All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.trustedadvisor.model.RecommendationSummary 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.trustedadvisor.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Summary of Recommendation for an Account *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RecommendationSummary implements Serializable, Cloneable, StructuredPojo { /** *

* The ARN of the Recommendation *

*/ private String arn; /** *

* The AWS Services that the Recommendation applies to *

*/ private java.util.List awsServices; /** *

* The AWS Trusted Advisor Check ARN that relates to the Recommendation *

*/ private String checkArn; /** *

* When the Recommendation was created, if created by AWS Trusted Advisor Priority *

*/ private java.util.Date createdAt; /** *

* The ID which identifies where the Recommendation was produced *

*/ private String id; /** *

* When the Recommendation was last updated *

*/ private java.util.Date lastUpdatedAt; /** *

* The lifecycle stage from AWS Trusted Advisor Priority *

*/ private String lifecycleStage; /** *

* The name of the AWS Trusted Advisor Recommendation *

*/ private String name; /** *

* The pillar aggregations for cost savings *

*/ private RecommendationPillarSpecificAggregates pillarSpecificAggregates; /** *

* The Pillars that the Recommendation is optimizing *

*/ private java.util.List pillars; /** *

* An aggregation of all resources *

*/ private RecommendationResourcesAggregates resourcesAggregates; /** *

* The source of the Recommendation *

*/ private String source; /** *

* The status of the Recommendation *

*/ private String status; /** *

* Whether the Recommendation was automated or generated by AWS Trusted Advisor Priority *

*/ private String type; /** *

* The ARN of the Recommendation *

* * @param arn * The ARN of the Recommendation */ public void setArn(String arn) { this.arn = arn; } /** *

* The ARN of the Recommendation *

* * @return The ARN of the Recommendation */ public String getArn() { return this.arn; } /** *

* The ARN of the Recommendation *

* * @param arn * The ARN of the Recommendation * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withArn(String arn) { setArn(arn); return this; } /** *

* The AWS Services that the Recommendation applies to *

* * @return The AWS Services that the Recommendation applies to */ public java.util.List getAwsServices() { return awsServices; } /** *

* The AWS Services that the Recommendation applies to *

* * @param awsServices * The AWS Services that the Recommendation applies to */ public void setAwsServices(java.util.Collection awsServices) { if (awsServices == null) { this.awsServices = null; return; } this.awsServices = new java.util.ArrayList(awsServices); } /** *

* The AWS Services that the Recommendation applies to *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAwsServices(java.util.Collection)} or {@link #withAwsServices(java.util.Collection)} if you want to * override the existing values. *

* * @param awsServices * The AWS Services that the Recommendation applies to * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withAwsServices(String... awsServices) { if (this.awsServices == null) { setAwsServices(new java.util.ArrayList(awsServices.length)); } for (String ele : awsServices) { this.awsServices.add(ele); } return this; } /** *

* The AWS Services that the Recommendation applies to *

* * @param awsServices * The AWS Services that the Recommendation applies to * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withAwsServices(java.util.Collection awsServices) { setAwsServices(awsServices); return this; } /** *

* The AWS Trusted Advisor Check ARN that relates to the Recommendation *

* * @param checkArn * The AWS Trusted Advisor Check ARN that relates to the Recommendation */ public void setCheckArn(String checkArn) { this.checkArn = checkArn; } /** *

* The AWS Trusted Advisor Check ARN that relates to the Recommendation *

* * @return The AWS Trusted Advisor Check ARN that relates to the Recommendation */ public String getCheckArn() { return this.checkArn; } /** *

* The AWS Trusted Advisor Check ARN that relates to the Recommendation *

* * @param checkArn * The AWS Trusted Advisor Check ARN that relates to the Recommendation * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withCheckArn(String checkArn) { setCheckArn(checkArn); return this; } /** *

* When the Recommendation was created, if created by AWS Trusted Advisor Priority *

* * @param createdAt * When the Recommendation was created, if created by AWS Trusted Advisor Priority */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** *

* When the Recommendation was created, if created by AWS Trusted Advisor Priority *

* * @return When the Recommendation was created, if created by AWS Trusted Advisor Priority */ public java.util.Date getCreatedAt() { return this.createdAt; } /** *

* When the Recommendation was created, if created by AWS Trusted Advisor Priority *

* * @param createdAt * When the Recommendation was created, if created by AWS Trusted Advisor Priority * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** *

* The ID which identifies where the Recommendation was produced *

* * @param id * The ID which identifies where the Recommendation was produced */ public void setId(String id) { this.id = id; } /** *

* The ID which identifies where the Recommendation was produced *

* * @return The ID which identifies where the Recommendation was produced */ public String getId() { return this.id; } /** *

* The ID which identifies where the Recommendation was produced *

* * @param id * The ID which identifies where the Recommendation was produced * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withId(String id) { setId(id); return this; } /** *

* When the Recommendation was last updated *

* * @param lastUpdatedAt * When the Recommendation was last updated */ public void setLastUpdatedAt(java.util.Date lastUpdatedAt) { this.lastUpdatedAt = lastUpdatedAt; } /** *

* When the Recommendation was last updated *

* * @return When the Recommendation was last updated */ public java.util.Date getLastUpdatedAt() { return this.lastUpdatedAt; } /** *

* When the Recommendation was last updated *

* * @param lastUpdatedAt * When the Recommendation was last updated * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withLastUpdatedAt(java.util.Date lastUpdatedAt) { setLastUpdatedAt(lastUpdatedAt); return this; } /** *

* The lifecycle stage from AWS Trusted Advisor Priority *

* * @param lifecycleStage * The lifecycle stage from AWS Trusted Advisor Priority * @see RecommendationLifecycleStage */ public void setLifecycleStage(String lifecycleStage) { this.lifecycleStage = lifecycleStage; } /** *

* The lifecycle stage from AWS Trusted Advisor Priority *

* * @return The lifecycle stage from AWS Trusted Advisor Priority * @see RecommendationLifecycleStage */ public String getLifecycleStage() { return this.lifecycleStage; } /** *

* The lifecycle stage from AWS Trusted Advisor Priority *

* * @param lifecycleStage * The lifecycle stage from AWS Trusted Advisor Priority * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationLifecycleStage */ public RecommendationSummary withLifecycleStage(String lifecycleStage) { setLifecycleStage(lifecycleStage); return this; } /** *

* The lifecycle stage from AWS Trusted Advisor Priority *

* * @param lifecycleStage * The lifecycle stage from AWS Trusted Advisor Priority * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationLifecycleStage */ public RecommendationSummary withLifecycleStage(RecommendationLifecycleStage lifecycleStage) { this.lifecycleStage = lifecycleStage.toString(); return this; } /** *

* The name of the AWS Trusted Advisor Recommendation *

* * @param name * The name of the AWS Trusted Advisor Recommendation */ public void setName(String name) { this.name = name; } /** *

* The name of the AWS Trusted Advisor Recommendation *

* * @return The name of the AWS Trusted Advisor Recommendation */ public String getName() { return this.name; } /** *

* The name of the AWS Trusted Advisor Recommendation *

* * @param name * The name of the AWS Trusted Advisor Recommendation * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withName(String name) { setName(name); return this; } /** *

* The pillar aggregations for cost savings *

* * @param pillarSpecificAggregates * The pillar aggregations for cost savings */ public void setPillarSpecificAggregates(RecommendationPillarSpecificAggregates pillarSpecificAggregates) { this.pillarSpecificAggregates = pillarSpecificAggregates; } /** *

* The pillar aggregations for cost savings *

* * @return The pillar aggregations for cost savings */ public RecommendationPillarSpecificAggregates getPillarSpecificAggregates() { return this.pillarSpecificAggregates; } /** *

* The pillar aggregations for cost savings *

* * @param pillarSpecificAggregates * The pillar aggregations for cost savings * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withPillarSpecificAggregates(RecommendationPillarSpecificAggregates pillarSpecificAggregates) { setPillarSpecificAggregates(pillarSpecificAggregates); return this; } /** *

* The Pillars that the Recommendation is optimizing *

* * @return The Pillars that the Recommendation is optimizing * @see RecommendationPillar */ public java.util.List getPillars() { return pillars; } /** *

* The Pillars that the Recommendation is optimizing *

* * @param pillars * The Pillars that the Recommendation is optimizing * @see RecommendationPillar */ public void setPillars(java.util.Collection pillars) { if (pillars == null) { this.pillars = null; return; } this.pillars = new java.util.ArrayList(pillars); } /** *

* The Pillars that the Recommendation is optimizing *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setPillars(java.util.Collection)} or {@link #withPillars(java.util.Collection)} if you want to override * the existing values. *

* * @param pillars * The Pillars that the Recommendation is optimizing * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationPillar */ public RecommendationSummary withPillars(String... pillars) { if (this.pillars == null) { setPillars(new java.util.ArrayList(pillars.length)); } for (String ele : pillars) { this.pillars.add(ele); } return this; } /** *

* The Pillars that the Recommendation is optimizing *

* * @param pillars * The Pillars that the Recommendation is optimizing * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationPillar */ public RecommendationSummary withPillars(java.util.Collection pillars) { setPillars(pillars); return this; } /** *

* The Pillars that the Recommendation is optimizing *

* * @param pillars * The Pillars that the Recommendation is optimizing * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationPillar */ public RecommendationSummary withPillars(RecommendationPillar... pillars) { java.util.ArrayList pillarsCopy = new java.util.ArrayList(pillars.length); for (RecommendationPillar value : pillars) { pillarsCopy.add(value.toString()); } if (getPillars() == null) { setPillars(pillarsCopy); } else { getPillars().addAll(pillarsCopy); } return this; } /** *

* An aggregation of all resources *

* * @param resourcesAggregates * An aggregation of all resources */ public void setResourcesAggregates(RecommendationResourcesAggregates resourcesAggregates) { this.resourcesAggregates = resourcesAggregates; } /** *

* An aggregation of all resources *

* * @return An aggregation of all resources */ public RecommendationResourcesAggregates getResourcesAggregates() { return this.resourcesAggregates; } /** *

* An aggregation of all resources *

* * @param resourcesAggregates * An aggregation of all resources * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withResourcesAggregates(RecommendationResourcesAggregates resourcesAggregates) { setResourcesAggregates(resourcesAggregates); return this; } /** *

* The source of the Recommendation *

* * @param source * The source of the Recommendation * @see RecommendationSource */ public void setSource(String source) { this.source = source; } /** *

* The source of the Recommendation *

* * @return The source of the Recommendation * @see RecommendationSource */ public String getSource() { return this.source; } /** *

* The source of the Recommendation *

* * @param source * The source of the Recommendation * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationSource */ public RecommendationSummary withSource(String source) { setSource(source); return this; } /** *

* The source of the Recommendation *

* * @param source * The source of the Recommendation * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationSource */ public RecommendationSummary withSource(RecommendationSource source) { this.source = source.toString(); return this; } /** *

* The status of the Recommendation *

* * @param status * The status of the Recommendation * @see RecommendationStatus */ public void setStatus(String status) { this.status = status; } /** *

* The status of the Recommendation *

* * @return The status of the Recommendation * @see RecommendationStatus */ public String getStatus() { return this.status; } /** *

* The status of the Recommendation *

* * @param status * The status of the Recommendation * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationStatus */ public RecommendationSummary withStatus(String status) { setStatus(status); return this; } /** *

* The status of the Recommendation *

* * @param status * The status of the Recommendation * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationStatus */ public RecommendationSummary withStatus(RecommendationStatus status) { this.status = status.toString(); return this; } /** *

* Whether the Recommendation was automated or generated by AWS Trusted Advisor Priority *

* * @param type * Whether the Recommendation was automated or generated by AWS Trusted Advisor Priority * @see RecommendationType */ public void setType(String type) { this.type = type; } /** *

* Whether the Recommendation was automated or generated by AWS Trusted Advisor Priority *

* * @return Whether the Recommendation was automated or generated by AWS Trusted Advisor Priority * @see RecommendationType */ public String getType() { return this.type; } /** *

* Whether the Recommendation was automated or generated by AWS Trusted Advisor Priority *

* * @param type * Whether the Recommendation was automated or generated by AWS Trusted Advisor Priority * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationType */ public RecommendationSummary withType(String type) { setType(type); return this; } /** *

* Whether the Recommendation was automated or generated by AWS Trusted Advisor Priority *

* * @param type * Whether the Recommendation was automated or generated by AWS Trusted Advisor Priority * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationType */ public RecommendationSummary withType(RecommendationType type) { this.type = type.toString(); 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 (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getAwsServices() != null) sb.append("AwsServices: ").append(getAwsServices()).append(","); if (getCheckArn() != null) sb.append("CheckArn: ").append(getCheckArn()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getLastUpdatedAt() != null) sb.append("LastUpdatedAt: ").append(getLastUpdatedAt()).append(","); if (getLifecycleStage() != null) sb.append("LifecycleStage: ").append(getLifecycleStage()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getPillarSpecificAggregates() != null) sb.append("PillarSpecificAggregates: ").append(getPillarSpecificAggregates()).append(","); if (getPillars() != null) sb.append("Pillars: ").append(getPillars()).append(","); if (getResourcesAggregates() != null) sb.append("ResourcesAggregates: ").append(getResourcesAggregates()).append(","); if (getSource() != null) sb.append("Source: ").append(getSource()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getType() != null) sb.append("Type: ").append(getType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RecommendationSummary == false) return false; RecommendationSummary other = (RecommendationSummary) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getAwsServices() == null ^ this.getAwsServices() == null) return false; if (other.getAwsServices() != null && other.getAwsServices().equals(this.getAwsServices()) == false) return false; if (other.getCheckArn() == null ^ this.getCheckArn() == null) return false; if (other.getCheckArn() != null && other.getCheckArn().equals(this.getCheckArn()) == false) return false; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getLastUpdatedAt() == null ^ this.getLastUpdatedAt() == null) return false; if (other.getLastUpdatedAt() != null && other.getLastUpdatedAt().equals(this.getLastUpdatedAt()) == false) return false; if (other.getLifecycleStage() == null ^ this.getLifecycleStage() == null) return false; if (other.getLifecycleStage() != null && other.getLifecycleStage().equals(this.getLifecycleStage()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getPillarSpecificAggregates() == null ^ this.getPillarSpecificAggregates() == null) return false; if (other.getPillarSpecificAggregates() != null && other.getPillarSpecificAggregates().equals(this.getPillarSpecificAggregates()) == false) return false; if (other.getPillars() == null ^ this.getPillars() == null) return false; if (other.getPillars() != null && other.getPillars().equals(this.getPillars()) == false) return false; if (other.getResourcesAggregates() == null ^ this.getResourcesAggregates() == null) return false; if (other.getResourcesAggregates() != null && other.getResourcesAggregates().equals(this.getResourcesAggregates()) == false) return false; if (other.getSource() == null ^ this.getSource() == null) return false; if (other.getSource() != null && other.getSource().equals(this.getSource()) == 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.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getAwsServices() == null) ? 0 : getAwsServices().hashCode()); hashCode = prime * hashCode + ((getCheckArn() == null) ? 0 : getCheckArn().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedAt() == null) ? 0 : getLastUpdatedAt().hashCode()); hashCode = prime * hashCode + ((getLifecycleStage() == null) ? 0 : getLifecycleStage().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getPillarSpecificAggregates() == null) ? 0 : getPillarSpecificAggregates().hashCode()); hashCode = prime * hashCode + ((getPillars() == null) ? 0 : getPillars().hashCode()); hashCode = prime * hashCode + ((getResourcesAggregates() == null) ? 0 : getResourcesAggregates().hashCode()); hashCode = prime * hashCode + ((getSource() == null) ? 0 : getSource().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); return hashCode; } @Override public RecommendationSummary clone() { try { return (RecommendationSummary) 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.trustedadvisor.model.transform.RecommendationSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy