/* * 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.AmazonWebServiceRequest; /** * * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PutRecommendationPreferencesRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The target resource type of the recommendation preference to create. *
*
* The Ec2Instance
option encompasses standalone instances and instances that are part of Auto Scaling
* groups. The AutoScalingGroup
option encompasses only instances that are part of an Auto Scaling
* group.
*
* The valid values for this parameter are Ec2Instance
and AutoScalingGroup
.
*
* An object that describes the scope of the recommendation preference to create. *
** You can create recommendation preferences at the organization level (for management accounts of an organization * only), account level, and resource level. For more information, see Activating * enhanced infrastructure metrics in the Compute Optimizer User Guide. *
*
* You cannot create recommendation preferences for Auto Scaling groups at the organization and account levels. You
* can create recommendation preferences for Auto Scaling groups only at the resource level by specifying a scope
* name of ResourceArn
and a scope value of the Auto Scaling group Amazon Resource Name (ARN). This
* will configure the preference for all instances that are part of the specified Auto Scaling group. You also
* cannot create recommendation preferences at the resource level for instances that are part of an Auto Scaling
* group. You can create recommendation preferences at the resource level only for standalone instances.
*
* The status of the enhanced infrastructure metrics recommendation preference to create or update. *
*
* Specify the Active
status to activate the preference, or specify Inactive
to deactivate
* the preference.
*
* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. *
*/ private String enhancedInfrastructureMetrics; /** ** The status of the inferred workload types recommendation preference to create or update. *
** The inferred workload type feature is active by default. To deactivate it, create a recommendation preference. *
*
* Specify the Inactive
status to deactivate the feature, or specify Active
to activate
* it.
*
* For more information, see Inferred workload * types in the Compute Optimizer User Guide. *
*/ private String inferredWorkloadTypes; /** ** The provider of the external metrics recommendation preference to create or update. *
*
* Specify a valid provider in the source
field to activate the preference. To delete this preference,
* see the DeleteRecommendationPreferences action.
*
* This preference can only be set for the Ec2Instance
resource type.
*
* For more information, see External metrics * ingestion in the Compute Optimizer User Guide. *
*/ private ExternalMetricsPreference externalMetricsPreference; /** ** The target resource type of the recommendation preference to create. *
*
* The Ec2Instance
option encompasses standalone instances and instances that are part of Auto Scaling
* groups. The AutoScalingGroup
option encompasses only instances that are part of an Auto Scaling
* group.
*
* The valid values for this parameter are Ec2Instance
and AutoScalingGroup
.
*
* The Ec2Instance
option encompasses standalone instances and instances that are part of Auto
* Scaling groups. The AutoScalingGroup
option encompasses only instances that are part of an
* Auto Scaling group.
*
* The valid values for this parameter are Ec2Instance
and AutoScalingGroup
.
*
* The target resource type of the recommendation preference to create. *
*
* The Ec2Instance
option encompasses standalone instances and instances that are part of Auto Scaling
* groups. The AutoScalingGroup
option encompasses only instances that are part of an Auto Scaling
* group.
*
* The valid values for this parameter are Ec2Instance
and AutoScalingGroup
.
*
* The Ec2Instance
option encompasses standalone instances and instances that are part of Auto
* Scaling groups. The AutoScalingGroup
option encompasses only instances that are part of an
* Auto Scaling group.
*
* The valid values for this parameter are Ec2Instance
and AutoScalingGroup
.
*
* The target resource type of the recommendation preference to create. *
*
* The Ec2Instance
option encompasses standalone instances and instances that are part of Auto Scaling
* groups. The AutoScalingGroup
option encompasses only instances that are part of an Auto Scaling
* group.
*
* The valid values for this parameter are Ec2Instance
and AutoScalingGroup
.
*
* The Ec2Instance
option encompasses standalone instances and instances that are part of Auto
* Scaling groups. The AutoScalingGroup
option encompasses only instances that are part of an
* Auto Scaling group.
*
* The valid values for this parameter are Ec2Instance
and AutoScalingGroup
.
*
* The target resource type of the recommendation preference to create. *
*
* The Ec2Instance
option encompasses standalone instances and instances that are part of Auto Scaling
* groups. The AutoScalingGroup
option encompasses only instances that are part of an Auto Scaling
* group.
*
* The valid values for this parameter are Ec2Instance
and AutoScalingGroup
.
*
* The Ec2Instance
option encompasses standalone instances and instances that are part of Auto
* Scaling groups. The AutoScalingGroup
option encompasses only instances that are part of an
* Auto Scaling group.
*
* The valid values for this parameter are Ec2Instance
and AutoScalingGroup
.
*
* An object that describes the scope of the recommendation preference to create. *
** You can create recommendation preferences at the organization level (for management accounts of an organization * only), account level, and resource level. For more information, see Activating * enhanced infrastructure metrics in the Compute Optimizer User Guide. *
*
* You cannot create recommendation preferences for Auto Scaling groups at the organization and account levels. You
* can create recommendation preferences for Auto Scaling groups only at the resource level by specifying a scope
* name of ResourceArn
and a scope value of the Auto Scaling group Amazon Resource Name (ARN). This
* will configure the preference for all instances that are part of the specified Auto Scaling group. You also
* cannot create recommendation preferences at the resource level for instances that are part of an Auto Scaling
* group. You can create recommendation preferences at the resource level only for standalone instances.
*
* You can create recommendation preferences at the organization level (for management accounts of an * organization only), account level, and resource level. For more information, see Activating enhanced infrastructure metrics in the Compute Optimizer User Guide. *
*
* You cannot create recommendation preferences for Auto Scaling groups at the organization and account
* levels. You can create recommendation preferences for Auto Scaling groups only at the resource level by
* specifying a scope name of ResourceArn
and a scope value of the Auto Scaling group Amazon
* Resource Name (ARN). This will configure the preference for all instances that are part of the specified
* Auto Scaling group. You also cannot create recommendation preferences at the resource level for instances
* that are part of an Auto Scaling group. You can create recommendation preferences at the resource level
* only for standalone instances.
*
* An object that describes the scope of the recommendation preference to create. *
** You can create recommendation preferences at the organization level (for management accounts of an organization * only), account level, and resource level. For more information, see Activating * enhanced infrastructure metrics in the Compute Optimizer User Guide. *
*
* You cannot create recommendation preferences for Auto Scaling groups at the organization and account levels. You
* can create recommendation preferences for Auto Scaling groups only at the resource level by specifying a scope
* name of ResourceArn
and a scope value of the Auto Scaling group Amazon Resource Name (ARN). This
* will configure the preference for all instances that are part of the specified Auto Scaling group. You also
* cannot create recommendation preferences at the resource level for instances that are part of an Auto Scaling
* group. You can create recommendation preferences at the resource level only for standalone instances.
*
* You can create recommendation preferences at the organization level (for management accounts of an * organization only), account level, and resource level. For more information, see Activating enhanced infrastructure metrics in the Compute Optimizer User Guide. *
*
* You cannot create recommendation preferences for Auto Scaling groups at the organization and account
* levels. You can create recommendation preferences for Auto Scaling groups only at the resource level by
* specifying a scope name of ResourceArn
and a scope value of the Auto Scaling group Amazon
* Resource Name (ARN). This will configure the preference for all instances that are part of the specified
* Auto Scaling group. You also cannot create recommendation preferences at the resource level for instances
* that are part of an Auto Scaling group. You can create recommendation preferences at the resource level
* only for standalone instances.
*
* An object that describes the scope of the recommendation preference to create. *
** You can create recommendation preferences at the organization level (for management accounts of an organization * only), account level, and resource level. For more information, see Activating * enhanced infrastructure metrics in the Compute Optimizer User Guide. *
*
* You cannot create recommendation preferences for Auto Scaling groups at the organization and account levels. You
* can create recommendation preferences for Auto Scaling groups only at the resource level by specifying a scope
* name of ResourceArn
and a scope value of the Auto Scaling group Amazon Resource Name (ARN). This
* will configure the preference for all instances that are part of the specified Auto Scaling group. You also
* cannot create recommendation preferences at the resource level for instances that are part of an Auto Scaling
* group. You can create recommendation preferences at the resource level only for standalone instances.
*
* You can create recommendation preferences at the organization level (for management accounts of an * organization only), account level, and resource level. For more information, see Activating enhanced infrastructure metrics in the Compute Optimizer User Guide. *
*
* You cannot create recommendation preferences for Auto Scaling groups at the organization and account
* levels. You can create recommendation preferences for Auto Scaling groups only at the resource level by
* specifying a scope name of ResourceArn
and a scope value of the Auto Scaling group Amazon
* Resource Name (ARN). This will configure the preference for all instances that are part of the specified
* Auto Scaling group. You also cannot create recommendation preferences at the resource level for instances
* that are part of an Auto Scaling group. You can create recommendation preferences at the resource level
* only for standalone instances.
*
* The status of the enhanced infrastructure metrics recommendation preference to create or update. *
*
* Specify the Active
status to activate the preference, or specify Inactive
to deactivate
* the preference.
*
* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. *
* * @param enhancedInfrastructureMetrics * The status of the enhanced infrastructure metrics recommendation preference to create or update. *
* Specify the Active
status to activate the preference, or specify Inactive
to
* deactivate the preference.
*
* 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 to create or update. *
*
* Specify the Active
status to activate the preference, or specify Inactive
to deactivate
* the preference.
*
* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. *
* * @return The status of the enhanced infrastructure metrics recommendation preference to create or update. *
* Specify the Active
status to activate the preference, or specify Inactive
to
* deactivate the preference.
*
* 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 to create or update. *
*
* Specify the Active
status to activate the preference, or specify Inactive
to deactivate
* the preference.
*
* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. *
* * @param enhancedInfrastructureMetrics * The status of the enhanced infrastructure metrics recommendation preference to create or update. *
* Specify the Active
status to activate the preference, or specify Inactive
to
* deactivate the preference.
*
* 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 PutRecommendationPreferencesRequest withEnhancedInfrastructureMetrics(String enhancedInfrastructureMetrics) { setEnhancedInfrastructureMetrics(enhancedInfrastructureMetrics); return this; } /** *
* The status of the enhanced infrastructure metrics recommendation preference to create or update. *
*
* Specify the Active
status to activate the preference, or specify Inactive
to deactivate
* the preference.
*
* For more information, see Enhanced * infrastructure metrics in the Compute Optimizer User Guide. *
* * @param enhancedInfrastructureMetrics * The status of the enhanced infrastructure metrics recommendation preference to create or update. *
* Specify the Active
status to activate the preference, or specify Inactive
to
* deactivate the preference.
*
* 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 PutRecommendationPreferencesRequest withEnhancedInfrastructureMetrics(EnhancedInfrastructureMetrics enhancedInfrastructureMetrics) { this.enhancedInfrastructureMetrics = enhancedInfrastructureMetrics.toString(); return this; } /** *
* The status of the inferred workload types recommendation preference to create or update. *
** The inferred workload type feature is active by default. To deactivate it, create a recommendation preference. *
*
* Specify the Inactive
status to deactivate the feature, or specify Active
to activate
* it.
*
* For more information, see Inferred workload * types in the Compute Optimizer User Guide. *
* * @param inferredWorkloadTypes * The status of the inferred workload types recommendation preference to create or update.* The inferred workload type feature is active by default. To deactivate it, create a recommendation * preference. *
*
* Specify the Inactive
status to deactivate the feature, or specify Active
to
* activate it.
*
* For more information, see Inferred * workload types in the Compute Optimizer User Guide. * @see InferredWorkloadTypesPreference */ public void setInferredWorkloadTypes(String inferredWorkloadTypes) { this.inferredWorkloadTypes = inferredWorkloadTypes; } /** *
* The status of the inferred workload types recommendation preference to create or update. *
** The inferred workload type feature is active by default. To deactivate it, create a recommendation preference. *
*
* Specify the Inactive
status to deactivate the feature, or specify Active
to activate
* it.
*
* For more information, see Inferred workload * types in the Compute Optimizer User Guide. *
* * @return The status of the inferred workload types recommendation preference to create or update.* The inferred workload type feature is active by default. To deactivate it, create a recommendation * preference. *
*
* Specify the Inactive
status to deactivate the feature, or specify Active
to
* activate it.
*
* For more information, see Inferred * workload types in the Compute Optimizer User Guide. * @see InferredWorkloadTypesPreference */ public String getInferredWorkloadTypes() { return this.inferredWorkloadTypes; } /** *
* The status of the inferred workload types recommendation preference to create or update. *
** The inferred workload type feature is active by default. To deactivate it, create a recommendation preference. *
*
* Specify the Inactive
status to deactivate the feature, or specify Active
to activate
* it.
*
* For more information, see Inferred workload * types in the Compute Optimizer User Guide. *
* * @param inferredWorkloadTypes * The status of the inferred workload types recommendation preference to create or update.* The inferred workload type feature is active by default. To deactivate it, create a recommendation * preference. *
*
* Specify the Inactive
status to deactivate the feature, or specify Active
to
* activate it.
*
* For more information, see Inferred * workload types in the Compute Optimizer User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see InferredWorkloadTypesPreference */ public PutRecommendationPreferencesRequest withInferredWorkloadTypes(String inferredWorkloadTypes) { setInferredWorkloadTypes(inferredWorkloadTypes); return this; } /** *
* The status of the inferred workload types recommendation preference to create or update. *
** The inferred workload type feature is active by default. To deactivate it, create a recommendation preference. *
*
* Specify the Inactive
status to deactivate the feature, or specify Active
to activate
* it.
*
* For more information, see Inferred workload * types in the Compute Optimizer User Guide. *
* * @param inferredWorkloadTypes * The status of the inferred workload types recommendation preference to create or update.* The inferred workload type feature is active by default. To deactivate it, create a recommendation * preference. *
*
* Specify the Inactive
status to deactivate the feature, or specify Active
to
* activate it.
*
* For more information, see Inferred * workload types in the Compute Optimizer User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see InferredWorkloadTypesPreference */ public PutRecommendationPreferencesRequest withInferredWorkloadTypes(InferredWorkloadTypesPreference inferredWorkloadTypes) { this.inferredWorkloadTypes = inferredWorkloadTypes.toString(); return this; } /** *
* The provider of the external metrics recommendation preference to create or update. *
*
* Specify a valid provider in the source
field to activate the preference. To delete this preference,
* see the DeleteRecommendationPreferences action.
*
* This preference can only be set for the Ec2Instance
resource type.
*
* For more information, see External metrics * ingestion in the Compute Optimizer User Guide. *
* * @param externalMetricsPreference * The provider of the external metrics recommendation preference to create or update. *
* Specify a valid provider in the source
field to activate the preference. To delete this
* preference, see the DeleteRecommendationPreferences action.
*
* This preference can only be set for the Ec2Instance
resource type.
*
* For more information, see External * metrics ingestion in the Compute Optimizer User Guide. */ public void setExternalMetricsPreference(ExternalMetricsPreference externalMetricsPreference) { this.externalMetricsPreference = externalMetricsPreference; } /** *
* The provider of the external metrics recommendation preference to create or update. *
*
* Specify a valid provider in the source
field to activate the preference. To delete this preference,
* see the DeleteRecommendationPreferences action.
*
* This preference can only be set for the Ec2Instance
resource type.
*
* For more information, see External metrics * ingestion in the Compute Optimizer User Guide. *
* * @return The provider of the external metrics recommendation preference to create or update. *
* Specify a valid provider in the source
field to activate the preference. To delete this
* preference, see the DeleteRecommendationPreferences action.
*
* This preference can only be set for the Ec2Instance
resource type.
*
* For more information, see External * metrics ingestion in the Compute Optimizer User Guide. */ public ExternalMetricsPreference getExternalMetricsPreference() { return this.externalMetricsPreference; } /** *
* The provider of the external metrics recommendation preference to create or update. *
*
* Specify a valid provider in the source
field to activate the preference. To delete this preference,
* see the DeleteRecommendationPreferences action.
*
* This preference can only be set for the Ec2Instance
resource type.
*
* For more information, see External metrics * ingestion in the Compute Optimizer User Guide. *
* * @param externalMetricsPreference * The provider of the external metrics recommendation preference to create or update. *
* Specify a valid provider in the source
field to activate the preference. To delete this
* preference, see the DeleteRecommendationPreferences action.
*
* This preference can only be set for the Ec2Instance
resource type.
*
* For more information, see External * metrics ingestion in the Compute Optimizer User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public PutRecommendationPreferencesRequest 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 (getResourceType() != null) sb.append("ResourceType: ").append(getResourceType()).append(","); if (getScope() != null) sb.append("Scope: ").append(getScope()).append(","); if (getEnhancedInfrastructureMetrics() != null) sb.append("EnhancedInfrastructureMetrics: ").append(getEnhancedInfrastructureMetrics()).append(","); if (getInferredWorkloadTypes() != null) sb.append("InferredWorkloadTypes: ").append(getInferredWorkloadTypes()).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 PutRecommendationPreferencesRequest == false) return false; PutRecommendationPreferencesRequest other = (PutRecommendationPreferencesRequest) obj; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false; if (other.getScope() == null ^ this.getScope() == null) return false; if (other.getScope() != null && other.getScope().equals(this.getScope()) == false) return false; if (other.getEnhancedInfrastructureMetrics() == null ^ this.getEnhancedInfrastructureMetrics() == null) return false; if (other.getEnhancedInfrastructureMetrics() != null && other.getEnhancedInfrastructureMetrics().equals(this.getEnhancedInfrastructureMetrics()) == false) return false; if (other.getInferredWorkloadTypes() == null ^ this.getInferredWorkloadTypes() == null) return false; if (other.getInferredWorkloadTypes() != null && other.getInferredWorkloadTypes().equals(this.getInferredWorkloadTypes()) == 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 + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getScope() == null) ? 0 : getScope().hashCode()); hashCode = prime * hashCode + ((getEnhancedInfrastructureMetrics() == null) ? 0 : getEnhancedInfrastructureMetrics().hashCode()); hashCode = prime * hashCode + ((getInferredWorkloadTypes() == null) ? 0 : getInferredWorkloadTypes().hashCode()); hashCode = prime * hashCode + ((getExternalMetricsPreference() == null) ? 0 : getExternalMetricsPreference().hashCode()); return hashCode; } @Override public PutRecommendationPreferencesRequest clone() { return (PutRecommendationPreferencesRequest) super.clone(); } }