
com.amazonaws.services.sagemaker.model.Image Maven / Gradle / Ivy
/*
* Copyright 2015-2020 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.sagemaker.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* A SageMaker image. A SageMaker image represents a set of container images that are derived from a common base
* container image. Each of these container images is represented by a SageMaker ImageVersion
.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Image implements Serializable, Cloneable, StructuredPojo {
/**
*
* When the image was created.
*
*/
private java.util.Date creationTime;
/**
*
* The description of the image.
*
*/
private String description;
/**
*
* The name of the image as displayed.
*
*/
private String displayName;
/**
*
* When a create, update, or delete operation fails, the reason for the failure.
*
*/
private String failureReason;
/**
*
* The Amazon Resource Name (ARN) of the image.
*
*/
private String imageArn;
/**
*
* The name of the image.
*
*/
private String imageName;
/**
*
* The status of the image.
*
*/
private String imageStatus;
/**
*
* When the image was last modified.
*
*/
private java.util.Date lastModifiedTime;
/**
*
* When the image was created.
*
*
* @param creationTime
* When the image was created.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* When the image was created.
*
*
* @return When the image was created.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* When the image was created.
*
*
* @param creationTime
* When the image was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Image withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* The description of the image.
*
*
* @param description
* The description of the image.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The description of the image.
*
*
* @return The description of the image.
*/
public String getDescription() {
return this.description;
}
/**
*
* The description of the image.
*
*
* @param description
* The description of the image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Image withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The name of the image as displayed.
*
*
* @param displayName
* The name of the image as displayed.
*/
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
/**
*
* The name of the image as displayed.
*
*
* @return The name of the image as displayed.
*/
public String getDisplayName() {
return this.displayName;
}
/**
*
* The name of the image as displayed.
*
*
* @param displayName
* The name of the image as displayed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Image withDisplayName(String displayName) {
setDisplayName(displayName);
return this;
}
/**
*
* When a create, update, or delete operation fails, the reason for the failure.
*
*
* @param failureReason
* When a create, update, or delete operation fails, the reason for the failure.
*/
public void setFailureReason(String failureReason) {
this.failureReason = failureReason;
}
/**
*
* When a create, update, or delete operation fails, the reason for the failure.
*
*
* @return When a create, update, or delete operation fails, the reason for the failure.
*/
public String getFailureReason() {
return this.failureReason;
}
/**
*
* When a create, update, or delete operation fails, the reason for the failure.
*
*
* @param failureReason
* When a create, update, or delete operation fails, the reason for the failure.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Image withFailureReason(String failureReason) {
setFailureReason(failureReason);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the image.
*
*
* @param imageArn
* The Amazon Resource Name (ARN) of the image.
*/
public void setImageArn(String imageArn) {
this.imageArn = imageArn;
}
/**
*
* The Amazon Resource Name (ARN) of the image.
*
*
* @return The Amazon Resource Name (ARN) of the image.
*/
public String getImageArn() {
return this.imageArn;
}
/**
*
* The Amazon Resource Name (ARN) of the image.
*
*
* @param imageArn
* The Amazon Resource Name (ARN) of the image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Image withImageArn(String imageArn) {
setImageArn(imageArn);
return this;
}
/**
*
* The name of the image.
*
*
* @param imageName
* The name of the image.
*/
public void setImageName(String imageName) {
this.imageName = imageName;
}
/**
*
* The name of the image.
*
*
* @return The name of the image.
*/
public String getImageName() {
return this.imageName;
}
/**
*
* The name of the image.
*
*
* @param imageName
* The name of the image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Image withImageName(String imageName) {
setImageName(imageName);
return this;
}
/**
*
* The status of the image.
*
*
* @param imageStatus
* The status of the image.
* @see ImageStatus
*/
public void setImageStatus(String imageStatus) {
this.imageStatus = imageStatus;
}
/**
*
* The status of the image.
*
*
* @return The status of the image.
* @see ImageStatus
*/
public String getImageStatus() {
return this.imageStatus;
}
/**
*
* The status of the image.
*
*
* @param imageStatus
* The status of the image.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ImageStatus
*/
public Image withImageStatus(String imageStatus) {
setImageStatus(imageStatus);
return this;
}
/**
*
* The status of the image.
*
*
* @param imageStatus
* The status of the image.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ImageStatus
*/
public Image withImageStatus(ImageStatus imageStatus) {
this.imageStatus = imageStatus.toString();
return this;
}
/**
*
* When the image was last modified.
*
*
* @param lastModifiedTime
* When the image was last modified.
*/
public void setLastModifiedTime(java.util.Date lastModifiedTime) {
this.lastModifiedTime = lastModifiedTime;
}
/**
*
* When the image was last modified.
*
*
* @return When the image was last modified.
*/
public java.util.Date getLastModifiedTime() {
return this.lastModifiedTime;
}
/**
*
* When the image was last modified.
*
*
* @param lastModifiedTime
* When the image was last modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Image withLastModifiedTime(java.util.Date lastModifiedTime) {
setLastModifiedTime(lastModifiedTime);
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 (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getDisplayName() != null)
sb.append("DisplayName: ").append(getDisplayName()).append(",");
if (getFailureReason() != null)
sb.append("FailureReason: ").append(getFailureReason()).append(",");
if (getImageArn() != null)
sb.append("ImageArn: ").append(getImageArn()).append(",");
if (getImageName() != null)
sb.append("ImageName: ").append(getImageName()).append(",");
if (getImageStatus() != null)
sb.append("ImageStatus: ").append(getImageStatus()).append(",");
if (getLastModifiedTime() != null)
sb.append("LastModifiedTime: ").append(getLastModifiedTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Image == false)
return false;
Image other = (Image) obj;
if (other.getCreationTime() == null ^ this.getCreationTime() == null)
return false;
if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getDisplayName() == null ^ this.getDisplayName() == null)
return false;
if (other.getDisplayName() != null && other.getDisplayName().equals(this.getDisplayName()) == false)
return false;
if (other.getFailureReason() == null ^ this.getFailureReason() == null)
return false;
if (other.getFailureReason() != null && other.getFailureReason().equals(this.getFailureReason()) == false)
return false;
if (other.getImageArn() == null ^ this.getImageArn() == null)
return false;
if (other.getImageArn() != null && other.getImageArn().equals(this.getImageArn()) == false)
return false;
if (other.getImageName() == null ^ this.getImageName() == null)
return false;
if (other.getImageName() != null && other.getImageName().equals(this.getImageName()) == false)
return false;
if (other.getImageStatus() == null ^ this.getImageStatus() == null)
return false;
if (other.getImageStatus() != null && other.getImageStatus().equals(this.getImageStatus()) == false)
return false;
if (other.getLastModifiedTime() == null ^ this.getLastModifiedTime() == null)
return false;
if (other.getLastModifiedTime() != null && other.getLastModifiedTime().equals(this.getLastModifiedTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getDisplayName() == null) ? 0 : getDisplayName().hashCode());
hashCode = prime * hashCode + ((getFailureReason() == null) ? 0 : getFailureReason().hashCode());
hashCode = prime * hashCode + ((getImageArn() == null) ? 0 : getImageArn().hashCode());
hashCode = prime * hashCode + ((getImageName() == null) ? 0 : getImageName().hashCode());
hashCode = prime * hashCode + ((getImageStatus() == null) ? 0 : getImageStatus().hashCode());
hashCode = prime * hashCode + ((getLastModifiedTime() == null) ? 0 : getLastModifiedTime().hashCode());
return hashCode;
}
@Override
public Image clone() {
try {
return (Image) 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.sagemaker.model.transform.ImageMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}