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

com.tencentcloudapi.as.v20180419.models.ModifyScalingPolicyRequest Maven / Gradle / Ivy

/*
 * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License 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.tencentcloudapi.as.v20180419.models;

import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;

public class ModifyScalingPolicyRequest extends AbstractModel{

    /**
    * Alarm policy ID.
    */
    @SerializedName("AutoScalingPolicyId")
    @Expose
    private String AutoScalingPolicyId;

    /**
    * Alarm policy name.
    */
    @SerializedName("ScalingPolicyName")
    @Expose
    private String ScalingPolicyName;

    /**
    * The method to adjust the desired number of instances after the alarm is triggered. Value range: 
  • CHANGE_IN_CAPACITY: Increase or decrease the desired number of instances
  • EXACT_CAPACITY: Adjust to the specified desired number of instances
  • PERCENT_CHANGE_IN_CAPACITY: Adjust the desired number of instances by percentage
  • */ @SerializedName("AdjustmentType") @Expose private String AdjustmentType; /** * The adjusted value of desired number of instances after the alarm is triggered. Value range:
  • When AdjustmentType is CHANGE_IN_CAPACITY, if AdjustmentValue is a positive value, some new instances will be added after the alarm is triggered, and if it is a negative value, some existing instances will be removed after the alarm is triggered
  • When AdjustmentType is EXACT_CAPACITY, the value of AdjustmentValue is the desired number of instances after the alarm is triggered, which should be equal to or greater than 0
  • When AdjustmentType is PERCENT_CHANGE_IN_CAPACITY, if AdjusmentValue (in %) is a positive value, new instances will be added by percentage after the alarm is triggered; if it is a negative value, existing instances will be removed by percentage after the alarm is triggered. */ @SerializedName("AdjustmentValue") @Expose private Long AdjustmentValue; /** * Cooldown period in seconds. */ @SerializedName("Cooldown") @Expose private Long Cooldown; /** * Alarm monitoring metric. */ @SerializedName("MetricAlarm") @Expose private MetricAlarm MetricAlarm; /** * Notification group ID, which is the set of user group IDs. You can query the user group IDs through the [ListGroups](https://intl.cloud.tencent.com/document/product/598/34589?from_cn_redirect=1) API. If you want to clear the user group, you need to pass in the specific string "NULL" to the list. */ @SerializedName("NotificationUserGroupIds") @Expose private String [] NotificationUserGroupIds; /** * Get Alarm policy ID. * @return AutoScalingPolicyId Alarm policy ID. */ public String getAutoScalingPolicyId() { return this.AutoScalingPolicyId; } /** * Set Alarm policy ID. * @param AutoScalingPolicyId Alarm policy ID. */ public void setAutoScalingPolicyId(String AutoScalingPolicyId) { this.AutoScalingPolicyId = AutoScalingPolicyId; } /** * Get Alarm policy name. * @return ScalingPolicyName Alarm policy name. */ public String getScalingPolicyName() { return this.ScalingPolicyName; } /** * Set Alarm policy name. * @param ScalingPolicyName Alarm policy name. */ public void setScalingPolicyName(String ScalingPolicyName) { this.ScalingPolicyName = ScalingPolicyName; } /** * Get The method to adjust the desired number of instances after the alarm is triggered. Value range:
  • CHANGE_IN_CAPACITY: Increase or decrease the desired number of instances
  • EXACT_CAPACITY: Adjust to the specified desired number of instances
  • PERCENT_CHANGE_IN_CAPACITY: Adjust the desired number of instances by percentage
  • * @return AdjustmentType The method to adjust the desired number of instances after the alarm is triggered. Value range:
  • CHANGE_IN_CAPACITY: Increase or decrease the desired number of instances
  • EXACT_CAPACITY: Adjust to the specified desired number of instances
  • PERCENT_CHANGE_IN_CAPACITY: Adjust the desired number of instances by percentage
  • */ public String getAdjustmentType() { return this.AdjustmentType; } /** * Set The method to adjust the desired number of instances after the alarm is triggered. Value range:
  • CHANGE_IN_CAPACITY: Increase or decrease the desired number of instances
  • EXACT_CAPACITY: Adjust to the specified desired number of instances
  • PERCENT_CHANGE_IN_CAPACITY: Adjust the desired number of instances by percentage
  • * @param AdjustmentType The method to adjust the desired number of instances after the alarm is triggered. Value range:
  • CHANGE_IN_CAPACITY: Increase or decrease the desired number of instances
  • EXACT_CAPACITY: Adjust to the specified desired number of instances
  • PERCENT_CHANGE_IN_CAPACITY: Adjust the desired number of instances by percentage
  • */ public void setAdjustmentType(String AdjustmentType) { this.AdjustmentType = AdjustmentType; } /** * Get The adjusted value of desired number of instances after the alarm is triggered. Value range:
  • When AdjustmentType is CHANGE_IN_CAPACITY, if AdjustmentValue is a positive value, some new instances will be added after the alarm is triggered, and if it is a negative value, some existing instances will be removed after the alarm is triggered
  • When AdjustmentType is EXACT_CAPACITY, the value of AdjustmentValue is the desired number of instances after the alarm is triggered, which should be equal to or greater than 0
  • When AdjustmentType is PERCENT_CHANGE_IN_CAPACITY, if AdjusmentValue (in %) is a positive value, new instances will be added by percentage after the alarm is triggered; if it is a negative value, existing instances will be removed by percentage after the alarm is triggered. * @return AdjustmentValue The adjusted value of desired number of instances after the alarm is triggered. Value range:
  • When AdjustmentType is CHANGE_IN_CAPACITY, if AdjustmentValue is a positive value, some new instances will be added after the alarm is triggered, and if it is a negative value, some existing instances will be removed after the alarm is triggered
  • When AdjustmentType is EXACT_CAPACITY, the value of AdjustmentValue is the desired number of instances after the alarm is triggered, which should be equal to or greater than 0
  • When AdjustmentType is PERCENT_CHANGE_IN_CAPACITY, if AdjusmentValue (in %) is a positive value, new instances will be added by percentage after the alarm is triggered; if it is a negative value, existing instances will be removed by percentage after the alarm is triggered. */ public Long getAdjustmentValue() { return this.AdjustmentValue; } /** * Set The adjusted value of desired number of instances after the alarm is triggered. Value range:
  • When AdjustmentType is CHANGE_IN_CAPACITY, if AdjustmentValue is a positive value, some new instances will be added after the alarm is triggered, and if it is a negative value, some existing instances will be removed after the alarm is triggered
  • When AdjustmentType is EXACT_CAPACITY, the value of AdjustmentValue is the desired number of instances after the alarm is triggered, which should be equal to or greater than 0
  • When AdjustmentType is PERCENT_CHANGE_IN_CAPACITY, if AdjusmentValue (in %) is a positive value, new instances will be added by percentage after the alarm is triggered; if it is a negative value, existing instances will be removed by percentage after the alarm is triggered. * @param AdjustmentValue The adjusted value of desired number of instances after the alarm is triggered. Value range:
  • When AdjustmentType is CHANGE_IN_CAPACITY, if AdjustmentValue is a positive value, some new instances will be added after the alarm is triggered, and if it is a negative value, some existing instances will be removed after the alarm is triggered
  • When AdjustmentType is EXACT_CAPACITY, the value of AdjustmentValue is the desired number of instances after the alarm is triggered, which should be equal to or greater than 0
  • When AdjustmentType is PERCENT_CHANGE_IN_CAPACITY, if AdjusmentValue (in %) is a positive value, new instances will be added by percentage after the alarm is triggered; if it is a negative value, existing instances will be removed by percentage after the alarm is triggered. */ public void setAdjustmentValue(Long AdjustmentValue) { this.AdjustmentValue = AdjustmentValue; } /** * Get Cooldown period in seconds. * @return Cooldown Cooldown period in seconds. */ public Long getCooldown() { return this.Cooldown; } /** * Set Cooldown period in seconds. * @param Cooldown Cooldown period in seconds. */ public void setCooldown(Long Cooldown) { this.Cooldown = Cooldown; } /** * Get Alarm monitoring metric. * @return MetricAlarm Alarm monitoring metric. */ public MetricAlarm getMetricAlarm() { return this.MetricAlarm; } /** * Set Alarm monitoring metric. * @param MetricAlarm Alarm monitoring metric. */ public void setMetricAlarm(MetricAlarm MetricAlarm) { this.MetricAlarm = MetricAlarm; } /** * Get Notification group ID, which is the set of user group IDs. You can query the user group IDs through the [ListGroups](https://intl.cloud.tencent.com/document/product/598/34589?from_cn_redirect=1) API. If you want to clear the user group, you need to pass in the specific string "NULL" to the list. * @return NotificationUserGroupIds Notification group ID, which is the set of user group IDs. You can query the user group IDs through the [ListGroups](https://intl.cloud.tencent.com/document/product/598/34589?from_cn_redirect=1) API. If you want to clear the user group, you need to pass in the specific string "NULL" to the list. */ public String [] getNotificationUserGroupIds() { return this.NotificationUserGroupIds; } /** * Set Notification group ID, which is the set of user group IDs. You can query the user group IDs through the [ListGroups](https://intl.cloud.tencent.com/document/product/598/34589?from_cn_redirect=1) API. If you want to clear the user group, you need to pass in the specific string "NULL" to the list. * @param NotificationUserGroupIds Notification group ID, which is the set of user group IDs. You can query the user group IDs through the [ListGroups](https://intl.cloud.tencent.com/document/product/598/34589?from_cn_redirect=1) API. If you want to clear the user group, you need to pass in the specific string "NULL" to the list. */ public void setNotificationUserGroupIds(String [] NotificationUserGroupIds) { this.NotificationUserGroupIds = NotificationUserGroupIds; } public ModifyScalingPolicyRequest() { } /** * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, * and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. */ public ModifyScalingPolicyRequest(ModifyScalingPolicyRequest source) { if (source.AutoScalingPolicyId != null) { this.AutoScalingPolicyId = new String(source.AutoScalingPolicyId); } if (source.ScalingPolicyName != null) { this.ScalingPolicyName = new String(source.ScalingPolicyName); } if (source.AdjustmentType != null) { this.AdjustmentType = new String(source.AdjustmentType); } if (source.AdjustmentValue != null) { this.AdjustmentValue = new Long(source.AdjustmentValue); } if (source.Cooldown != null) { this.Cooldown = new Long(source.Cooldown); } if (source.MetricAlarm != null) { this.MetricAlarm = new MetricAlarm(source.MetricAlarm); } if (source.NotificationUserGroupIds != null) { this.NotificationUserGroupIds = new String[source.NotificationUserGroupIds.length]; for (int i = 0; i < source.NotificationUserGroupIds.length; i++) { this.NotificationUserGroupIds[i] = new String(source.NotificationUserGroupIds[i]); } } } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap map, String prefix) { this.setParamSimple(map, prefix + "AutoScalingPolicyId", this.AutoScalingPolicyId); this.setParamSimple(map, prefix + "ScalingPolicyName", this.ScalingPolicyName); this.setParamSimple(map, prefix + "AdjustmentType", this.AdjustmentType); this.setParamSimple(map, prefix + "AdjustmentValue", this.AdjustmentValue); this.setParamSimple(map, prefix + "Cooldown", this.Cooldown); this.setParamObj(map, prefix + "MetricAlarm.", this.MetricAlarm); this.setParamArraySimple(map, prefix + "NotificationUserGroupIds.", this.NotificationUserGroupIds); } }




  • © 2015 - 2025 Weber Informatics LLC | Privacy Policy