![JAR search and dependency download from the Maven repository](/logo.png)
com.tencentcloudapi.postgres.v20170312.models.CreateReadOnlyGroupRequest 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.postgres.v20170312.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 CreateReadOnlyGroupRequest extends AbstractModel {
/**
* Primary instance ID
*/
@SerializedName("MasterDBInstanceId")
@Expose
private String MasterDBInstanceId;
/**
* RO group name
*/
@SerializedName("Name")
@Expose
private String Name;
/**
* Project ID
*/
@SerializedName("ProjectId")
@Expose
private Long ProjectId;
/**
* VPC ID
*/
@SerializedName("VpcId")
@Expose
private String VpcId;
/**
* Subnet ID
*/
@SerializedName("SubnetId")
@Expose
private String SubnetId;
/**
* Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: `0` (no), `1` (yes).
*/
@SerializedName("ReplayLagEliminate")
@Expose
private Long ReplayLagEliminate;
/**
* Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: `0` (no), `1` (yes).
*/
@SerializedName("ReplayLatencyEliminate")
@Expose
private Long ReplayLatencyEliminate;
/**
* Delay threshold in ms
*/
@SerializedName("MaxReplayLag")
@Expose
private Long MaxReplayLag;
/**
* Delayed log size threshold in MB
*/
@SerializedName("MaxReplayLatency")
@Expose
private Long MaxReplayLatency;
/**
* The minimum number of read-only replicas that must be retained in an RO group
*/
@SerializedName("MinDelayEliminateReserve")
@Expose
private Long MinDelayEliminateReserve;
/**
* Security group ID
*/
@SerializedName("SecurityGroupIds")
@Expose
private String [] SecurityGroupIds;
/**
* Get Primary instance ID
* @return MasterDBInstanceId Primary instance ID
*/
public String getMasterDBInstanceId() {
return this.MasterDBInstanceId;
}
/**
* Set Primary instance ID
* @param MasterDBInstanceId Primary instance ID
*/
public void setMasterDBInstanceId(String MasterDBInstanceId) {
this.MasterDBInstanceId = MasterDBInstanceId;
}
/**
* Get RO group name
* @return Name RO group name
*/
public String getName() {
return this.Name;
}
/**
* Set RO group name
* @param Name RO group name
*/
public void setName(String Name) {
this.Name = Name;
}
/**
* Get Project ID
* @return ProjectId Project ID
*/
public Long getProjectId() {
return this.ProjectId;
}
/**
* Set Project ID
* @param ProjectId Project ID
*/
public void setProjectId(Long ProjectId) {
this.ProjectId = ProjectId;
}
/**
* Get VPC ID
* @return VpcId VPC ID
*/
public String getVpcId() {
return this.VpcId;
}
/**
* Set VPC ID
* @param VpcId VPC ID
*/
public void setVpcId(String VpcId) {
this.VpcId = VpcId;
}
/**
* Get Subnet ID
* @return SubnetId Subnet ID
*/
public String getSubnetId() {
return this.SubnetId;
}
/**
* Set Subnet ID
* @param SubnetId Subnet ID
*/
public void setSubnetId(String SubnetId) {
this.SubnetId = SubnetId;
}
/**
* Get Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: `0` (no), `1` (yes).
* @return ReplayLagEliminate Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: `0` (no), `1` (yes).
*/
public Long getReplayLagEliminate() {
return this.ReplayLagEliminate;
}
/**
* Set Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: `0` (no), `1` (yes).
* @param ReplayLagEliminate Whether to remove a read-only replica from an RO group if the delay between the read-only replica and the primary instance exceeds the threshold. Valid values: `0` (no), `1` (yes).
*/
public void setReplayLagEliminate(Long ReplayLagEliminate) {
this.ReplayLagEliminate = ReplayLagEliminate;
}
/**
* Get Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: `0` (no), `1` (yes).
* @return ReplayLatencyEliminate Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: `0` (no), `1` (yes).
*/
public Long getReplayLatencyEliminate() {
return this.ReplayLatencyEliminate;
}
/**
* Set Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: `0` (no), `1` (yes).
* @param ReplayLatencyEliminate Whether to remove a read-only replica from an RO group if the sync log size difference between the read-only replica and the primary instance exceeds the threshold. Valid values: `0` (no), `1` (yes).
*/
public void setReplayLatencyEliminate(Long ReplayLatencyEliminate) {
this.ReplayLatencyEliminate = ReplayLatencyEliminate;
}
/**
* Get Delay threshold in ms
* @return MaxReplayLag Delay threshold in ms
*/
public Long getMaxReplayLag() {
return this.MaxReplayLag;
}
/**
* Set Delay threshold in ms
* @param MaxReplayLag Delay threshold in ms
*/
public void setMaxReplayLag(Long MaxReplayLag) {
this.MaxReplayLag = MaxReplayLag;
}
/**
* Get Delayed log size threshold in MB
* @return MaxReplayLatency Delayed log size threshold in MB
*/
public Long getMaxReplayLatency() {
return this.MaxReplayLatency;
}
/**
* Set Delayed log size threshold in MB
* @param MaxReplayLatency Delayed log size threshold in MB
*/
public void setMaxReplayLatency(Long MaxReplayLatency) {
this.MaxReplayLatency = MaxReplayLatency;
}
/**
* Get The minimum number of read-only replicas that must be retained in an RO group
* @return MinDelayEliminateReserve The minimum number of read-only replicas that must be retained in an RO group
*/
public Long getMinDelayEliminateReserve() {
return this.MinDelayEliminateReserve;
}
/**
* Set The minimum number of read-only replicas that must be retained in an RO group
* @param MinDelayEliminateReserve The minimum number of read-only replicas that must be retained in an RO group
*/
public void setMinDelayEliminateReserve(Long MinDelayEliminateReserve) {
this.MinDelayEliminateReserve = MinDelayEliminateReserve;
}
/**
* Get Security group ID
* @return SecurityGroupIds Security group ID
*/
public String [] getSecurityGroupIds() {
return this.SecurityGroupIds;
}
/**
* Set Security group ID
* @param SecurityGroupIds Security group ID
*/
public void setSecurityGroupIds(String [] SecurityGroupIds) {
this.SecurityGroupIds = SecurityGroupIds;
}
public CreateReadOnlyGroupRequest() {
}
/**
* 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 CreateReadOnlyGroupRequest(CreateReadOnlyGroupRequest source) {
if (source.MasterDBInstanceId != null) {
this.MasterDBInstanceId = new String(source.MasterDBInstanceId);
}
if (source.Name != null) {
this.Name = new String(source.Name);
}
if (source.ProjectId != null) {
this.ProjectId = new Long(source.ProjectId);
}
if (source.VpcId != null) {
this.VpcId = new String(source.VpcId);
}
if (source.SubnetId != null) {
this.SubnetId = new String(source.SubnetId);
}
if (source.ReplayLagEliminate != null) {
this.ReplayLagEliminate = new Long(source.ReplayLagEliminate);
}
if (source.ReplayLatencyEliminate != null) {
this.ReplayLatencyEliminate = new Long(source.ReplayLatencyEliminate);
}
if (source.MaxReplayLag != null) {
this.MaxReplayLag = new Long(source.MaxReplayLag);
}
if (source.MaxReplayLatency != null) {
this.MaxReplayLatency = new Long(source.MaxReplayLatency);
}
if (source.MinDelayEliminateReserve != null) {
this.MinDelayEliminateReserve = new Long(source.MinDelayEliminateReserve);
}
if (source.SecurityGroupIds != null) {
this.SecurityGroupIds = new String[source.SecurityGroupIds.length];
for (int i = 0; i < source.SecurityGroupIds.length; i++) {
this.SecurityGroupIds[i] = new String(source.SecurityGroupIds[i]);
}
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap map, String prefix) {
this.setParamSimple(map, prefix + "MasterDBInstanceId", this.MasterDBInstanceId);
this.setParamSimple(map, prefix + "Name", this.Name);
this.setParamSimple(map, prefix + "ProjectId", this.ProjectId);
this.setParamSimple(map, prefix + "VpcId", this.VpcId);
this.setParamSimple(map, prefix + "SubnetId", this.SubnetId);
this.setParamSimple(map, prefix + "ReplayLagEliminate", this.ReplayLagEliminate);
this.setParamSimple(map, prefix + "ReplayLatencyEliminate", this.ReplayLatencyEliminate);
this.setParamSimple(map, prefix + "MaxReplayLag", this.MaxReplayLag);
this.setParamSimple(map, prefix + "MaxReplayLatency", this.MaxReplayLatency);
this.setParamSimple(map, prefix + "MinDelayEliminateReserve", this.MinDelayEliminateReserve);
this.setParamArraySimple(map, prefix + "SecurityGroupIds.", this.SecurityGroupIds);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy