/* * 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.computeoptimizer.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Describes a recommendation export job. *
** Use the DescribeRecommendationExportJobs action to view your recommendation export jobs. *
** Use the ExportAutoScalingGroupRecommendations or ExportEC2InstanceRecommendations actions to request an * export of your recommendations. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RecommendationExportJob implements Serializable, Cloneable, StructuredPojo { /** ** The identification number of the export job. *
*/ private String jobId; /** ** An object that describes the destination of the export file. *
*/ private ExportDestination destination; /** ** The resource type of the exported recommendations. *
*/ private String resourceType; /** ** The status of the export job. *
*/ private String status; /** ** The timestamp of when the export job was created. *
*/ private java.util.Date creationTimestamp; /** ** The timestamp of when the export job was last updated. *
*/ private java.util.Date lastUpdatedTimestamp; /** ** The reason for an export job failure. *
*/ private String failureReason; /** ** The identification number of the export job. *
* * @param jobId * The identification number of the export job. */ public void setJobId(String jobId) { this.jobId = jobId; } /** ** The identification number of the export job. *
* * @return The identification number of the export job. */ public String getJobId() { return this.jobId; } /** ** The identification number of the export job. *
* * @param jobId * The identification number of the export job. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationExportJob withJobId(String jobId) { setJobId(jobId); return this; } /** ** An object that describes the destination of the export file. *
* * @param destination * An object that describes the destination of the export file. */ public void setDestination(ExportDestination destination) { this.destination = destination; } /** ** An object that describes the destination of the export file. *
* * @return An object that describes the destination of the export file. */ public ExportDestination getDestination() { return this.destination; } /** ** An object that describes the destination of the export file. *
* * @param destination * An object that describes the destination of the export file. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationExportJob withDestination(ExportDestination destination) { setDestination(destination); return this; } /** ** The resource type of the exported recommendations. *
* * @param resourceType * The resource type of the exported recommendations. * @see ResourceType */ public void setResourceType(String resourceType) { this.resourceType = resourceType; } /** ** The resource type of the exported recommendations. *
* * @return The resource type of the exported recommendations. * @see ResourceType */ public String getResourceType() { return this.resourceType; } /** ** The resource type of the exported recommendations. *
* * @param resourceType * The resource type of the exported recommendations. * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceType */ public RecommendationExportJob withResourceType(String resourceType) { setResourceType(resourceType); return this; } /** ** The resource type of the exported recommendations. *
* * @param resourceType * The resource type of the exported recommendations. * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceType */ public RecommendationExportJob withResourceType(ResourceType resourceType) { this.resourceType = resourceType.toString(); return this; } /** ** The status of the export job. *
* * @param status * The status of the export job. * @see JobStatus */ public void setStatus(String status) { this.status = status; } /** ** The status of the export job. *
* * @return The status of the export job. * @see JobStatus */ public String getStatus() { return this.status; } /** ** The status of the export job. *
* * @param status * The status of the export job. * @return Returns a reference to this object so that method calls can be chained together. * @see JobStatus */ public RecommendationExportJob withStatus(String status) { setStatus(status); return this; } /** ** The status of the export job. *
* * @param status * The status of the export job. * @return Returns a reference to this object so that method calls can be chained together. * @see JobStatus */ public RecommendationExportJob withStatus(JobStatus status) { this.status = status.toString(); return this; } /** ** The timestamp of when the export job was created. *
* * @param creationTimestamp * The timestamp of when the export job was created. */ public void setCreationTimestamp(java.util.Date creationTimestamp) { this.creationTimestamp = creationTimestamp; } /** ** The timestamp of when the export job was created. *
* * @return The timestamp of when the export job was created. */ public java.util.Date getCreationTimestamp() { return this.creationTimestamp; } /** ** The timestamp of when the export job was created. *
* * @param creationTimestamp * The timestamp of when the export job was created. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationExportJob withCreationTimestamp(java.util.Date creationTimestamp) { setCreationTimestamp(creationTimestamp); return this; } /** ** The timestamp of when the export job was last updated. *
* * @param lastUpdatedTimestamp * The timestamp of when the export job was last updated. */ public void setLastUpdatedTimestamp(java.util.Date lastUpdatedTimestamp) { this.lastUpdatedTimestamp = lastUpdatedTimestamp; } /** ** The timestamp of when the export job was last updated. *
* * @return The timestamp of when the export job was last updated. */ public java.util.Date getLastUpdatedTimestamp() { return this.lastUpdatedTimestamp; } /** ** The timestamp of when the export job was last updated. *
* * @param lastUpdatedTimestamp * The timestamp of when the export job was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationExportJob withLastUpdatedTimestamp(java.util.Date lastUpdatedTimestamp) { setLastUpdatedTimestamp(lastUpdatedTimestamp); return this; } /** ** The reason for an export job failure. *
* * @param failureReason * The reason for an export job failure. */ public void setFailureReason(String failureReason) { this.failureReason = failureReason; } /** ** The reason for an export job failure. *
* * @return The reason for an export job failure. */ public String getFailureReason() { return this.failureReason; } /** ** The reason for an export job failure. *
* * @param failureReason * The reason for an export job failure. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationExportJob withFailureReason(String failureReason) { setFailureReason(failureReason); 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 (getJobId() != null) sb.append("JobId: ").append(getJobId()).append(","); if (getDestination() != null) sb.append("Destination: ").append(getDestination()).append(","); if (getResourceType() != null) sb.append("ResourceType: ").append(getResourceType()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getCreationTimestamp() != null) sb.append("CreationTimestamp: ").append(getCreationTimestamp()).append(","); if (getLastUpdatedTimestamp() != null) sb.append("LastUpdatedTimestamp: ").append(getLastUpdatedTimestamp()).append(","); if (getFailureReason() != null) sb.append("FailureReason: ").append(getFailureReason()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RecommendationExportJob == false) return false; RecommendationExportJob other = (RecommendationExportJob) obj; if (other.getJobId() == null ^ this.getJobId() == null) return false; if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == false) return false; if (other.getDestination() == null ^ this.getDestination() == null) return false; if (other.getDestination() != null && other.getDestination().equals(this.getDestination()) == false) return false; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getCreationTimestamp() == null ^ this.getCreationTimestamp() == null) return false; if (other.getCreationTimestamp() != null && other.getCreationTimestamp().equals(this.getCreationTimestamp()) == false) return false; if (other.getLastUpdatedTimestamp() == null ^ this.getLastUpdatedTimestamp() == null) return false; if (other.getLastUpdatedTimestamp() != null && other.getLastUpdatedTimestamp().equals(this.getLastUpdatedTimestamp()) == false) return false; if (other.getFailureReason() == null ^ this.getFailureReason() == null) return false; if (other.getFailureReason() != null && other.getFailureReason().equals(this.getFailureReason()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getJobId() == null) ? 0 : getJobId().hashCode()); hashCode = prime * hashCode + ((getDestination() == null) ? 0 : getDestination().hashCode()); hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getCreationTimestamp() == null) ? 0 : getCreationTimestamp().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedTimestamp() == null) ? 0 : getLastUpdatedTimestamp().hashCode()); hashCode = prime * hashCode + ((getFailureReason() == null) ? 0 : getFailureReason().hashCode()); return hashCode; } @Override public RecommendationExportJob clone() { try { return (RecommendationExportJob) 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.computeoptimizer.model.transform.RecommendationExportJobMarshaller.getInstance().marshall(this, protocolMarshaller); } }