/* * 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.securityhub.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Provides details about a task in a cluster. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AwsEcsTaskDetails implements Serializable, Cloneable, StructuredPojo { /** ** The Amazon Resource Name (ARN) of the cluster that hosts the task. *
*/ private String clusterArn; /** ** The ARN of the task definition that creates the task. *
*/ private String taskDefinitionArn; /** ** The version counter for the task. *
*/ private String version; /** *
* The Unix timestamp for the time when the task was created. More specifically, it's for the time when the task
* entered the PENDING
state.
*
* The Unix timestamp for the time when the task started. More specifically, it's for the time when the task
* transitioned from the PENDING
state to the RUNNING
state.
*
* The tag specified when a task is started. If an Amazon ECS service started the task, the startedBy
* parameter contains the deployment ID of that service.
*
* The name of the task group that's associated with the task. *
*/ private String group; /** ** Details about the data volume that is used in a task definition. *
*/ private java.util.List* The containers that are associated with the task. *
*/ private java.util.List* The Amazon Resource Name (ARN) of the cluster that hosts the task. *
* * @param clusterArn * The Amazon Resource Name (ARN) of the cluster that hosts the task. */ public void setClusterArn(String clusterArn) { this.clusterArn = clusterArn; } /** ** The Amazon Resource Name (ARN) of the cluster that hosts the task. *
* * @return The Amazon Resource Name (ARN) of the cluster that hosts the task. */ public String getClusterArn() { return this.clusterArn; } /** ** The Amazon Resource Name (ARN) of the cluster that hosts the task. *
* * @param clusterArn * The Amazon Resource Name (ARN) of the cluster that hosts the task. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDetails withClusterArn(String clusterArn) { setClusterArn(clusterArn); return this; } /** ** The ARN of the task definition that creates the task. *
* * @param taskDefinitionArn * The ARN of the task definition that creates the task. */ public void setTaskDefinitionArn(String taskDefinitionArn) { this.taskDefinitionArn = taskDefinitionArn; } /** ** The ARN of the task definition that creates the task. *
* * @return The ARN of the task definition that creates the task. */ public String getTaskDefinitionArn() { return this.taskDefinitionArn; } /** ** The ARN of the task definition that creates the task. *
* * @param taskDefinitionArn * The ARN of the task definition that creates the task. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDetails withTaskDefinitionArn(String taskDefinitionArn) { setTaskDefinitionArn(taskDefinitionArn); return this; } /** ** The version counter for the task. *
* * @param version * The version counter for the task. */ public void setVersion(String version) { this.version = version; } /** ** The version counter for the task. *
* * @return The version counter for the task. */ public String getVersion() { return this.version; } /** ** The version counter for the task. *
* * @param version * The version counter for the task. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDetails withVersion(String version) { setVersion(version); return this; } /** *
* The Unix timestamp for the time when the task was created. More specifically, it's for the time when the task
* entered the PENDING
state.
*
PENDING
state.
*/
public void setCreatedAt(String createdAt) {
this.createdAt = createdAt;
}
/**
*
* The Unix timestamp for the time when the task was created. More specifically, it's for the time when the task
* entered the PENDING
state.
*
PENDING
state.
*/
public String getCreatedAt() {
return this.createdAt;
}
/**
*
* The Unix timestamp for the time when the task was created. More specifically, it's for the time when the task
* entered the PENDING
state.
*
PENDING
state.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEcsTaskDetails withCreatedAt(String createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The Unix timestamp for the time when the task started. More specifically, it's for the time when the task
* transitioned from the PENDING
state to the RUNNING
state.
*
PENDING
state to the RUNNING
state.
*/
public void setStartedAt(String startedAt) {
this.startedAt = startedAt;
}
/**
*
* The Unix timestamp for the time when the task started. More specifically, it's for the time when the task
* transitioned from the PENDING
state to the RUNNING
state.
*
PENDING
state to the RUNNING
state.
*/
public String getStartedAt() {
return this.startedAt;
}
/**
*
* The Unix timestamp for the time when the task started. More specifically, it's for the time when the task
* transitioned from the PENDING
state to the RUNNING
state.
*
PENDING
state to the RUNNING
state.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEcsTaskDetails withStartedAt(String startedAt) {
setStartedAt(startedAt);
return this;
}
/**
*
* The tag specified when a task is started. If an Amazon ECS service started the task, the startedBy
* parameter contains the deployment ID of that service.
*
startedBy
parameter contains the deployment ID of that service.
*/
public void setStartedBy(String startedBy) {
this.startedBy = startedBy;
}
/**
*
* The tag specified when a task is started. If an Amazon ECS service started the task, the startedBy
* parameter contains the deployment ID of that service.
*
startedBy
parameter contains the deployment ID of that service.
*/
public String getStartedBy() {
return this.startedBy;
}
/**
*
* The tag specified when a task is started. If an Amazon ECS service started the task, the startedBy
* parameter contains the deployment ID of that service.
*
startedBy
parameter contains the deployment ID of that service.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEcsTaskDetails withStartedBy(String startedBy) {
setStartedBy(startedBy);
return this;
}
/**
* * The name of the task group that's associated with the task. *
* * @param group * The name of the task group that's associated with the task. */ public void setGroup(String group) { this.group = group; } /** ** The name of the task group that's associated with the task. *
* * @return The name of the task group that's associated with the task. */ public String getGroup() { return this.group; } /** ** The name of the task group that's associated with the task. *
* * @param group * The name of the task group that's associated with the task. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDetails withGroup(String group) { setGroup(group); return this; } /** ** Details about the data volume that is used in a task definition. *
* * @return Details about the data volume that is used in a task definition. */ public java.util.List* Details about the data volume that is used in a task definition. *
* * @param volumes * Details about the data volume that is used in a task definition. */ public void setVolumes(java.util.Collection* Details about the data volume that is used in a task definition. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setVolumes(java.util.Collection)} or {@link #withVolumes(java.util.Collection)} if you want to override * the existing values. *
* * @param volumes * Details about the data volume that is used in a task definition. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDetails withVolumes(AwsEcsTaskVolumeDetails... volumes) { if (this.volumes == null) { setVolumes(new java.util.ArrayList* Details about the data volume that is used in a task definition. *
* * @param volumes * Details about the data volume that is used in a task definition. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDetails withVolumes(java.util.Collection* The containers that are associated with the task. *
* * @return The containers that are associated with the task. */ public java.util.List* The containers that are associated with the task. *
* * @param containers * The containers that are associated with the task. */ public void setContainers(java.util.Collection* The containers that are associated with the task. *
** 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 * The containers that are associated with the task. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDetails withContainers(AwsEcsContainerDetails... containers) { if (this.containers == null) { setContainers(new java.util.ArrayList* The containers that are associated with the task. *
* * @param containers * The containers that are associated with the task. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDetails withContainers(java.util.Collection