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

com.amazonaws.services.computeoptimizer.model.ECSServiceRecommendedOptionProjectedMetric Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Compute Optimizer module holds the client classes that are used for communicating with AWS Compute Optimizer Service

The newest version!
/*
 * 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.computeoptimizer.model;

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

/**
 * 

* Describes the projected metrics of an Amazon ECS service recommendation option. *

*

* To determine the performance difference between your current Amazon ECS service and the recommended option, compare * the metric data of your service against its projected metric data. *

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

* The recommended CPU size for the Amazon ECS service. *

*/ private Integer recommendedCpuUnits; /** *

* The recommended memory size for the Amazon ECS service. *

*/ private Integer recommendedMemorySize; /** *

* An array of objects that describe the projected metric. *

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

* The recommended CPU size for the Amazon ECS service. *

* * @param recommendedCpuUnits * The recommended CPU size for the Amazon ECS service. */ public void setRecommendedCpuUnits(Integer recommendedCpuUnits) { this.recommendedCpuUnits = recommendedCpuUnits; } /** *

* The recommended CPU size for the Amazon ECS service. *

* * @return The recommended CPU size for the Amazon ECS service. */ public Integer getRecommendedCpuUnits() { return this.recommendedCpuUnits; } /** *

* The recommended CPU size for the Amazon ECS service. *

* * @param recommendedCpuUnits * The recommended CPU size for the Amazon ECS service. * @return Returns a reference to this object so that method calls can be chained together. */ public ECSServiceRecommendedOptionProjectedMetric withRecommendedCpuUnits(Integer recommendedCpuUnits) { setRecommendedCpuUnits(recommendedCpuUnits); return this; } /** *

* The recommended memory size for the Amazon ECS service. *

* * @param recommendedMemorySize * The recommended memory size for the Amazon ECS service. */ public void setRecommendedMemorySize(Integer recommendedMemorySize) { this.recommendedMemorySize = recommendedMemorySize; } /** *

* The recommended memory size for the Amazon ECS service. *

* * @return The recommended memory size for the Amazon ECS service. */ public Integer getRecommendedMemorySize() { return this.recommendedMemorySize; } /** *

* The recommended memory size for the Amazon ECS service. *

* * @param recommendedMemorySize * The recommended memory size for the Amazon ECS service. * @return Returns a reference to this object so that method calls can be chained together. */ public ECSServiceRecommendedOptionProjectedMetric withRecommendedMemorySize(Integer recommendedMemorySize) { setRecommendedMemorySize(recommendedMemorySize); return this; } /** *

* An array of objects that describe the projected metric. *

* * @return An array of objects that describe the projected metric. */ public java.util.List getProjectedMetrics() { return projectedMetrics; } /** *

* An array of objects that describe the projected metric. *

* * @param projectedMetrics * An array of objects that describe the projected metric. */ public void setProjectedMetrics(java.util.Collection projectedMetrics) { if (projectedMetrics == null) { this.projectedMetrics = null; return; } this.projectedMetrics = new java.util.ArrayList(projectedMetrics); } /** *

* An array of objects that describe the projected metric. *

*

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

* * @param projectedMetrics * An array of objects that describe the projected metric. * @return Returns a reference to this object so that method calls can be chained together. */ public ECSServiceRecommendedOptionProjectedMetric withProjectedMetrics(ECSServiceProjectedMetric... projectedMetrics) { if (this.projectedMetrics == null) { setProjectedMetrics(new java.util.ArrayList(projectedMetrics.length)); } for (ECSServiceProjectedMetric ele : projectedMetrics) { this.projectedMetrics.add(ele); } return this; } /** *

* An array of objects that describe the projected metric. *

* * @param projectedMetrics * An array of objects that describe the projected metric. * @return Returns a reference to this object so that method calls can be chained together. */ public ECSServiceRecommendedOptionProjectedMetric withProjectedMetrics(java.util.Collection projectedMetrics) { setProjectedMetrics(projectedMetrics); 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 (getRecommendedCpuUnits() != null) sb.append("RecommendedCpuUnits: ").append(getRecommendedCpuUnits()).append(","); if (getRecommendedMemorySize() != null) sb.append("RecommendedMemorySize: ").append(getRecommendedMemorySize()).append(","); if (getProjectedMetrics() != null) sb.append("ProjectedMetrics: ").append(getProjectedMetrics()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ECSServiceRecommendedOptionProjectedMetric == false) return false; ECSServiceRecommendedOptionProjectedMetric other = (ECSServiceRecommendedOptionProjectedMetric) obj; if (other.getRecommendedCpuUnits() == null ^ this.getRecommendedCpuUnits() == null) return false; if (other.getRecommendedCpuUnits() != null && other.getRecommendedCpuUnits().equals(this.getRecommendedCpuUnits()) == false) return false; if (other.getRecommendedMemorySize() == null ^ this.getRecommendedMemorySize() == null) return false; if (other.getRecommendedMemorySize() != null && other.getRecommendedMemorySize().equals(this.getRecommendedMemorySize()) == false) return false; if (other.getProjectedMetrics() == null ^ this.getProjectedMetrics() == null) return false; if (other.getProjectedMetrics() != null && other.getProjectedMetrics().equals(this.getProjectedMetrics()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRecommendedCpuUnits() == null) ? 0 : getRecommendedCpuUnits().hashCode()); hashCode = prime * hashCode + ((getRecommendedMemorySize() == null) ? 0 : getRecommendedMemorySize().hashCode()); hashCode = prime * hashCode + ((getProjectedMetrics() == null) ? 0 : getProjectedMetrics().hashCode()); return hashCode; } @Override public ECSServiceRecommendedOptionProjectedMetric clone() { try { return (ECSServiceRecommendedOptionProjectedMetric) 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.ECSServiceRecommendedOptionProjectedMetricMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy