com.amazonaws.services.robomaker.model.CreateWorldGenerationJobResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-robomaker Show documentation
/*
* Copyright 2016-2021 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;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateWorldGenerationJobResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The Amazon Resource Name (ARN) of the world generator job.
*
*/
private String arn;
/**
*
* 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;
/**
*
* The time, in milliseconds since the epoch, when the world generator job was created.
*
*/
private java.util.Date createdAt;
/**
*
* The failure code of the world generator job if it failed:
*
*
* - InternalServiceError
* -
*
* Internal service error.
*
*
* - LimitExceeded
* -
*
* The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds
* the maximum number allowed.
*
*
* - ResourceNotFound
* -
*
* The specified resource could not be found.
*
*
* - RequestThrottled
* -
*
* The request was throttled.
*
*
* - InvalidInput
* -
*
* An input parameter in the request is not valid.
*
*
*
*/
private String failureCode;
/**
*
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
*
*/
private String clientRequestToken;
/**
*
* The Amazon Resource Name (arn) of the world template.
*
*/
private String template;
/**
*
* Information about the world count.
*
*/
private WorldCount worldCount;
/**
*
* A map that contains tag keys and tag values that are attached to the world generator job.
*
*/
private java.util.Map tags;
/**
*
* A map that contains tag keys and tag values that are attached to the generated worlds.
*
*/
private java.util.Map worldTags;
/**
*
* 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 CreateWorldGenerationJobResult withArn(String arn) {
setArn(arn);
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 CreateWorldGenerationJobResult 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 CreateWorldGenerationJobResult withStatus(WorldGenerationJobStatus status) {
this.status = status.toString();
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 CreateWorldGenerationJobResult withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The failure code of the world generator job if it failed:
*
*
* - InternalServiceError
* -
*
* Internal service error.
*
*
* - LimitExceeded
* -
*
* The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds
* the maximum number allowed.
*
*
* - ResourceNotFound
* -
*
* The specified resource could not be found.
*
*
* - RequestThrottled
* -
*
* The request was throttled.
*
*
* - InvalidInput
* -
*
* An input parameter in the request is not valid.
*
*
*
*
* @param failureCode
* The failure code of the world generator job if it failed:
*
* - InternalServiceError
* -
*
* Internal service error.
*
*
* - LimitExceeded
* -
*
* The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests
* exceeds the maximum number allowed.
*
*
* - ResourceNotFound
* -
*
* The specified resource could not be found.
*
*
* - RequestThrottled
* -
*
* The request was throttled.
*
*
* - InvalidInput
* -
*
* An input parameter in the request is not valid.
*
*
* @see WorldGenerationJobErrorCode
*/
public void setFailureCode(String failureCode) {
this.failureCode = failureCode;
}
/**
*
* The failure code of the world generator job if it failed:
*
*
* - InternalServiceError
* -
*
* Internal service error.
*
*
* - LimitExceeded
* -
*
* The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds
* the maximum number allowed.
*
*
* - ResourceNotFound
* -
*
* The specified resource could not be found.
*
*
* - RequestThrottled
* -
*
* The request was throttled.
*
*
* - InvalidInput
* -
*
* An input parameter in the request is not valid.
*
*
*
*
* @return The failure code of the world generator job if it failed:
*
* - InternalServiceError
* -
*
* Internal service error.
*
*
* - LimitExceeded
* -
*
* The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests
* exceeds the maximum number allowed.
*
*
* - ResourceNotFound
* -
*
* The specified resource could not be found.
*
*
* - RequestThrottled
* -
*
* The request was throttled.
*
*
* - InvalidInput
* -
*
* An input parameter in the request is not valid.
*
*
* @see WorldGenerationJobErrorCode
*/
public String getFailureCode() {
return this.failureCode;
}
/**
*
* The failure code of the world generator job if it failed:
*
*
* - InternalServiceError
* -
*
* Internal service error.
*
*
* - LimitExceeded
* -
*
* The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds
* the maximum number allowed.
*
*
* - ResourceNotFound
* -
*
* The specified resource could not be found.
*
*
* - RequestThrottled
* -
*
* The request was throttled.
*
*
* - InvalidInput
* -
*
* An input parameter in the request is not valid.
*
*
*
*
* @param failureCode
* The failure code of the world generator job if it failed:
*
* - InternalServiceError
* -
*
* Internal service error.
*
*
* - LimitExceeded
* -
*
* The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests
* exceeds the maximum number allowed.
*
*
* - ResourceNotFound
* -
*
* The specified resource could not be found.
*
*
* - RequestThrottled
* -
*
* The request was throttled.
*
*
* - InvalidInput
* -
*
* An input parameter in the request is not valid.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see WorldGenerationJobErrorCode
*/
public CreateWorldGenerationJobResult withFailureCode(String failureCode) {
setFailureCode(failureCode);
return this;
}
/**
*
* The failure code of the world generator job if it failed:
*
*
* - InternalServiceError
* -
*
* Internal service error.
*
*
* - LimitExceeded
* -
*
* The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds
* the maximum number allowed.
*
*
* - ResourceNotFound
* -
*
* The specified resource could not be found.
*
*
* - RequestThrottled
* -
*
* The request was throttled.
*
*
* - InvalidInput
* -
*
* An input parameter in the request is not valid.
*
*
*
*
* @param failureCode
* The failure code of the world generator job if it failed:
*
* - InternalServiceError
* -
*
* Internal service error.
*
*
* - LimitExceeded
* -
*
* The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests
* exceeds the maximum number allowed.
*
*
* - ResourceNotFound
* -
*
* The specified resource could not be found.
*
*
* - RequestThrottled
* -
*
* The request was throttled.
*
*
* - InvalidInput
* -
*
* An input parameter in the request is not valid.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see WorldGenerationJobErrorCode
*/
public CreateWorldGenerationJobResult withFailureCode(WorldGenerationJobErrorCode failureCode) {
this.failureCode = failureCode.toString();
return this;
}
/**
*
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
*
*
* @param clientRequestToken
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
*/
public void setClientRequestToken(String clientRequestToken) {
this.clientRequestToken = clientRequestToken;
}
/**
*
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
*
*
* @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
*/
public String getClientRequestToken() {
return this.clientRequestToken;
}
/**
*
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
*
*
* @param clientRequestToken
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateWorldGenerationJobResult withClientRequestToken(String clientRequestToken) {
setClientRequestToken(clientRequestToken);
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 CreateWorldGenerationJobResult withTemplate(String template) {
setTemplate(template);
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 CreateWorldGenerationJobResult withWorldCount(WorldCount worldCount) {
setWorldCount(worldCount);
return this;
}
/**
*
* A map that contains tag keys and tag values that are attached to the world generator job.
*
*
* @return A map that contains tag keys and tag values that are attached to the world generator job.
*/
public java.util.Map getTags() {
return tags;
}
/**
*
* A map that contains tag keys and tag values that are attached to the world generator job.
*
*
* @param tags
* A map that contains tag keys and tag values that are attached to the world generator job.
*/
public void setTags(java.util.Map tags) {
this.tags = tags;
}
/**
*
* A map that contains tag keys and tag values that are attached to the world generator job.
*
*
* @param tags
* A map that contains tag keys and tag values that are attached to the world generator job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateWorldGenerationJobResult withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see CreateWorldGenerationJobResult#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public CreateWorldGenerationJobResult addTagsEntry(String key, String value) {
if (null == this.tags) {
this.tags = new java.util.HashMap();
}
if (this.tags.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.tags.put(key, value);
return this;
}
/**
* Removes all the entries added into Tags.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateWorldGenerationJobResult clearTagsEntries() {
this.tags = null;
return this;
}
/**
*
* A map that contains tag keys and tag values that are attached to the generated worlds.
*
*
* @return A map that contains tag keys and tag values that are attached to the generated worlds.
*/
public java.util.Map getWorldTags() {
return worldTags;
}
/**
*
* A map that contains tag keys and tag values that are attached to the generated worlds.
*
*
* @param worldTags
* A map that contains tag keys and tag values that are attached to the generated worlds.
*/
public void setWorldTags(java.util.Map worldTags) {
this.worldTags = worldTags;
}
/**
*
* A map that contains tag keys and tag values that are attached to the generated worlds.
*
*
* @param worldTags
* A map that contains tag keys and tag values that are attached to the generated worlds.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateWorldGenerationJobResult withWorldTags(java.util.Map worldTags) {
setWorldTags(worldTags);
return this;
}
/**
* Add a single WorldTags entry
*
* @see CreateWorldGenerationJobResult#withWorldTags
* @returns a reference to this object so that method calls can be chained together.
*/
public CreateWorldGenerationJobResult addWorldTagsEntry(String key, String value) {
if (null == this.worldTags) {
this.worldTags = new java.util.HashMap();
}
if (this.worldTags.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.worldTags.put(key, value);
return this;
}
/**
* Removes all the entries added into WorldTags.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateWorldGenerationJobResult clearWorldTagsEntries() {
this.worldTags = null;
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 (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getFailureCode() != null)
sb.append("FailureCode: ").append(getFailureCode()).append(",");
if (getClientRequestToken() != null)
sb.append("ClientRequestToken: ").append(getClientRequestToken()).append(",");
if (getTemplate() != null)
sb.append("Template: ").append(getTemplate()).append(",");
if (getWorldCount() != null)
sb.append("WorldCount: ").append(getWorldCount()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getWorldTags() != null)
sb.append("WorldTags: ").append(getWorldTags());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateWorldGenerationJobResult == false)
return false;
CreateWorldGenerationJobResult other = (CreateWorldGenerationJobResult) obj;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == 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.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false)
return false;
if (other.getFailureCode() == null ^ this.getFailureCode() == null)
return false;
if (other.getFailureCode() != null && other.getFailureCode().equals(this.getFailureCode()) == false)
return false;
if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null)
return false;
if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == 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.getWorldCount() == null ^ this.getWorldCount() == null)
return false;
if (other.getWorldCount() != null && other.getWorldCount().equals(this.getWorldCount()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getWorldTags() == null ^ this.getWorldTags() == null)
return false;
if (other.getWorldTags() != null && other.getWorldTags().equals(this.getWorldTags()) == 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 + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getFailureCode() == null) ? 0 : getFailureCode().hashCode());
hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode());
hashCode = prime * hashCode + ((getTemplate() == null) ? 0 : getTemplate().hashCode());
hashCode = prime * hashCode + ((getWorldCount() == null) ? 0 : getWorldCount().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getWorldTags() == null) ? 0 : getWorldTags().hashCode());
return hashCode;
}
@Override
public CreateWorldGenerationJobResult clone() {
try {
return (CreateWorldGenerationJobResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}