/*
* 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.Ckafka.V20190819.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class CreateTopicRequest : AbstractModel
{
///
/// 实例Id
///
[JsonProperty("InstanceId")]
public string InstanceId{ get; set; }
///
/// 主题名称,是一个不超过 64 个字符的字符串,必须以字母为首字符,剩余部分可以包含字母、数字和横划线(-)
///
[JsonProperty("TopicName")]
public string TopicName{ get; set; }
///
/// Partition个数,大于0
///
[JsonProperty("PartitionNum")]
public long? PartitionNum{ get; set; }
///
/// 副本个数,不能多于 broker 数,最大为3
///
[JsonProperty("ReplicaNum")]
public long? ReplicaNum{ get; set; }
///
/// ip白名单开关, 1:打开 0:关闭,默认不打开
///
[JsonProperty("EnableWhiteList")]
public long? EnableWhiteList{ get; set; }
///
/// Ip白名单列表,配额限制,enableWhileList=1时必选
///
[JsonProperty("IpWhiteList")]
public string[] IpWhiteList{ get; set; }
///
/// 清理日志策略,日志清理模式,默认为"delete"。"delete":日志按保存时间删除,"compact":日志按 key 压缩,"compact, delete":日志按 key 压缩且会按保存时间删除。
///
[JsonProperty("CleanUpPolicy")]
public string CleanUpPolicy{ get; set; }
///
/// 主题备注,是一个不超过 64 个字符的字符串,必须以字母为首字符,剩余部分可以包含字母、数字和横划线(-)
///
[JsonProperty("Note")]
public string Note{ get; set; }
///
/// 默认为1
///
[JsonProperty("MinInsyncReplicas")]
public long? MinInsyncReplicas{ get; set; }
///
/// 是否允许未同步的副本选为leader,false:不允许,true:允许,默认不允许
///
[JsonProperty("UncleanLeaderElectionEnable")]
public long? UncleanLeaderElectionEnable{ get; set; }
///
/// 可消息选。保留时间,单位ms,当前最小值为60000ms
///
[JsonProperty("RetentionMs")]
public long? RetentionMs{ get; set; }
///
/// Segment分片滚动的时长,单位ms,当前最小为3600000ms
///
[JsonProperty("SegmentMs")]
public long? SegmentMs{ get; set; }
///
/// For internal usage only. DO NOT USE IT.
///
internal override void ToMap(Dictionary map, string prefix)
{
this.SetParamSimple(map, prefix + "InstanceId", this.InstanceId);
this.SetParamSimple(map, prefix + "TopicName", this.TopicName);
this.SetParamSimple(map, prefix + "PartitionNum", this.PartitionNum);
this.SetParamSimple(map, prefix + "ReplicaNum", this.ReplicaNum);
this.SetParamSimple(map, prefix + "EnableWhiteList", this.EnableWhiteList);
this.SetParamArraySimple(map, prefix + "IpWhiteList.", this.IpWhiteList);
this.SetParamSimple(map, prefix + "CleanUpPolicy", this.CleanUpPolicy);
this.SetParamSimple(map, prefix + "Note", this.Note);
this.SetParamSimple(map, prefix + "MinInsyncReplicas", this.MinInsyncReplicas);
this.SetParamSimple(map, prefix + "UncleanLeaderElectionEnable", this.UncleanLeaderElectionEnable);
this.SetParamSimple(map, prefix + "RetentionMs", this.RetentionMs);
this.SetParamSimple(map, prefix + "SegmentMs", this.SegmentMs);
}
}
}