diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteComponentTcbExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteComponentTcbExtensions.cs index d857bc3b..80ba7fa3 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteComponentTcbExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteComponentTcbExtensions.cs @@ -277,5 +277,287 @@ namespace SKIT.FlurlHttpClient.Wechat.Api return await client.SendRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken); } #endregion + + #region ContainerService + /// + /// 异步调用 [POST] /componenttcb/opencontainerservice 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/batch/opencontainerservice.html + /// + /// + /// + /// + /// + public static async Task ExecuteComponentTcbOpenContainerServiceAsync(this WechatApiClient client, Models.ComponentTcbOpenContainerServiceRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "componenttcb", "opencontainerservice") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /tcb/usecloudaccesstoken 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/batch/usecloudaccesstoken.html + /// + /// + /// + /// + /// + public static async Task ExecuteComponentTcbUseCloudAccessTokenAsync(this WechatApiClient client, Models.ComponentTcbUseCloudAccessTokenRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "tcb", "usecloudaccesstoken") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /componenttcb/createcontainerservice 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/batch/createcontainerservice.html + /// + /// + /// + /// + /// + public static async Task ExecuteComponentTcbCreateContainerServiceAsync(this WechatApiClient client, Models.ComponentTcbCreateContainerServiceRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "componenttcb", "createcontainerservice") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /componenttcb/getcslist 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/batch/getcslist.html + /// + /// + /// + /// + /// + public static async Task ExecuteComponentTcbGetContainerServiceListAsync(this WechatApiClient client, Models.ComponentTcbGetContainerServiceListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "componenttcb", "getcslist") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /componenttcb/delcontainerservice 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/batch/delcontainerservice.html + /// + /// + /// + /// + /// + public static async Task ExecuteComponentTcbDeleteContainerServiceAsync(this WechatApiClient client, Models.ComponentTcbDeleteContainerServiceRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "componenttcb", "delcontainerservice") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /componenttcb/createcsversion 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/batch/createcsversion.html + /// + /// + /// + /// + /// + public static async Task ExecuteComponentTcbCreateContainerServiceVersionAsync(this WechatApiClient client, Models.ComponentTcbCreateContainerServiceVersionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "componenttcb", "createcsversion") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /componenttcb/batchcreatecsversion 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/batch/batchcreatecsversion.html + /// + /// + /// + /// + /// + public static async Task ExecuteComponentTcbBatchCreateContainerServiceVersionAsync(this WechatApiClient client, Models.ComponentTcbBatchCreateContainerServiceVersionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "componenttcb", "batchcreatecsversion") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /componenttcb/delcsversion 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/batch/delcsversion.html + /// + /// + /// + /// + /// + public static async Task ExecuteComponentTcbDeleteContainerServiceVersionAsync(this WechatApiClient client, Models.ComponentTcbDeleteContainerServiceVersionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "componenttcb", "delcsversion") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /componenttcb/batchdelcsversion 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/batch/batchDelCSVersion.html + /// + /// + /// + /// + /// + public static async Task ExecuteComponentTcbBatchDeleteContainerServiceVersionAsync(this WechatApiClient client, Models.ComponentTcbBatchDeleteContainerServiceVersionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "componenttcb", "batchdelcsversion") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /componenttcb/getcsversionlist 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/batch/getcsversionlist.html + /// + /// + /// + /// + /// + public static async Task ExecuteComponentTcbGetContainerServiceVersionListAsync(this WechatApiClient client, Models.ComponentTcbGetContainerServiceVersionListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "componenttcb", "getcsversionlist") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /componenttcb/getcsversiondetail 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/batch/getcsversiondetail.html + /// + /// + /// + /// + /// + public static async Task ExecuteComponentTcbGetContainerServiceVersionDetailAsync(this WechatApiClient client, Models.ComponentTcbGetContainerServiceVersionDetailRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "componenttcb", "getcsversiondetail") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /componenttcb/setcsversionconfig 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/batch/setcsversionconfig.html + /// + /// + /// + /// + /// + public static async Task ExecuteComponentTcbSetContainerServiceVersionConfigAsync(this WechatApiClient client, Models.ComponentTcbSetContainerServiceVersionConfigRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "componenttcb", "setcsversionconfig") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /componenttcb/setcspropotion 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/batch/setcspropotion.html + /// + /// + /// + /// + /// + public static async Task ExecuteComponentTcbSetContainerServicePropotionAsync(this WechatApiClient client, Models.ComponentTcbSetContainerServicePropotionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "componenttcb", "setcspropotion") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /componenttcb/batchsetcspropotion 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/batch/batchSetCSPropotion.html + /// + /// + /// + /// + /// + public static async Task ExecuteComponentTcbBatchSetContainerServicePropotionAsync(this WechatApiClient client, Models.ComponentTcbBatchSetContainerServicePropotionRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "componenttcb", "batchsetcspropotion") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbCreateContainerServiceRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbCreateContainerServiceRequest.cs new file mode 100644 index 00000000..ac6f9816 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbCreateContainerServiceRequest.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/createcontainerservice 接口的请求。 + /// + public class ComponentTcbCreateContainerServiceRequest : WechatApiRequest + { + public static class Types + { + public class VPC + { + /// + /// 获取或设置 VPC 唯一标识。 + /// + [Newtonsoft.Json.JsonProperty("vpcid")] + [System.Text.Json.Serialization.JsonPropertyName("vpcid")] + public string VPCId { get; set; } = string.Empty; + + /// + /// 获取或设置子网 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("subnetids")] + [System.Text.Json.Serialization.JsonPropertyName("subnetids")] + public IList SubnetIdList { get; set; } = new List(); + + /// + /// 获取或设置创建类型。 + /// + [Newtonsoft.Json.JsonProperty("create_type")] + [System.Text.Json.Serialization.JsonPropertyName("create_type")] + public int CreateType { get; set; } + } + } + + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = string.Empty; + + /// + /// 获取或设置服务名。 + /// + [Newtonsoft.Json.JsonProperty("service_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_name")] + public string ServiceName { get; set; } = string.Empty; + + /// + /// 获取或设置备注。 + /// + [Newtonsoft.Json.JsonProperty("remark")] + [System.Text.Json.Serialization.JsonPropertyName("remark")] + public string? Remark { get; set; } + + /// + /// 获取或设置 VPC 信息。 + /// + [Newtonsoft.Json.JsonProperty("vpc")] + [System.Text.Json.Serialization.JsonPropertyName("vpc")] + public Types.VPC? VPC { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbCreateContainerServiceResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbCreateContainerServiceResponse.cs new file mode 100644 index 00000000..a6e7a5bd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbCreateContainerServiceResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/createcontainerservice 接口的响应。 + /// + public class ComponentTcbCreateContainerServiceResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbDeleteContainerServiceRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbDeleteContainerServiceRequest.cs new file mode 100644 index 00000000..8c07e566 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbDeleteContainerServiceRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/delcontainerservice 接口的请求。 + /// + public class ComponentTcbDeleteContainerServiceRequest : WechatApiRequest + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = string.Empty; + + /// + /// 获取或设置服务名。 + /// + [Newtonsoft.Json.JsonProperty("service_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_name")] + public string ServiceName { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbDeleteContainerServiceResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbDeleteContainerServiceResponse.cs new file mode 100644 index 00000000..011aa929 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbDeleteContainerServiceResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/delcontainerservice 接口的响应。 + /// + public class ComponentTcbDeleteContainerServiceResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbGetContainerServiceListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbGetContainerServiceListRequest.cs new file mode 100644 index 00000000..b53d8472 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbGetContainerServiceListRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/getcslist 接口的请求。 + /// + public class ComponentTcbGetContainerServiceListRequest : WechatApiRequest + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = string.Empty; + + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("offset")] + [System.Text.Json.Serialization.JsonPropertyName("offset")] + public int? Offset { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("limit")] + [System.Text.Json.Serialization.JsonPropertyName("limit")] + public int? Limit { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbGetContainerServiceListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbGetContainerServiceListResponse.cs new file mode 100644 index 00000000..03338b05 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbGetContainerServiceListResponse.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/getcslist 接口的响应。 + /// + public class ComponentTcbGetContainerServiceListResponse : WechatApiResponse + { + public static class Types + { + public class ContainerService + { + /// + /// 获取或设置服务名。 + /// + [Newtonsoft.Json.JsonProperty("server_name")] + [System.Text.Json.Serialization.JsonPropertyName("server_name")] + public string ServiceName { get; set; } = default!; + + /// + /// 获取或设置 VPC 唯一标识。 + /// + [Newtonsoft.Json.JsonProperty("vpcid")] + [System.Text.Json.Serialization.JsonPropertyName("vpcid")] + public string VPCId { get; set; } = default!; + + /// + /// 获取或设置服务状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置镜像地址。 + /// + [Newtonsoft.Json.JsonProperty("image_repo")] + [System.Text.Json.Serialization.JsonPropertyName("image_repo")] + public string? ImageRepository { get; set; } + + /// + /// 获取或设置修改时间。 + /// + [Newtonsoft.Json.JsonProperty("updated_time")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339DateTimeOffsetConverter))] + [System.Text.Json.Serialization.JsonPropertyName("updated_time")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339DateTimeOffsetConverter))] + public DateTimeOffset UpdateTime { get; set; } = default!; + + /// + /// 获取或设置创建时间。 + /// + [Newtonsoft.Json.JsonProperty("created_time")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339DateTimeOffsetConverter))] + [System.Text.Json.Serialization.JsonPropertyName("created_time")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339DateTimeOffsetConverter))] + public DateTimeOffset CreateTime { get; set; } = default!; + } + } + + /// + /// 获取或设置云托管服务列表。 + /// + [Newtonsoft.Json.JsonProperty("cslist")] + [System.Text.Json.Serialization.JsonPropertyName("cslist")] + public Types.ContainerService[] ContainerServiceList { get; set; } = default!; + + /// + /// 获取或设置云函数总数量。 + /// + [Newtonsoft.Json.JsonProperty("total")] + [System.Text.Json.Serialization.JsonPropertyName("total")] + public int TotalCount { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbOpenContainerServiceRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbOpenContainerServiceRequest.cs new file mode 100644 index 00000000..2cd0a873 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbOpenContainerServiceRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/opencontainerservice 接口的请求。 + /// + public class ComponentTcbOpenContainerServiceRequest : WechatApiRequest + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbOpenContainerServiceResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbOpenContainerServiceResponse.cs new file mode 100644 index 00000000..46541560 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbOpenContainerServiceResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/opencontainerservice 接口的响应。 + /// + public class ComponentTcbOpenContainerServiceResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbUseCloudAccessTokenRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbUseCloudAccessTokenRequest.cs new file mode 100644 index 00000000..8b64668d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbUseCloudAccessTokenRequest.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /tcb/usecloudaccesstoken 接口的请求。 + /// + public class ComponentTcbUseCloudAccessTokenRequest : WechatApiRequest + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置操作类型。 + /// + [Newtonsoft.Json.JsonProperty("action")] + [System.Text.Json.Serialization.JsonPropertyName("action")] + public string Action { get; set; } = string.Empty; + + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = string.Empty; + + /// + /// 获取或设置是否关闭。 + /// + [Newtonsoft.Json.JsonProperty("open")] + [System.Text.Json.Serialization.JsonPropertyName("open")] + public bool? IsOpen { get; set; } + + /// + /// 获取或设置 API 白名单列表。 + /// + [Newtonsoft.Json.JsonProperty("api_whitelist")] + [System.Text.Json.Serialization.JsonPropertyName("api_whitelist")] + public IList? ApiWhiteList { get; set; } + + /// + /// 获取或设置版本号。 + /// + [Newtonsoft.Json.JsonProperty("version")] + [System.Text.Json.Serialization.JsonPropertyName("version")] + public int? Version { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbUseCloudAccessTokenResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbUseCloudAccessTokenResponse.cs new file mode 100644 index 00000000..3975fae1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/ComponentTcbUseCloudAccessTokenResponse.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /tcb/usecloudaccesstoken 接口的响应。 + /// + public class ComponentTcbUseCloudAccessTokenResponse : WechatApiResponse + { + /// + /// 获取或设置是否关闭。 + /// + [Newtonsoft.Json.JsonProperty("open")] + [System.Text.Json.Serialization.JsonPropertyName("open")] + public bool? IsOpen { get; set; } + + /// + /// 获取或设置 API 白名单列表。 + /// + [Newtonsoft.Json.JsonProperty("api_whitelist")] + [System.Text.Json.Serialization.JsonPropertyName("api_whitelist")] + public string[]? ApiWhiteList { get; set; } + + /// + /// 获取或设置版本号。 + /// + [Newtonsoft.Json.JsonProperty("version")] + [System.Text.Json.Serialization.JsonPropertyName("version")] + public int? Version { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Propotion/ComponentTcbBatchSetContainerServicePropotionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Propotion/ComponentTcbBatchSetContainerServicePropotionRequest.cs new file mode 100644 index 00000000..588c9efc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Propotion/ComponentTcbBatchSetContainerServicePropotionRequest.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/batchsetcspropotion 接口的请求。 + /// + public class ComponentTcbBatchSetContainerServicePropotionRequest : WechatApiRequest + { + public static class Types + { + public class ContainerService + { + public static class Types + { + public class Version : ComponentTcbSetContainerServicePropotionRequest.Types.Version + { + } + } + + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = string.Empty; + + /// + /// 获取或设置服务名。 + /// + [Newtonsoft.Json.JsonProperty("service_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_name")] + public string ServiceName { get; set; } = string.Empty; + + /// + /// 获取或设置版本列表。 + /// + [Newtonsoft.Json.JsonProperty("items")] + [System.Text.Json.Serialization.JsonPropertyName("items")] + public IList VersionList { get; set; } = new List(); + } + } + + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置云托管服务列表。 + /// + [Newtonsoft.Json.JsonProperty("items")] + [System.Text.Json.Serialization.JsonPropertyName("items")] + public IList ContainerServiceList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Propotion/ComponentTcbBatchSetContainerServicePropotionResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Propotion/ComponentTcbBatchSetContainerServicePropotionResponse.cs new file mode 100644 index 00000000..1b0cb375 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Propotion/ComponentTcbBatchSetContainerServicePropotionResponse.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/batchsetcspropotion 接口的响应。 + /// + public class ComponentTcbBatchSetContainerServicePropotionResponse : WechatApiResponse + { + public static class Types + { + public class Success + { + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = default!; + + /// + /// 获取或设置服务名。 + /// + [Newtonsoft.Json.JsonProperty("service_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_name")] + public string ServiceName { get; set; } = default!; + } + + public class Failure : Success + { + /// + /// 获取或设置错误描述。 + /// + [Newtonsoft.Json.JsonProperty("errmsg")] + [System.Text.Json.Serialization.JsonPropertyName("errmsg")] + public string ErrorMessage { get; set; } = default!; + } + } + + /// + /// 获取或设置成功项列表。 + /// + [Newtonsoft.Json.JsonProperty("succ_list")] + [System.Text.Json.Serialization.JsonPropertyName("succ_list")] + public Types.Success[] SuccessList { get; set; } = default!; + + /// + /// 获取或设置失败项列表。 + /// + [Newtonsoft.Json.JsonProperty("fail_list")] + [System.Text.Json.Serialization.JsonPropertyName("fail_list")] + public Types.Failure[] FailureList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Propotion/ComponentTcbSetContainerServicePropotionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Propotion/ComponentTcbSetContainerServicePropotionRequest.cs new file mode 100644 index 00000000..ca8715fe --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Propotion/ComponentTcbSetContainerServicePropotionRequest.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/setcspropotion 接口的请求。 + /// + public class ComponentTcbSetContainerServicePropotionRequest : WechatApiRequest + { + public static class Types + { + public class Version + { + /// + /// 获取或设置版本名称。 + /// + [Newtonsoft.Json.JsonProperty("version_name")] + [System.Text.Json.Serialization.JsonPropertyName("version_name")] + public string VersionName { get; set; } = string.Empty; + + /// + /// 获取或设置流量占比(范围:0~100)。 + /// + [Newtonsoft.Json.JsonProperty("flow_ratio")] + [System.Text.Json.Serialization.JsonPropertyName("flow_ratio")] + public int FlowRatio { get; set; } + } + } + + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = string.Empty; + + /// + /// 获取或设置服务名。 + /// + [Newtonsoft.Json.JsonProperty("service_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_name")] + public string ServiceName { get; set; } = string.Empty; + + /// + /// 获取或设置版本列表。 + /// + [Newtonsoft.Json.JsonProperty("items")] + [System.Text.Json.Serialization.JsonPropertyName("items")] + public IList VersionList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Propotion/ComponentTcbSetContainerServicePropotionResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Propotion/ComponentTcbSetContainerServicePropotionResponse.cs new file mode 100644 index 00000000..5f39d524 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Propotion/ComponentTcbSetContainerServicePropotionResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/setcspropotion 接口的响应。 + /// + public class ComponentTcbSetContainerServicePropotionResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbBatchCreateContainerServiceVersionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbBatchCreateContainerServiceVersionRequest.cs new file mode 100644 index 00000000..de091034 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbBatchCreateContainerServiceVersionRequest.cs @@ -0,0 +1,215 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/batchcreatecsversion 接口的请求。 + /// + public class ComponentTcbBatchCreateContainerServiceVersionRequest : WechatApiRequest + { + public static class Types + { + public class Image : ComponentTcbCreateContainerServiceVersionRequest.Types.Image + { + } + + public class Code : ComponentTcbCreateContainerServiceVersionRequest.Types.Code + { + } + + public class ImageSecret : ComponentTcbCreateContainerServiceVersionRequest.Types.ImageSecret + { + } + } + + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置环境 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("envs")] + [System.Text.Json.Serialization.JsonPropertyName("envs")] + public IList EnvironmentIdList { get; set; } = new List(); + + /// + /// 获取或设置服务名。 + /// + [Newtonsoft.Json.JsonProperty("service_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_name")] + public string ServiceName { get; set; } = string.Empty; + + /// + /// 获取或设置上传方式。 + /// + [Newtonsoft.Json.JsonProperty("upload_type")] + [System.Text.Json.Serialization.JsonPropertyName("upload_type")] + public string UploadType { get; set; } = string.Empty; + + /// + /// 获取或设置流量占比(范围:0~100)。 + /// + [Newtonsoft.Json.JsonProperty("flow_ratio")] + [System.Text.Json.Serialization.JsonPropertyName("flow_ratio")] + public int? FlowRatio { get; set; } + + /// + /// 获取或设置 CPU 核心数。 + /// + [Newtonsoft.Json.JsonProperty("cpu")] + [System.Text.Json.Serialization.JsonPropertyName("cpu")] + public double? CPUCount { get; set; } + + /// + /// 获取或设置内存大小(单位:GB)。 + /// + [Newtonsoft.Json.JsonProperty("mem")] + [System.Text.Json.Serialization.JsonPropertyName("mem")] + public double? MemorySize { get; set; } + + /// + /// 获取或设置最小副本数(范围:0~50)。 + /// + [Newtonsoft.Json.JsonProperty("minnum")] + [System.Text.Json.Serialization.JsonPropertyName("minnum")] + public int? MinReplicas { get; set; } + + /// + /// 获取或设置最大副本数(范围:0~50)。 + /// + [Newtonsoft.Json.JsonProperty("maxnum")] + [System.Text.Json.Serialization.JsonPropertyName("maxnum")] + public int? MaxReplicas { get; set; } + + /// + /// 获取或设置策略类型。 + /// + [Newtonsoft.Json.JsonProperty("policy_type")] + [System.Text.Json.Serialization.JsonPropertyName("policy_type")] + public string? PolicyType { get; set; } + + /// + /// 获取或设置策略阈值(范围:0~100)。 + /// + [Newtonsoft.Json.JsonProperty("policy_threshold")] + [System.Text.Json.Serialization.JsonPropertyName("policy_threshold")] + public int? PolicyThreshold { get; set; } + + /// + /// 获取或设置端口号。 + /// + [Newtonsoft.Json.JsonProperty("container_port")] + [System.Text.Json.Serialization.JsonPropertyName("container_port")] + public int? ContainerPort { get; set; } + + /// + /// 获取或设置仓库类型。 + /// + [Newtonsoft.Json.JsonProperty("repository_type")] + [System.Text.Json.Serialization.JsonPropertyName("repository_type")] + public string? RepositoryType { get; set; } + + /// + /// 获取或设置仓库地址。 + /// + [Newtonsoft.Json.JsonProperty("repository")] + [System.Text.Json.Serialization.JsonPropertyName("repository")] + public string? RepositoryUrl { get; set; } + + /// + /// 获取或设置 Dockerfile 路径。 + /// + [Newtonsoft.Json.JsonProperty("dockerfile_path")] + [System.Text.Json.Serialization.JsonPropertyName("dockerfile_path")] + public string? DockerfilePath { get; set; } + + /// + /// 获取或设置构建目录。 + /// + [Newtonsoft.Json.JsonProperty("build_dir")] + [System.Text.Json.Serialization.JsonPropertyName("build_dir")] + public string? BuildDirectory { get; set; } + + /// + /// 获取或设置环境变量。 + /// + [Newtonsoft.Json.JsonProperty("env_params")] + [System.Text.Json.Serialization.JsonPropertyName("env_params")] + public string? EnvironmentVariables { get; set; } + + /// + /// 获取或设置分支。 + /// + [Newtonsoft.Json.JsonProperty("branch")] + [System.Text.Json.Serialization.JsonPropertyName("branch")] + public string? Branch { get; set; } + + /// + /// 获取或设置包名称。 + /// + [Newtonsoft.Json.JsonProperty("package_name")] + [System.Text.Json.Serialization.JsonPropertyName("package_name")] + public string? PackageName { get; set; } + + /// + /// 获取或设置包版本。 + /// + [Newtonsoft.Json.JsonProperty("package_version")] + [System.Text.Json.Serialization.JsonPropertyName("package_version")] + public string? PackageVersion { get; set; } + + /// + /// 获取或设置镜像信息。 + /// + [Newtonsoft.Json.JsonProperty("image_info")] + [System.Text.Json.Serialization.JsonPropertyName("image_info")] + public Types.Image? Image { get; set; } + + /// + /// 获取或设置代码信息。 + /// + [Newtonsoft.Json.JsonProperty("code_detail")] + [System.Text.Json.Serialization.JsonPropertyName("code_detail")] + public Types.Code? Code { get; set; } + + /// + /// 获取或设置私有镜像密钥信息。 + /// + [Newtonsoft.Json.JsonProperty("image_secret_info")] + [System.Text.Json.Serialization.JsonPropertyName("image_secret_info")] + public Types.ImageSecret? ImageSecret { get; set; } + + /// + /// 获取或设置私有镜像认证密钥。 + /// + [Newtonsoft.Json.JsonProperty("image_pulls_secret")] + [System.Text.Json.Serialization.JsonPropertyName("image_pulls_secret")] + public string? ImagePullsSecret { get; set; } + + /// + /// 获取或设置自定义采集日志路径。 + /// + [Newtonsoft.Json.JsonProperty("custom_logs")] + [System.Text.Json.Serialization.JsonPropertyName("custom_logs")] + public string? CustomLogPath { get; set; } + + /// + /// 获取或设置是否开启微信令牌自动推送。 + /// + [Newtonsoft.Json.JsonProperty("mount_wx_token")] + [System.Text.Json.Serialization.JsonPropertyName("mount_wx_token")] + public bool? IsMountWechatToken { get; set; } + + /// + /// 获取或设置备注。 + /// + [Newtonsoft.Json.JsonProperty("version_remark")] + [System.Text.Json.Serialization.JsonPropertyName("version_remark")] + public string? Remark { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbBatchCreateContainerServiceVersionResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbBatchCreateContainerServiceVersionResponse.cs new file mode 100644 index 00000000..ff1adedb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbBatchCreateContainerServiceVersionResponse.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/batchcreatecsversion 接口的响应。 + /// + public class ComponentTcbBatchCreateContainerServiceVersionResponse : WechatApiResponse + { + public static class Types + { + public class Success + { + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = default!; + + /// + /// 获取或设置版本名称。 + /// + [Newtonsoft.Json.JsonProperty("version_name")] + [System.Text.Json.Serialization.JsonPropertyName("version_name")] + public string VersionName { get; set; } = default!; + } + + public class Failure + { + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = default!; + + /// + /// 获取或设置错误描述。 + /// + [Newtonsoft.Json.JsonProperty("errormsg")] + [System.Text.Json.Serialization.JsonPropertyName("errormsg")] + public string ErrorMessage { get; set; } = default!; + } + } + + /// + /// 获取或设置成功项列表。 + /// + [Newtonsoft.Json.JsonProperty("succ_list")] + [System.Text.Json.Serialization.JsonPropertyName("succ_list")] + public Types.Success[] SuccessList { get; set; } = default!; + + /// + /// 获取或设置失败项列表。 + /// + [Newtonsoft.Json.JsonProperty("fail_list")] + [System.Text.Json.Serialization.JsonPropertyName("fail_list")] + public Types.Failure[] FailureList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbBatchDeleteContainerServiceVersionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbBatchDeleteContainerServiceVersionRequest.cs new file mode 100644 index 00000000..499aeb59 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbBatchDeleteContainerServiceVersionRequest.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/batchdelcsversion 接口的请求。 + /// + public class ComponentTcbBatchDeleteContainerServiceVersionRequest : WechatApiRequest + { + public static class Types + { + public class Version + { + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = string.Empty; + + /// + /// 获取或设置服务名。 + /// + [Newtonsoft.Json.JsonProperty("service_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_name")] + public string ServiceName { get; set; } = string.Empty; + + /// + /// 获取或设置版本名称。 + /// + [Newtonsoft.Json.JsonProperty("version_name")] + [System.Text.Json.Serialization.JsonPropertyName("version_name")] + public string VersionName { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置版本列表。 + /// + [Newtonsoft.Json.JsonProperty("items")] + [System.Text.Json.Serialization.JsonPropertyName("items")] + public IList VersionList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbBatchDeleteContainerServiceVersionResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbBatchDeleteContainerServiceVersionResponse.cs new file mode 100644 index 00000000..1efa9434 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbBatchDeleteContainerServiceVersionResponse.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/batchdelcsversion 接口的响应。 + /// + public class ComponentTcbBatchDeleteContainerServiceVersionResponse : WechatApiResponse + { + public static class Types + { + public class Success + { + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = default!; + + /// + /// 获取或设置服务名。 + /// + [Newtonsoft.Json.JsonProperty("service_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_name")] + public string ServiceName { get; set; } = default!; + + /// + /// 获取或设置版本名称。 + /// + [Newtonsoft.Json.JsonProperty("version_name")] + [System.Text.Json.Serialization.JsonPropertyName("version_name")] + public string VersionName { get; set; } = default!; + } + + public class Failure : Success + { + /// + /// 获取或设置错误描述。 + /// + [Newtonsoft.Json.JsonProperty("errmsg")] + [System.Text.Json.Serialization.JsonPropertyName("errmsg")] + public string ErrorMessage { get; set; } = default!; + } + + } + + /// + /// 获取或设置成功项列表。 + /// + [Newtonsoft.Json.JsonProperty("succ_list")] + [System.Text.Json.Serialization.JsonPropertyName("succ_list")] + public Types.Success[] SuccessList { get; set; } = default!; + + /// + /// 获取或设置失败项列表。 + /// + [Newtonsoft.Json.JsonProperty("fail_list")] + [System.Text.Json.Serialization.JsonPropertyName("fail_list")] + public Types.Failure[] FailureList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbCreateContainerServiceVersionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbCreateContainerServiceVersionRequest.cs new file mode 100644 index 00000000..5e696e97 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbCreateContainerServiceVersionRequest.cs @@ -0,0 +1,309 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/createcsversion 接口的请求。 + /// + public class ComponentTcbCreateContainerServiceVersionRequest : WechatApiRequest + { + public static class Types + { + public class Image + { + /// + /// 获取或设置镜像仓库名称。 + /// + [Newtonsoft.Json.JsonProperty("repository_name")] + [System.Text.Json.Serialization.JsonPropertyName("repository_name")] + public string RepositoryName { get; set; } = string.Empty; + + /// + /// 获取或设置是否公有。 + /// + [Newtonsoft.Json.JsonProperty("ispublic")] + [System.Text.Json.Serialization.JsonPropertyName("ispublic")] + public bool IsPublic { get; set; } + + /// + /// 获取或设置镜像 Tag 名称。 + /// + [Newtonsoft.Json.JsonProperty("tagname")] + [System.Text.Json.Serialization.JsonPropertyName("tagname")] + public string TagName { get; set; } = string.Empty; + + /// + /// 获取或设置镜像服务地址。 + /// + [Newtonsoft.Json.JsonProperty("server_addr")] + [System.Text.Json.Serialization.JsonPropertyName("server_addr")] + public string ServerAddress { get; set; } = string.Empty; + + /// + /// 获取或设置镜像拉取地址。 + /// + [Newtonsoft.Json.JsonProperty("image_url")] + [System.Text.Json.Serialization.JsonPropertyName("image_url")] + public string ImageUrl { get; set; } = string.Empty; + } + + public class Code + { + public static class Types + { + public class Repository + { + /// + /// 获取或设置仓库名字。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// 获取或设置仓库完整名字。 + /// + [Newtonsoft.Json.JsonProperty("fullname")] + [System.Text.Json.Serialization.JsonPropertyName("fullname")] + public string? FullName { get; set; } + } + } + + /// + /// 获取或设置仓库信息。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public Types.Repository? Repository { get; set; } + + /// + /// 获取或设置仓库地址。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } + } + + public class ImageSecret + { + /// + /// 获取或设置镜像地址。 + /// + [Newtonsoft.Json.JsonProperty("registryserver")] + [System.Text.Json.Serialization.JsonPropertyName("registryserver")] + public string? RegistryServer { get; set; } + + /// + /// 获取或设置用户名。 + /// + [Newtonsoft.Json.JsonProperty("username")] + [System.Text.Json.Serialization.JsonPropertyName("username")] + public string? Username { get; set; } + + /// + /// 获取或设置密码。 + /// + [Newtonsoft.Json.JsonProperty("password")] + [System.Text.Json.Serialization.JsonPropertyName("password")] + public string? Password { get; set; } + + /// + /// 获取或设置邮箱。 + /// + [Newtonsoft.Json.JsonProperty("email")] + [System.Text.Json.Serialization.JsonPropertyName("email")] + public string? Email { get; set; } + } + } + + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = string.Empty; + + /// + /// 获取或设置服务名。 + /// + [Newtonsoft.Json.JsonProperty("service_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_name")] + public string ServiceName { get; set; } = string.Empty; + + /// + /// 获取或设置上传方式。 + /// + [Newtonsoft.Json.JsonProperty("upload_type")] + [System.Text.Json.Serialization.JsonPropertyName("upload_type")] + public string UploadType { get; set; } = string.Empty; + + /// + /// 获取或设置流量占比(范围:0~100)。 + /// + [Newtonsoft.Json.JsonProperty("flow_ratio")] + [System.Text.Json.Serialization.JsonPropertyName("flow_ratio")] + public int? FlowRatio { get; set; } + + /// + /// 获取或设置 CPU 核心数。 + /// + [Newtonsoft.Json.JsonProperty("cpu")] + [System.Text.Json.Serialization.JsonPropertyName("cpu")] + public double? CPUCount { get; set; } + + /// + /// 获取或设置内存大小(单位:GB)。 + /// + [Newtonsoft.Json.JsonProperty("mem")] + [System.Text.Json.Serialization.JsonPropertyName("mem")] + public double? MemorySize { get; set; } + + /// + /// 获取或设置最小副本数(范围:0~50)。 + /// + [Newtonsoft.Json.JsonProperty("minnum")] + [System.Text.Json.Serialization.JsonPropertyName("minnum")] + public int? MinReplicas { get; set; } + + /// + /// 获取或设置最大副本数(范围:0~50)。 + /// + [Newtonsoft.Json.JsonProperty("maxnum")] + [System.Text.Json.Serialization.JsonPropertyName("maxnum")] + public int? MaxReplicas { get; set; } + + /// + /// 获取或设置策略类型。 + /// + [Newtonsoft.Json.JsonProperty("policy_type")] + [System.Text.Json.Serialization.JsonPropertyName("policy_type")] + public string? PolicyType { get; set; } + + /// + /// 获取或设置策略阈值(范围:0~100)。 + /// + [Newtonsoft.Json.JsonProperty("policy_threshold")] + [System.Text.Json.Serialization.JsonPropertyName("policy_threshold")] + public int? PolicyThreshold { get; set; } + + /// + /// 获取或设置端口号。 + /// + [Newtonsoft.Json.JsonProperty("container_port")] + [System.Text.Json.Serialization.JsonPropertyName("container_port")] + public int? ContainerPort { get; set; } + + /// + /// 获取或设置仓库类型。 + /// + [Newtonsoft.Json.JsonProperty("repository_type")] + [System.Text.Json.Serialization.JsonPropertyName("repository_type")] + public string? RepositoryType { get; set; } + + /// + /// 获取或设置仓库地址。 + /// + [Newtonsoft.Json.JsonProperty("repository")] + [System.Text.Json.Serialization.JsonPropertyName("repository")] + public string? RepositoryUrl { get; set; } + + /// + /// 获取或设置 Dockerfile 路径。 + /// + [Newtonsoft.Json.JsonProperty("dockerfile_path")] + [System.Text.Json.Serialization.JsonPropertyName("dockerfile_path")] + public string? DockerfilePath { get; set; } + + /// + /// 获取或设置构建目录。 + /// + [Newtonsoft.Json.JsonProperty("build_dir")] + [System.Text.Json.Serialization.JsonPropertyName("build_dir")] + public string? BuildDirectory { get; set; } + + /// + /// 获取或设置环境变量。 + /// + [Newtonsoft.Json.JsonProperty("env_params")] + [System.Text.Json.Serialization.JsonPropertyName("env_params")] + public string? EnvironmentVariables { get; set; } + + /// + /// 获取或设置分支。 + /// + [Newtonsoft.Json.JsonProperty("branch")] + [System.Text.Json.Serialization.JsonPropertyName("branch")] + public string? Branch { get; set; } + + /// + /// 获取或设置包名称。 + /// + [Newtonsoft.Json.JsonProperty("package_name")] + [System.Text.Json.Serialization.JsonPropertyName("package_name")] + public string? PackageName { get; set; } + + /// + /// 获取或设置包版本。 + /// + [Newtonsoft.Json.JsonProperty("package_version")] + [System.Text.Json.Serialization.JsonPropertyName("package_version")] + public string? PackageVersion { get; set; } + + /// + /// 获取或设置镜像信息。 + /// + [Newtonsoft.Json.JsonProperty("image_info")] + [System.Text.Json.Serialization.JsonPropertyName("image_info")] + public Types.Image? Image { get; set; } + + /// + /// 获取或设置代码信息。 + /// + [Newtonsoft.Json.JsonProperty("code_detail")] + [System.Text.Json.Serialization.JsonPropertyName("code_detail")] + public Types.Code? Code { get; set; } + + /// + /// 获取或设置私有镜像密钥信息。 + /// + [Newtonsoft.Json.JsonProperty("image_secret_info")] + [System.Text.Json.Serialization.JsonPropertyName("image_secret_info")] + public Types.ImageSecret? ImageSecret { get; set; } + + /// + /// 获取或设置私有镜像认证密钥。 + /// + [Newtonsoft.Json.JsonProperty("image_pulls_secret")] + [System.Text.Json.Serialization.JsonPropertyName("image_pulls_secret")] + public string? ImagePullsSecret { get; set; } + + /// + /// 获取或设置自定义采集日志路径。 + /// + [Newtonsoft.Json.JsonProperty("custom_logs")] + [System.Text.Json.Serialization.JsonPropertyName("custom_logs")] + public string? CustomLogPath { get; set; } + + /// + /// 获取或设置是否开启微信令牌自动推送。 + /// + [Newtonsoft.Json.JsonProperty("mount_wx_token")] + [System.Text.Json.Serialization.JsonPropertyName("mount_wx_token")] + public bool? IsMountWechatToken { get; set; } + + /// + /// 获取或设置备注。 + /// + [Newtonsoft.Json.JsonProperty("version_remark")] + [System.Text.Json.Serialization.JsonPropertyName("version_remark")] + public string? Remark { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbCreateContainerServiceVersionResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbCreateContainerServiceVersionResponse.cs new file mode 100644 index 00000000..0d716007 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbCreateContainerServiceVersionResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/createcsversion 接口的响应。 + /// + public class ComponentTcbCreateContainerServiceVersionResponse : WechatApiResponse + { + /// + /// 获取或设置版本名称。 + /// + [Newtonsoft.Json.JsonProperty("version_name")] + [System.Text.Json.Serialization.JsonPropertyName("version_name")] + public string VersionName { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbDeleteContainerServiceVersionRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbDeleteContainerServiceVersionRequest.cs new file mode 100644 index 00000000..e13f68b7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbDeleteContainerServiceVersionRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/delcsversion 接口的请求。 + /// + public class ComponentTcbDeleteContainerServiceVersionRequest : WechatApiRequest + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = string.Empty; + + /// + /// 获取或设置服务名。 + /// + [Newtonsoft.Json.JsonProperty("service_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_name")] + public string ServiceName { get; set; } = string.Empty; + + /// + /// 获取或设置版本名称。 + /// + [Newtonsoft.Json.JsonProperty("version_name")] + [System.Text.Json.Serialization.JsonPropertyName("version_name")] + public string VersionName { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbDeleteContainerServiceVersionResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbDeleteContainerServiceVersionResponse.cs new file mode 100644 index 00000000..824b6588 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbDeleteContainerServiceVersionResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/delcsversion 接口的响应。 + /// + public class ComponentTcbDeleteContainerServiceVersionResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbGetContainerServiceVersionDetailRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbGetContainerServiceVersionDetailRequest.cs new file mode 100644 index 00000000..2a7ccca3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbGetContainerServiceVersionDetailRequest.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/getcsversiondetail 接口的请求。 + /// + public class ComponentTcbGetContainerServiceVersionDetailRequest : WechatApiRequest + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = string.Empty; + + /// + /// 获取或设置服务名。 + /// + [Newtonsoft.Json.JsonProperty("service_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_name")] + public string ServiceName { get; set; } = string.Empty; + + /// + /// 获取或设置版本名称。 + /// + [Newtonsoft.Json.JsonProperty("version_name")] + [System.Text.Json.Serialization.JsonPropertyName("version_name")] + public string VersionName { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbGetContainerServiceVersionDetailResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbGetContainerServiceVersionDetailResponse.cs new file mode 100644 index 00000000..9d95f270 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbGetContainerServiceVersionDetailResponse.cs @@ -0,0 +1,190 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/getcsversiondetail 接口的响应。 + /// + public class ComponentTcbGetContainerServiceVersionDetailResponse : WechatApiResponse + { + /// + /// 获取或设置版本名称。 + /// + [Newtonsoft.Json.JsonProperty("version_name")] + [System.Text.Json.Serialization.JsonPropertyName("version_name")] + public string VersionName { get; set; } = default!; + + /// + /// 获取或设置版本状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置上传方式。 + /// + [Newtonsoft.Json.JsonProperty("upload_type")] + [System.Text.Json.Serialization.JsonPropertyName("upload_type")] + public string UploadType { get; set; } = default!; + + /// + /// 获取或设置 CPU 核心数。 + /// + [Newtonsoft.Json.JsonProperty("cpu")] + [System.Text.Json.Serialization.JsonPropertyName("cpu")] + public double CPUCount { get; set; } + + /// + /// 获取或设置内存大小(单位:GB)。 + /// + [Newtonsoft.Json.JsonProperty("mem")] + [System.Text.Json.Serialization.JsonPropertyName("mem")] + public double MemorySize { get; set; } + + /// + /// 获取或设置最小副本数(范围:0~50)。 + /// + [Newtonsoft.Json.JsonProperty("minnum")] + [System.Text.Json.Serialization.JsonPropertyName("minnum")] + public int MinReplicas { get; set; } + + /// + /// 获取或设置最大副本数(范围:0~50)。 + /// + [Newtonsoft.Json.JsonProperty("maxnum")] + [System.Text.Json.Serialization.JsonPropertyName("maxnum")] + public int MaxReplicas { get; set; } + + /// + /// 获取或设置策略类型。 + /// + [Newtonsoft.Json.JsonProperty("policy_type")] + [System.Text.Json.Serialization.JsonPropertyName("policy_type")] + public string PolicyType { get; set; } = default!; + + /// + /// 获取或设置策略阈值(范围:0~100)。 + /// + [Newtonsoft.Json.JsonProperty("policy_threshold")] + [System.Text.Json.Serialization.JsonPropertyName("policy_threshold")] + public int PolicyThreshold { get; set; } + + /// + /// 获取或设置版本 IP。 + /// + [Newtonsoft.Json.JsonProperty("version_ip")] + [System.Text.Json.Serialization.JsonPropertyName("version_ip")] + public string VersionIP { get; set; } = default!; + + /// + /// 获取或设置版本端口。 + /// + [Newtonsoft.Json.JsonProperty("version_port")] + [System.Text.Json.Serialization.JsonPropertyName("version_port")] + public int VersionPort { get; set; } + + /// + /// 获取或设置端口号。 + /// + [Newtonsoft.Json.JsonProperty("container_port")] + [System.Text.Json.Serialization.JsonPropertyName("container_port")] + public int ContainerPort { get; set; } + + /// + /// 获取或设置仓库类型。 + /// + [Newtonsoft.Json.JsonProperty("repo_type")] + [System.Text.Json.Serialization.JsonPropertyName("repo_type")] + public string RepositoryType { get; set; } = default!; + + /// + /// 获取或设置仓库地址。 + /// + [Newtonsoft.Json.JsonProperty("repo")] + [System.Text.Json.Serialization.JsonPropertyName("repo")] + public string RepositoryUrl { get; set; } = default!; + + /// + /// 获取或设置 Dockerfile 路径。 + /// + [Newtonsoft.Json.JsonProperty("dockerfile_path")] + [System.Text.Json.Serialization.JsonPropertyName("dockerfile_path")] + public string DockerfilePath { get; set; } = default!; + + /// + /// 获取或设置构建目录。 + /// + [Newtonsoft.Json.JsonProperty("build_dir")] + [System.Text.Json.Serialization.JsonPropertyName("build_dir")] + public string BuildDirectory { get; set; } = default!; + + /// + /// 获取或设置环境变量。 + /// + [Newtonsoft.Json.JsonProperty("env_params")] + [System.Text.Json.Serialization.JsonPropertyName("env_params")] + public string EnvironmentVariables { get; set; } = default!; + + /// + /// 获取或设置分支。 + /// + [Newtonsoft.Json.JsonProperty("branch")] + [System.Text.Json.Serialization.JsonPropertyName("branch")] + public string Branch { get; set; } = default!; + + /// + /// 获取或设置备注。 + /// + [Newtonsoft.Json.JsonProperty("remark")] + [System.Text.Json.Serialization.JsonPropertyName("remark")] + public string? Remark { get; set; } + + /// + /// 获取或设置包名称。 + /// + [Newtonsoft.Json.JsonProperty("package_name")] + [System.Text.Json.Serialization.JsonPropertyName("package_name")] + public string PackageName { get; set; } = default!; + + /// + /// 获取或设置包版本。 + /// + [Newtonsoft.Json.JsonProperty("package_version")] + [System.Text.Json.Serialization.JsonPropertyName("package_version")] + public string PackageVersion { get; set; } = default!; + + /// + /// 获取或设置镜像地址。 + /// + [Newtonsoft.Json.JsonProperty("image_url")] + [System.Text.Json.Serialization.JsonPropertyName("image_url")] + public string? ImageUrl { get; set; } + + /// + /// 获取或设置自定义采集日志路径。 + /// + [Newtonsoft.Json.JsonProperty("custom_logs")] + [System.Text.Json.Serialization.JsonPropertyName("custom_logs")] + public string? CustomLogPath { get; set; } + + /// + /// 获取或设置修改时间。 + /// + [Newtonsoft.Json.JsonProperty("updated_time")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339DateTimeOffsetConverter))] + [System.Text.Json.Serialization.JsonPropertyName("updated_time")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339DateTimeOffsetConverter))] + public DateTimeOffset UpdateTime { get; set; } = default!; + + /// + /// 获取或设置创建时间。 + /// + [Newtonsoft.Json.JsonProperty("created_time")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339DateTimeOffsetConverter))] + [System.Text.Json.Serialization.JsonPropertyName("created_time")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339DateTimeOffsetConverter))] + public DateTimeOffset CreateTime { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbGetContainerServiceVersionListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbGetContainerServiceVersionListRequest.cs new file mode 100644 index 00000000..8566a37f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbGetContainerServiceVersionListRequest.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/getcsversionlist 接口的请求。 + /// + public class ComponentTcbGetContainerServiceVersionListRequest : WechatApiRequest + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = string.Empty; + + /// + /// 获取或设置服务名。 + /// + [Newtonsoft.Json.JsonProperty("service_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_name")] + public string ServiceName { get; set; } = string.Empty; + + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("offset")] + [System.Text.Json.Serialization.JsonPropertyName("offset")] + public int? Offset { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("limit")] + [System.Text.Json.Serialization.JsonPropertyName("limit")] + public int? Limit { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbGetContainerServiceVersionListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbGetContainerServiceVersionListResponse.cs new file mode 100644 index 00000000..9688360f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbGetContainerServiceVersionListResponse.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/getcsversionlist 接口的响应。 + /// + public class ComponentTcbGetContainerServiceVersionListResponse : WechatApiResponse + { + public static class Types + { + public class Version + { + /// + /// 获取或设置版本名称。 + /// + [Newtonsoft.Json.JsonProperty("version_name")] + [System.Text.Json.Serialization.JsonPropertyName("version_name")] + public string VersionName { get; set; } = default!; + + /// + /// 获取或设置版本状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置流量占比。 + /// + [Newtonsoft.Json.JsonProperty("flow_ratio")] + [System.Text.Json.Serialization.JsonPropertyName("flow_ratio")] + public int FlowRatio { get; set; } + + /// + /// 获取或设置构建 ID。 + /// + [Newtonsoft.Json.JsonProperty("buildid")] + [System.Text.Json.Serialization.JsonPropertyName("buildid")] + public int BuildId { get; set; } + + /// + /// 获取或设置上传类型。 + /// + [Newtonsoft.Json.JsonProperty("upload_type")] + [System.Text.Json.Serialization.JsonPropertyName("upload_type")] + public string UploadType { get; set; } = default!; + + /// + /// 获取或设置最小副本数。 + /// + [Newtonsoft.Json.JsonProperty("min_replicas")] + [System.Text.Json.Serialization.JsonPropertyName("min_replicas")] + public int MinReplicas { get; set; } + + /// + /// 获取或设置最大副本数。 + /// + [Newtonsoft.Json.JsonProperty("max_replicas")] + [System.Text.Json.Serialization.JsonPropertyName("max_replicas")] + public int MaxReplicas { get; set; } + + /// + /// 获取或设置修改时间。 + /// + [Newtonsoft.Json.JsonProperty("updated_time")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339DateTimeOffsetConverter))] + [System.Text.Json.Serialization.JsonPropertyName("updated_time")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339DateTimeOffsetConverter))] + public DateTimeOffset UpdateTime { get; set; } = default!; + + /// + /// 获取或设置创建时间。 + /// + [Newtonsoft.Json.JsonProperty("created_time")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339DateTimeOffsetConverter))] + [System.Text.Json.Serialization.JsonPropertyName("created_time")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339DateTimeOffsetConverter))] + public DateTimeOffset CreateTime { get; set; } = default!; + } + } + + /// + /// 获取或设置版本列表。 + /// + [Newtonsoft.Json.JsonProperty("items")] + [System.Text.Json.Serialization.JsonPropertyName("items")] + public Types.Version[] VersionList { get; set; } = default!; + + /// + /// 获取或设置云函数总数量。 + /// + [Newtonsoft.Json.JsonProperty("total")] + [System.Text.Json.Serialization.JsonPropertyName("total")] + public int TotalCount { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbSetContainerServiceVersionConfigRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbSetContainerServiceVersionConfigRequest.cs new file mode 100644 index 00000000..70c18331 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbSetContainerServiceVersionConfigRequest.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/setcsversionconfig 接口的请求。 + /// + public class ComponentTcbSetContainerServiceVersionConfigRequest : WechatApiRequest + { + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置环境 ID。 + /// + [Newtonsoft.Json.JsonProperty("env")] + [System.Text.Json.Serialization.JsonPropertyName("env")] + public string EnvironmentId { get; set; } = string.Empty; + + /// + /// 获取或设置服务名。 + /// + [Newtonsoft.Json.JsonProperty("service_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_name")] + public string ServiceName { get; set; } = string.Empty; + + /// + /// 获取或设置版本名称。 + /// + [Newtonsoft.Json.JsonProperty("version_name")] + [System.Text.Json.Serialization.JsonPropertyName("version_name")] + public string VersionName { get; set; } = string.Empty; + + /// + /// 获取或设置最小副本数(范围:0~50)。 + /// + [Newtonsoft.Json.JsonProperty("minnum")] + [System.Text.Json.Serialization.JsonPropertyName("minnum")] + public int? MinReplicas { get; set; } + + /// + /// 获取或设置最大副本数(范围:0~50)。 + /// + [Newtonsoft.Json.JsonProperty("maxnum")] + [System.Text.Json.Serialization.JsonPropertyName("maxnum")] + public int? MaxReplicas { get; set; } + + /// + /// 获取或设置端口号。 + /// + [Newtonsoft.Json.JsonProperty("container_port")] + [System.Text.Json.Serialization.JsonPropertyName("container_port")] + public int? ContainerPort { get; set; } + + /// + /// 获取或设置环境变量。 + /// + [Newtonsoft.Json.JsonProperty("env_params")] + [System.Text.Json.Serialization.JsonPropertyName("env_params")] + public string? EnvironmentVariables { get; set; } + + /// + /// 获取或设置自定义采集日志路径。 + /// + [Newtonsoft.Json.JsonProperty("custom_logs")] + [System.Text.Json.Serialization.JsonPropertyName("custom_logs")] + public string? CustomLogPath { get; set; } + + /// + /// 获取或设置备注。 + /// + [Newtonsoft.Json.JsonProperty("remark")] + [System.Text.Json.Serialization.JsonPropertyName("remark")] + public string? Remark { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbSetContainerServiceVersionConfigResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbSetContainerServiceVersionConfigResponse.cs new file mode 100644 index 00000000..fab47d54 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/ComponentTcb/ContainerService/Version/ComponentTcbSetContainerServiceVersionConfigResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /componenttcb/setcsversionconfig 接口的响应。 + /// + public class ComponentTcbSetContainerServiceVersionConfigResponse : WechatApiResponse + { + } +}