Files
g.hnyhua.cn/TencentCloud/Cmq/V20190304/Models/ModifySubscriptionAttributeRequest.cs

81 lines
4.5 KiB
C#
Raw Permalink 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.Cmq.V20190304.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class ModifySubscriptionAttributeRequest : AbstractModel
{
/// <summary>
/// 主题名字在单个地域同一帐号下唯一。主题名称是一个不超过64个字符的字符串必须以字母为首字符剩余部分可以包含字母、数字和横划线-)。
/// </summary>
[JsonProperty("TopicName")]
public string TopicName{ get; set; }
/// <summary>
/// 订阅名字在单个地域同一帐号的同一主题下唯一。订阅名称是一个不超过64个字符的字符串必须以字母为首字符剩余部分可以包含字母、数字和横划线(-)。
/// </summary>
[JsonProperty("SubscriptionName")]
public string SubscriptionName{ get; set; }
/// <summary>
/// 向 Endpoint 推送消息出现错误时CMQ 推送服务器的重试策略。取值如下:
/// 1BACKOFF_RETRY退避重试。每隔一定时间重试一次重试够一定次数后就把该消息丢弃继续推送下一条消息。
/// 2EXPONENTIAL_DECAY_RETRY指数衰退重试。每次重试的间隔是指数递增的例如开始1s后面是2s4s8s···由于 Topic 消息的周期是一天,所以最多重试一天就把消息丢弃。默认值是 EXPONENTIAL_DECAY_RETRY。
/// </summary>
[JsonProperty("NotifyStrategy")]
public string NotifyStrategy{ get; set; }
/// <summary>
/// 推送内容的格式。取值1JSON2SIMPLIFIED即 raw 格式。如果 Protocol 是 queue则取值必须为 SIMPLIFIED。如果 Protocol 是 HTTP两个值均可以默认值是 JSON。
/// </summary>
[JsonProperty("NotifyContentFormat")]
public string NotifyContentFormat{ get; set; }
/// <summary>
/// 消息正文。消息标签(用于消息过滤)。标签数量不能超过5个每个标签不超过16个字符。与(Batch)PublishMessage的MsgTag参数配合使用规则1如果FilterTag没有设置则无论MsgTag是否有设置订阅接收所有发布到Topic的消息2如果FilterTag数组有值则只有数组中至少有一个值在MsgTag数组中也存在时即FilterTag和MsgTag有交集订阅才接收该发布到Topic的消息3如果FilterTag数组有值但MsgTag没设置则不接收任何发布到Topic的消息可以认为是2的一种特例此时FilterTag和MsgTag没有交集。规则整体的设计思想是以订阅者的意愿为主。
/// </summary>
[JsonProperty("FilterTags")]
public string[] FilterTags{ get; set; }
/// <summary>
/// BindingKey数量不超过5个 每个BindingKey长度不超过64字节该字段表示订阅接收消息的过滤策略每个BindingKey最多含有15个“.”, 即最多16个词组。
/// </summary>
[JsonProperty("BindingKey")]
public string[] BindingKey{ 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 + "TopicName", this.TopicName);
this.SetParamSimple(map, prefix + "SubscriptionName", this.SubscriptionName);
this.SetParamSimple(map, prefix + "NotifyStrategy", this.NotifyStrategy);
this.SetParamSimple(map, prefix + "NotifyContentFormat", this.NotifyContentFormat);
this.SetParamArraySimple(map, prefix + "FilterTags.", this.FilterTags);
this.SetParamArraySimple(map, prefix + "BindingKey.", this.BindingKey);
}
}
}