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