com.tencentcloudapi.as.v20180419.models.CreateLifecycleHookRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tencentcloud-sdk-java-intl-en Show documentation
Show all versions of tencentcloud-sdk-java-intl-en Show documentation
Tencent Cloud 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.tencentcloudapi.common.SSEResponseModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class CreateLifecycleHookRequest extends AbstractModel {
/**
* Auto scaling group ID
*/
@SerializedName("AutoScalingGroupId")
@Expose
private String AutoScalingGroupId;
/**
* Lifecycle hook name, which can contain Chinese characters, letters, numbers, underscores (_), hyphens (-), and periods (.) with a maximum length of 128 bytes.
*/
@SerializedName("LifecycleHookName")
@Expose
private String LifecycleHookName;
/**
* Scenario for the lifecycle hook. Valid values: "INSTANCE_LAUNCHING" and "INSTANCE_TERMINATING"
*/
@SerializedName("LifecycleTransition")
@Expose
private String LifecycleTransition;
/**
* Defined actions when lifecycle hook times out. Valid values: "CONTINUE" and "ABANDON". Default value: "CONTINUE"
*/
@SerializedName("DefaultResult")
@Expose
private String DefaultResult;
/**
* The maximum length of time (in seconds) that can elapse before the lifecycle hook times out. Value range: 30-7200. Default value: 300
*/
@SerializedName("HeartbeatTimeout")
@Expose
private Long HeartbeatTimeout;
/**
* Additional information of a notification that Auto Scaling sends to targets. This parameter is set when you configure a notification (default value: ""). Up to 1024 characters are allowed.
*/
@SerializedName("NotificationMetadata")
@Expose
private String NotificationMetadata;
/**
* Notification target. `NotificationTarget` and `LifecycleCommand` cannot be specified at the same time.
*/
@SerializedName("NotificationTarget")
@Expose
private NotificationTarget NotificationTarget;
/**
* The scenario where the lifecycle hook is applied. `EXTENSION`: the lifecycle hook will be triggered when AttachInstances, DetachInstances or RemoveInstaces is called. `NORMAL`: the lifecycle hook is not triggered by the above APIs.
*/
@SerializedName("LifecycleTransitionType")
@Expose
private String LifecycleTransitionType;
/**
* Remote command execution object. `NotificationTarget` and `LifecycleCommand` cannot be specified at the same time.
*/
@SerializedName("LifecycleCommand")
@Expose
private LifecycleCommand LifecycleCommand;
/**
* Get Auto scaling group ID
* @return AutoScalingGroupId Auto scaling group ID
*/
public String getAutoScalingGroupId() {
return this.AutoScalingGroupId;
}
/**
* Set Auto scaling group ID
* @param AutoScalingGroupId Auto scaling group ID
*/
public void setAutoScalingGroupId(String AutoScalingGroupId) {
this.AutoScalingGroupId = AutoScalingGroupId;
}
/**
* Get Lifecycle hook name, which can contain Chinese characters, letters, numbers, underscores (_), hyphens (-), and periods (.) with a maximum length of 128 bytes.
* @return LifecycleHookName Lifecycle hook name, which can contain Chinese characters, letters, numbers, underscores (_), hyphens (-), and periods (.) with a maximum length of 128 bytes.
*/
public String getLifecycleHookName() {
return this.LifecycleHookName;
}
/**
* Set Lifecycle hook name, which can contain Chinese characters, letters, numbers, underscores (_), hyphens (-), and periods (.) with a maximum length of 128 bytes.
* @param LifecycleHookName Lifecycle hook name, which can contain Chinese characters, letters, numbers, underscores (_), hyphens (-), and periods (.) with a maximum length of 128 bytes.
*/
public void setLifecycleHookName(String LifecycleHookName) {
this.LifecycleHookName = LifecycleHookName;
}
/**
* Get Scenario for the lifecycle hook. Valid values: "INSTANCE_LAUNCHING" and "INSTANCE_TERMINATING"
* @return LifecycleTransition Scenario for the lifecycle hook. Valid values: "INSTANCE_LAUNCHING" and "INSTANCE_TERMINATING"
*/
public String getLifecycleTransition() {
return this.LifecycleTransition;
}
/**
* Set Scenario for the lifecycle hook. Valid values: "INSTANCE_LAUNCHING" and "INSTANCE_TERMINATING"
* @param LifecycleTransition Scenario for the lifecycle hook. Valid values: "INSTANCE_LAUNCHING" and "INSTANCE_TERMINATING"
*/
public void setLifecycleTransition(String LifecycleTransition) {
this.LifecycleTransition = LifecycleTransition;
}
/**
* Get Defined actions when lifecycle hook times out. Valid values: "CONTINUE" and "ABANDON". Default value: "CONTINUE"
* @return DefaultResult Defined actions when lifecycle hook times out. Valid values: "CONTINUE" and "ABANDON". Default value: "CONTINUE"
*/
public String getDefaultResult() {
return this.DefaultResult;
}
/**
* Set Defined actions when lifecycle hook times out. Valid values: "CONTINUE" and "ABANDON". Default value: "CONTINUE"
* @param DefaultResult Defined actions when lifecycle hook times out. Valid values: "CONTINUE" and "ABANDON". Default value: "CONTINUE"
*/
public void setDefaultResult(String DefaultResult) {
this.DefaultResult = DefaultResult;
}
/**
* Get The maximum length of time (in seconds) that can elapse before the lifecycle hook times out. Value range: 30-7200. Default value: 300
* @return HeartbeatTimeout The maximum length of time (in seconds) that can elapse before the lifecycle hook times out. Value range: 30-7200. Default value: 300
*/
public Long getHeartbeatTimeout() {
return this.HeartbeatTimeout;
}
/**
* Set The maximum length of time (in seconds) that can elapse before the lifecycle hook times out. Value range: 30-7200. Default value: 300
* @param HeartbeatTimeout The maximum length of time (in seconds) that can elapse before the lifecycle hook times out. Value range: 30-7200. Default value: 300
*/
public void setHeartbeatTimeout(Long HeartbeatTimeout) {
this.HeartbeatTimeout = HeartbeatTimeout;
}
/**
* Get Additional information of a notification that Auto Scaling sends to targets. This parameter is set when you configure a notification (default value: ""). Up to 1024 characters are allowed.
* @return NotificationMetadata Additional information of a notification that Auto Scaling sends to targets. This parameter is set when you configure a notification (default value: ""). Up to 1024 characters are allowed.
*/
public String getNotificationMetadata() {
return this.NotificationMetadata;
}
/**
* Set Additional information of a notification that Auto Scaling sends to targets. This parameter is set when you configure a notification (default value: ""). Up to 1024 characters are allowed.
* @param NotificationMetadata Additional information of a notification that Auto Scaling sends to targets. This parameter is set when you configure a notification (default value: ""). Up to 1024 characters are allowed.
*/
public void setNotificationMetadata(String NotificationMetadata) {
this.NotificationMetadata = NotificationMetadata;
}
/**
* Get Notification target. `NotificationTarget` and `LifecycleCommand` cannot be specified at the same time.
* @return NotificationTarget Notification target. `NotificationTarget` and `LifecycleCommand` cannot be specified at the same time.
*/
public NotificationTarget getNotificationTarget() {
return this.NotificationTarget;
}
/**
* Set Notification target. `NotificationTarget` and `LifecycleCommand` cannot be specified at the same time.
* @param NotificationTarget Notification target. `NotificationTarget` and `LifecycleCommand` cannot be specified at the same time.
*/
public void setNotificationTarget(NotificationTarget NotificationTarget) {
this.NotificationTarget = NotificationTarget;
}
/**
* Get The scenario where the lifecycle hook is applied. `EXTENSION`: the lifecycle hook will be triggered when AttachInstances, DetachInstances or RemoveInstaces is called. `NORMAL`: the lifecycle hook is not triggered by the above APIs.
* @return LifecycleTransitionType The scenario where the lifecycle hook is applied. `EXTENSION`: the lifecycle hook will be triggered when AttachInstances, DetachInstances or RemoveInstaces is called. `NORMAL`: the lifecycle hook is not triggered by the above APIs.
*/
public String getLifecycleTransitionType() {
return this.LifecycleTransitionType;
}
/**
* Set The scenario where the lifecycle hook is applied. `EXTENSION`: the lifecycle hook will be triggered when AttachInstances, DetachInstances or RemoveInstaces is called. `NORMAL`: the lifecycle hook is not triggered by the above APIs.
* @param LifecycleTransitionType The scenario where the lifecycle hook is applied. `EXTENSION`: the lifecycle hook will be triggered when AttachInstances, DetachInstances or RemoveInstaces is called. `NORMAL`: the lifecycle hook is not triggered by the above APIs.
*/
public void setLifecycleTransitionType(String LifecycleTransitionType) {
this.LifecycleTransitionType = LifecycleTransitionType;
}
/**
* Get Remote command execution object. `NotificationTarget` and `LifecycleCommand` cannot be specified at the same time.
* @return LifecycleCommand Remote command execution object. `NotificationTarget` and `LifecycleCommand` cannot be specified at the same time.
*/
public LifecycleCommand getLifecycleCommand() {
return this.LifecycleCommand;
}
/**
* Set Remote command execution object. `NotificationTarget` and `LifecycleCommand` cannot be specified at the same time.
* @param LifecycleCommand Remote command execution object. `NotificationTarget` and `LifecycleCommand` cannot be specified at the same time.
*/
public void setLifecycleCommand(LifecycleCommand LifecycleCommand) {
this.LifecycleCommand = LifecycleCommand;
}
public CreateLifecycleHookRequest() {
}
/**
* 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 CreateLifecycleHookRequest(CreateLifecycleHookRequest source) {
if (source.AutoScalingGroupId != null) {
this.AutoScalingGroupId = new String(source.AutoScalingGroupId);
}
if (source.LifecycleHookName != null) {
this.LifecycleHookName = new String(source.LifecycleHookName);
}
if (source.LifecycleTransition != null) {
this.LifecycleTransition = new String(source.LifecycleTransition);
}
if (source.DefaultResult != null) {
this.DefaultResult = new String(source.DefaultResult);
}
if (source.HeartbeatTimeout != null) {
this.HeartbeatTimeout = new Long(source.HeartbeatTimeout);
}
if (source.NotificationMetadata != null) {
this.NotificationMetadata = new String(source.NotificationMetadata);
}
if (source.NotificationTarget != null) {
this.NotificationTarget = new NotificationTarget(source.NotificationTarget);
}
if (source.LifecycleTransitionType != null) {
this.LifecycleTransitionType = new String(source.LifecycleTransitionType);
}
if (source.LifecycleCommand != null) {
this.LifecycleCommand = new LifecycleCommand(source.LifecycleCommand);
}
}
/**
* 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 + "LifecycleHookName", this.LifecycleHookName);
this.setParamSimple(map, prefix + "LifecycleTransition", this.LifecycleTransition);
this.setParamSimple(map, prefix + "DefaultResult", this.DefaultResult);
this.setParamSimple(map, prefix + "HeartbeatTimeout", this.HeartbeatTimeout);
this.setParamSimple(map, prefix + "NotificationMetadata", this.NotificationMetadata);
this.setParamObj(map, prefix + "NotificationTarget.", this.NotificationTarget);
this.setParamSimple(map, prefix + "LifecycleTransitionType", this.LifecycleTransitionType);
this.setParamObj(map, prefix + "LifecycleCommand.", this.LifecycleCommand);
}
}