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

com.amazonaws.services.autoscaling.model.PutScalingPolicyRequest Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2013-2018 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.autoscaling.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 PutScalingPolicyRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The name of the Auto Scaling group. *

*/ private String autoScalingGroupName; /** *

* The name of the policy. *

*/ private String policyName; /** *

* The policy type. The valid values are SimpleScaling, StepScaling, and * TargetTrackingScaling. If the policy type is null, the value is treated as * SimpleScaling. *

*/ private String policyType; /** *

* The adjustment type. The valid values are ChangeInCapacity, ExactCapacity, and * PercentChangeInCapacity. *

*

* This parameter is supported if the policy type is SimpleScaling or StepScaling. *

*

* For more information, see Dynamic Scaling * in the Auto Scaling User Guide. *

*/ private String adjustmentType; /** *

* Available for backward compatibility. Use MinAdjustmentMagnitude instead. *

*/ private Integer minAdjustmentStep; /** *

* The minimum number of instances to scale. If the value of AdjustmentType is * PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the Auto * Scaling group by at least this many instances. Otherwise, the error is ValidationError. *

*

* This parameter is supported if the policy type is SimpleScaling or StepScaling. *

*/ private Integer minAdjustmentMagnitude; /** *

* The amount by which to scale, based on the specified adjustment type. A positive value adds to the current * capacity while a negative number removes from the current capacity. *

*

* This parameter is required if the policy type is SimpleScaling and not supported otherwise. *

*/ private Integer scalingAdjustment; /** *

* The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can * start. If this parameter is not specified, the default cooldown period for the group applies. *

*

* This parameter is supported if the policy type is SimpleScaling. *

*

* For more information, see Auto * Scaling Cooldowns in the Auto Scaling User Guide. *

*/ private Integer cooldown; /** *

* The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, * and Average. If the aggregation type is null, the value is treated as Average. *

*

* This parameter is supported if the policy type is StepScaling. *

*/ private String metricAggregationType; /** *

* A set of adjustments that enable you to scale based on the size of the alarm breach. *

*

* This parameter is required if the policy type is StepScaling and not supported otherwise. *

*/ private com.amazonaws.internal.SdkInternalList stepAdjustments; /** *

* The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. The * default is to use the value specified for the default cooldown period for the group. *

*

* This parameter is supported if the policy type is StepScaling or TargetTrackingScaling. *

*/ private Integer estimatedInstanceWarmup; /** *

* A target tracking policy. *

*

* This parameter is required if the policy type is TargetTrackingScaling and not supported otherwise. *

*/ private TargetTrackingConfiguration targetTrackingConfiguration; /** *

* The name of the Auto Scaling group. *

* * @param autoScalingGroupName * The name of the Auto Scaling group. */ public void setAutoScalingGroupName(String autoScalingGroupName) { this.autoScalingGroupName = autoScalingGroupName; } /** *

* The name of the Auto Scaling group. *

* * @return The name of the Auto Scaling group. */ public String getAutoScalingGroupName() { return this.autoScalingGroupName; } /** *

* The name of the Auto Scaling group. *

* * @param autoScalingGroupName * The name of the Auto Scaling group. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScalingPolicyRequest withAutoScalingGroupName(String autoScalingGroupName) { setAutoScalingGroupName(autoScalingGroupName); return this; } /** *

* The name of the policy. *

* * @param policyName * The name of the policy. */ public void setPolicyName(String policyName) { this.policyName = policyName; } /** *

* The name of the policy. *

* * @return The name of the policy. */ public String getPolicyName() { return this.policyName; } /** *

* The name of the policy. *

* * @param policyName * The name of the policy. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScalingPolicyRequest withPolicyName(String policyName) { setPolicyName(policyName); return this; } /** *

* The policy type. The valid values are SimpleScaling, StepScaling, and * TargetTrackingScaling. If the policy type is null, the value is treated as * SimpleScaling. *

* * @param policyType * The policy type. The valid values are SimpleScaling, StepScaling, and * TargetTrackingScaling. If the policy type is null, the value is treated as * SimpleScaling. */ public void setPolicyType(String policyType) { this.policyType = policyType; } /** *

* The policy type. The valid values are SimpleScaling, StepScaling, and * TargetTrackingScaling. If the policy type is null, the value is treated as * SimpleScaling. *

* * @return The policy type. The valid values are SimpleScaling, StepScaling, and * TargetTrackingScaling. If the policy type is null, the value is treated as * SimpleScaling. */ public String getPolicyType() { return this.policyType; } /** *

* The policy type. The valid values are SimpleScaling, StepScaling, and * TargetTrackingScaling. If the policy type is null, the value is treated as * SimpleScaling. *

* * @param policyType * The policy type. The valid values are SimpleScaling, StepScaling, and * TargetTrackingScaling. If the policy type is null, the value is treated as * SimpleScaling. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScalingPolicyRequest withPolicyType(String policyType) { setPolicyType(policyType); return this; } /** *

* The adjustment type. The valid values are ChangeInCapacity, ExactCapacity, and * PercentChangeInCapacity. *

*

* This parameter is supported if the policy type is SimpleScaling or StepScaling. *

*

* For more information, see Dynamic Scaling * in the Auto Scaling User Guide. *

* * @param adjustmentType * The adjustment type. The valid values are ChangeInCapacity, ExactCapacity, and * PercentChangeInCapacity.

*

* This parameter is supported if the policy type is SimpleScaling or StepScaling. *

*

* For more information, see Dynamic * Scaling in the Auto Scaling User Guide. */ public void setAdjustmentType(String adjustmentType) { this.adjustmentType = adjustmentType; } /** *

* The adjustment type. The valid values are ChangeInCapacity, ExactCapacity, and * PercentChangeInCapacity. *

*

* This parameter is supported if the policy type is SimpleScaling or StepScaling. *

*

* For more information, see Dynamic Scaling * in the Auto Scaling User Guide. *

* * @return The adjustment type. The valid values are ChangeInCapacity, ExactCapacity, and * PercentChangeInCapacity.

*

* This parameter is supported if the policy type is SimpleScaling or StepScaling. *

*

* For more information, see Dynamic * Scaling in the Auto Scaling User Guide. */ public String getAdjustmentType() { return this.adjustmentType; } /** *

* The adjustment type. The valid values are ChangeInCapacity, ExactCapacity, and * PercentChangeInCapacity. *

*

* This parameter is supported if the policy type is SimpleScaling or StepScaling. *

*

* For more information, see Dynamic Scaling * in the Auto Scaling User Guide. *

* * @param adjustmentType * The adjustment type. The valid values are ChangeInCapacity, ExactCapacity, and * PercentChangeInCapacity.

*

* This parameter is supported if the policy type is SimpleScaling or StepScaling. *

*

* For more information, see Dynamic * Scaling in the Auto Scaling User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScalingPolicyRequest withAdjustmentType(String adjustmentType) { setAdjustmentType(adjustmentType); return this; } /** *

* Available for backward compatibility. Use MinAdjustmentMagnitude instead. *

* * @param minAdjustmentStep * Available for backward compatibility. Use MinAdjustmentMagnitude instead. */ public void setMinAdjustmentStep(Integer minAdjustmentStep) { this.minAdjustmentStep = minAdjustmentStep; } /** *

* Available for backward compatibility. Use MinAdjustmentMagnitude instead. *

* * @return Available for backward compatibility. Use MinAdjustmentMagnitude instead. */ public Integer getMinAdjustmentStep() { return this.minAdjustmentStep; } /** *

* Available for backward compatibility. Use MinAdjustmentMagnitude instead. *

* * @param minAdjustmentStep * Available for backward compatibility. Use MinAdjustmentMagnitude instead. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScalingPolicyRequest withMinAdjustmentStep(Integer minAdjustmentStep) { setMinAdjustmentStep(minAdjustmentStep); return this; } /** *

* The minimum number of instances to scale. If the value of AdjustmentType is * PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the Auto * Scaling group by at least this many instances. Otherwise, the error is ValidationError. *

*

* This parameter is supported if the policy type is SimpleScaling or StepScaling. *

* * @param minAdjustmentMagnitude * The minimum number of instances to scale. If the value of AdjustmentType is * PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the * Auto Scaling group by at least this many instances. Otherwise, the error is ValidationError * .

*

* This parameter is supported if the policy type is SimpleScaling or StepScaling. */ public void setMinAdjustmentMagnitude(Integer minAdjustmentMagnitude) { this.minAdjustmentMagnitude = minAdjustmentMagnitude; } /** *

* The minimum number of instances to scale. If the value of AdjustmentType is * PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the Auto * Scaling group by at least this many instances. Otherwise, the error is ValidationError. *

*

* This parameter is supported if the policy type is SimpleScaling or StepScaling. *

* * @return The minimum number of instances to scale. If the value of AdjustmentType is * PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the * Auto Scaling group by at least this many instances. Otherwise, the error is ValidationError * .

*

* This parameter is supported if the policy type is SimpleScaling or StepScaling. */ public Integer getMinAdjustmentMagnitude() { return this.minAdjustmentMagnitude; } /** *

* The minimum number of instances to scale. If the value of AdjustmentType is * PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the Auto * Scaling group by at least this many instances. Otherwise, the error is ValidationError. *

*

* This parameter is supported if the policy type is SimpleScaling or StepScaling. *

* * @param minAdjustmentMagnitude * The minimum number of instances to scale. If the value of AdjustmentType is * PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the * Auto Scaling group by at least this many instances. Otherwise, the error is ValidationError * .

*

* This parameter is supported if the policy type is SimpleScaling or StepScaling. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScalingPolicyRequest withMinAdjustmentMagnitude(Integer minAdjustmentMagnitude) { setMinAdjustmentMagnitude(minAdjustmentMagnitude); return this; } /** *

* The amount by which to scale, based on the specified adjustment type. A positive value adds to the current * capacity while a negative number removes from the current capacity. *

*

* This parameter is required if the policy type is SimpleScaling and not supported otherwise. *

* * @param scalingAdjustment * The amount by which to scale, based on the specified adjustment type. A positive value adds to the current * capacity while a negative number removes from the current capacity.

*

* This parameter is required if the policy type is SimpleScaling and not supported otherwise. */ public void setScalingAdjustment(Integer scalingAdjustment) { this.scalingAdjustment = scalingAdjustment; } /** *

* The amount by which to scale, based on the specified adjustment type. A positive value adds to the current * capacity while a negative number removes from the current capacity. *

*

* This parameter is required if the policy type is SimpleScaling and not supported otherwise. *

* * @return The amount by which to scale, based on the specified adjustment type. A positive value adds to the * current capacity while a negative number removes from the current capacity.

*

* This parameter is required if the policy type is SimpleScaling and not supported otherwise. */ public Integer getScalingAdjustment() { return this.scalingAdjustment; } /** *

* The amount by which to scale, based on the specified adjustment type. A positive value adds to the current * capacity while a negative number removes from the current capacity. *

*

* This parameter is required if the policy type is SimpleScaling and not supported otherwise. *

* * @param scalingAdjustment * The amount by which to scale, based on the specified adjustment type. A positive value adds to the current * capacity while a negative number removes from the current capacity.

*

* This parameter is required if the policy type is SimpleScaling and not supported otherwise. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScalingPolicyRequest withScalingAdjustment(Integer scalingAdjustment) { setScalingAdjustment(scalingAdjustment); return this; } /** *

* The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can * start. If this parameter is not specified, the default cooldown period for the group applies. *

*

* This parameter is supported if the policy type is SimpleScaling. *

*

* For more information, see Auto * Scaling Cooldowns in the Auto Scaling User Guide. *

* * @param cooldown * The amount of time, in seconds, after a scaling activity completes and before the next scaling activity * can start. If this parameter is not specified, the default cooldown period for the group applies.

*

* This parameter is supported if the policy type is SimpleScaling. *

*

* For more information, see Auto Scaling Cooldowns in * the Auto Scaling User Guide. */ public void setCooldown(Integer cooldown) { this.cooldown = cooldown; } /** *

* The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can * start. If this parameter is not specified, the default cooldown period for the group applies. *

*

* This parameter is supported if the policy type is SimpleScaling. *

*

* For more information, see Auto * Scaling Cooldowns in the Auto Scaling User Guide. *

* * @return The amount of time, in seconds, after a scaling activity completes and before the next scaling activity * can start. If this parameter is not specified, the default cooldown period for the group applies.

*

* This parameter is supported if the policy type is SimpleScaling. *

*

* For more information, see Auto Scaling Cooldowns * in the Auto Scaling User Guide. */ public Integer getCooldown() { return this.cooldown; } /** *

* The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can * start. If this parameter is not specified, the default cooldown period for the group applies. *

*

* This parameter is supported if the policy type is SimpleScaling. *

*

* For more information, see Auto * Scaling Cooldowns in the Auto Scaling User Guide. *

* * @param cooldown * The amount of time, in seconds, after a scaling activity completes and before the next scaling activity * can start. If this parameter is not specified, the default cooldown period for the group applies.

*

* This parameter is supported if the policy type is SimpleScaling. *

*

* For more information, see Auto Scaling Cooldowns in * the Auto Scaling User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScalingPolicyRequest withCooldown(Integer cooldown) { setCooldown(cooldown); return this; } /** *

* The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, * and Average. If the aggregation type is null, the value is treated as Average. *

*

* This parameter is supported if the policy type is StepScaling. *

* * @param metricAggregationType * The aggregation type for the CloudWatch metrics. The valid values are Minimum, * Maximum, and Average. If the aggregation type is null, the value is treated as * Average.

*

* This parameter is supported if the policy type is StepScaling. */ public void setMetricAggregationType(String metricAggregationType) { this.metricAggregationType = metricAggregationType; } /** *

* The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, * and Average. If the aggregation type is null, the value is treated as Average. *

*

* This parameter is supported if the policy type is StepScaling. *

* * @return The aggregation type for the CloudWatch metrics. The valid values are Minimum, * Maximum, and Average. If the aggregation type is null, the value is treated as * Average.

*

* This parameter is supported if the policy type is StepScaling. */ public String getMetricAggregationType() { return this.metricAggregationType; } /** *

* The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, * and Average. If the aggregation type is null, the value is treated as Average. *

*

* This parameter is supported if the policy type is StepScaling. *

* * @param metricAggregationType * The aggregation type for the CloudWatch metrics. The valid values are Minimum, * Maximum, and Average. If the aggregation type is null, the value is treated as * Average.

*

* This parameter is supported if the policy type is StepScaling. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScalingPolicyRequest withMetricAggregationType(String metricAggregationType) { setMetricAggregationType(metricAggregationType); return this; } /** *

* A set of adjustments that enable you to scale based on the size of the alarm breach. *

*

* This parameter is required if the policy type is StepScaling and not supported otherwise. *

* * @return A set of adjustments that enable you to scale based on the size of the alarm breach.

*

* This parameter is required if the policy type is StepScaling and not supported otherwise. */ public java.util.List getStepAdjustments() { if (stepAdjustments == null) { stepAdjustments = new com.amazonaws.internal.SdkInternalList(); } return stepAdjustments; } /** *

* A set of adjustments that enable you to scale based on the size of the alarm breach. *

*

* This parameter is required if the policy type is StepScaling and not supported otherwise. *

* * @param stepAdjustments * A set of adjustments that enable you to scale based on the size of the alarm breach.

*

* This parameter is required if the policy type is StepScaling and not supported otherwise. */ public void setStepAdjustments(java.util.Collection stepAdjustments) { if (stepAdjustments == null) { this.stepAdjustments = null; return; } this.stepAdjustments = new com.amazonaws.internal.SdkInternalList(stepAdjustments); } /** *

* A set of adjustments that enable you to scale based on the size of the alarm breach. *

*

* This parameter is required if the policy type is StepScaling and not supported otherwise. *

*

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

* * @param stepAdjustments * A set of adjustments that enable you to scale based on the size of the alarm breach.

*

* This parameter is required if the policy type is StepScaling and not supported otherwise. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScalingPolicyRequest withStepAdjustments(StepAdjustment... stepAdjustments) { if (this.stepAdjustments == null) { setStepAdjustments(new com.amazonaws.internal.SdkInternalList(stepAdjustments.length)); } for (StepAdjustment ele : stepAdjustments) { this.stepAdjustments.add(ele); } return this; } /** *

* A set of adjustments that enable you to scale based on the size of the alarm breach. *

*

* This parameter is required if the policy type is StepScaling and not supported otherwise. *

* * @param stepAdjustments * A set of adjustments that enable you to scale based on the size of the alarm breach.

*

* This parameter is required if the policy type is StepScaling and not supported otherwise. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScalingPolicyRequest withStepAdjustments(java.util.Collection stepAdjustments) { setStepAdjustments(stepAdjustments); return this; } /** *

* The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. The * default is to use the value specified for the default cooldown period for the group. *

*

* This parameter is supported if the policy type is StepScaling or TargetTrackingScaling. *

* * @param estimatedInstanceWarmup * The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. * The default is to use the value specified for the default cooldown period for the group.

*

* This parameter is supported if the policy type is StepScaling or * TargetTrackingScaling. */ public void setEstimatedInstanceWarmup(Integer estimatedInstanceWarmup) { this.estimatedInstanceWarmup = estimatedInstanceWarmup; } /** *

* The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. The * default is to use the value specified for the default cooldown period for the group. *

*

* This parameter is supported if the policy type is StepScaling or TargetTrackingScaling. *

* * @return The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. * The default is to use the value specified for the default cooldown period for the group.

*

* This parameter is supported if the policy type is StepScaling or * TargetTrackingScaling. */ public Integer getEstimatedInstanceWarmup() { return this.estimatedInstanceWarmup; } /** *

* The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. The * default is to use the value specified for the default cooldown period for the group. *

*

* This parameter is supported if the policy type is StepScaling or TargetTrackingScaling. *

* * @param estimatedInstanceWarmup * The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. * The default is to use the value specified for the default cooldown period for the group.

*

* This parameter is supported if the policy type is StepScaling or * TargetTrackingScaling. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScalingPolicyRequest withEstimatedInstanceWarmup(Integer estimatedInstanceWarmup) { setEstimatedInstanceWarmup(estimatedInstanceWarmup); return this; } /** *

* A target tracking policy. *

*

* This parameter is required if the policy type is TargetTrackingScaling and not supported otherwise. *

* * @param targetTrackingConfiguration * A target tracking policy.

*

* This parameter is required if the policy type is TargetTrackingScaling and not supported * otherwise. */ public void setTargetTrackingConfiguration(TargetTrackingConfiguration targetTrackingConfiguration) { this.targetTrackingConfiguration = targetTrackingConfiguration; } /** *

* A target tracking policy. *

*

* This parameter is required if the policy type is TargetTrackingScaling and not supported otherwise. *

* * @return A target tracking policy.

*

* This parameter is required if the policy type is TargetTrackingScaling and not supported * otherwise. */ public TargetTrackingConfiguration getTargetTrackingConfiguration() { return this.targetTrackingConfiguration; } /** *

* A target tracking policy. *

*

* This parameter is required if the policy type is TargetTrackingScaling and not supported otherwise. *

* * @param targetTrackingConfiguration * A target tracking policy.

*

* This parameter is required if the policy type is TargetTrackingScaling and not supported * otherwise. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScalingPolicyRequest withTargetTrackingConfiguration(TargetTrackingConfiguration targetTrackingConfiguration) { setTargetTrackingConfiguration(targetTrackingConfiguration); return this; } /** * Returns a string representation of this object; useful for testing and debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAutoScalingGroupName() != null) sb.append("AutoScalingGroupName: ").append(getAutoScalingGroupName()).append(","); if (getPolicyName() != null) sb.append("PolicyName: ").append(getPolicyName()).append(","); if (getPolicyType() != null) sb.append("PolicyType: ").append(getPolicyType()).append(","); if (getAdjustmentType() != null) sb.append("AdjustmentType: ").append(getAdjustmentType()).append(","); if (getMinAdjustmentStep() != null) sb.append("MinAdjustmentStep: ").append(getMinAdjustmentStep()).append(","); if (getMinAdjustmentMagnitude() != null) sb.append("MinAdjustmentMagnitude: ").append(getMinAdjustmentMagnitude()).append(","); if (getScalingAdjustment() != null) sb.append("ScalingAdjustment: ").append(getScalingAdjustment()).append(","); if (getCooldown() != null) sb.append("Cooldown: ").append(getCooldown()).append(","); if (getMetricAggregationType() != null) sb.append("MetricAggregationType: ").append(getMetricAggregationType()).append(","); if (getStepAdjustments() != null) sb.append("StepAdjustments: ").append(getStepAdjustments()).append(","); if (getEstimatedInstanceWarmup() != null) sb.append("EstimatedInstanceWarmup: ").append(getEstimatedInstanceWarmup()).append(","); if (getTargetTrackingConfiguration() != null) sb.append("TargetTrackingConfiguration: ").append(getTargetTrackingConfiguration()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PutScalingPolicyRequest == false) return false; PutScalingPolicyRequest other = (PutScalingPolicyRequest) obj; if (other.getAutoScalingGroupName() == null ^ this.getAutoScalingGroupName() == null) return false; if (other.getAutoScalingGroupName() != null && other.getAutoScalingGroupName().equals(this.getAutoScalingGroupName()) == false) return false; if (other.getPolicyName() == null ^ this.getPolicyName() == null) return false; if (other.getPolicyName() != null && other.getPolicyName().equals(this.getPolicyName()) == false) return false; if (other.getPolicyType() == null ^ this.getPolicyType() == null) return false; if (other.getPolicyType() != null && other.getPolicyType().equals(this.getPolicyType()) == false) return false; if (other.getAdjustmentType() == null ^ this.getAdjustmentType() == null) return false; if (other.getAdjustmentType() != null && other.getAdjustmentType().equals(this.getAdjustmentType()) == false) return false; if (other.getMinAdjustmentStep() == null ^ this.getMinAdjustmentStep() == null) return false; if (other.getMinAdjustmentStep() != null && other.getMinAdjustmentStep().equals(this.getMinAdjustmentStep()) == false) return false; if (other.getMinAdjustmentMagnitude() == null ^ this.getMinAdjustmentMagnitude() == null) return false; if (other.getMinAdjustmentMagnitude() != null && other.getMinAdjustmentMagnitude().equals(this.getMinAdjustmentMagnitude()) == false) return false; if (other.getScalingAdjustment() == null ^ this.getScalingAdjustment() == null) return false; if (other.getScalingAdjustment() != null && other.getScalingAdjustment().equals(this.getScalingAdjustment()) == false) return false; if (other.getCooldown() == null ^ this.getCooldown() == null) return false; if (other.getCooldown() != null && other.getCooldown().equals(this.getCooldown()) == false) return false; if (other.getMetricAggregationType() == null ^ this.getMetricAggregationType() == null) return false; if (other.getMetricAggregationType() != null && other.getMetricAggregationType().equals(this.getMetricAggregationType()) == false) return false; if (other.getStepAdjustments() == null ^ this.getStepAdjustments() == null) return false; if (other.getStepAdjustments() != null && other.getStepAdjustments().equals(this.getStepAdjustments()) == false) return false; if (other.getEstimatedInstanceWarmup() == null ^ this.getEstimatedInstanceWarmup() == null) return false; if (other.getEstimatedInstanceWarmup() != null && other.getEstimatedInstanceWarmup().equals(this.getEstimatedInstanceWarmup()) == false) return false; if (other.getTargetTrackingConfiguration() == null ^ this.getTargetTrackingConfiguration() == null) return false; if (other.getTargetTrackingConfiguration() != null && other.getTargetTrackingConfiguration().equals(this.getTargetTrackingConfiguration()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoScalingGroupName() == null) ? 0 : getAutoScalingGroupName().hashCode()); hashCode = prime * hashCode + ((getPolicyName() == null) ? 0 : getPolicyName().hashCode()); hashCode = prime * hashCode + ((getPolicyType() == null) ? 0 : getPolicyType().hashCode()); hashCode = prime * hashCode + ((getAdjustmentType() == null) ? 0 : getAdjustmentType().hashCode()); hashCode = prime * hashCode + ((getMinAdjustmentStep() == null) ? 0 : getMinAdjustmentStep().hashCode()); hashCode = prime * hashCode + ((getMinAdjustmentMagnitude() == null) ? 0 : getMinAdjustmentMagnitude().hashCode()); hashCode = prime * hashCode + ((getScalingAdjustment() == null) ? 0 : getScalingAdjustment().hashCode()); hashCode = prime * hashCode + ((getCooldown() == null) ? 0 : getCooldown().hashCode()); hashCode = prime * hashCode + ((getMetricAggregationType() == null) ? 0 : getMetricAggregationType().hashCode()); hashCode = prime * hashCode + ((getStepAdjustments() == null) ? 0 : getStepAdjustments().hashCode()); hashCode = prime * hashCode + ((getEstimatedInstanceWarmup() == null) ? 0 : getEstimatedInstanceWarmup().hashCode()); hashCode = prime * hashCode + ((getTargetTrackingConfiguration() == null) ? 0 : getTargetTrackingConfiguration().hashCode()); return hashCode; } @Override public PutScalingPolicyRequest clone() { return (PutScalingPolicyRequest) super.clone(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy