com.amazonaws.services.appstream.model.CopyImageRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-appstream Show documentation
/*
* Copyright 2018-2023 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.appstream.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 CopyImageRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of the image to copy.
*
*/
private String sourceImageName;
/**
*
* The name that the image will have when it is copied to the destination.
*
*/
private String destinationImageName;
/**
*
* The destination region to which the image will be copied. This parameter is required, even if you are copying an
* image within the same region.
*
*/
private String destinationRegion;
/**
*
* The description that the image will have when it is copied to the destination.
*
*/
private String destinationImageDescription;
/**
*
* The name of the image to copy.
*
*
* @param sourceImageName
* The name of the image to copy.
*/
public void setSourceImageName(String sourceImageName) {
this.sourceImageName = sourceImageName;
}
/**
*
* The name of the image to copy.
*
*
* @return The name of the image to copy.
*/
public String getSourceImageName() {
return this.sourceImageName;
}
/**
*
* The name of the image to copy.
*
*
* @param sourceImageName
* The name of the image to copy.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CopyImageRequest withSourceImageName(String sourceImageName) {
setSourceImageName(sourceImageName);
return this;
}
/**
*
* The name that the image will have when it is copied to the destination.
*
*
* @param destinationImageName
* The name that the image will have when it is copied to the destination.
*/
public void setDestinationImageName(String destinationImageName) {
this.destinationImageName = destinationImageName;
}
/**
*
* The name that the image will have when it is copied to the destination.
*
*
* @return The name that the image will have when it is copied to the destination.
*/
public String getDestinationImageName() {
return this.destinationImageName;
}
/**
*
* The name that the image will have when it is copied to the destination.
*
*
* @param destinationImageName
* The name that the image will have when it is copied to the destination.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CopyImageRequest withDestinationImageName(String destinationImageName) {
setDestinationImageName(destinationImageName);
return this;
}
/**
*
* The destination region to which the image will be copied. This parameter is required, even if you are copying an
* image within the same region.
*
*
* @param destinationRegion
* The destination region to which the image will be copied. This parameter is required, even if you are
* copying an image within the same region.
*/
public void setDestinationRegion(String destinationRegion) {
this.destinationRegion = destinationRegion;
}
/**
*
* The destination region to which the image will be copied. This parameter is required, even if you are copying an
* image within the same region.
*
*
* @return The destination region to which the image will be copied. This parameter is required, even if you are
* copying an image within the same region.
*/
public String getDestinationRegion() {
return this.destinationRegion;
}
/**
*
* The destination region to which the image will be copied. This parameter is required, even if you are copying an
* image within the same region.
*
*
* @param destinationRegion
* The destination region to which the image will be copied. This parameter is required, even if you are
* copying an image within the same region.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CopyImageRequest withDestinationRegion(String destinationRegion) {
setDestinationRegion(destinationRegion);
return this;
}
/**
*
* The description that the image will have when it is copied to the destination.
*
*
* @param destinationImageDescription
* The description that the image will have when it is copied to the destination.
*/
public void setDestinationImageDescription(String destinationImageDescription) {
this.destinationImageDescription = destinationImageDescription;
}
/**
*
* The description that the image will have when it is copied to the destination.
*
*
* @return The description that the image will have when it is copied to the destination.
*/
public String getDestinationImageDescription() {
return this.destinationImageDescription;
}
/**
*
* The description that the image will have when it is copied to the destination.
*
*
* @param destinationImageDescription
* The description that the image will have when it is copied to the destination.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CopyImageRequest withDestinationImageDescription(String destinationImageDescription) {
setDestinationImageDescription(destinationImageDescription);
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 (getSourceImageName() != null)
sb.append("SourceImageName: ").append(getSourceImageName()).append(",");
if (getDestinationImageName() != null)
sb.append("DestinationImageName: ").append(getDestinationImageName()).append(",");
if (getDestinationRegion() != null)
sb.append("DestinationRegion: ").append(getDestinationRegion()).append(",");
if (getDestinationImageDescription() != null)
sb.append("DestinationImageDescription: ").append(getDestinationImageDescription());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CopyImageRequest == false)
return false;
CopyImageRequest other = (CopyImageRequest) obj;
if (other.getSourceImageName() == null ^ this.getSourceImageName() == null)
return false;
if (other.getSourceImageName() != null && other.getSourceImageName().equals(this.getSourceImageName()) == false)
return false;
if (other.getDestinationImageName() == null ^ this.getDestinationImageName() == null)
return false;
if (other.getDestinationImageName() != null && other.getDestinationImageName().equals(this.getDestinationImageName()) == false)
return false;
if (other.getDestinationRegion() == null ^ this.getDestinationRegion() == null)
return false;
if (other.getDestinationRegion() != null && other.getDestinationRegion().equals(this.getDestinationRegion()) == false)
return false;
if (other.getDestinationImageDescription() == null ^ this.getDestinationImageDescription() == null)
return false;
if (other.getDestinationImageDescription() != null && other.getDestinationImageDescription().equals(this.getDestinationImageDescription()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getSourceImageName() == null) ? 0 : getSourceImageName().hashCode());
hashCode = prime * hashCode + ((getDestinationImageName() == null) ? 0 : getDestinationImageName().hashCode());
hashCode = prime * hashCode + ((getDestinationRegion() == null) ? 0 : getDestinationRegion().hashCode());
hashCode = prime * hashCode + ((getDestinationImageDescription() == null) ? 0 : getDestinationImageDescription().hashCode());
return hashCode;
}
@Override
public CopyImageRequest clone() {
return (CopyImageRequest) super.clone();
}
}