All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.batch.model.AttemptEcsTaskDetails Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Batch module holds the client classes that are used for communicating with AWS Batch.

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2019-2024 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.batch.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* An object that represents the details of a task. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AttemptEcsTaskDetails implements Serializable, Cloneable, StructuredPojo { /** *

* The Amazon Resource Name (ARN) of the container instance that hosts the task. *

*/ private String containerInstanceArn; /** *

* The ARN of the Amazon ECS task. *

*/ private String taskArn; /** *

* A list of containers that are included in the taskProperties list. *

*/ private java.util.List containers; /** *

* The Amazon Resource Name (ARN) of the container instance that hosts the task. *

* * @param containerInstanceArn * The Amazon Resource Name (ARN) of the container instance that hosts the task. */ public void setContainerInstanceArn(String containerInstanceArn) { this.containerInstanceArn = containerInstanceArn; } /** *

* The Amazon Resource Name (ARN) of the container instance that hosts the task. *

* * @return The Amazon Resource Name (ARN) of the container instance that hosts the task. */ public String getContainerInstanceArn() { return this.containerInstanceArn; } /** *

* The Amazon Resource Name (ARN) of the container instance that hosts the task. *

* * @param containerInstanceArn * The Amazon Resource Name (ARN) of the container instance that hosts the task. * @return Returns a reference to this object so that method calls can be chained together. */ public AttemptEcsTaskDetails withContainerInstanceArn(String containerInstanceArn) { setContainerInstanceArn(containerInstanceArn); return this; } /** *

* The ARN of the Amazon ECS task. *

* * @param taskArn * The ARN of the Amazon ECS task. */ public void setTaskArn(String taskArn) { this.taskArn = taskArn; } /** *

* The ARN of the Amazon ECS task. *

* * @return The ARN of the Amazon ECS task. */ public String getTaskArn() { return this.taskArn; } /** *

* The ARN of the Amazon ECS task. *

* * @param taskArn * The ARN of the Amazon ECS task. * @return Returns a reference to this object so that method calls can be chained together. */ public AttemptEcsTaskDetails withTaskArn(String taskArn) { setTaskArn(taskArn); return this; } /** *

* A list of containers that are included in the taskProperties list. *

* * @return A list of containers that are included in the taskProperties list. */ public java.util.List getContainers() { return containers; } /** *

* A list of containers that are included in the taskProperties list. *

* * @param containers * A list of containers that are included in the taskProperties list. */ public void setContainers(java.util.Collection containers) { if (containers == null) { this.containers = null; return; } this.containers = new java.util.ArrayList(containers); } /** *

* A list of containers that are included in the taskProperties list. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setContainers(java.util.Collection)} or {@link #withContainers(java.util.Collection)} if you want to * override the existing values. *

* * @param containers * A list of containers that are included in the taskProperties list. * @return Returns a reference to this object so that method calls can be chained together. */ public AttemptEcsTaskDetails withContainers(AttemptTaskContainerDetails... containers) { if (this.containers == null) { setContainers(new java.util.ArrayList(containers.length)); } for (AttemptTaskContainerDetails ele : containers) { this.containers.add(ele); } return this; } /** *

* A list of containers that are included in the taskProperties list. *

* * @param containers * A list of containers that are included in the taskProperties list. * @return Returns a reference to this object so that method calls can be chained together. */ public AttemptEcsTaskDetails withContainers(java.util.Collection containers) { setContainers(containers); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getContainerInstanceArn() != null) sb.append("ContainerInstanceArn: ").append(getContainerInstanceArn()).append(","); if (getTaskArn() != null) sb.append("TaskArn: ").append(getTaskArn()).append(","); if (getContainers() != null) sb.append("Containers: ").append(getContainers()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AttemptEcsTaskDetails == false) return false; AttemptEcsTaskDetails other = (AttemptEcsTaskDetails) obj; if (other.getContainerInstanceArn() == null ^ this.getContainerInstanceArn() == null) return false; if (other.getContainerInstanceArn() != null && other.getContainerInstanceArn().equals(this.getContainerInstanceArn()) == false) return false; if (other.getTaskArn() == null ^ this.getTaskArn() == null) return false; if (other.getTaskArn() != null && other.getTaskArn().equals(this.getTaskArn()) == false) return false; if (other.getContainers() == null ^ this.getContainers() == null) return false; if (other.getContainers() != null && other.getContainers().equals(this.getContainers()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getContainerInstanceArn() == null) ? 0 : getContainerInstanceArn().hashCode()); hashCode = prime * hashCode + ((getTaskArn() == null) ? 0 : getTaskArn().hashCode()); hashCode = prime * hashCode + ((getContainers() == null) ? 0 : getContainers().hashCode()); return hashCode; } @Override public AttemptEcsTaskDetails clone() { try { return (AttemptEcsTaskDetails) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.batch.model.transform.AttemptEcsTaskDetailsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy