com.amazonaws.services.robomaker.model.CreateWorldGenerationJobRequest 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.AmazonWebServiceRequest;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateWorldGenerationJobRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* 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 describing the worlds you want to create.
*
*/
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;
/**
*
* 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 CreateWorldGenerationJobRequest withClientRequestToken(String clientRequestToken) {
setClientRequestToken(clientRequestToken);
return this;
}
/**
*
* The Amazon Resource Name (arn) of the world template describing the worlds you want to create.
*
*
* @param template
* The Amazon Resource Name (arn) of the world template describing the worlds you want to create.
*/
public void setTemplate(String template) {
this.template = template;
}
/**
*
* The Amazon Resource Name (arn) of the world template describing the worlds you want to create.
*
*
* @return The Amazon Resource Name (arn) of the world template describing the worlds you want to create.
*/
public String getTemplate() {
return this.template;
}
/**
*
* The Amazon Resource Name (arn) of the world template describing the worlds you want to create.
*
*
* @param template
* The Amazon Resource Name (arn) of the world template describing the worlds you want to create.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateWorldGenerationJobRequest 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 CreateWorldGenerationJobRequest 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 CreateWorldGenerationJobRequest withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see CreateWorldGenerationJobRequest#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public CreateWorldGenerationJobRequest 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 CreateWorldGenerationJobRequest 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 CreateWorldGenerationJobRequest withWorldTags(java.util.Map worldTags) {
setWorldTags(worldTags);
return this;
}
/**
* Add a single WorldTags entry
*
* @see CreateWorldGenerationJobRequest#withWorldTags
* @returns a reference to this object so that method calls can be chained together.
*/
public CreateWorldGenerationJobRequest 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 CreateWorldGenerationJobRequest 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 (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 CreateWorldGenerationJobRequest == false)
return false;
CreateWorldGenerationJobRequest other = (CreateWorldGenerationJobRequest) obj;
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 + ((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 CreateWorldGenerationJobRequest clone() {
return (CreateWorldGenerationJobRequest) super.clone();
}
}