com.tencentcloudapi.as.v20180419.models.ScalingPolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tencentcloud-sdk-java-as Show documentation
Show all versions of tencentcloud-sdk-java-as Show documentation
Tencent Cloud Open API SDK for Java
/*
* 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 ScalingPolicy extends AbstractModel{
/**
* 伸缩组ID。
*/
@SerializedName("AutoScalingGroupId")
@Expose
private String AutoScalingGroupId;
/**
* 告警触发策略ID。
*/
@SerializedName("AutoScalingPolicyId")
@Expose
private String AutoScalingPolicyId;
/**
* 告警触发策略名称。
*/
@SerializedName("ScalingPolicyName")
@Expose
private String ScalingPolicyName;
/**
* 告警触发后,期望实例数修改方式。取值 :
CHANGE_IN_CAPACITY:增加或减少若干期望实例数 EXACT_CAPACITY:调整至指定期望实例数 PERCENT_CHANGE_IN_CAPACITY:按百分比调整期望实例数
*/
@SerializedName("AdjustmentType")
@Expose
private String AdjustmentType;
/**
* 告警触发后,期望实例数的调整值。
*/
@SerializedName("AdjustmentValue")
@Expose
private Long AdjustmentValue;
/**
* 冷却时间。
*/
@SerializedName("Cooldown")
@Expose
private Long Cooldown;
/**
* 告警监控指标。
*/
@SerializedName("MetricAlarm")
@Expose
private MetricAlarm MetricAlarm;
/**
* 通知组ID,即为用户组ID集合。
*/
@SerializedName("NotificationUserGroupIds")
@Expose
private String [] NotificationUserGroupIds;
/**
* Get 伸缩组ID。
* @return AutoScalingGroupId 伸缩组ID。
*/
public String getAutoScalingGroupId() {
return this.AutoScalingGroupId;
}
/**
* Set 伸缩组ID。
* @param AutoScalingGroupId 伸缩组ID。
*/
public void setAutoScalingGroupId(String AutoScalingGroupId) {
this.AutoScalingGroupId = AutoScalingGroupId;
}
/**
* Get 告警触发策略ID。
* @return AutoScalingPolicyId 告警触发策略ID。
*/
public String getAutoScalingPolicyId() {
return this.AutoScalingPolicyId;
}
/**
* Set 告警触发策略ID。
* @param AutoScalingPolicyId 告警触发策略ID。
*/
public void setAutoScalingPolicyId(String AutoScalingPolicyId) {
this.AutoScalingPolicyId = AutoScalingPolicyId;
}
/**
* Get 告警触发策略名称。
* @return ScalingPolicyName 告警触发策略名称。
*/
public String getScalingPolicyName() {
return this.ScalingPolicyName;
}
/**
* Set 告警触发策略名称。
* @param ScalingPolicyName 告警触发策略名称。
*/
public void setScalingPolicyName(String ScalingPolicyName) {
this.ScalingPolicyName = ScalingPolicyName;
}
/**
* Get 告警触发后,期望实例数修改方式。取值 :
CHANGE_IN_CAPACITY:增加或减少若干期望实例数 EXACT_CAPACITY:调整至指定期望实例数 PERCENT_CHANGE_IN_CAPACITY:按百分比调整期望实例数
* @return AdjustmentType 告警触发后,期望实例数修改方式。取值 :
CHANGE_IN_CAPACITY:增加或减少若干期望实例数 EXACT_CAPACITY:调整至指定期望实例数 PERCENT_CHANGE_IN_CAPACITY:按百分比调整期望实例数
*/
public String getAdjustmentType() {
return this.AdjustmentType;
}
/**
* Set 告警触发后,期望实例数修改方式。取值 :
CHANGE_IN_CAPACITY:增加或减少若干期望实例数 EXACT_CAPACITY:调整至指定期望实例数 PERCENT_CHANGE_IN_CAPACITY:按百分比调整期望实例数
* @param AdjustmentType 告警触发后,期望实例数修改方式。取值 :
CHANGE_IN_CAPACITY:增加或减少若干期望实例数 EXACT_CAPACITY:调整至指定期望实例数 PERCENT_CHANGE_IN_CAPACITY:按百分比调整期望实例数
*/
public void setAdjustmentType(String AdjustmentType) {
this.AdjustmentType = AdjustmentType;
}
/**
* Get 告警触发后,期望实例数的调整值。
* @return AdjustmentValue 告警触发后,期望实例数的调整值。
*/
public Long getAdjustmentValue() {
return this.AdjustmentValue;
}
/**
* Set 告警触发后,期望实例数的调整值。
* @param AdjustmentValue 告警触发后,期望实例数的调整值。
*/
public void setAdjustmentValue(Long AdjustmentValue) {
this.AdjustmentValue = AdjustmentValue;
}
/**
* Get 冷却时间。
* @return Cooldown 冷却时间。
*/
public Long getCooldown() {
return this.Cooldown;
}
/**
* Set 冷却时间。
* @param Cooldown 冷却时间。
*/
public void setCooldown(Long Cooldown) {
this.Cooldown = Cooldown;
}
/**
* Get 告警监控指标。
* @return MetricAlarm 告警监控指标。
*/
public MetricAlarm getMetricAlarm() {
return this.MetricAlarm;
}
/**
* Set 告警监控指标。
* @param MetricAlarm 告警监控指标。
*/
public void setMetricAlarm(MetricAlarm MetricAlarm) {
this.MetricAlarm = MetricAlarm;
}
/**
* Get 通知组ID,即为用户组ID集合。
* @return NotificationUserGroupIds 通知组ID,即为用户组ID集合。
*/
public String [] getNotificationUserGroupIds() {
return this.NotificationUserGroupIds;
}
/**
* Set 通知组ID,即为用户组ID集合。
* @param NotificationUserGroupIds 通知组ID,即为用户组ID集合。
*/
public void setNotificationUserGroupIds(String [] NotificationUserGroupIds) {
this.NotificationUserGroupIds = NotificationUserGroupIds;
}
public ScalingPolicy() {
}
/**
* 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 ScalingPolicy(ScalingPolicy source) {
if (source.AutoScalingGroupId != null) {
this.AutoScalingGroupId = new String(source.AutoScalingGroupId);
}
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 + "AutoScalingGroupId", this.AutoScalingGroupId);
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);
}
}