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

com.amazonaws.services.batch.model.AttemptDetail 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 a job attempt. *

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

* The details for the container in this job attempt. *

*/ private AttemptContainerDetail container; /** *

* The Unix timestamp (in milliseconds) for when the attempt was started (when the attempt transitioned from the * STARTING state to the RUNNING state). *

*/ private Long startedAt; /** *

* The Unix timestamp (in milliseconds) for when the attempt was stopped (when the attempt transitioned from the * RUNNING state to a terminal state, such as SUCCEEDED or FAILED). *

*/ private Long stoppedAt; /** *

* A short, human-readable string to provide additional details for the current status of the job attempt. *

*/ private String statusReason; /** *

* The properties for a task definition that describes the container and volume definitions of an Amazon ECS task. *

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

* The details for the container in this job attempt. *

* * @param container * The details for the container in this job attempt. */ public void setContainer(AttemptContainerDetail container) { this.container = container; } /** *

* The details for the container in this job attempt. *

* * @return The details for the container in this job attempt. */ public AttemptContainerDetail getContainer() { return this.container; } /** *

* The details for the container in this job attempt. *

* * @param container * The details for the container in this job attempt. * @return Returns a reference to this object so that method calls can be chained together. */ public AttemptDetail withContainer(AttemptContainerDetail container) { setContainer(container); return this; } /** *

* The Unix timestamp (in milliseconds) for when the attempt was started (when the attempt transitioned from the * STARTING state to the RUNNING state). *

* * @param startedAt * The Unix timestamp (in milliseconds) for when the attempt was started (when the attempt transitioned from * the STARTING state to the RUNNING state). */ public void setStartedAt(Long startedAt) { this.startedAt = startedAt; } /** *

* The Unix timestamp (in milliseconds) for when the attempt was started (when the attempt transitioned from the * STARTING state to the RUNNING state). *

* * @return The Unix timestamp (in milliseconds) for when the attempt was started (when the attempt transitioned from * the STARTING state to the RUNNING state). */ public Long getStartedAt() { return this.startedAt; } /** *

* The Unix timestamp (in milliseconds) for when the attempt was started (when the attempt transitioned from the * STARTING state to the RUNNING state). *

* * @param startedAt * The Unix timestamp (in milliseconds) for when the attempt was started (when the attempt transitioned from * the STARTING state to the RUNNING state). * @return Returns a reference to this object so that method calls can be chained together. */ public AttemptDetail withStartedAt(Long startedAt) { setStartedAt(startedAt); return this; } /** *

* The Unix timestamp (in milliseconds) for when the attempt was stopped (when the attempt transitioned from the * RUNNING state to a terminal state, such as SUCCEEDED or FAILED). *

* * @param stoppedAt * The Unix timestamp (in milliseconds) for when the attempt was stopped (when the attempt transitioned from * the RUNNING state to a terminal state, such as SUCCEEDED or FAILED * ). */ public void setStoppedAt(Long stoppedAt) { this.stoppedAt = stoppedAt; } /** *

* The Unix timestamp (in milliseconds) for when the attempt was stopped (when the attempt transitioned from the * RUNNING state to a terminal state, such as SUCCEEDED or FAILED). *

* * @return The Unix timestamp (in milliseconds) for when the attempt was stopped (when the attempt transitioned from * the RUNNING state to a terminal state, such as SUCCEEDED or FAILED * ). */ public Long getStoppedAt() { return this.stoppedAt; } /** *

* The Unix timestamp (in milliseconds) for when the attempt was stopped (when the attempt transitioned from the * RUNNING state to a terminal state, such as SUCCEEDED or FAILED). *

* * @param stoppedAt * The Unix timestamp (in milliseconds) for when the attempt was stopped (when the attempt transitioned from * the RUNNING state to a terminal state, such as SUCCEEDED or FAILED * ). * @return Returns a reference to this object so that method calls can be chained together. */ public AttemptDetail withStoppedAt(Long stoppedAt) { setStoppedAt(stoppedAt); return this; } /** *

* A short, human-readable string to provide additional details for the current status of the job attempt. *

* * @param statusReason * A short, human-readable string to provide additional details for the current status of the job attempt. */ public void setStatusReason(String statusReason) { this.statusReason = statusReason; } /** *

* A short, human-readable string to provide additional details for the current status of the job attempt. *

* * @return A short, human-readable string to provide additional details for the current status of the job attempt. */ public String getStatusReason() { return this.statusReason; } /** *

* A short, human-readable string to provide additional details for the current status of the job attempt. *

* * @param statusReason * A short, human-readable string to provide additional details for the current status of the job attempt. * @return Returns a reference to this object so that method calls can be chained together. */ public AttemptDetail withStatusReason(String statusReason) { setStatusReason(statusReason); return this; } /** *

* The properties for a task definition that describes the container and volume definitions of an Amazon ECS task. *

* * @return The properties for a task definition that describes the container and volume definitions of an Amazon ECS * task. */ public java.util.List getTaskProperties() { return taskProperties; } /** *

* The properties for a task definition that describes the container and volume definitions of an Amazon ECS task. *

* * @param taskProperties * The properties for a task definition that describes the container and volume definitions of an Amazon ECS * task. */ public void setTaskProperties(java.util.Collection taskProperties) { if (taskProperties == null) { this.taskProperties = null; return; } this.taskProperties = new java.util.ArrayList(taskProperties); } /** *

* The properties for a task definition that describes the container and volume definitions of an Amazon ECS task. *

*

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

* * @param taskProperties * The properties for a task definition that describes the container and volume definitions of an Amazon ECS * task. * @return Returns a reference to this object so that method calls can be chained together. */ public AttemptDetail withTaskProperties(AttemptEcsTaskDetails... taskProperties) { if (this.taskProperties == null) { setTaskProperties(new java.util.ArrayList(taskProperties.length)); } for (AttemptEcsTaskDetails ele : taskProperties) { this.taskProperties.add(ele); } return this; } /** *

* The properties for a task definition that describes the container and volume definitions of an Amazon ECS task. *

* * @param taskProperties * The properties for a task definition that describes the container and volume definitions of an Amazon ECS * task. * @return Returns a reference to this object so that method calls can be chained together. */ public AttemptDetail withTaskProperties(java.util.Collection taskProperties) { setTaskProperties(taskProperties); 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 (getContainer() != null) sb.append("Container: ").append(getContainer()).append(","); if (getStartedAt() != null) sb.append("StartedAt: ").append(getStartedAt()).append(","); if (getStoppedAt() != null) sb.append("StoppedAt: ").append(getStoppedAt()).append(","); if (getStatusReason() != null) sb.append("StatusReason: ").append(getStatusReason()).append(","); if (getTaskProperties() != null) sb.append("TaskProperties: ").append(getTaskProperties()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AttemptDetail == false) return false; AttemptDetail other = (AttemptDetail) obj; if (other.getContainer() == null ^ this.getContainer() == null) return false; if (other.getContainer() != null && other.getContainer().equals(this.getContainer()) == false) return false; if (other.getStartedAt() == null ^ this.getStartedAt() == null) return false; if (other.getStartedAt() != null && other.getStartedAt().equals(this.getStartedAt()) == false) return false; if (other.getStoppedAt() == null ^ this.getStoppedAt() == null) return false; if (other.getStoppedAt() != null && other.getStoppedAt().equals(this.getStoppedAt()) == false) return false; if (other.getStatusReason() == null ^ this.getStatusReason() == null) return false; if (other.getStatusReason() != null && other.getStatusReason().equals(this.getStatusReason()) == false) return false; if (other.getTaskProperties() == null ^ this.getTaskProperties() == null) return false; if (other.getTaskProperties() != null && other.getTaskProperties().equals(this.getTaskProperties()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getContainer() == null) ? 0 : getContainer().hashCode()); hashCode = prime * hashCode + ((getStartedAt() == null) ? 0 : getStartedAt().hashCode()); hashCode = prime * hashCode + ((getStoppedAt() == null) ? 0 : getStoppedAt().hashCode()); hashCode = prime * hashCode + ((getStatusReason() == null) ? 0 : getStatusReason().hashCode()); hashCode = prime * hashCode + ((getTaskProperties() == null) ? 0 : getTaskProperties().hashCode()); return hashCode; } @Override public AttemptDetail clone() { try { return (AttemptDetail) 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.AttemptDetailMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy