All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tencentcloudapi.dcdb.v20180411.models.DBAccount Maven / Gradle / Ivy

There is a newer version: 3.1.1086
Show newest version
/*
 * 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.dcdb.v20180411.models;

import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;

public class DBAccount extends AbstractModel{

    /**
    * 用户名
    */
    @SerializedName("UserName")
    @Expose
    private String UserName;

    /**
    * 用户可以从哪台主机登录(对应 MySQL 用户的 host 字段,UserName + Host 唯一标识一个用户,IP形式,IP段以%结尾;支持填入%;为空默认等于%)
    */
    @SerializedName("Host")
    @Expose
    private String Host;

    /**
    * 用户备注信息
    */
    @SerializedName("Description")
    @Expose
    private String Description;

    /**
    * 创建时间
    */
    @SerializedName("CreateTime")
    @Expose
    private String CreateTime;

    /**
    * 最后更新时间
    */
    @SerializedName("UpdateTime")
    @Expose
    private String UpdateTime;

    /**
    * 只读标记,0:否, 1:该账号的sql请求优先选择备机执行,备机不可用时选择主机执行,2:优先选择备机执行,备机不可用时操作失败。
    */
    @SerializedName("ReadOnly")
    @Expose
    private Long ReadOnly;

    /**
    * 如果备机延迟超过本参数设置值,系统将认为备机发生故障
建议该参数值大于10。当ReadOnly选择1、2时该参数生效。
    */
    @SerializedName("DelayThresh")
    @Expose
    private Long DelayThresh;

    /**
    * 针对只读账号,设置策略是否固定备机,0:不固定备机,即备机不满足条件与客户端不断开连接,Proxy选择其他可用备机,1:备机不满足条件断开连接,确保一个连接固定备机。
    */
    @SerializedName("SlaveConst")
    @Expose
    private Long SlaveConst;

    /**
    * 用户最大连接数,0代表无限制	
    */
    @SerializedName("MaxUserConnections")
    @Expose
    private Long MaxUserConnections;

    /**
     * Get 用户名 
     * @return UserName 用户名
     */
    public String getUserName() {
        return this.UserName;
    }

    /**
     * Set 用户名
     * @param UserName 用户名
     */
    public void setUserName(String UserName) {
        this.UserName = UserName;
    }

    /**
     * Get 用户可以从哪台主机登录(对应 MySQL 用户的 host 字段,UserName + Host 唯一标识一个用户,IP形式,IP段以%结尾;支持填入%;为空默认等于%) 
     * @return Host 用户可以从哪台主机登录(对应 MySQL 用户的 host 字段,UserName + Host 唯一标识一个用户,IP形式,IP段以%结尾;支持填入%;为空默认等于%)
     */
    public String getHost() {
        return this.Host;
    }

    /**
     * Set 用户可以从哪台主机登录(对应 MySQL 用户的 host 字段,UserName + Host 唯一标识一个用户,IP形式,IP段以%结尾;支持填入%;为空默认等于%)
     * @param Host 用户可以从哪台主机登录(对应 MySQL 用户的 host 字段,UserName + Host 唯一标识一个用户,IP形式,IP段以%结尾;支持填入%;为空默认等于%)
     */
    public void setHost(String Host) {
        this.Host = Host;
    }

    /**
     * Get 用户备注信息 
     * @return Description 用户备注信息
     */
    public String getDescription() {
        return this.Description;
    }

    /**
     * Set 用户备注信息
     * @param Description 用户备注信息
     */
    public void setDescription(String Description) {
        this.Description = Description;
    }

    /**
     * Get 创建时间 
     * @return CreateTime 创建时间
     */
    public String getCreateTime() {
        return this.CreateTime;
    }

    /**
     * Set 创建时间
     * @param CreateTime 创建时间
     */
    public void setCreateTime(String CreateTime) {
        this.CreateTime = CreateTime;
    }

    /**
     * Get 最后更新时间 
     * @return UpdateTime 最后更新时间
     */
    public String getUpdateTime() {
        return this.UpdateTime;
    }

    /**
     * Set 最后更新时间
     * @param UpdateTime 最后更新时间
     */
    public void setUpdateTime(String UpdateTime) {
        this.UpdateTime = UpdateTime;
    }

    /**
     * Get 只读标记,0:否, 1:该账号的sql请求优先选择备机执行,备机不可用时选择主机执行,2:优先选择备机执行,备机不可用时操作失败。 
     * @return ReadOnly 只读标记,0:否, 1:该账号的sql请求优先选择备机执行,备机不可用时选择主机执行,2:优先选择备机执行,备机不可用时操作失败。
     */
    public Long getReadOnly() {
        return this.ReadOnly;
    }

    /**
     * Set 只读标记,0:否, 1:该账号的sql请求优先选择备机执行,备机不可用时选择主机执行,2:优先选择备机执行,备机不可用时操作失败。
     * @param ReadOnly 只读标记,0:否, 1:该账号的sql请求优先选择备机执行,备机不可用时选择主机执行,2:优先选择备机执行,备机不可用时操作失败。
     */
    public void setReadOnly(Long ReadOnly) {
        this.ReadOnly = ReadOnly;
    }

    /**
     * Get 如果备机延迟超过本参数设置值,系统将认为备机发生故障
建议该参数值大于10。当ReadOnly选择1、2时该参数生效。 
     * @return DelayThresh 如果备机延迟超过本参数设置值,系统将认为备机发生故障
建议该参数值大于10。当ReadOnly选择1、2时该参数生效。
     */
    public Long getDelayThresh() {
        return this.DelayThresh;
    }

    /**
     * Set 如果备机延迟超过本参数设置值,系统将认为备机发生故障
建议该参数值大于10。当ReadOnly选择1、2时该参数生效。
     * @param DelayThresh 如果备机延迟超过本参数设置值,系统将认为备机发生故障
建议该参数值大于10。当ReadOnly选择1、2时该参数生效。
     */
    public void setDelayThresh(Long DelayThresh) {
        this.DelayThresh = DelayThresh;
    }

    /**
     * Get 针对只读账号,设置策略是否固定备机,0:不固定备机,即备机不满足条件与客户端不断开连接,Proxy选择其他可用备机,1:备机不满足条件断开连接,确保一个连接固定备机。 
     * @return SlaveConst 针对只读账号,设置策略是否固定备机,0:不固定备机,即备机不满足条件与客户端不断开连接,Proxy选择其他可用备机,1:备机不满足条件断开连接,确保一个连接固定备机。
     */
    public Long getSlaveConst() {
        return this.SlaveConst;
    }

    /**
     * Set 针对只读账号,设置策略是否固定备机,0:不固定备机,即备机不满足条件与客户端不断开连接,Proxy选择其他可用备机,1:备机不满足条件断开连接,确保一个连接固定备机。
     * @param SlaveConst 针对只读账号,设置策略是否固定备机,0:不固定备机,即备机不满足条件与客户端不断开连接,Proxy选择其他可用备机,1:备机不满足条件断开连接,确保一个连接固定备机。
     */
    public void setSlaveConst(Long SlaveConst) {
        this.SlaveConst = SlaveConst;
    }

    /**
     * Get 用户最大连接数,0代表无限制	 
     * @return MaxUserConnections 用户最大连接数,0代表无限制	
     */
    public Long getMaxUserConnections() {
        return this.MaxUserConnections;
    }

    /**
     * Set 用户最大连接数,0代表无限制	
     * @param MaxUserConnections 用户最大连接数,0代表无限制	
     */
    public void setMaxUserConnections(Long MaxUserConnections) {
        this.MaxUserConnections = MaxUserConnections;
    }

    public DBAccount() {
    }

    /**
     * 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 DBAccount(DBAccount source) {
        if (source.UserName != null) {
            this.UserName = new String(source.UserName);
        }
        if (source.Host != null) {
            this.Host = new String(source.Host);
        }
        if (source.Description != null) {
            this.Description = new String(source.Description);
        }
        if (source.CreateTime != null) {
            this.CreateTime = new String(source.CreateTime);
        }
        if (source.UpdateTime != null) {
            this.UpdateTime = new String(source.UpdateTime);
        }
        if (source.ReadOnly != null) {
            this.ReadOnly = new Long(source.ReadOnly);
        }
        if (source.DelayThresh != null) {
            this.DelayThresh = new Long(source.DelayThresh);
        }
        if (source.SlaveConst != null) {
            this.SlaveConst = new Long(source.SlaveConst);
        }
        if (source.MaxUserConnections != null) {
            this.MaxUserConnections = new Long(source.MaxUserConnections);
        }
    }


    /**
     * Internal implementation, normal users should not use it.
     */
    public void toMap(HashMap map, String prefix) {
        this.setParamSimple(map, prefix + "UserName", this.UserName);
        this.setParamSimple(map, prefix + "Host", this.Host);
        this.setParamSimple(map, prefix + "Description", this.Description);
        this.setParamSimple(map, prefix + "CreateTime", this.CreateTime);
        this.setParamSimple(map, prefix + "UpdateTime", this.UpdateTime);
        this.setParamSimple(map, prefix + "ReadOnly", this.ReadOnly);
        this.setParamSimple(map, prefix + "DelayThresh", this.DelayThresh);
        this.setParamSimple(map, prefix + "SlaveConst", this.SlaveConst);
        this.setParamSimple(map, prefix + "MaxUserConnections", this.MaxUserConnections);

    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy