/* * 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; /** *
* A summary of a recommendation. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RecommendationSummary implements Serializable, Cloneable, StructuredPojo { /** ** An array of objects that describe a recommendation summary. *
*/ private java.util.List* The resource type that the recommendation summary applies to. *
*/ private String recommendationResourceType; /** ** The Amazon Web Services account ID of the recommendation summary. *
*/ private String accountId; /** ** An object that describes the savings opportunity for a given resource type. Savings opportunity includes the * estimated monthly savings amount and percentage. *
*/ private SavingsOpportunity savingsOpportunity; /** ** An object that describes the performance risk ratings for a given resource type. *
*/ private CurrentPerformanceRiskRatings currentPerformanceRiskRatings; /** *
* An array of objects that describes the estimated monthly saving amounts for the instances running on the
* specified inferredWorkloadTypes
. The array contains the top three savings opportunites for the
* instances running inferred workload types.
*
* An array of objects that describe a recommendation summary. *
* * @return An array of objects that describe a recommendation summary. */ public java.util.List* An array of objects that describe a recommendation summary. *
* * @param summaries * An array of objects that describe a recommendation summary. */ public void setSummaries(java.util.Collection* An array of objects that describe a recommendation summary. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSummaries(java.util.Collection)} or {@link #withSummaries(java.util.Collection)} if you want to * override the existing values. *
* * @param summaries * An array of objects that describe a recommendation summary. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withSummaries(Summary... summaries) { if (this.summaries == null) { setSummaries(new java.util.ArrayList* An array of objects that describe a recommendation summary. *
* * @param summaries * An array of objects that describe a recommendation summary. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withSummaries(java.util.Collection* The resource type that the recommendation summary applies to. *
* * @param recommendationResourceType * The resource type that the recommendation summary applies to. * @see RecommendationSourceType */ public void setRecommendationResourceType(String recommendationResourceType) { this.recommendationResourceType = recommendationResourceType; } /** ** The resource type that the recommendation summary applies to. *
* * @return The resource type that the recommendation summary applies to. * @see RecommendationSourceType */ public String getRecommendationResourceType() { return this.recommendationResourceType; } /** ** The resource type that the recommendation summary applies to. *
* * @param recommendationResourceType * The resource type that the recommendation summary applies to. * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationSourceType */ public RecommendationSummary withRecommendationResourceType(String recommendationResourceType) { setRecommendationResourceType(recommendationResourceType); return this; } /** ** The resource type that the recommendation summary applies to. *
* * @param recommendationResourceType * The resource type that the recommendation summary applies to. * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationSourceType */ public RecommendationSummary withRecommendationResourceType(RecommendationSourceType recommendationResourceType) { this.recommendationResourceType = recommendationResourceType.toString(); return this; } /** ** The Amazon Web Services account ID of the recommendation summary. *
* * @param accountId * The Amazon Web Services account ID of the recommendation summary. */ public void setAccountId(String accountId) { this.accountId = accountId; } /** ** The Amazon Web Services account ID of the recommendation summary. *
* * @return The Amazon Web Services account ID of the recommendation summary. */ public String getAccountId() { return this.accountId; } /** ** The Amazon Web Services account ID of the recommendation summary. *
* * @param accountId * The Amazon Web Services account ID of the recommendation summary. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withAccountId(String accountId) { setAccountId(accountId); return this; } /** ** An object that describes the savings opportunity for a given resource type. Savings opportunity includes the * estimated monthly savings amount and percentage. *
* * @param savingsOpportunity * An object that describes the savings opportunity for a given resource type. Savings opportunity includes * the estimated monthly savings amount and percentage. */ public void setSavingsOpportunity(SavingsOpportunity savingsOpportunity) { this.savingsOpportunity = savingsOpportunity; } /** ** An object that describes the savings opportunity for a given resource type. Savings opportunity includes the * estimated monthly savings amount and percentage. *
* * @return An object that describes the savings opportunity for a given resource type. Savings opportunity includes * the estimated monthly savings amount and percentage. */ public SavingsOpportunity getSavingsOpportunity() { return this.savingsOpportunity; } /** ** An object that describes the savings opportunity for a given resource type. Savings opportunity includes the * estimated monthly savings amount and percentage. *
* * @param savingsOpportunity * An object that describes the savings opportunity for a given resource type. Savings opportunity includes * the estimated monthly savings amount and percentage. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withSavingsOpportunity(SavingsOpportunity savingsOpportunity) { setSavingsOpportunity(savingsOpportunity); return this; } /** ** An object that describes the performance risk ratings for a given resource type. *
* * @param currentPerformanceRiskRatings * An object that describes the performance risk ratings for a given resource type. */ public void setCurrentPerformanceRiskRatings(CurrentPerformanceRiskRatings currentPerformanceRiskRatings) { this.currentPerformanceRiskRatings = currentPerformanceRiskRatings; } /** ** An object that describes the performance risk ratings for a given resource type. *
* * @return An object that describes the performance risk ratings for a given resource type. */ public CurrentPerformanceRiskRatings getCurrentPerformanceRiskRatings() { return this.currentPerformanceRiskRatings; } /** ** An object that describes the performance risk ratings for a given resource type. *
* * @param currentPerformanceRiskRatings * An object that describes the performance risk ratings for a given resource type. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withCurrentPerformanceRiskRatings(CurrentPerformanceRiskRatings currentPerformanceRiskRatings) { setCurrentPerformanceRiskRatings(currentPerformanceRiskRatings); return this; } /** *
* An array of objects that describes the estimated monthly saving amounts for the instances running on the
* specified inferredWorkloadTypes
. The array contains the top three savings opportunites for the
* instances running inferred workload types.
*
inferredWorkloadTypes
. The array contains the top three savings opportunites for
* the instances running inferred workload types.
*/
public java.util.List
* An array of objects that describes the estimated monthly saving amounts for the instances running on the
* specified inferredWorkloadTypes
. The array contains the top three savings opportunites for the
* instances running inferred workload types.
*
inferredWorkloadTypes
. The array contains the top three savings opportunites for
* the instances running inferred workload types.
*/
public void setInferredWorkloadSavings(java.util.Collection
* An array of objects that describes the estimated monthly saving amounts for the instances running on the
* specified inferredWorkloadTypes
. The array contains the top three savings opportunites for the
* instances running inferred workload types.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setInferredWorkloadSavings(java.util.Collection)} or * {@link #withInferredWorkloadSavings(java.util.Collection)} if you want to override the existing values. *
* * @param inferredWorkloadSavings * An array of objects that describes the estimated monthly saving amounts for the instances running on the * specifiedinferredWorkloadTypes
. The array contains the top three savings opportunites for
* the instances running inferred workload types.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecommendationSummary withInferredWorkloadSavings(InferredWorkloadSaving... inferredWorkloadSavings) {
if (this.inferredWorkloadSavings == null) {
setInferredWorkloadSavings(new java.util.ArrayList
* An array of objects that describes the estimated monthly saving amounts for the instances running on the
* specified inferredWorkloadTypes
. The array contains the top three savings opportunites for the
* instances running inferred workload types.
*
inferredWorkloadTypes
. The array contains the top three savings opportunites for
* the instances running inferred workload types.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecommendationSummary withInferredWorkloadSavings(java.util.Collection