/* * 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.sagemaker.model; import java.io.Serializable; import javax.annotation.Generated; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DescribeImageResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* 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 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; /** *

* The ARN of the IAM role that enables Amazon SageMaker to perform tasks on your behalf. *

*/ private String roleArn; /** *

* 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 DescribeImageResult 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 DescribeImageResult 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 DescribeImageResult 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 DescribeImageResult withFailureReason(String failureReason) { setFailureReason(failureReason); return this; } /** *

* The ARN of the image. *

* * @param imageArn * The ARN of the image. */ public void setImageArn(String imageArn) { this.imageArn = imageArn; } /** *

* The ARN of the image. *

* * @return The ARN of the image. */ public String getImageArn() { return this.imageArn; } /** *

* The ARN of the image. *

* * @param imageArn * The ARN of the image. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeImageResult 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 DescribeImageResult 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 DescribeImageResult 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 DescribeImageResult 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 DescribeImageResult withLastModifiedTime(java.util.Date lastModifiedTime) { setLastModifiedTime(lastModifiedTime); return this; } /** *

* The ARN of the IAM role that enables Amazon SageMaker to perform tasks on your behalf. *

* * @param roleArn * The ARN of the IAM role that enables Amazon SageMaker to perform tasks on your behalf. */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** *

* The ARN of the IAM role that enables Amazon SageMaker to perform tasks on your behalf. *

* * @return The ARN of the IAM role that enables Amazon SageMaker to perform tasks on your behalf. */ public String getRoleArn() { return this.roleArn; } /** *

* The ARN of the IAM role that enables Amazon SageMaker to perform tasks on your behalf. *

* * @param roleArn * The ARN of the IAM role that enables Amazon SageMaker to perform tasks on your behalf. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeImageResult withRoleArn(String roleArn) { setRoleArn(roleArn); 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()).append(","); if (getRoleArn() != null) sb.append("RoleArn: ").append(getRoleArn()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeImageResult == false) return false; DescribeImageResult other = (DescribeImageResult) 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; if (other.getRoleArn() == null ^ this.getRoleArn() == null) return false; if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == 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()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); return hashCode; } @Override public DescribeImageResult clone() { try { return (DescribeImageResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }