Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.opsworks.model;
 

The Shutdown event configuration.

 
 public class ShutdownEventConfiguration implements SerializableCloneable {

    
The time, in seconds, that AWS OpsWorks will wait after triggering a Shutdown event before shutting down an instance.
 
     private Integer executionTimeout;

    
Whether to enable Elastic Load Balancing connection draining. For more information, see Connection Draining
 
     private Boolean delayUntilElbConnectionsDrained;

    
The time, in seconds, that AWS OpsWorks will wait after triggering a Shutdown event before shutting down an instance.

Returns:
The time, in seconds, that AWS OpsWorks will wait after triggering a Shutdown event before shutting down an instance.
 
     public Integer getExecutionTimeout() {
         return ;
     }
    
    
The time, in seconds, that AWS OpsWorks will wait after triggering a Shutdown event before shutting down an instance.

Parameters:
executionTimeout The time, in seconds, that AWS OpsWorks will wait after triggering a Shutdown event before shutting down an instance.
 
     public void setExecutionTimeout(Integer executionTimeout) {
         this. = executionTimeout;
     }
    
    
The time, in seconds, that AWS OpsWorks will wait after triggering a Shutdown event before shutting down an instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
executionTimeout The time, in seconds, that AWS OpsWorks will wait after triggering a Shutdown event before shutting down an instance.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ShutdownEventConfiguration withExecutionTimeout(Integer executionTimeout) {
         this. = executionTimeout;
         return this;
     }

    
Whether to enable Elastic Load Balancing connection draining. For more information, see Connection Draining

Returns:
Whether to enable Elastic Load Balancing connection draining. For more information, see Connection Draining
 
         return ;
     }
    
    
Whether to enable Elastic Load Balancing connection draining. For more information, see Connection Draining

Parameters:
delayUntilElbConnectionsDrained Whether to enable Elastic Load Balancing connection draining. For more information, see Connection Draining
    public void setDelayUntilElbConnectionsDrained(Boolean delayUntilElbConnectionsDrained) {
        this. = delayUntilElbConnectionsDrained;
    }
    
    
Whether to enable Elastic Load Balancing connection draining. For more information, see Connection Draining

Returns a reference to this object so that method calls can be chained together.

Parameters:
delayUntilElbConnectionsDrained Whether to enable Elastic Load Balancing connection draining. For more information, see Connection Draining
Returns:
A reference to this updated object so that method calls can be chained together.
    public ShutdownEventConfiguration withDelayUntilElbConnectionsDrained(Boolean delayUntilElbConnectionsDrained) {
        this. = delayUntilElbConnectionsDrained;
        return this;
    }

    
Whether to enable Elastic Load Balancing connection draining. For more information, see Connection Draining

Returns:
Whether to enable Elastic Load Balancing connection draining. For more information, see Connection Draining
        return ;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getExecutionTimeout() != nullsb.append("ExecutionTimeout: " + getExecutionTimeout() + ",");
        if (isDelayUntilElbConnectionsDrained() != nullsb.append("DelayUntilElbConnectionsDrained: " + isDelayUntilElbConnectionsDrained() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getExecutionTimeout() == null) ? 0 : getExecutionTimeout().hashCode()); 
        hashCode = prime * hashCode + ((isDelayUntilElbConnectionsDrained() == null) ? 0 : isDelayUntilElbConnectionsDrained().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ShutdownEventConfiguration == falsereturn false;
        
        if (other.getExecutionTimeout() == null ^ this.getExecutionTimeout() == nullreturn false;
        if (other.getExecutionTimeout() != null && other.getExecutionTimeout().equals(this.getExecutionTimeout()) == falsereturn false
        if (other.isDelayUntilElbConnectionsDrained() == null ^ this.isDelayUntilElbConnectionsDrained() == nullreturn false;
        if (other.isDelayUntilElbConnectionsDrained() != null && other.isDelayUntilElbConnectionsDrained().equals(this.isDelayUntilElbConnectionsDrained()) == falsereturn false
        return true;
    }
    
    @Override
    public ShutdownEventConfiguration clone() {
        try {
            return (ShutdownEventConfigurationsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X