/* * 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 GroupInfoResponse : AbstractModel { /// /// 错误码,正常为0 /// [JsonProperty("ErrorCode")] public string ErrorCode{ get; set; } /// /// group 状态描述(常见的为 Empty、Stable、Dead 三种状态): /// Dead:消费分组不存在 /// Empty:消费分组,当前没有任何消费者订阅 /// PreparingRebalance:消费分组处于 rebalance 状态 /// CompletingRebalance:消费分组处于 rebalance 状态 /// Stable:消费分组中各个消费者已经加入,处于稳定状态 /// [JsonProperty("State")] public string State{ get; set; } /// /// 消费分组选择的协议类型正常的消费者一般为 consumer 但有些系统采用了自己的协议如 kafka-connect 用的就是 connect。只有标准的 consumer 协议,本接口才知道具体的分配方式的格式,才能解析到具体的 partition 的分配情况 /// [JsonProperty("ProtocolType")] public string ProtocolType{ get; set; } /// /// 消费者 partition 分配算法常见的有如下几种(Kafka 消费者 SDK 默认的选择项为 range):range、 roundrobin、 sticky /// [JsonProperty("Protocol")] public string Protocol{ get; set; } /// /// 仅当 state 为 Stable 且 protocol_type 为 consumer 时, 该数组才包含信息 /// [JsonProperty("Members")] public GroupInfoMember[] Members{ get; set; } /// /// Kafka 消费分组 /// [JsonProperty("Group")] public string Group{ get; set; } /// /// For internal usage only. DO NOT USE IT. /// internal override void ToMap(Dictionary map, string prefix) { this.SetParamSimple(map, prefix + "ErrorCode", this.ErrorCode); this.SetParamSimple(map, prefix + "State", this.State); this.SetParamSimple(map, prefix + "ProtocolType", this.ProtocolType); this.SetParamSimple(map, prefix + "Protocol", this.Protocol); this.SetParamArrayObj(map, prefix + "Members.", this.Members); this.SetParamSimple(map, prefix + "Group", this.Group); } } }