com.aliyun.sdk.service.ecs20140526.models.ModifyInstanceMaintenanceAttributesRequest Maven / Gradle / Ivy
Show all versions of alibabacloud-ecs20140526 Show documentation
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ecs20140526.models;
import com.aliyun.sdk.gateway.pop.*;
import darabonba.core.*;
import darabonba.core.async.*;
import darabonba.core.sync.*;
import darabonba.core.client.*;
import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;
/**
*
* {@link ModifyInstanceMaintenanceAttributesRequest} extends {@link RequestModel}
*
* ModifyInstanceMaintenanceAttributesRequest
*/
public class ModifyInstanceMaintenanceAttributesRequest extends Request {
@com.aliyun.core.annotation.Host
@com.aliyun.core.annotation.NameInMap("SourceRegionId")
private String sourceRegionId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ActionOnMaintenance")
private String actionOnMaintenance;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("InstanceId")
private java.util.List instanceId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("MaintenanceWindow")
private java.util.List maintenanceWindow;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("NotifyOnMaintenance")
private Boolean notifyOnMaintenance;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("OwnerAccount")
private String ownerAccount;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("OwnerId")
private Long ownerId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("RegionId")
@com.aliyun.core.annotation.Validation(required = true)
private String regionId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ResourceOwnerAccount")
private String resourceOwnerAccount;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ResourceOwnerId")
private Long resourceOwnerId;
private ModifyInstanceMaintenanceAttributesRequest(Builder builder) {
super(builder);
this.sourceRegionId = builder.sourceRegionId;
this.actionOnMaintenance = builder.actionOnMaintenance;
this.instanceId = builder.instanceId;
this.maintenanceWindow = builder.maintenanceWindow;
this.notifyOnMaintenance = builder.notifyOnMaintenance;
this.ownerAccount = builder.ownerAccount;
this.ownerId = builder.ownerId;
this.regionId = builder.regionId;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.resourceOwnerId = builder.resourceOwnerId;
}
public static Builder builder() {
return new Builder();
}
public static ModifyInstanceMaintenanceAttributesRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return sourceRegionId
*/
public String getSourceRegionId() {
return this.sourceRegionId;
}
/**
* @return actionOnMaintenance
*/
public String getActionOnMaintenance() {
return this.actionOnMaintenance;
}
/**
* @return instanceId
*/
public java.util.List getInstanceId() {
return this.instanceId;
}
/**
* @return maintenanceWindow
*/
public java.util.List getMaintenanceWindow() {
return this.maintenanceWindow;
}
/**
* @return notifyOnMaintenance
*/
public Boolean getNotifyOnMaintenance() {
return this.notifyOnMaintenance;
}
/**
* @return ownerAccount
*/
public String getOwnerAccount() {
return this.ownerAccount;
}
/**
* @return ownerId
*/
public Long getOwnerId() {
return this.ownerId;
}
/**
* @return regionId
*/
public String getRegionId() {
return this.regionId;
}
/**
* @return resourceOwnerAccount
*/
public String getResourceOwnerAccount() {
return this.resourceOwnerAccount;
}
/**
* @return resourceOwnerId
*/
public Long getResourceOwnerId() {
return this.resourceOwnerId;
}
public static final class Builder extends Request.Builder {
private String sourceRegionId;
private String actionOnMaintenance;
private java.util.List instanceId;
private java.util.List maintenanceWindow;
private Boolean notifyOnMaintenance;
private String ownerAccount;
private Long ownerId;
private String regionId;
private String resourceOwnerAccount;
private Long resourceOwnerId;
private Builder() {
super();
}
private Builder(ModifyInstanceMaintenanceAttributesRequest request) {
super(request);
this.sourceRegionId = request.sourceRegionId;
this.actionOnMaintenance = request.actionOnMaintenance;
this.instanceId = request.instanceId;
this.maintenanceWindow = request.maintenanceWindow;
this.notifyOnMaintenance = request.notifyOnMaintenance;
this.ownerAccount = request.ownerAccount;
this.ownerId = request.ownerId;
this.regionId = request.regionId;
this.resourceOwnerAccount = request.resourceOwnerAccount;
this.resourceOwnerId = request.resourceOwnerId;
}
/**
* SourceRegionId.
*/
public Builder sourceRegionId(String sourceRegionId) {
this.putHostParameter("SourceRegionId", sourceRegionId);
this.sourceRegionId = sourceRegionId;
return this;
}
/**
* The maintenance action. Valid values:
*
* - Stop: stops the instance.
* - AutoRecover: automatically recovers the instance.
* - AutoRedeploy: redeploys the instance, which may damage the data disks attached to the instance.
*
*
* example:
* AutoRecover
*/
public Builder actionOnMaintenance(String actionOnMaintenance) {
this.putQueryParameter("ActionOnMaintenance", actionOnMaintenance);
this.actionOnMaintenance = actionOnMaintenance;
return this;
}
/**
* The ID of instance N. Valid values of N: 1 to 100.
*
* example:
* i-bp67acfmxazb4ph****
*/
public Builder instanceId(java.util.List instanceId) {
this.putQueryParameter("InstanceId", instanceId);
this.instanceId = instanceId;
return this;
}
/**
* The maintenance windows.
*/
public Builder maintenanceWindow(java.util.List maintenanceWindow) {
this.putQueryParameter("MaintenanceWindow", maintenanceWindow);
this.maintenanceWindow = maintenanceWindow;
return this;
}
/**
* Specifies whether to send an event notification before maintenance. Valid values:
*
* - true
* - false
*
* Default value: false.
*
* example:
* false
*/
public Builder notifyOnMaintenance(Boolean notifyOnMaintenance) {
this.putQueryParameter("NotifyOnMaintenance", notifyOnMaintenance);
this.notifyOnMaintenance = notifyOnMaintenance;
return this;
}
/**
* OwnerAccount.
*/
public Builder ownerAccount(String ownerAccount) {
this.putQueryParameter("OwnerAccount", ownerAccount);
this.ownerAccount = ownerAccount;
return this;
}
/**
* OwnerId.
*/
public Builder ownerId(Long ownerId) {
this.putQueryParameter("OwnerId", ownerId);
this.ownerId = ownerId;
return this;
}
/**
* The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.
* This parameter is required.
*
* example:
* cn-hangzhou
*/
public Builder regionId(String regionId) {
this.putQueryParameter("RegionId", regionId);
this.regionId = regionId;
return this;
}
/**
* ResourceOwnerAccount.
*/
public Builder resourceOwnerAccount(String resourceOwnerAccount) {
this.putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount);
this.resourceOwnerAccount = resourceOwnerAccount;
return this;
}
/**
* ResourceOwnerId.
*/
public Builder resourceOwnerId(Long resourceOwnerId) {
this.putQueryParameter("ResourceOwnerId", resourceOwnerId);
this.resourceOwnerId = resourceOwnerId;
return this;
}
@Override
public ModifyInstanceMaintenanceAttributesRequest build() {
return new ModifyInstanceMaintenanceAttributesRequest(this);
}
}
/**
*
* {@link ModifyInstanceMaintenanceAttributesRequest} extends {@link TeaModel}
*
* ModifyInstanceMaintenanceAttributesRequest
*/
public static class MaintenanceWindow extends TeaModel {
@com.aliyun.core.annotation.NameInMap("EndTime")
private String endTime;
@com.aliyun.core.annotation.NameInMap("StartTime")
private String startTime;
private MaintenanceWindow(Builder builder) {
this.endTime = builder.endTime;
this.startTime = builder.startTime;
}
public static Builder builder() {
return new Builder();
}
public static MaintenanceWindow create() {
return builder().build();
}
/**
* @return endTime
*/
public String getEndTime() {
return this.endTime;
}
/**
* @return startTime
*/
public String getStartTime() {
return this.startTime;
}
public static final class Builder {
private String endTime;
private String startTime;
/**
* The end time of the maintenance window. The time must be on the hour. You must configure both StartTime and EndTime. The value of EndTime must be 1 to 23 hours later than the value of StartTime. Specify the time in the HH:mm:ss
format. The time must be in UTC+8. Set the value of N to 1.
*
* example:
* 18:00:00
*/
public Builder endTime(String endTime) {
this.endTime = endTime;
return this;
}
/**
* The start time of the maintenance window. The time must be on the hour. You must configure both StartTime and EndTime. The value of EndTime must be 1 to 23 hours later than the value of StartTime. Specify the time in the HH:mm:ss
format. The time must be in UTC+8. Set the value of N to 1.
*
* example:
* 02:00:00
*/
public Builder startTime(String startTime) {
this.startTime = startTime;
return this;
}
public MaintenanceWindow build() {
return new MaintenanceWindow(this);
}
}
}
}