/* * 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 the recommendation options for an Amazon ECS service. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ECSServiceRecommendationOption implements Serializable, Cloneable, StructuredPojo { /** ** The memory size of the Amazon ECS service recommendation option. *
*/ private Integer memory; /** ** The CPU size of the Amazon ECS service recommendation option. *
*/ private Integer cpu; private SavingsOpportunity savingsOpportunity; /** ** An array of objects that describe the projected utilization metrics of the Amazon ECS service recommendation * option. *
*/ private java.util.List* The CPU and memory size recommendations for the containers within the task of your Amazon ECS service. *
*/ private java.util.List* The memory size of the Amazon ECS service recommendation option. *
* * @param memory * The memory size of the Amazon ECS service recommendation option. */ public void setMemory(Integer memory) { this.memory = memory; } /** ** The memory size of the Amazon ECS service recommendation option. *
* * @return The memory size of the Amazon ECS service recommendation option. */ public Integer getMemory() { return this.memory; } /** ** The memory size of the Amazon ECS service recommendation option. *
* * @param memory * The memory size of the Amazon ECS service recommendation option. * @return Returns a reference to this object so that method calls can be chained together. */ public ECSServiceRecommendationOption withMemory(Integer memory) { setMemory(memory); return this; } /** ** The CPU size of the Amazon ECS service recommendation option. *
* * @param cpu * The CPU size of the Amazon ECS service recommendation option. */ public void setCpu(Integer cpu) { this.cpu = cpu; } /** ** The CPU size of the Amazon ECS service recommendation option. *
* * @return The CPU size of the Amazon ECS service recommendation option. */ public Integer getCpu() { return this.cpu; } /** ** The CPU size of the Amazon ECS service recommendation option. *
* * @param cpu * The CPU size of the Amazon ECS service recommendation option. * @return Returns a reference to this object so that method calls can be chained together. */ public ECSServiceRecommendationOption withCpu(Integer cpu) { setCpu(cpu); return this; } /** * @param savingsOpportunity */ public void setSavingsOpportunity(SavingsOpportunity savingsOpportunity) { this.savingsOpportunity = savingsOpportunity; } /** * @return */ public SavingsOpportunity getSavingsOpportunity() { return this.savingsOpportunity; } /** * @param savingsOpportunity * @return Returns a reference to this object so that method calls can be chained together. */ public ECSServiceRecommendationOption withSavingsOpportunity(SavingsOpportunity savingsOpportunity) { setSavingsOpportunity(savingsOpportunity); return this; } /** ** An array of objects that describe the projected utilization metrics of the Amazon ECS service recommendation * option. *
* * @return An array of objects that describe the projected utilization metrics of the Amazon ECS service * recommendation option. */ public java.util.List* An array of objects that describe the projected utilization metrics of the Amazon ECS service recommendation * option. *
* * @param projectedUtilizationMetrics * An array of objects that describe the projected utilization metrics of the Amazon ECS service * recommendation option. */ public void setProjectedUtilizationMetrics(java.util.Collection* An array of objects that describe the projected utilization metrics of the Amazon ECS service recommendation * option. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setProjectedUtilizationMetrics(java.util.Collection)} or * {@link #withProjectedUtilizationMetrics(java.util.Collection)} if you want to override the existing values. *
* * @param projectedUtilizationMetrics * An array of objects that describe the projected utilization metrics of the Amazon ECS service * recommendation option. * @return Returns a reference to this object so that method calls can be chained together. */ public ECSServiceRecommendationOption withProjectedUtilizationMetrics(ECSServiceProjectedUtilizationMetric... projectedUtilizationMetrics) { if (this.projectedUtilizationMetrics == null) { setProjectedUtilizationMetrics(new java.util.ArrayList* An array of objects that describe the projected utilization metrics of the Amazon ECS service recommendation * option. *
* * @param projectedUtilizationMetrics * An array of objects that describe the projected utilization metrics of the Amazon ECS service * recommendation option. * @return Returns a reference to this object so that method calls can be chained together. */ public ECSServiceRecommendationOption withProjectedUtilizationMetrics(java.util.Collection* The CPU and memory size recommendations for the containers within the task of your Amazon ECS service. *
* * @return The CPU and memory size recommendations for the containers within the task of your Amazon ECS service. */ public java.util.List* The CPU and memory size recommendations for the containers within the task of your Amazon ECS service. *
* * @param containerRecommendations * The CPU and memory size recommendations for the containers within the task of your Amazon ECS service. */ public void setContainerRecommendations(java.util.Collection* The CPU and memory size recommendations for the containers within the task of your Amazon ECS service. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setContainerRecommendations(java.util.Collection)} or * {@link #withContainerRecommendations(java.util.Collection)} if you want to override the existing values. *
* * @param containerRecommendations * The CPU and memory size recommendations for the containers within the task of your Amazon ECS service. * @return Returns a reference to this object so that method calls can be chained together. */ public ECSServiceRecommendationOption withContainerRecommendations(ContainerRecommendation... containerRecommendations) { if (this.containerRecommendations == null) { setContainerRecommendations(new java.util.ArrayList* The CPU and memory size recommendations for the containers within the task of your Amazon ECS service. *
* * @param containerRecommendations * The CPU and memory size recommendations for the containers within the task of your Amazon ECS service. * @return Returns a reference to this object so that method calls can be chained together. */ public ECSServiceRecommendationOption withContainerRecommendations(java.util.Collection