com.amazonaws.services.robomaker.model.WorldGenerationJobSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-robomaker Show documentation
/*
* 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.robomaker.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about a world generator job.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class WorldGenerationJobSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Resource Name (ARN) of the world generator job.
*
*/
private String arn;
/**
*
* The Amazon Resource Name (arn) of the world template.
*
*/
private String template;
/**
*
* The time, in milliseconds since the epoch, when the world generator job was created.
*
*/
private java.util.Date createdAt;
/**
*
* The status of the world generator job:
*
*
* - Pending
* -
*
* The world generator job request is pending.
*
*
* - Running
* -
*
* The world generator job is running.
*
*
* - Completed
* -
*
* The world generator job completed.
*
*
* - Failed
* -
*
* The world generator job failed. See failureCode
for more information.
*
*
* - PartialFailed
* -
*
* Some worlds did not generate.
*
*
* - Canceled
* -
*
* The world generator job was cancelled.
*
*
* - Canceling
* -
*
* The world generator job is being cancelled.
*
*
*
*/
private String status;
/**
*
* Information about the world count.
*
*/
private WorldCount worldCount;
/**
*
* The number of worlds that were generated.
*
*/
private Integer succeededWorldCount;
/**
*
* The number of worlds that failed.
*
*/
private Integer failedWorldCount;
/**
*
* The Amazon Resource Name (ARN) of the world generator job.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the world generator job.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The Amazon Resource Name (ARN) of the world generator job.
*
*
* @return The Amazon Resource Name (ARN) of the world generator job.
*/
public String getArn() {
return this.arn;
}
/**
*
* The Amazon Resource Name (ARN) of the world generator job.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the world generator job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorldGenerationJobSummary withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The Amazon Resource Name (arn) of the world template.
*
*
* @param template
* The Amazon Resource Name (arn) of the world template.
*/
public void setTemplate(String template) {
this.template = template;
}
/**
*
* The Amazon Resource Name (arn) of the world template.
*
*
* @return The Amazon Resource Name (arn) of the world template.
*/
public String getTemplate() {
return this.template;
}
/**
*
* The Amazon Resource Name (arn) of the world template.
*
*
* @param template
* The Amazon Resource Name (arn) of the world template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorldGenerationJobSummary withTemplate(String template) {
setTemplate(template);
return this;
}
/**
*
* The time, in milliseconds since the epoch, when the world generator job was created.
*
*
* @param createdAt
* The time, in milliseconds since the epoch, when the world generator job was created.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The time, in milliseconds since the epoch, when the world generator job was created.
*
*
* @return The time, in milliseconds since the epoch, when the world generator job was created.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The time, in milliseconds since the epoch, when the world generator job was created.
*
*
* @param createdAt
* The time, in milliseconds since the epoch, when the world generator job was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorldGenerationJobSummary withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The status of the world generator job:
*
*
* - Pending
* -
*
* The world generator job request is pending.
*
*
* - Running
* -
*
* The world generator job is running.
*
*
* - Completed
* -
*
* The world generator job completed.
*
*
* - Failed
* -
*
* The world generator job failed. See failureCode
for more information.
*
*
* - PartialFailed
* -
*
* Some worlds did not generate.
*
*
* - Canceled
* -
*
* The world generator job was cancelled.
*
*
* - Canceling
* -
*
* The world generator job is being cancelled.
*
*
*
*
* @param status
* The status of the world generator job:
*
* - Pending
* -
*
* The world generator job request is pending.
*
*
* - Running
* -
*
* The world generator job is running.
*
*
* - Completed
* -
*
* The world generator job completed.
*
*
* - Failed
* -
*
* The world generator job failed. See failureCode
for more information.
*
*
* - PartialFailed
* -
*
* Some worlds did not generate.
*
*
* - Canceled
* -
*
* The world generator job was cancelled.
*
*
* - Canceling
* -
*
* The world generator job is being cancelled.
*
*
* @see WorldGenerationJobStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the world generator job:
*
*
* - Pending
* -
*
* The world generator job request is pending.
*
*
* - Running
* -
*
* The world generator job is running.
*
*
* - Completed
* -
*
* The world generator job completed.
*
*
* - Failed
* -
*
* The world generator job failed. See failureCode
for more information.
*
*
* - PartialFailed
* -
*
* Some worlds did not generate.
*
*
* - Canceled
* -
*
* The world generator job was cancelled.
*
*
* - Canceling
* -
*
* The world generator job is being cancelled.
*
*
*
*
* @return The status of the world generator job:
*
* - Pending
* -
*
* The world generator job request is pending.
*
*
* - Running
* -
*
* The world generator job is running.
*
*
* - Completed
* -
*
* The world generator job completed.
*
*
* - Failed
* -
*
* The world generator job failed. See failureCode
for more information.
*
*
* - PartialFailed
* -
*
* Some worlds did not generate.
*
*
* - Canceled
* -
*
* The world generator job was cancelled.
*
*
* - Canceling
* -
*
* The world generator job is being cancelled.
*
*
* @see WorldGenerationJobStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the world generator job:
*
*
* - Pending
* -
*
* The world generator job request is pending.
*
*
* - Running
* -
*
* The world generator job is running.
*
*
* - Completed
* -
*
* The world generator job completed.
*
*
* - Failed
* -
*
* The world generator job failed. See failureCode
for more information.
*
*
* - PartialFailed
* -
*
* Some worlds did not generate.
*
*
* - Canceled
* -
*
* The world generator job was cancelled.
*
*
* - Canceling
* -
*
* The world generator job is being cancelled.
*
*
*
*
* @param status
* The status of the world generator job:
*
* - Pending
* -
*
* The world generator job request is pending.
*
*
* - Running
* -
*
* The world generator job is running.
*
*
* - Completed
* -
*
* The world generator job completed.
*
*
* - Failed
* -
*
* The world generator job failed. See failureCode
for more information.
*
*
* - PartialFailed
* -
*
* Some worlds did not generate.
*
*
* - Canceled
* -
*
* The world generator job was cancelled.
*
*
* - Canceling
* -
*
* The world generator job is being cancelled.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see WorldGenerationJobStatus
*/
public WorldGenerationJobSummary withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the world generator job:
*
*
* - Pending
* -
*
* The world generator job request is pending.
*
*
* - Running
* -
*
* The world generator job is running.
*
*
* - Completed
* -
*
* The world generator job completed.
*
*
* - Failed
* -
*
* The world generator job failed. See failureCode
for more information.
*
*
* - PartialFailed
* -
*
* Some worlds did not generate.
*
*
* - Canceled
* -
*
* The world generator job was cancelled.
*
*
* - Canceling
* -
*
* The world generator job is being cancelled.
*
*
*
*
* @param status
* The status of the world generator job:
*
* - Pending
* -
*
* The world generator job request is pending.
*
*
* - Running
* -
*
* The world generator job is running.
*
*
* - Completed
* -
*
* The world generator job completed.
*
*
* - Failed
* -
*
* The world generator job failed. See failureCode
for more information.
*
*
* - PartialFailed
* -
*
* Some worlds did not generate.
*
*
* - Canceled
* -
*
* The world generator job was cancelled.
*
*
* - Canceling
* -
*
* The world generator job is being cancelled.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see WorldGenerationJobStatus
*/
public WorldGenerationJobSummary withStatus(WorldGenerationJobStatus status) {
this.status = status.toString();
return this;
}
/**
*
* Information about the world count.
*
*
* @param worldCount
* Information about the world count.
*/
public void setWorldCount(WorldCount worldCount) {
this.worldCount = worldCount;
}
/**
*
* Information about the world count.
*
*
* @return Information about the world count.
*/
public WorldCount getWorldCount() {
return this.worldCount;
}
/**
*
* Information about the world count.
*
*
* @param worldCount
* Information about the world count.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorldGenerationJobSummary withWorldCount(WorldCount worldCount) {
setWorldCount(worldCount);
return this;
}
/**
*
* The number of worlds that were generated.
*
*
* @param succeededWorldCount
* The number of worlds that were generated.
*/
public void setSucceededWorldCount(Integer succeededWorldCount) {
this.succeededWorldCount = succeededWorldCount;
}
/**
*
* The number of worlds that were generated.
*
*
* @return The number of worlds that were generated.
*/
public Integer getSucceededWorldCount() {
return this.succeededWorldCount;
}
/**
*
* The number of worlds that were generated.
*
*
* @param succeededWorldCount
* The number of worlds that were generated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorldGenerationJobSummary withSucceededWorldCount(Integer succeededWorldCount) {
setSucceededWorldCount(succeededWorldCount);
return this;
}
/**
*
* The number of worlds that failed.
*
*
* @param failedWorldCount
* The number of worlds that failed.
*/
public void setFailedWorldCount(Integer failedWorldCount) {
this.failedWorldCount = failedWorldCount;
}
/**
*
* The number of worlds that failed.
*
*
* @return The number of worlds that failed.
*/
public Integer getFailedWorldCount() {
return this.failedWorldCount;
}
/**
*
* The number of worlds that failed.
*
*
* @param failedWorldCount
* The number of worlds that failed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorldGenerationJobSummary withFailedWorldCount(Integer failedWorldCount) {
setFailedWorldCount(failedWorldCount);
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 (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getTemplate() != null)
sb.append("Template: ").append(getTemplate()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getWorldCount() != null)
sb.append("WorldCount: ").append(getWorldCount()).append(",");
if (getSucceededWorldCount() != null)
sb.append("SucceededWorldCount: ").append(getSucceededWorldCount()).append(",");
if (getFailedWorldCount() != null)
sb.append("FailedWorldCount: ").append(getFailedWorldCount());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof WorldGenerationJobSummary == false)
return false;
WorldGenerationJobSummary other = (WorldGenerationJobSummary) obj;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getTemplate() == null ^ this.getTemplate() == null)
return false;
if (other.getTemplate() != null && other.getTemplate().equals(this.getTemplate()) == false)
return false;
if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getWorldCount() == null ^ this.getWorldCount() == null)
return false;
if (other.getWorldCount() != null && other.getWorldCount().equals(this.getWorldCount()) == false)
return false;
if (other.getSucceededWorldCount() == null ^ this.getSucceededWorldCount() == null)
return false;
if (other.getSucceededWorldCount() != null && other.getSucceededWorldCount().equals(this.getSucceededWorldCount()) == false)
return false;
if (other.getFailedWorldCount() == null ^ this.getFailedWorldCount() == null)
return false;
if (other.getFailedWorldCount() != null && other.getFailedWorldCount().equals(this.getFailedWorldCount()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getTemplate() == null) ? 0 : getTemplate().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getWorldCount() == null) ? 0 : getWorldCount().hashCode());
hashCode = prime * hashCode + ((getSucceededWorldCount() == null) ? 0 : getSucceededWorldCount().hashCode());
hashCode = prime * hashCode + ((getFailedWorldCount() == null) ? 0 : getFailedWorldCount().hashCode());
return hashCode;
}
@Override
public WorldGenerationJobSummary clone() {
try {
return (WorldGenerationJobSummary) 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.robomaker.model.transform.WorldGenerationJobSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}