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.ecs.model;
 
 
Container for the parameters to the SubmitContainerStateChange operation.

NOTE: This action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.

Sent to acknowledge that a container changed states.

 
 public class SubmitContainerStateChangeRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container.
 
     private String cluster;

    
The task UUID or full Amazon Resource Name (ARN) of the task that hosts the container.
 
     private String task;

    
The name of the container.
 
     private String containerName;

    
The status of the state change request.
 
     private String status;

    
The exit code returned for the state change request.
 
     private Integer exitCode;

    
The reason for the state change request.
 
     private String reason;

    
The network bindings of the container.
 
The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container.

Returns:
The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container.
 
     public String getCluster() {
         return ;
     }
    
    
The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container.

Parameters:
cluster The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container.
 
     public void setCluster(String cluster) {
         this. = cluster;
     }
    
    
The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container.

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

Parameters:
cluster The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = cluster;
        return this;
    }

    
The task UUID or full Amazon Resource Name (ARN) of the task that hosts the container.

Returns:
The task UUID or full Amazon Resource Name (ARN) of the task that hosts the container.
    public String getTask() {
        return ;
    }
    
    
The task UUID or full Amazon Resource Name (ARN) of the task that hosts the container.

Parameters:
task The task UUID or full Amazon Resource Name (ARN) of the task that hosts the container.
    public void setTask(String task) {
        this. = task;
    }
    
    
The task UUID or full Amazon Resource Name (ARN) of the task that hosts the container.

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

Parameters:
task The task UUID or full Amazon Resource Name (ARN) of the task that hosts the container.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = task;
        return this;
    }

    
The name of the container.

Returns:
The name of the container.
    public String getContainerName() {
        return ;
    }
    
    
The name of the container.

Parameters:
containerName The name of the container.
    public void setContainerName(String containerName) {
        this. = containerName;
    }
    
    
The name of the container.

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

Parameters:
containerName The name of the container.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = containerName;
        return this;
    }

    
The status of the state change request.

Returns:
The status of the state change request.
    public String getStatus() {
        return ;
    }
    
    
The status of the state change request.

Parameters:
status The status of the state change request.
    public void setStatus(String status) {
        this. = status;
    }
    
    
The status of the state change request.

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

Parameters:
status The status of the state change request.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = status;
        return this;
    }

    
The exit code returned for the state change request.

Returns:
The exit code returned for the state change request.
    public Integer getExitCode() {
        return ;
    }
    
    
The exit code returned for the state change request.

Parameters:
exitCode The exit code returned for the state change request.
    public void setExitCode(Integer exitCode) {
        this. = exitCode;
    }
    
    
The exit code returned for the state change request.

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

Parameters:
exitCode The exit code returned for the state change request.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = exitCode;
        return this;
    }

    
The reason for the state change request.

Returns:
The reason for the state change request.
    public String getReason() {
        return ;
    }
    
    
The reason for the state change request.

Parameters:
reason The reason for the state change request.
    public void setReason(String reason) {
        this. = reason;
    }
    
    
The reason for the state change request.

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

Parameters:
reason The reason for the state change request.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = reason;
        return this;
    }

    
The network bindings of the container.

Returns:
The network bindings of the container.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The network bindings of the container.

Parameters:
networkBindings The network bindings of the container.
    public void setNetworkBindings(java.util.Collection<NetworkBindingnetworkBindings) {
        if (networkBindings == null) {
            this. = null;
            return;
        }
        networkBindingsCopy.addAll(networkBindings);
        this. = networkBindingsCopy;
    }
    
    
The network bindings of the container.

NOTE: This method appends the values to the existing list (if any). Use setNetworkBindings(java.util.Collection) or withNetworkBindings(java.util.Collection) if you want to override the existing values.

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

Parameters:
networkBindings The network bindings of the container.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (getNetworkBindings() == nullsetNetworkBindings(new java.util.ArrayList<NetworkBinding>(networkBindings.length));
        for (NetworkBinding value : networkBindings) {
            getNetworkBindings().add(value);
        }
        return this;
    }
    
    
The network bindings of the container.

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

Parameters:
networkBindings The network bindings of the container.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (networkBindings == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<NetworkBindingnetworkBindingsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<NetworkBinding>(networkBindings.size());
            networkBindingsCopy.addAll(networkBindings);
            this. = networkBindingsCopy;
        }
        return this;
    }

    
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 (getCluster() != nullsb.append("Cluster: " + getCluster() + ",");
        if (getTask() != nullsb.append("Task: " + getTask() + ",");
        if (getContainerName() != nullsb.append("ContainerName: " + getContainerName() + ",");
        if (getStatus() != nullsb.append("Status: " + getStatus() + ",");
        if (getExitCode() != nullsb.append("ExitCode: " + getExitCode() + ",");
        if (getReason() != nullsb.append("Reason: " + getReason() + ",");
        if (getNetworkBindings() != nullsb.append("NetworkBindings: " + getNetworkBindings() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getCluster() == null) ? 0 : getCluster().hashCode()); 
        hashCode = prime * hashCode + ((getTask() == null) ? 0 : getTask().hashCode()); 
        hashCode = prime * hashCode + ((getContainerName() == null) ? 0 : getContainerName().hashCode()); 
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        hashCode = prime * hashCode + ((getExitCode() == null) ? 0 : getExitCode().hashCode()); 
        hashCode = prime * hashCode + ((getReason() == null) ? 0 : getReason().hashCode()); 
        hashCode = prime * hashCode + ((getNetworkBindings() == null) ? 0 : getNetworkBindings().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof SubmitContainerStateChangeRequest == falsereturn false;
        
        if (other.getCluster() == null ^ this.getCluster() == nullreturn false;
        if (other.getCluster() != null && other.getCluster().equals(this.getCluster()) == falsereturn false
        if (other.getTask() == null ^ this.getTask() == nullreturn false;
        if (other.getTask() != null && other.getTask().equals(this.getTask()) == falsereturn false
        if (other.getContainerName() == null ^ this.getContainerName() == nullreturn false;
        if (other.getContainerName() != null && other.getContainerName().equals(this.getContainerName()) == falsereturn false
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        if (other.getExitCode() == null ^ this.getExitCode() == nullreturn false;
        if (other.getExitCode() != null && other.getExitCode().equals(this.getExitCode()) == falsereturn false
        if (other.getReason() == null ^ this.getReason() == nullreturn false;
        if (other.getReason() != null && other.getReason().equals(this.getReason()) == falsereturn false
        if (other.getNetworkBindings() == null ^ this.getNetworkBindings() == nullreturn false;
        if (other.getNetworkBindings() != null && other.getNetworkBindings().equals(this.getNetworkBindings()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (SubmitContainerStateChangeRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X