/* * Copyright 2018-2023 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; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* An object representing a container instance or task attachment. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Attachment implements Serializable, Cloneable, StructuredPojo { /** ** The unique identifier for the attachment. *
*/ private String id; /** *
* The type of the attachment, such as ElasticNetworkInterface
.
*
* The status of the attachment. Valid values are PRECREATED
, CREATED
,
* ATTACHING
, ATTACHED
, DETACHING
, DETACHED
,
* DELETED
, and FAILED
.
*
* Details of the attachment. For elastic network interfaces, this includes the network interface ID, the MAC * address, the subnet ID, and the private IPv4 address. *
*/ private com.amazonaws.internal.SdkInternalList* The unique identifier for the attachment. *
* * @param id * The unique identifier for the attachment. */ public void setId(String id) { this.id = id; } /** ** The unique identifier for the attachment. *
* * @return The unique identifier for the attachment. */ public String getId() { return this.id; } /** ** The unique identifier for the attachment. *
* * @param id * The unique identifier for the attachment. * @return Returns a reference to this object so that method calls can be chained together. */ public Attachment withId(String id) { setId(id); return this; } /** *
* The type of the attachment, such as ElasticNetworkInterface
.
*
ElasticNetworkInterface
.
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The type of the attachment, such as ElasticNetworkInterface
.
*
ElasticNetworkInterface
.
*/
public String getType() {
return this.type;
}
/**
*
* The type of the attachment, such as ElasticNetworkInterface
.
*
ElasticNetworkInterface
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Attachment withType(String type) {
setType(type);
return this;
}
/**
*
* The status of the attachment. Valid values are PRECREATED
, CREATED
,
* ATTACHING
, ATTACHED
, DETACHING
, DETACHED
,
* DELETED
, and FAILED
.
*
PRECREATED
, CREATED
,
* ATTACHING
, ATTACHED
, DETACHING
, DETACHED
,
* DELETED
, and FAILED
.
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the attachment. Valid values are PRECREATED
, CREATED
,
* ATTACHING
, ATTACHED
, DETACHING
, DETACHED
,
* DELETED
, and FAILED
.
*
PRECREATED
, CREATED
,
* ATTACHING
, ATTACHED
, DETACHING
, DETACHED
,
* DELETED
, and FAILED
.
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the attachment. Valid values are PRECREATED
, CREATED
,
* ATTACHING
, ATTACHED
, DETACHING
, DETACHED
,
* DELETED
, and FAILED
.
*
PRECREATED
, CREATED
,
* ATTACHING
, ATTACHED
, DETACHING
, DETACHED
,
* DELETED
, and FAILED
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Attachment withStatus(String status) {
setStatus(status);
return this;
}
/**
* * Details of the attachment. For elastic network interfaces, this includes the network interface ID, the MAC * address, the subnet ID, and the private IPv4 address. *
* * @return Details of the attachment. For elastic network interfaces, this includes the network interface ID, the * MAC address, the subnet ID, and the private IPv4 address. */ public java.util.List* Details of the attachment. For elastic network interfaces, this includes the network interface ID, the MAC * address, the subnet ID, and the private IPv4 address. *
* * @param details * Details of the attachment. For elastic network interfaces, this includes the network interface ID, the MAC * address, the subnet ID, and the private IPv4 address. */ public void setDetails(java.util.Collection* Details of the attachment. For elastic network interfaces, this includes the network interface ID, the MAC * address, the subnet ID, and the private IPv4 address. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setDetails(java.util.Collection)} or {@link #withDetails(java.util.Collection)} if you want to override * the existing values. *
* * @param details * Details of the attachment. For elastic network interfaces, this includes the network interface ID, the MAC * address, the subnet ID, and the private IPv4 address. * @return Returns a reference to this object so that method calls can be chained together. */ public Attachment withDetails(KeyValuePair... details) { if (this.details == null) { setDetails(new com.amazonaws.internal.SdkInternalList* Details of the attachment. For elastic network interfaces, this includes the network interface ID, the MAC * address, the subnet ID, and the private IPv4 address. *
* * @param details * Details of the attachment. For elastic network interfaces, this includes the network interface ID, the MAC * address, the subnet ID, and the private IPv4 address. * @return Returns a reference to this object so that method calls can be chained together. */ public Attachment withDetails(java.util.Collection