com.amazonaws.services.robomaker.model.CreateRobotApplicationVersionRequest Maven / Gradle / Ivy
/*
* 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 CreateRobotApplicationVersionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The application information for the robot application.
*
*/
private String application;
/**
*
* The current revision id for the robot application. If you provide a value and it matches the latest revision ID,
* a new version will be created.
*
*/
private String currentRevisionId;
/**
*
* The Amazon S3 identifier for the zip file bundle that you use for your robot application.
*
*/
private java.util.List s3Etags;
/**
*
* A SHA256 identifier for the Docker image that you use for your robot application.
*
*/
private String imageDigest;
/**
*
* The application information for the robot application.
*
*
* @param application
* The application information for the robot application.
*/
public void setApplication(String application) {
this.application = application;
}
/**
*
* The application information for the robot application.
*
*
* @return The application information for the robot application.
*/
public String getApplication() {
return this.application;
}
/**
*
* The application information for the robot application.
*
*
* @param application
* The application information for the robot application.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateRobotApplicationVersionRequest withApplication(String application) {
setApplication(application);
return this;
}
/**
*
* The current revision id for the robot application. If you provide a value and it matches the latest revision ID,
* a new version will be created.
*
*
* @param currentRevisionId
* The current revision id for the robot application. If you provide a value and it matches the latest
* revision ID, a new version will be created.
*/
public void setCurrentRevisionId(String currentRevisionId) {
this.currentRevisionId = currentRevisionId;
}
/**
*
* The current revision id for the robot application. If you provide a value and it matches the latest revision ID,
* a new version will be created.
*
*
* @return The current revision id for the robot application. If you provide a value and it matches the latest
* revision ID, a new version will be created.
*/
public String getCurrentRevisionId() {
return this.currentRevisionId;
}
/**
*
* The current revision id for the robot application. If you provide a value and it matches the latest revision ID,
* a new version will be created.
*
*
* @param currentRevisionId
* The current revision id for the robot application. If you provide a value and it matches the latest
* revision ID, a new version will be created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateRobotApplicationVersionRequest withCurrentRevisionId(String currentRevisionId) {
setCurrentRevisionId(currentRevisionId);
return this;
}
/**
*
* The Amazon S3 identifier for the zip file bundle that you use for your robot application.
*
*
* @return The Amazon S3 identifier for the zip file bundle that you use for your robot application.
*/
public java.util.List getS3Etags() {
return s3Etags;
}
/**
*
* The Amazon S3 identifier for the zip file bundle that you use for your robot application.
*
*
* @param s3Etags
* The Amazon S3 identifier for the zip file bundle that you use for your robot application.
*/
public void setS3Etags(java.util.Collection s3Etags) {
if (s3Etags == null) {
this.s3Etags = null;
return;
}
this.s3Etags = new java.util.ArrayList(s3Etags);
}
/**
*
* The Amazon S3 identifier for the zip file bundle that you use for your robot application.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setS3Etags(java.util.Collection)} or {@link #withS3Etags(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param s3Etags
* The Amazon S3 identifier for the zip file bundle that you use for your robot application.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateRobotApplicationVersionRequest withS3Etags(String... s3Etags) {
if (this.s3Etags == null) {
setS3Etags(new java.util.ArrayList(s3Etags.length));
}
for (String ele : s3Etags) {
this.s3Etags.add(ele);
}
return this;
}
/**
*
* The Amazon S3 identifier for the zip file bundle that you use for your robot application.
*
*
* @param s3Etags
* The Amazon S3 identifier for the zip file bundle that you use for your robot application.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateRobotApplicationVersionRequest withS3Etags(java.util.Collection s3Etags) {
setS3Etags(s3Etags);
return this;
}
/**
*
* A SHA256 identifier for the Docker image that you use for your robot application.
*
*
* @param imageDigest
* A SHA256 identifier for the Docker image that you use for your robot application.
*/
public void setImageDigest(String imageDigest) {
this.imageDigest = imageDigest;
}
/**
*
* A SHA256 identifier for the Docker image that you use for your robot application.
*
*
* @return A SHA256 identifier for the Docker image that you use for your robot application.
*/
public String getImageDigest() {
return this.imageDigest;
}
/**
*
* A SHA256 identifier for the Docker image that you use for your robot application.
*
*
* @param imageDigest
* A SHA256 identifier for the Docker image that you use for your robot application.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateRobotApplicationVersionRequest withImageDigest(String imageDigest) {
setImageDigest(imageDigest);
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 (getApplication() != null)
sb.append("Application: ").append(getApplication()).append(",");
if (getCurrentRevisionId() != null)
sb.append("CurrentRevisionId: ").append(getCurrentRevisionId()).append(",");
if (getS3Etags() != null)
sb.append("S3Etags: ").append(getS3Etags()).append(",");
if (getImageDigest() != null)
sb.append("ImageDigest: ").append(getImageDigest());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateRobotApplicationVersionRequest == false)
return false;
CreateRobotApplicationVersionRequest other = (CreateRobotApplicationVersionRequest) obj;
if (other.getApplication() == null ^ this.getApplication() == null)
return false;
if (other.getApplication() != null && other.getApplication().equals(this.getApplication()) == false)
return false;
if (other.getCurrentRevisionId() == null ^ this.getCurrentRevisionId() == null)
return false;
if (other.getCurrentRevisionId() != null && other.getCurrentRevisionId().equals(this.getCurrentRevisionId()) == false)
return false;
if (other.getS3Etags() == null ^ this.getS3Etags() == null)
return false;
if (other.getS3Etags() != null && other.getS3Etags().equals(this.getS3Etags()) == false)
return false;
if (other.getImageDigest() == null ^ this.getImageDigest() == null)
return false;
if (other.getImageDigest() != null && other.getImageDigest().equals(this.getImageDigest()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getApplication() == null) ? 0 : getApplication().hashCode());
hashCode = prime * hashCode + ((getCurrentRevisionId() == null) ? 0 : getCurrentRevisionId().hashCode());
hashCode = prime * hashCode + ((getS3Etags() == null) ? 0 : getS3Etags().hashCode());
hashCode = prime * hashCode + ((getImageDigest() == null) ? 0 : getImageDigest().hashCode());
return hashCode;
}
@Override
public CreateRobotApplicationVersionRequest clone() {
return (CreateRobotApplicationVersionRequest) super.clone();
}
}