com.tencentcloudapi.cdb.v20170320.models.SwitchDBInstanceMasterSlaveRequest 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.cdb.v20170320.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class SwitchDBInstanceMasterSlaveRequest extends AbstractModel{
/**
* Instance ID
*/
@SerializedName("InstanceId")
@Expose
private String InstanceId;
/**
* Specifies the replica server to switched to. Valid values: `first` (the first replica server), `second` (the second replica server). Default value: `first`. `second` is valid only for a multi-AZ instance.
*/
@SerializedName("DstSlave")
@Expose
private String DstSlave;
/**
* Whether to force the switch. Valid values: `True`, `False` (default). If this parameter is set to `True`, instance data may be lost during the switch.
*/
@SerializedName("ForceSwitch")
@Expose
private Boolean ForceSwitch;
/**
* Whether to perform the switch during a time window. Valid values: `True`, `False` (default). If `ForceSwitch` is set to `True`, this parameter is invalid.
*/
@SerializedName("WaitSwitch")
@Expose
private Boolean WaitSwitch;
/**
* Get Instance ID
* @return InstanceId Instance ID
*/
public String getInstanceId() {
return this.InstanceId;
}
/**
* Set Instance ID
* @param InstanceId Instance ID
*/
public void setInstanceId(String InstanceId) {
this.InstanceId = InstanceId;
}
/**
* Get Specifies the replica server to switched to. Valid values: `first` (the first replica server), `second` (the second replica server). Default value: `first`. `second` is valid only for a multi-AZ instance.
* @return DstSlave Specifies the replica server to switched to. Valid values: `first` (the first replica server), `second` (the second replica server). Default value: `first`. `second` is valid only for a multi-AZ instance.
*/
public String getDstSlave() {
return this.DstSlave;
}
/**
* Set Specifies the replica server to switched to. Valid values: `first` (the first replica server), `second` (the second replica server). Default value: `first`. `second` is valid only for a multi-AZ instance.
* @param DstSlave Specifies the replica server to switched to. Valid values: `first` (the first replica server), `second` (the second replica server). Default value: `first`. `second` is valid only for a multi-AZ instance.
*/
public void setDstSlave(String DstSlave) {
this.DstSlave = DstSlave;
}
/**
* Get Whether to force the switch. Valid values: `True`, `False` (default). If this parameter is set to `True`, instance data may be lost during the switch.
* @return ForceSwitch Whether to force the switch. Valid values: `True`, `False` (default). If this parameter is set to `True`, instance data may be lost during the switch.
*/
public Boolean getForceSwitch() {
return this.ForceSwitch;
}
/**
* Set Whether to force the switch. Valid values: `True`, `False` (default). If this parameter is set to `True`, instance data may be lost during the switch.
* @param ForceSwitch Whether to force the switch. Valid values: `True`, `False` (default). If this parameter is set to `True`, instance data may be lost during the switch.
*/
public void setForceSwitch(Boolean ForceSwitch) {
this.ForceSwitch = ForceSwitch;
}
/**
* Get Whether to perform the switch during a time window. Valid values: `True`, `False` (default). If `ForceSwitch` is set to `True`, this parameter is invalid.
* @return WaitSwitch Whether to perform the switch during a time window. Valid values: `True`, `False` (default). If `ForceSwitch` is set to `True`, this parameter is invalid.
*/
public Boolean getWaitSwitch() {
return this.WaitSwitch;
}
/**
* Set Whether to perform the switch during a time window. Valid values: `True`, `False` (default). If `ForceSwitch` is set to `True`, this parameter is invalid.
* @param WaitSwitch Whether to perform the switch during a time window. Valid values: `True`, `False` (default). If `ForceSwitch` is set to `True`, this parameter is invalid.
*/
public void setWaitSwitch(Boolean WaitSwitch) {
this.WaitSwitch = WaitSwitch;
}
public SwitchDBInstanceMasterSlaveRequest() {
}
/**
* 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 SwitchDBInstanceMasterSlaveRequest(SwitchDBInstanceMasterSlaveRequest source) {
if (source.InstanceId != null) {
this.InstanceId = new String(source.InstanceId);
}
if (source.DstSlave != null) {
this.DstSlave = new String(source.DstSlave);
}
if (source.ForceSwitch != null) {
this.ForceSwitch = new Boolean(source.ForceSwitch);
}
if (source.WaitSwitch != null) {
this.WaitSwitch = new Boolean(source.WaitSwitch);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap map, String prefix) {
this.setParamSimple(map, prefix + "InstanceId", this.InstanceId);
this.setParamSimple(map, prefix + "DstSlave", this.DstSlave);
this.setParamSimple(map, prefix + "ForceSwitch", this.ForceSwitch);
this.setParamSimple(map, prefix + "WaitSwitch", this.WaitSwitch);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy