Files
g.hnyhua.cn/TencentCloud/Ckafka/V20190819/Models/ModifyGroupOffsetsRequest.cs

86 lines
3.6 KiB
C#
Raw Normal View History

/*
* 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 ModifyGroupOffsetsRequest : AbstractModel
{
/// <summary>
/// kafka实例id
/// </summary>
[JsonProperty("InstanceId")]
public string InstanceId{ get; set; }
/// <summary>
/// kafka 消费分组
/// </summary>
[JsonProperty("Group")]
public string Group{ get; set; }
/// <summary>
/// 重置offset的策略入参含义 0. 对齐shift-by参数代表把offset向前或向后移动shift条 1. 对齐参考(by-duration,to-datetime,to-earliest,to-latest),代表把offset移动到指定timestamp的位置 2. 对齐参考(to-offset)代表把offset移动到指定的offset位置
/// </summary>
[JsonProperty("Strategy")]
public long? Strategy{ get; set; }
/// <summary>
/// 表示需要重置的topics 不填表示全部
/// </summary>
[JsonProperty("Topics")]
public string[] Topics{ get; set; }
/// <summary>
/// 当strategy为0时必须包含该字段可以大于零代表会把offset向后移动shift条小于零则将offset向前回溯shift条数。正确重置后新的offset应该是(old_offset + shift)需要注意的是如果新的offset小于partition的earliest则会设置为earliest如果大于partition 的latest则会设置为latest
/// </summary>
[JsonProperty("Shift")]
public long? Shift{ get; set; }
/// <summary>
/// 单位ms。当strategy为1时必须包含该字段其中-2表示重置offset到最开始的位置-1表示重置到最新的位置(相当于清空)其它值则代表指定的时间会获取topic中指定时间的offset然后进行重置需要注意的时如果指定的时间不存在消息则获取最末尾的offset。
/// </summary>
[JsonProperty("ShiftTimestamp")]
public long? ShiftTimestamp{ get; set; }
/// <summary>
/// 需要重新设置的offset位置。当strategy为2必须包含该字段。
/// </summary>
[JsonProperty("Offset")]
public long? Offset{ 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 + "InstanceId", this.InstanceId);
this.SetParamSimple(map, prefix + "Group", this.Group);
this.SetParamSimple(map, prefix + "Strategy", this.Strategy);
this.SetParamArraySimple(map, prefix + "Topics.", this.Topics);
this.SetParamSimple(map, prefix + "Shift", this.Shift);
this.SetParamSimple(map, prefix + "ShiftTimestamp", this.ShiftTimestamp);
this.SetParamSimple(map, prefix + "Offset", this.Offset);
}
}
}