/*
* 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;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetEffectiveRecommendationPreferencesResult extends com.amazonaws.AmazonWebServiceResult
* 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
* To validate whether the preference is applied to your last generated set of recommendations, review the
*
* For more information, see Enhanced
* infrastructure metrics in the Compute Optimizer User Guide.
*
* 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
* To validate whether the preference is applied to your last generated set of recommendations, review the
*
* For more information, see Enhanced
* infrastructure metrics in the Compute Optimizer User Guide.
*
* 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
* To validate whether the preference is applied to your last generated set of recommendations, review the
*
* For more information, see Enhanced
* infrastructure metrics in the Compute Optimizer User Guide.
* 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.
* effectiveRecommendationPreferences
value in the response of the
* GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions.
* 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.
* effectiveRecommendationPreferences
value in the response of the GetEC2InstanceRecommendations
* actions.
* 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.
* effectiveRecommendationPreferences
value in the response of the
* GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions.
*
* 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; } /** * 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()); 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; 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()); 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); } } }