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

com.amazonaws.services.computeoptimizer.model.GetEffectiveRecommendationPreferencesResult 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;

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

    /**
     * 

* The status of the enhanced infrastructure metrics recommendation preference. Considers all applicable preferences * that you might have set at the resource, account, and organization level. *

*

* A status of Active confirms that the preference is applied in the latest recommendation refresh, and * a status of Inactive confirms that it's not yet applied to recommendations. *

*

* To validate whether the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions. *

*

* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. *

*/ private String enhancedInfrastructureMetrics; /** *

* The provider of the external metrics recommendation preference. Considers all applicable preferences that you * might have set at the account and organization level. *

*

* If the preference is applied in the latest recommendation refresh, an object with a valid source * value appears in the response. If the preference isn't applied to the recommendations already, then this object * doesn't appear in the response. *

*

* To validate whether the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetEC2InstanceRecommendations * actions. *

*

* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. *

*/ private ExternalMetricsPreference externalMetricsPreference; /** *

* The number of days the utilization metrics of the Amazon Web Services resource are analyzed. *

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetAutoScalingGroupRecommendations * or GetEC2InstanceRecommendations actions. *

*/ private String lookBackPeriod; /** *

* The resource’s CPU and memory utilization preferences, such as threshold and headroom, that were used to generate * rightsizing recommendations. It considers all applicable preferences that you set at the resource, account, and * organization level. *

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetAutoScalingGroupRecommendations * or GetEC2InstanceRecommendations actions. *

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

* The resource type values that are considered as candidates when generating rightsizing recommendations. This * object resolves any wildcard expressions and returns the effective list of candidate resource type values. It * also considers all applicable preferences that you set at the resource, account, and organization level. *

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetAutoScalingGroupRecommendations * or GetEC2InstanceRecommendations actions. *

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

* The status of the enhanced infrastructure metrics recommendation preference. Considers all applicable preferences * that you might have set at the resource, account, and organization level. *

*

* A status of Active confirms that the preference is applied in the latest recommendation refresh, and * a status of Inactive confirms that it's not yet applied to recommendations. *

*

* To validate whether the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions. *

*

* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. *

* * @param enhancedInfrastructureMetrics * The status of the enhanced infrastructure metrics recommendation preference. Considers all applicable * preferences that you might have set at the resource, account, and organization level.

*

* A status of Active confirms that the preference is applied in the latest recommendation * refresh, and a status of Inactive confirms that it's not yet applied to recommendations. *

*

* To validate whether the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions. *

*

* For more information, see Enhanced infrastructure metrics in the Compute Optimizer User Guide. * @see EnhancedInfrastructureMetrics */ public void setEnhancedInfrastructureMetrics(String enhancedInfrastructureMetrics) { this.enhancedInfrastructureMetrics = enhancedInfrastructureMetrics; } /** *

* The status of the enhanced infrastructure metrics recommendation preference. Considers all applicable preferences * that you might have set at the resource, account, and organization level. *

*

* A status of Active confirms that the preference is applied in the latest recommendation refresh, and * a status of Inactive confirms that it's not yet applied to recommendations. *

*

* To validate whether the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions. *

*

* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. *

* * @return The status of the enhanced infrastructure metrics recommendation preference. Considers all applicable * preferences that you might have set at the resource, account, and organization level.

*

* A status of Active confirms that the preference is applied in the latest recommendation * refresh, and a status of Inactive confirms that it's not yet applied to recommendations. *

*

* To validate whether the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions. *

*

* For more information, see Enhanced infrastructure metrics in the Compute Optimizer User Guide. * @see EnhancedInfrastructureMetrics */ public String getEnhancedInfrastructureMetrics() { return this.enhancedInfrastructureMetrics; } /** *

* The status of the enhanced infrastructure metrics recommendation preference. Considers all applicable preferences * that you might have set at the resource, account, and organization level. *

*

* A status of Active confirms that the preference is applied in the latest recommendation refresh, and * a status of Inactive confirms that it's not yet applied to recommendations. *

*

* To validate whether the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions. *

*

* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. *

* * @param enhancedInfrastructureMetrics * The status of the enhanced infrastructure metrics recommendation preference. Considers all applicable * preferences that you might have set at the resource, account, and organization level.

*

* A status of Active confirms that the preference is applied in the latest recommendation * refresh, and a status of Inactive confirms that it's not yet applied to recommendations. *

*

* To validate whether the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions. *

*

* For more information, see Enhanced infrastructure metrics in the Compute Optimizer User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see EnhancedInfrastructureMetrics */ public GetEffectiveRecommendationPreferencesResult withEnhancedInfrastructureMetrics(String enhancedInfrastructureMetrics) { setEnhancedInfrastructureMetrics(enhancedInfrastructureMetrics); return this; } /** *

* The status of the enhanced infrastructure metrics recommendation preference. Considers all applicable preferences * that you might have set at the resource, account, and organization level. *

*

* A status of Active confirms that the preference is applied in the latest recommendation refresh, and * a status of Inactive confirms that it's not yet applied to recommendations. *

*

* To validate whether the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions. *

*

* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. *

* * @param enhancedInfrastructureMetrics * The status of the enhanced infrastructure metrics recommendation preference. Considers all applicable * preferences that you might have set at the resource, account, and organization level.

*

* A status of Active confirms that the preference is applied in the latest recommendation * refresh, and a status of Inactive confirms that it's not yet applied to recommendations. *

*

* To validate whether the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions. *

*

* For more information, see Enhanced infrastructure metrics in the Compute Optimizer User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see EnhancedInfrastructureMetrics */ public GetEffectiveRecommendationPreferencesResult withEnhancedInfrastructureMetrics(EnhancedInfrastructureMetrics enhancedInfrastructureMetrics) { this.enhancedInfrastructureMetrics = enhancedInfrastructureMetrics.toString(); return this; } /** *

* The provider of the external metrics recommendation preference. Considers all applicable preferences that you * might have set at the account and organization level. *

*

* If the preference is applied in the latest recommendation refresh, an object with a valid source * value appears in the response. If the preference isn't applied to the recommendations already, then this object * doesn't appear in the response. *

*

* To validate whether the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetEC2InstanceRecommendations * actions. *

*

* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. *

* * @param externalMetricsPreference * The provider of the external metrics recommendation preference. Considers all applicable preferences that * you might have set at the account and organization level.

*

* If the preference is applied in the latest recommendation refresh, an object with a valid * source value appears in the response. If the preference isn't applied to the recommendations * already, then this object doesn't appear in the response. *

*

* To validate whether the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetEC2InstanceRecommendations actions. *

*

* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. */ public void setExternalMetricsPreference(ExternalMetricsPreference externalMetricsPreference) { this.externalMetricsPreference = externalMetricsPreference; } /** *

* The provider of the external metrics recommendation preference. Considers all applicable preferences that you * might have set at the account and organization level. *

*

* If the preference is applied in the latest recommendation refresh, an object with a valid source * value appears in the response. If the preference isn't applied to the recommendations already, then this object * doesn't appear in the response. *

*

* To validate whether the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetEC2InstanceRecommendations * actions. *

*

* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. *

* * @return The provider of the external metrics recommendation preference. Considers all applicable preferences that * you might have set at the account and organization level.

*

* If the preference is applied in the latest recommendation refresh, an object with a valid * source value appears in the response. If the preference isn't applied to the recommendations * already, then this object doesn't appear in the response. *

*

* To validate whether the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetEC2InstanceRecommendations actions. *

*

* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. */ public ExternalMetricsPreference getExternalMetricsPreference() { return this.externalMetricsPreference; } /** *

* The provider of the external metrics recommendation preference. Considers all applicable preferences that you * might have set at the account and organization level. *

*

* If the preference is applied in the latest recommendation refresh, an object with a valid source * value appears in the response. If the preference isn't applied to the recommendations already, then this object * doesn't appear in the response. *

*

* To validate whether the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetEC2InstanceRecommendations * actions. *

*

* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. *

* * @param externalMetricsPreference * The provider of the external metrics recommendation preference. Considers all applicable preferences that * you might have set at the account and organization level.

*

* If the preference is applied in the latest recommendation refresh, an object with a valid * source value appears in the response. If the preference isn't applied to the recommendations * already, then this object doesn't appear in the response. *

*

* To validate whether the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetEC2InstanceRecommendations actions. *

*

* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public GetEffectiveRecommendationPreferencesResult withExternalMetricsPreference(ExternalMetricsPreference externalMetricsPreference) { setExternalMetricsPreference(externalMetricsPreference); return this; } /** *

* The number of days the utilization metrics of the Amazon Web Services resource are analyzed. *

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetAutoScalingGroupRecommendations * or GetEC2InstanceRecommendations actions. *

* * @param lookBackPeriod * The number of days the utilization metrics of the Amazon Web Services resource are analyzed.

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions. * @see LookBackPeriodPreference */ public void setLookBackPeriod(String lookBackPeriod) { this.lookBackPeriod = lookBackPeriod; } /** *

* The number of days the utilization metrics of the Amazon Web Services resource are analyzed. *

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetAutoScalingGroupRecommendations * or GetEC2InstanceRecommendations actions. *

* * @return The number of days the utilization metrics of the Amazon Web Services resource are analyzed.

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions. * @see LookBackPeriodPreference */ public String getLookBackPeriod() { return this.lookBackPeriod; } /** *

* The number of days the utilization metrics of the Amazon Web Services resource are analyzed. *

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetAutoScalingGroupRecommendations * or GetEC2InstanceRecommendations actions. *

* * @param lookBackPeriod * The number of days the utilization metrics of the Amazon Web Services resource are analyzed.

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions. * @return Returns a reference to this object so that method calls can be chained together. * @see LookBackPeriodPreference */ public GetEffectiveRecommendationPreferencesResult withLookBackPeriod(String lookBackPeriod) { setLookBackPeriod(lookBackPeriod); return this; } /** *

* The number of days the utilization metrics of the Amazon Web Services resource are analyzed. *

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetAutoScalingGroupRecommendations * or GetEC2InstanceRecommendations actions. *

* * @param lookBackPeriod * The number of days the utilization metrics of the Amazon Web Services resource are analyzed.

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions. * @return Returns a reference to this object so that method calls can be chained together. * @see LookBackPeriodPreference */ public GetEffectiveRecommendationPreferencesResult withLookBackPeriod(LookBackPeriodPreference lookBackPeriod) { this.lookBackPeriod = lookBackPeriod.toString(); return this; } /** *

* The resource’s CPU and memory utilization preferences, such as threshold and headroom, that were used to generate * rightsizing recommendations. It considers all applicable preferences that you set at the resource, account, and * organization level. *

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetAutoScalingGroupRecommendations * or GetEC2InstanceRecommendations actions. *

* * @return The resource’s CPU and memory utilization preferences, such as threshold and headroom, that were used to * generate rightsizing recommendations. It considers all applicable preferences that you set at the * resource, account, and organization level.

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions. */ public java.util.List getUtilizationPreferences() { return utilizationPreferences; } /** *

* The resource’s CPU and memory utilization preferences, such as threshold and headroom, that were used to generate * rightsizing recommendations. It considers all applicable preferences that you set at the resource, account, and * organization level. *

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetAutoScalingGroupRecommendations * or GetEC2InstanceRecommendations actions. *

* * @param utilizationPreferences * The resource’s CPU and memory utilization preferences, such as threshold and headroom, that were used to * generate rightsizing recommendations. It considers all applicable preferences that you set at the * resource, account, and organization level.

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions. */ public void setUtilizationPreferences(java.util.Collection utilizationPreferences) { if (utilizationPreferences == null) { this.utilizationPreferences = null; return; } this.utilizationPreferences = new java.util.ArrayList(utilizationPreferences); } /** *

* The resource’s CPU and memory utilization preferences, such as threshold and headroom, that were used to generate * rightsizing recommendations. It considers all applicable preferences that you set at the resource, account, and * organization level. *

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetAutoScalingGroupRecommendations * or GetEC2InstanceRecommendations actions. *

*

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

* * @param utilizationPreferences * The resource’s CPU and memory utilization preferences, such as threshold and headroom, that were used to * generate rightsizing recommendations. It considers all applicable preferences that you set at the * resource, account, and organization level.

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions. * @return Returns a reference to this object so that method calls can be chained together. */ public GetEffectiveRecommendationPreferencesResult withUtilizationPreferences(UtilizationPreference... utilizationPreferences) { if (this.utilizationPreferences == null) { setUtilizationPreferences(new java.util.ArrayList(utilizationPreferences.length)); } for (UtilizationPreference ele : utilizationPreferences) { this.utilizationPreferences.add(ele); } return this; } /** *

* The resource’s CPU and memory utilization preferences, such as threshold and headroom, that were used to generate * rightsizing recommendations. It considers all applicable preferences that you set at the resource, account, and * organization level. *

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetAutoScalingGroupRecommendations * or GetEC2InstanceRecommendations actions. *

* * @param utilizationPreferences * The resource’s CPU and memory utilization preferences, such as threshold and headroom, that were used to * generate rightsizing recommendations. It considers all applicable preferences that you set at the * resource, account, and organization level.

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions. * @return Returns a reference to this object so that method calls can be chained together. */ public GetEffectiveRecommendationPreferencesResult withUtilizationPreferences(java.util.Collection utilizationPreferences) { setUtilizationPreferences(utilizationPreferences); return this; } /** *

* The resource type values that are considered as candidates when generating rightsizing recommendations. This * object resolves any wildcard expressions and returns the effective list of candidate resource type values. It * also considers all applicable preferences that you set at the resource, account, and organization level. *

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetAutoScalingGroupRecommendations * or GetEC2InstanceRecommendations actions. *

* * @return The resource type values that are considered as candidates when generating rightsizing recommendations. * This object resolves any wildcard expressions and returns the effective list of candidate resource type * values. It also considers all applicable preferences that you set at the resource, account, and * organization level.

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions. */ public java.util.List getPreferredResources() { return preferredResources; } /** *

* The resource type values that are considered as candidates when generating rightsizing recommendations. This * object resolves any wildcard expressions and returns the effective list of candidate resource type values. It * also considers all applicable preferences that you set at the resource, account, and organization level. *

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetAutoScalingGroupRecommendations * or GetEC2InstanceRecommendations actions. *

* * @param preferredResources * The resource type values that are considered as candidates when generating rightsizing recommendations. * This object resolves any wildcard expressions and returns the effective list of candidate resource type * values. It also considers all applicable preferences that you set at the resource, account, and * organization level.

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions. */ public void setPreferredResources(java.util.Collection preferredResources) { if (preferredResources == null) { this.preferredResources = null; return; } this.preferredResources = new java.util.ArrayList(preferredResources); } /** *

* The resource type values that are considered as candidates when generating rightsizing recommendations. This * object resolves any wildcard expressions and returns the effective list of candidate resource type values. It * also considers all applicable preferences that you set at the resource, account, and organization level. *

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetAutoScalingGroupRecommendations * or GetEC2InstanceRecommendations actions. *

*

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

* * @param preferredResources * The resource type values that are considered as candidates when generating rightsizing recommendations. * This object resolves any wildcard expressions and returns the effective list of candidate resource type * values. It also considers all applicable preferences that you set at the resource, account, and * organization level.

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions. * @return Returns a reference to this object so that method calls can be chained together. */ public GetEffectiveRecommendationPreferencesResult withPreferredResources(EffectivePreferredResource... preferredResources) { if (this.preferredResources == null) { setPreferredResources(new java.util.ArrayList(preferredResources.length)); } for (EffectivePreferredResource ele : preferredResources) { this.preferredResources.add(ele); } return this; } /** *

* The resource type values that are considered as candidates when generating rightsizing recommendations. This * object resolves any wildcard expressions and returns the effective list of candidate resource type values. It * also considers all applicable preferences that you set at the resource, account, and organization level. *

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the GetAutoScalingGroupRecommendations * or GetEC2InstanceRecommendations actions. *

* * @param preferredResources * The resource type values that are considered as candidates when generating rightsizing recommendations. * This object resolves any wildcard expressions and returns the effective list of candidate resource type * values. It also considers all applicable preferences that you set at the resource, account, and * organization level.

*

* To validate that the preference is applied to your last generated set of recommendations, review the * effectiveRecommendationPreferences value in the response of the * GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions. * @return Returns a reference to this object so that method calls can be chained together. */ public GetEffectiveRecommendationPreferencesResult withPreferredResources(java.util.Collection preferredResources) { setPreferredResources(preferredResources); 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 (getEnhancedInfrastructureMetrics() != null) sb.append("EnhancedInfrastructureMetrics: ").append(getEnhancedInfrastructureMetrics()).append(","); if (getExternalMetricsPreference() != null) sb.append("ExternalMetricsPreference: ").append(getExternalMetricsPreference()).append(","); if (getLookBackPeriod() != null) sb.append("LookBackPeriod: ").append(getLookBackPeriod()).append(","); if (getUtilizationPreferences() != null) sb.append("UtilizationPreferences: ").append(getUtilizationPreferences()).append(","); if (getPreferredResources() != null) sb.append("PreferredResources: ").append(getPreferredResources()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetEffectiveRecommendationPreferencesResult == false) return false; GetEffectiveRecommendationPreferencesResult other = (GetEffectiveRecommendationPreferencesResult) obj; if (other.getEnhancedInfrastructureMetrics() == null ^ this.getEnhancedInfrastructureMetrics() == null) return false; if (other.getEnhancedInfrastructureMetrics() != null && other.getEnhancedInfrastructureMetrics().equals(this.getEnhancedInfrastructureMetrics()) == false) return false; if (other.getExternalMetricsPreference() == null ^ this.getExternalMetricsPreference() == null) return false; if (other.getExternalMetricsPreference() != null && other.getExternalMetricsPreference().equals(this.getExternalMetricsPreference()) == false) return false; if (other.getLookBackPeriod() == null ^ this.getLookBackPeriod() == null) return false; if (other.getLookBackPeriod() != null && other.getLookBackPeriod().equals(this.getLookBackPeriod()) == false) return false; if (other.getUtilizationPreferences() == null ^ this.getUtilizationPreferences() == null) return false; if (other.getUtilizationPreferences() != null && other.getUtilizationPreferences().equals(this.getUtilizationPreferences()) == false) return false; if (other.getPreferredResources() == null ^ this.getPreferredResources() == null) return false; if (other.getPreferredResources() != null && other.getPreferredResources().equals(this.getPreferredResources()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEnhancedInfrastructureMetrics() == null) ? 0 : getEnhancedInfrastructureMetrics().hashCode()); hashCode = prime * hashCode + ((getExternalMetricsPreference() == null) ? 0 : getExternalMetricsPreference().hashCode()); hashCode = prime * hashCode + ((getLookBackPeriod() == null) ? 0 : getLookBackPeriod().hashCode()); hashCode = prime * hashCode + ((getUtilizationPreferences() == null) ? 0 : getUtilizationPreferences().hashCode()); hashCode = prime * hashCode + ((getPreferredResources() == null) ? 0 : getPreferredResources().hashCode()); return hashCode; } @Override public GetEffectiveRecommendationPreferencesResult clone() { try { return (GetEffectiveRecommendationPreferencesResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy