代码修改后的版本,全部提交

This commit is contained in:
ss001
2026-02-07 15:48:27 +08:00
parent cccbaa37c9
commit c2cda58c65
15604 changed files with 2455502 additions and 0 deletions

View File

@@ -0,0 +1,96 @@
/*
* 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.Memcached.V20190318
{
using Newtonsoft.Json;
using System.Threading.Tasks;
using TencentCloud.Common;
using TencentCloud.Common.Profile;
using TencentCloud.Memcached.V20190318.Models;
public class MemcachedClient : AbstractClient{
private const string endpoint = "memcached.tencentcloudapi.com";
private const string version = "2019-03-18";
/// <summary>
/// Client constructor.
/// </summary>
/// <param name="credential">Credentials.</param>
/// <param name="region">Region name, such as "ap-guangzhou".</param>
public MemcachedClient(Credential credential, string region)
: this(credential, region, new ClientProfile())
{
}
/// <summary>
/// Client Constructor.
/// </summary>
/// <param name="credential">Credentials.</param>
/// <param name="region">Region name, such as "ap-guangzhou".</param>
/// <param name="profile">Client profiles.</param>
public MemcachedClient(Credential credential, string region, ClientProfile profile)
: base(endpoint, version, credential, region, profile)
{
}
/// <summary>
/// 获取Cmem实例列表
/// </summary>
/// <param name="req"><see cref="DescribeInstancesRequest"/></param>
/// <returns><see cref="DescribeInstancesResponse"/></returns>
public async Task<DescribeInstancesResponse> DescribeInstances(DescribeInstancesRequest req)
{
JsonResponseModel<DescribeInstancesResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DescribeInstances");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeInstancesResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 获取Cmem实例列表
/// </summary>
/// <param name="req"><see cref="DescribeInstancesRequest"/></param>
/// <returns><see cref="DescribeInstancesResponse"/></returns>
public DescribeInstancesResponse DescribeInstancesSync(DescribeInstancesRequest req)
{
JsonResponseModel<DescribeInstancesResponse> rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DescribeInstances");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeInstancesResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
}
}

View File

@@ -0,0 +1,113 @@
/*
* 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.Memcached.V20190318.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class DescribeInstancesRequest : AbstractModel
{
/// <summary>
/// 实例ID组成的数组数组下标从0开始
/// </summary>
[JsonProperty("InstanceIds")]
public string[] InstanceIds{ get; set; }
/// <summary>
/// 实例名称组成的数组数组下标从0开始
/// </summary>
[JsonProperty("InstanceNames")]
public string[] InstanceNames{ get; set; }
/// <summary>
/// 实例列表的大小参数默认值100
/// </summary>
[JsonProperty("Limit")]
public ulong? Limit{ get; set; }
/// <summary>
/// 偏移量取Limit整数倍
/// </summary>
[JsonProperty("Offset")]
public ulong? Offset{ get; set; }
/// <summary>
/// 枚举范围: AddTimeStamp, InstanceName, ProjectId
/// </summary>
[JsonProperty("OrderBy")]
public string OrderBy{ get; set; }
/// <summary>
/// 0倒序1正序默认倒序
/// </summary>
[JsonProperty("OrderType")]
public long? OrderType{ get; set; }
/// <summary>
/// 项目ID组成的数组数组下标从0开始
/// </summary>
[JsonProperty("ProjectIds")]
public long?[] ProjectIds{ get; set; }
/// <summary>
/// 搜索关键词支持实例ID、实例名称、完整IP
/// </summary>
[JsonProperty("SearchKeys")]
public string[] SearchKeys{ get; set; }
/// <summary>
/// 子网ID数组数组下标从0开始subnet-fdj24n34j2
/// </summary>
[JsonProperty("UniqSubnetIds")]
public string[] UniqSubnetIds{ get; set; }
/// <summary>
/// 私有网络ID数组数组下标从0开始如果不传则默认选择基础网络vpc-sad23jfdfk
/// </summary>
[JsonProperty("UniqVpcIds")]
public string[] UniqVpcIds{ get; set; }
/// <summary>
/// 实例服务IP组成的数组数组下标从0开始
/// </summary>
[JsonProperty("Vips")]
public string[] Vips{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamArraySimple(map, prefix + "InstanceIds.", this.InstanceIds);
this.SetParamArraySimple(map, prefix + "InstanceNames.", this.InstanceNames);
this.SetParamSimple(map, prefix + "Limit", this.Limit);
this.SetParamSimple(map, prefix + "Offset", this.Offset);
this.SetParamSimple(map, prefix + "OrderBy", this.OrderBy);
this.SetParamSimple(map, prefix + "OrderType", this.OrderType);
this.SetParamArraySimple(map, prefix + "ProjectIds.", this.ProjectIds);
this.SetParamArraySimple(map, prefix + "SearchKeys.", this.SearchKeys);
this.SetParamArraySimple(map, prefix + "UniqSubnetIds.", this.UniqSubnetIds);
this.SetParamArraySimple(map, prefix + "UniqVpcIds.", this.UniqVpcIds);
this.SetParamArraySimple(map, prefix + "Vips.", this.Vips);
}
}
}

View File

@@ -0,0 +1,57 @@
/*
* 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.Memcached.V20190318.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class DescribeInstancesResponse : AbstractModel
{
/// <summary>
/// 实例详细信息列表
/// </summary>
[JsonProperty("InstanceList")]
public InstanceListInfo[] InstanceList{ get; set; }
/// <summary>
/// 实例数量
/// </summary>
[JsonProperty("TotalNum")]
public long? TotalNum{ get; set; }
/// <summary>
/// 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamArrayObj(map, prefix + "InstanceList.", this.InstanceList);
this.SetParamSimple(map, prefix + "TotalNum", this.TotalNum);
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}

View File

@@ -0,0 +1,204 @@
/*
* 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.Memcached.V20190318.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class InstanceListInfo : AbstractModel
{
/// <summary>
/// 实例关联的标签信息
/// </summary>
[JsonProperty("Tags")]
public TagInfo[] Tags{ get; set; }
/// <summary>
/// 实例创建时间
/// </summary>
[JsonProperty("AddTimeStamp")]
public string AddTimeStamp{ get; set; }
/// <summary>
/// 用户AppID
/// </summary>
[JsonProperty("AppId")]
public long? AppId{ get; set; }
/// <summary>
/// 实例是否设置自动续费标识1设置自动续费0未设置自动续费
/// </summary>
[JsonProperty("AutoRenewFlag")]
public long? AutoRenewFlag{ get; set; }
/// <summary>
/// 实例内置ID
/// </summary>
[JsonProperty("CmemId")]
public long? CmemId{ get; set; }
/// <summary>
/// 实例截止时间
/// </summary>
[JsonProperty("DeadlineTimeStamp")]
public string DeadlineTimeStamp{ get; set; }
/// <summary>
/// 过期策略
/// </summary>
[JsonProperty("Expire")]
public long? Expire{ get; set; }
/// <summary>
/// 实例描述信息
/// </summary>
[JsonProperty("InstanceDesc")]
public string InstanceDesc{ get; set; }
/// <summary>
/// 实例ID
/// </summary>
[JsonProperty("InstanceId")]
public string InstanceId{ get; set; }
/// <summary>
/// 实例名称
/// </summary>
[JsonProperty("InstanceName")]
public string InstanceName{ get; set; }
/// <summary>
/// 实例隔离时间
/// </summary>
[JsonProperty("IsolateTimeStamp")]
public string IsolateTimeStamp{ get; set; }
/// <summary>
/// 实例修改时间
/// </summary>
[JsonProperty("ModTimeStamp")]
public string ModTimeStamp{ get; set; }
/// <summary>
/// 计费模式0-按量计费1-包年包月
/// </summary>
[JsonProperty("PayMode")]
public long? PayMode{ get; set; }
/// <summary>
/// 项目ID
/// </summary>
[JsonProperty("ProjectId")]
public long? ProjectId{ get; set; }
/// <summary>
/// 地域id 1--广州 4--上海 5-- 香港 6--多伦多 7--上海金融 8--北京 9-- 新加坡 11--深圳金融 15--美西硅谷16--成都 17--德国 18--韩国 19--重庆 21--印度 22--美东弗吉尼亚23--泰国 24--俄罗斯 25--日本
/// </summary>
[JsonProperty("RegionId")]
public long? RegionId{ get; set; }
/// <summary>
/// 仓库ID
/// </summary>
[JsonProperty("SetId")]
public long? SetId{ get; set; }
/// <summary>
/// 实例当前状态0待初始化1实例在流程中2实例运行中-2实例已隔离-3实例待删除
/// </summary>
[JsonProperty("Status")]
public long? Status{ get; set; }
/// <summary>
/// vpc网络下子网id 如46315
/// </summary>
[JsonProperty("SubnetId")]
public long? SubnetId{ get; set; }
/// <summary>
/// vpc网络下子网id 如subnet-fd3j6l35mm0
/// </summary>
[JsonProperty("UniqSubnetId")]
public string UniqSubnetId{ get; set; }
/// <summary>
/// vpc网络id 如vpc-fk33jsf43kgv
/// </summary>
[JsonProperty("UniqVpcId")]
public string UniqVpcId{ get; set; }
/// <summary>
/// 实例vip
/// </summary>
[JsonProperty("Vip")]
public string Vip{ get; set; }
/// <summary>
/// vpc网络id 如75101
/// </summary>
[JsonProperty("VpcId")]
public long? VpcId{ get; set; }
/// <summary>
/// 实例端口号
/// </summary>
[JsonProperty("Vport")]
public long? Vport{ get; set; }
/// <summary>
/// 区域ID
/// </summary>
[JsonProperty("ZoneId")]
public long? ZoneId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamArrayObj(map, prefix + "Tags.", this.Tags);
this.SetParamSimple(map, prefix + "AddTimeStamp", this.AddTimeStamp);
this.SetParamSimple(map, prefix + "AppId", this.AppId);
this.SetParamSimple(map, prefix + "AutoRenewFlag", this.AutoRenewFlag);
this.SetParamSimple(map, prefix + "CmemId", this.CmemId);
this.SetParamSimple(map, prefix + "DeadlineTimeStamp", this.DeadlineTimeStamp);
this.SetParamSimple(map, prefix + "Expire", this.Expire);
this.SetParamSimple(map, prefix + "InstanceDesc", this.InstanceDesc);
this.SetParamSimple(map, prefix + "InstanceId", this.InstanceId);
this.SetParamSimple(map, prefix + "InstanceName", this.InstanceName);
this.SetParamSimple(map, prefix + "IsolateTimeStamp", this.IsolateTimeStamp);
this.SetParamSimple(map, prefix + "ModTimeStamp", this.ModTimeStamp);
this.SetParamSimple(map, prefix + "PayMode", this.PayMode);
this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId);
this.SetParamSimple(map, prefix + "RegionId", this.RegionId);
this.SetParamSimple(map, prefix + "SetId", this.SetId);
this.SetParamSimple(map, prefix + "Status", this.Status);
this.SetParamSimple(map, prefix + "SubnetId", this.SubnetId);
this.SetParamSimple(map, prefix + "UniqSubnetId", this.UniqSubnetId);
this.SetParamSimple(map, prefix + "UniqVpcId", this.UniqVpcId);
this.SetParamSimple(map, prefix + "Vip", this.Vip);
this.SetParamSimple(map, prefix + "VpcId", this.VpcId);
this.SetParamSimple(map, prefix + "Vport", this.Vport);
this.SetParamSimple(map, prefix + "ZoneId", this.ZoneId);
}
}
}

View File

@@ -0,0 +1,50 @@
/*
* 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.Memcached.V20190318.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class TagInfo : AbstractModel
{
/// <summary>
/// 标签键
/// </summary>
[JsonProperty("TagKey")]
public string TagKey{ get; set; }
/// <summary>
/// 标签值
/// </summary>
[JsonProperty("TagValue")]
public string TagValue{ 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 + "TagKey", this.TagKey);
this.SetParamSimple(map, prefix + "TagValue", this.TagValue);
}
}
}