/* * Copyright (c) 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. */ namespace TencentCloud.Dcdb.V20180411.Models { using Newtonsoft.Json; using System.Collections.Generic; using TencentCloud.Common; public class DBAccount : AbstractModel { /// /// 用户名 /// [JsonProperty("UserName")] public string UserName{ get; set; } /// /// 用户可以从哪台主机登录(对应 MySQL 用户的 host 字段,UserName + Host 唯一标识一个用户,IP形式,IP段以%结尾;支持填入%;为空默认等于%) /// [JsonProperty("Host")] public string Host{ get; set; } /// /// 用户备注信息 /// [JsonProperty("Description")] public string Description{ get; set; } /// /// 创建时间 /// [JsonProperty("CreateTime")] public string CreateTime{ get; set; } /// /// 最后更新时间 /// [JsonProperty("UpdateTime")] public string UpdateTime{ get; set; } /// /// 只读标记,0:否, 1:该账号的sql请求优先选择备机执行,备机不可用时选择主机执行,2:优先选择备机执行,备机不可用时操作失败。 /// [JsonProperty("ReadOnly")] public long? ReadOnly{ get; set; } /// /// 如果备机延迟超过本参数设置值,系统将认为备机发生故障 /// 建议该参数值大于10。当ReadOnly选择1、2时该参数生效。 /// [JsonProperty("DelayThresh")] public long? DelayThresh{ get; set; } /// /// For internal usage only. DO NOT USE IT. /// internal override void ToMap(Dictionary 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); } } }