diff --git a/CHANGELOG.md b/CHANGELOG.md index bf6ee7b17..4b1aa2f0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,29 @@ +## 3.0.11-beta 2020-09-09 +## HuaweiCloud SDK Core + - ### Features + - None + - ### Bug Fix + - Delete redundant Sidecar code in the repository. + - ### Change + - None + +## HuaweiCloud SDK DMS + - ### Features + - Support Distributed Message Services, provide Kafka premium instances and RabbitMQ premium instances with dedicated resources. + - ### Bug Fix + - None + - ### Change + - None + +## HuaweiCloud SDK VPC + - ### Features + - None + - ### Bug Fix + - Fix the problem that security group related interfaces have wrong data type. + - ### Change + - None + + ## 3.0.10-beta 2020-09-04 ## HuaweiCloud SDK Core - ### Features diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index eaf921ea5..9fb6445ab 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,29 @@ +# 3.0.11-beta 2020-09-09 +## HuaweiCloud SDK Core + - ### 新增特性 + - 无 + - ### 解决问题 + - 删除代码仓中的冗余Sidecar代码 + - ### 特性变更 + - 无 + +## HuaweiCloud SDK DMS + - ### 新增特性 + - 支持分布式消息服务,提供Kafka专享版和RabbitMQ专享版 + - ### 解决问题 + - 无 + - ### 特性变更 + - 无 + +## HuaweiCloud SDK VPC + - ### 新增特性 + - 无 + - ### 解决问题 + - 修复安全组相关接口类型错误的问题 + - ### 特性变更 + - 无 + + # 3.0.10-beta 2020-09-04 ## HuaweiCloud SDK Core - ### 新增特性 diff --git a/Core/obj/Core.csproj.nuget.cache b/Core/obj/Core.csproj.nuget.cache index 002662c98..6256bf3b5 100644 --- a/Core/obj/Core.csproj.nuget.cache +++ b/Core/obj/Core.csproj.nuget.cache @@ -1,5 +1,5 @@ { "version": 1, - "dgSpecHash": "BI/WayeYc4X+hcAXtNz5hJGzp8qW8s1edxDEcioStmcg3359OM+gFIWHqsxtOLlikoqGzpLQVPcYih1jfr4f9g==", + "dgSpecHash": "z7RJzV4Vv6G6+/PXfWMLYDkzO0NZuQpvremnOJZg9a1Pzpr45eGJYrgDaze4DdQa0JjIsVypLRDUIzYDtLTzWQ==", "success": true } \ No newline at end of file diff --git a/Core/obj/Core.csproj.nuget.dgspec.json b/Core/obj/Core.csproj.nuget.dgspec.json index 34d3a222b..c92539077 100644 --- a/Core/obj/Core.csproj.nuget.dgspec.json +++ b/Core/obj/Core.csproj.nuget.dgspec.json @@ -1,17 +1,17 @@ { "format": 1, "restore": { - "/data/fuxi_ci_workspace/5f5209a7f796dd245cc822ce/Core/Core.csproj": {} + "/data/fuxi_ci_workspace/5f5894cfe5e4844a532d3187/Core/Core.csproj": {} }, "projects": { - "/data/fuxi_ci_workspace/5f5209a7f796dd245cc822ce/Core/Core.csproj": { + "/data/fuxi_ci_workspace/5f5894cfe5e4844a532d3187/Core/Core.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "/data/fuxi_ci_workspace/5f5209a7f796dd245cc822ce/Core/Core.csproj", + "projectUniqueName": "/data/fuxi_ci_workspace/5f5894cfe5e4844a532d3187/Core/Core.csproj", "projectName": "HuaweiCloud.SDK.Core", - "projectPath": "/data/fuxi_ci_workspace/5f5209a7f796dd245cc822ce/Core/Core.csproj", + "projectPath": "/data/fuxi_ci_workspace/5f5894cfe5e4844a532d3187/Core/Core.csproj", "packagesPath": "/root/.nuget/packages/", - "outputPath": "/data/fuxi_ci_workspace/5f5209a7f796dd245cc822ce/Core/obj/", + "outputPath": "/data/fuxi_ci_workspace/5f5894cfe5e4844a532d3187/Core/obj/", "projectStyle": "PackageReference", "fallbackFolders": [ "/usr/dotnet/sdk/NuGetFallbackFolder" @@ -23,7 +23,7 @@ "netstandard2.0" ], "sources": { - "/data/fuxi_ci_workspace/5f5209a7f796dd245cc822ce/package": {} + "/data/fuxi_ci_workspace/5f5894cfe5e4844a532d3187/package": {} }, "frameworks": { "netstandard2.0": { diff --git a/Core/obj/Core.csproj.nuget.g.props b/Core/obj/Core.csproj.nuget.g.props index fa888267c..5f2bd4c47 100644 --- a/Core/obj/Core.csproj.nuget.g.props +++ b/Core/obj/Core.csproj.nuget.g.props @@ -3,7 +3,7 @@ True NuGet - /data/fuxi_ci_workspace/5f5209a7f796dd245cc822ce/Core/obj/project.assets.json + /data/fuxi_ci_workspace/5f5894cfe5e4844a532d3187/Core/obj/project.assets.json /root/.nuget/packages/ /root/.nuget/packages/;/usr/dotnet/sdk/NuGetFallbackFolder PackageReference diff --git a/Core/obj/project.assets.json b/Core/obj/project.assets.json index ee3dade1b..b9d06a5e1 100644 --- a/Core/obj/project.assets.json +++ b/Core/obj/project.assets.json @@ -3593,11 +3593,11 @@ "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "/data/fuxi_ci_workspace/5f5209a7f796dd245cc822ce/Core/Core.csproj", + "projectUniqueName": "/data/fuxi_ci_workspace/5f5894cfe5e4844a532d3187/Core/Core.csproj", "projectName": "HuaweiCloud.SDK.Core", - "projectPath": "/data/fuxi_ci_workspace/5f5209a7f796dd245cc822ce/Core/Core.csproj", + "projectPath": "/data/fuxi_ci_workspace/5f5894cfe5e4844a532d3187/Core/Core.csproj", "packagesPath": "/root/.nuget/packages/", - "outputPath": "/data/fuxi_ci_workspace/5f5209a7f796dd245cc822ce/Core/obj/", + "outputPath": "/data/fuxi_ci_workspace/5f5894cfe5e4844a532d3187/Core/obj/", "projectStyle": "PackageReference", "fallbackFolders": [ "/usr/dotnet/sdk/NuGetFallbackFolder" @@ -3609,7 +3609,7 @@ "netstandard2.0" ], "sources": { - "/data/fuxi_ci_workspace/5f5209a7f796dd245cc822ce/package": {} + "/data/fuxi_ci_workspace/5f5894cfe5e4844a532d3187/package": {} }, "frameworks": { "netstandard2.0": { diff --git a/Examples/Dms/V2/ConsumeGroup.cs b/Examples/Dms/V2/ConsumeGroup.cs new file mode 100644 index 000000000..0ecf4c735 --- /dev/null +++ b/Examples/Dms/V2/ConsumeGroup.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections.Generic; +using HuaweiCloud.SDK.Core; +using HuaweiCloud.SDK.Core.Auth; +using HuaweiCloud.SDK.Dms.V2; +using HuaweiCloud.SDK.Dms.V2.Model; + +namespace Examples.Dms.V2 +{ + public class ConsumeGroup + { + private const string ak = "{your ak string}"; + private const string sk = "{your sk string}"; + private const string endpoint = "{your endpoint}"; + private const string projectId = "{your project id}"; + private const string queueId = "{your queue id}"; + + private static void ConsumeGroupMain(string[] args) + { + var config = HttpConfig.GetDefaultConfig(); + config.IgnoreSslVerification = true; + var auth = new BasicCredentials(ak, sk, projectId); + var dmsClient = DmsClient.NewBuilder() + .WithCredential(auth) + .WithEndPoint(endpoint) + .WithHttpConfig(config).Build(); + + // CreateConsumerGroup(dmsClient); + listConsumerGroups(dmsClient); + } + + private static void CreateConsumerGroup(DmsClient client) + { + var groupEntity = new GroupEntity + { + Name = "gourp-test", + }; + var req = new CreateConsumerGroupRequest() + { + QueueId = queueId, + Body = new CreateConsumerGroupReq + { + Groups = new List() {groupEntity} + } + }; + + try + { + var resp = client.CreateConsumerGroup(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + + private static void listConsumerGroups(DmsClient client) + { + var req = new ListConsumerGroupsRequest + { + QueueId = queueId, + }; + + try + { + var resp = client.ListConsumerGroups(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + } +} \ No newline at end of file diff --git a/Examples/Dms/V2/QueueMgt.cs b/Examples/Dms/V2/QueueMgt.cs new file mode 100644 index 000000000..13e91b3bd --- /dev/null +++ b/Examples/Dms/V2/QueueMgt.cs @@ -0,0 +1,116 @@ +using System; +using HuaweiCloud.SDK.Core; +using HuaweiCloud.SDK.Core.Auth; +using HuaweiCloud.SDK.Dms.V2; +using HuaweiCloud.SDK.Dms.V2.Model; + +namespace Examples.Dms.V2 +{ + public class QueueMgt + { + private const string ak = "{your ak string}"; + private const string sk = "{your sk string}"; + private const string endpoint = "{your endpoint}"; + private const string projectId = "{your project id}"; + private const string queueId = "{your queue id}"; + + private static void QueueMgtMain(string[] args) + { + var config = HttpConfig.GetDefaultConfig(); + config.IgnoreSslVerification = true; + var auth = new BasicCredentials(ak, sk, projectId); + var dmsClient = DmsClient.NewBuilder() + .WithCredential(auth) + .WithEndPoint(endpoint) + .WithHttpConfig(config).Build(); + + // listQueues(dmsClient); + CreateQueue(dmsClient); + //deleteQueue(dmsClient); + } + + private static void listQueues(DmsClient client) + { + var req = new ListQueuesRequest(); + + try + { + var resp = client.ListQueues(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + + private static void CreateQueue(DmsClient client) + { + var req = new CreateQueueRequest + { + Body = new CreateQueueReq + { + Name = "queue-test", + } + }; + + try + { + var resp = client.CreateQueue(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + + private static void deleteQueue(DmsClient client) + { + var req = new DeleteQueueRequest() + { + QueueId = queueId, + }; + + try + { + var resp = client.DeleteQueue(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + } +} \ No newline at end of file diff --git a/Examples/Examples.csproj b/Examples/Examples.csproj index 08e34809e..339f6ae21 100644 --- a/Examples/Examples.csproj +++ b/Examples/Examples.csproj @@ -21,6 +21,9 @@ + + + diff --git a/Examples/Kafka/V2/InstanceMgt.cs b/Examples/Kafka/V2/InstanceMgt.cs new file mode 100644 index 000000000..d50761755 --- /dev/null +++ b/Examples/Kafka/V2/InstanceMgt.cs @@ -0,0 +1,61 @@ +using System; +using HuaweiCloud.SDK.Core; +using HuaweiCloud.SDK.Core.Auth; +using HuaweiCloud.SDK.Kafka.V2; +using HuaweiCloud.SDK.Kafka.V2.Model; + +namespace Examples.Kafka.V2 +{ + public class InstanceMgt + { + private const string ak = "{your ak string}"; + private const string sk = "{your sk string}"; + private const string endpoint = "{your endpoint}"; + private const string projectId = "{your project id}"; + private const string instanceId = "{instance id}"; + + private static void InstanceMgtMain(string[] args) + { + var config = HttpConfig.GetDefaultConfig(); + config.IgnoreSslVerification = true; + var auth = new BasicCredentials(ak, sk, projectId); + var kafkaClient = KafkaClient.NewBuilder() + .WithCredential(auth) + .WithEndPoint(endpoint) + .WithHttpConfig(config).Build(); + + resetPassword(kafkaClient); + } + + private static void resetPassword(KafkaClient client) + { + var req = new ResetPasswordRequest + { + InstanceId = instanceId, + Body = new ResetPasswordReq + { + NewPassword = "xxxxxxxxxx", + } + }; + try + { + var resp = client.ResetPassword(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + } +} \ No newline at end of file diff --git a/Examples/Kafka/V2/LifeCycleMgt.cs b/Examples/Kafka/V2/LifeCycleMgt.cs new file mode 100644 index 000000000..a0ee05ae5 --- /dev/null +++ b/Examples/Kafka/V2/LifeCycleMgt.cs @@ -0,0 +1,146 @@ +using System; +using System.Collections.Generic; +using HuaweiCloud.SDK.Core; +using HuaweiCloud.SDK.Core.Auth; +using HuaweiCloud.SDK.Kafka.V2; +using HuaweiCloud.SDK.Kafka.V2.Model; + +namespace Examples.Kafka.V2 +{ + public class LifeCycleMgt + { + private const string ak = "{your ak string}"; + private const string sk = "{your sk string}"; + private const string endpoint = "{your endpoint}"; + private const string projectId = "{your project id}"; + + private const string az = "{az id}"; + private const string vpcId = "{your vpc id}"; + private const string subNetId = "{your sub net id}"; + private const string sgId = "{your security gate id}"; + private const string accessUser = "xxxxxxxx"; + private const string accessPasswd = "xxxxxxxx"; + private const string managerUser = "xxxxxxxx"; + private const string managerPasswd = "xxxxxxxx"; + private const string instanceId = "{instance id}"; + + private static void LifeCycleMgtMain(string[] args) + { + var config = HttpConfig.GetDefaultConfig(); + config.IgnoreSslVerification = true; + var auth = new BasicCredentials(ak, sk, projectId); + var kafkaClient = KafkaClient.NewBuilder() + .WithCredential(auth) + .WithEndPoint(endpoint) + .WithHttpConfig(config).Build(); + + //listInstance(kafkaClient); + createInstance(kafkaClient); + //batchRestartOrDeleteInstances(kafkaClient); + } + + private static void listInstance(KafkaClient client) + { + var req = new ListInstancesRequest + { + Engine = ListInstancesRequest.EngineEnum.KAFKA, + }; + try + { + var resp = client.ListInstances(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + + private static void createInstance(KafkaClient client) + { + var req = new CreatePostPaidInstanceRequest + { + Body = new CreatePostPaidInstanceReq + { + Name = "Csharp-sdk-create", + AvailableZones = new List {az}, + Engine = CreatePostPaidInstanceReq.EngineEnum.KAFKA, + EngineVersion = CreatePostPaidInstanceReq.EngineVersionEnum._1_1_0, + KafkaManagerUser = managerUser, + KafkaManagerPassword = managerPasswd, + PartitionNum = CreatePostPaidInstanceReq.PartitionNumEnum.NUMBER_300, + ProductId = "00300-30308-0--0", + SecurityGroupId = sgId, + Specification = CreatePostPaidInstanceReq.SpecificationEnum._100MB, + StorageSpecCode = CreatePostPaidInstanceReq.StorageSpecCodeEnum.DMS_PHYSICAL_STORAGE_NORMAL, + StorageSpace = 300, + SubnetId = subNetId, + VpcId = vpcId, + SslEnable = true, + AccessUser = accessUser, + Password = accessPasswd, + } + }; + try + { + var resp = client.CreatePostPaidInstance(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + + private static void batchRestartOrDeleteInstances(KafkaClient client) + { + var req = new BatchRestartOrDeleteInstancesRequest + { + Body = new BatchRestartOrDeleteInstanceReq + { + Action = BatchRestartOrDeleteInstanceReq.ActionEnum.DELETE, + Instances = new List(){instanceId}, + } + }; + try + { + var resp = client.BatchRestartOrDeleteInstances(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + } +} \ No newline at end of file diff --git a/Examples/Kafka/V2/OtherInterface.cs b/Examples/Kafka/V2/OtherInterface.cs new file mode 100644 index 000000000..bdaf5959a --- /dev/null +++ b/Examples/Kafka/V2/OtherInterface.cs @@ -0,0 +1,117 @@ +using System; +using HuaweiCloud.SDK.Core; +using HuaweiCloud.SDK.Core.Auth; +using HuaweiCloud.SDK.Kafka.V2; +using HuaweiCloud.SDK.Kafka.V2.Model; + +namespace Examples.Kafka.V2 +{ + public class OtherInterface + { + private const string ak = "{your ak string}"; + private const string sk = "{your sk string}"; + private const string endpoint = "{your endpoint}"; + private const string projectId = "{your project id}"; + + private const string az = "{az id}"; + private const string vpcId = "{your vpc id}"; + private const string subNetId = "{your sub net id}"; + private const string sgId = "{your security gate id}"; + private const string accessUser = "xxxxxxxx"; + private const string accessPasswd = "xxxxxxxx"; + private const string instanceId = "{instance id}"; + + private static void OtherInterfaceMain(string[] args) + { + var config = HttpConfig.GetDefaultConfig(); + config.IgnoreSslVerification = true; + var auth = new BasicCredentials(ak, sk, projectId); + var kafkaClient= KafkaClient.NewBuilder() + .WithCredential(auth) + .WithEndPoint(endpoint) + .WithHttpConfig(config).Build(); + + listAvailableZones(kafkaClient); + listProducts(kafkaClient); + showMaintainWindows(kafkaClient); + } + + private static void listAvailableZones(KafkaClient client) + { + var req = new ListAvailableZonesRequest(); + + try + { + var resp = client.ListAvailableZones(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + + private static void listProducts(KafkaClient client) + { + var req = new ListProductsRequest + { + Engine = ListProductsRequest.EngineEnum.KAFKA, + }; + + try + { + var resp = client.ListProducts(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + + private static void showMaintainWindows(KafkaClient client) + { + var req = new ShowMaintainWindowsRequest(); + + try + { + var resp = client.ShowMaintainWindows(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + } +} \ No newline at end of file diff --git a/Examples/Kafka/V2/TopicMgt.cs b/Examples/Kafka/V2/TopicMgt.cs new file mode 100644 index 000000000..cf08ece9f --- /dev/null +++ b/Examples/Kafka/V2/TopicMgt.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections.Generic; +using HuaweiCloud.SDK.Core; +using HuaweiCloud.SDK.Core.Auth; +using HuaweiCloud.SDK.Kafka.V2; +using HuaweiCloud.SDK.Kafka.V2.Model; + +namespace Examples.Kafka.V2 +{ + public class TopicMgt + { + private const string ak = "{your ak string}"; + private const string sk = "{your sk string}"; + private const string endpoint = "{your endpoint}"; + private const string projectId = "{your project id}"; + private const string instanceId = "{instance id}"; + + private static void TopicMgtMain(string[] args) + { + var config = HttpConfig.GetDefaultConfig(); + config.IgnoreSslVerification = true; + var auth = new BasicCredentials(ak, sk, projectId); + var kafkaClient = KafkaClient.NewBuilder() + .WithCredential(auth) + .WithEndPoint(endpoint) + .WithHttpConfig(config).Build(); + + //listInstanceTopics(kafkaClient); + //createInstanceTopic(kafkaClient); + batchDeleteInstanceTopic(kafkaClient); + } + + private static void listInstanceTopics(KafkaClient client) + { + var req = new ListInstanceTopicsRequest() + { + InstanceId = instanceId + }; + try + { + var resp = client.ListInstanceTopics(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + + private static void createInstanceTopic(KafkaClient client) + { + var req = new CreateInstanceTopicRequest + { + InstanceId = instanceId, + Body = new CreateInstanceTopicReq + { + Name = "topic-test", + } + }; + try + { + var resp = client.CreateInstanceTopic(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + + private static void batchDeleteInstanceTopic(KafkaClient client) + { + var req = new BatchDeleteInstanceTopicRequest() + { + InstanceId = instanceId, + Body = new BatchDeleteInstanceTopicReq + { + Topics = new List() {"topic-test"}, + } + }; + try + { + var resp = client.BatchDeleteInstanceTopic(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + } +} \ No newline at end of file diff --git a/Examples/Rabbitmq/V2/InstanceMgt.cs b/Examples/Rabbitmq/V2/InstanceMgt.cs new file mode 100644 index 000000000..83b9d300f --- /dev/null +++ b/Examples/Rabbitmq/V2/InstanceMgt.cs @@ -0,0 +1,122 @@ +using System; +using HuaweiCloud.SDK.Core; +using HuaweiCloud.SDK.Core.Auth; +using HuaweiCloud.SDK.Rabbitmq.V2; +using HuaweiCloud.SDK.Rabbitmq.V2.Model; + +namespace Examples.Rabbitmq.V2 +{ + public class InstanceMgt + { + private const string ak = "{your ak string}"; + private const string sk = "{your sk string}"; + private const string endpoint = "{your endpoint}"; + private const string projectId = "{your project id}"; + private const string instanceId = "{instance id}"; + + private static void InstanceMgtMain(string[] args) + { + var config = HttpConfig.GetDefaultConfig(); + config.IgnoreSslVerification = true; + var auth = new BasicCredentials(ak, sk, projectId); + var rabbitmqClient = RabbitmqClient.NewBuilder() + .WithCredential(auth) + .WithEndPoint(endpoint) + .WithHttpConfig(config).Build(); + + // listPlugins(rabbitmqClient); + // updatePlugins(rabbitmqClient); + resetPassword(rabbitmqClient); + } + + private static void listPlugins(RabbitmqClient client) + { + var req = new ListPluginsRequest + { + InstanceId = instanceId, + }; + try + { + var resp = client.ListPlugins(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + + private static void updatePlugins(RabbitmqClient client) + { + var req = new UpdatePluginsRequest() + { + InstanceId = instanceId, + Body = new UpdatePluginsReq + { + Enable = true, + Plugins = "rabbitmq_sharding,rabbitmq_federation", + } + }; + try + { + var resp = client.UpdatePlugins(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + + private static void resetPassword(RabbitmqClient client) + { + var req = new ResetPasswordRequest + { + InstanceId = instanceId, + Body = new ResetPasswordReq + { + NewPassword = "Cloud@123abc", + } + }; + try + { + var resp = client.ResetPassword(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + } +} \ No newline at end of file diff --git a/Examples/Rabbitmq/V2/LifeCycleMgt.cs b/Examples/Rabbitmq/V2/LifeCycleMgt.cs new file mode 100644 index 000000000..164b57f28 --- /dev/null +++ b/Examples/Rabbitmq/V2/LifeCycleMgt.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using HuaweiCloud.SDK.Core; +using HuaweiCloud.SDK.Core.Auth; +using HuaweiCloud.SDK.Rabbitmq.V2; +using HuaweiCloud.SDK.Rabbitmq.V2.Model; + +namespace Examples.Rabbitmq.V2 +{ + public class LifeCycleMgt + { + private const string ak = "{your ak string}"; + private const string sk = "{your sk string}"; + private const string endpoint = "{your endpoint}"; + private const string projectId = "{your project id}"; + + private const string az = "{az id}"; + private const string vpcId = "{your vpc id}"; + private const string subNetId = "{your sub net id}"; + private const string sgId = "{your security gate id}"; + private const string accessUser = "xxxxxxxx"; + private const string accessPasswd = "xxxxxxxx"; + private const string instanceId = "{instance id}"; + + private static void LifeCycleMgtMain(string[] args) + { + var config = HttpConfig.GetDefaultConfig(); + config.IgnoreSslVerification = true; + var auth = new BasicCredentials(ak, sk, projectId); + var rabbitmqClient = RabbitmqClient.NewBuilder() + .WithCredential(auth) + .WithEndPoint(endpoint) + .WithHttpConfig(config).Build(); + + // listInstance(rabbitmqClient); + // createPostPaidInstance(rabbitmqClient); + batchRestartOrDeleteInstances(rabbitmqClient); + } + + + private static void listInstance(RabbitmqClient client) + { + var req = new ListInstancesDetailsRequest + { + Engine = ListInstancesDetailsRequest.EngineEnum.RABBITMQ, + }; + try + { + var resp = client.ListInstancesDetails(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + + private static void createPostPaidInstance(RabbitmqClient client) + { + var req = new CreatePostPaidInstanceRequest + { + Body = new CreateInstanceReq + { + Name = "Csharp-sdk-create", + AvailableZones = new List {az}, + Engine = CreateInstanceReq.EngineEnum.RABBITMQ, + EngineVersion = CreateInstanceReq.EngineVersionEnum._3_7_17, + ProductId = "00300-30109-0--0", + SecurityGroupId = sgId, + StorageSpace = 100, + SubnetId = subNetId, + VpcId = vpcId, + SslEnable = true, + AccessUser = accessUser, + Password = accessPasswd, + } + }; + try + { + var resp = client.CreatePostPaidInstance(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + + private static void batchRestartOrDeleteInstances(RabbitmqClient client) + { + var req = new BatchRestartOrDeleteInstancesRequest + { + Body = new BatchRestartOrDeleteInstanceReq + { + Action = BatchRestartOrDeleteInstanceReq.ActionEnum.RESTART, + Instances = new List(){instanceId}, + } + }; + try + { + var resp = client.BatchRestartOrDeleteInstances(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + } +} \ No newline at end of file diff --git a/Examples/Rabbitmq/V2/OtherInterface.cs b/Examples/Rabbitmq/V2/OtherInterface.cs new file mode 100644 index 000000000..8bcb10140 --- /dev/null +++ b/Examples/Rabbitmq/V2/OtherInterface.cs @@ -0,0 +1,109 @@ +using System; +using HuaweiCloud.SDK.Core; +using HuaweiCloud.SDK.Core.Auth; +using HuaweiCloud.SDK.Rabbitmq.V2; +using HuaweiCloud.SDK.Rabbitmq.V2.Model; + +namespace Examples.Rabbitmq.V2 +{ + public class OtherInterface + { + private const string ak = "{your ak string}"; + private const string sk = "{your sk string}"; + private const string endpoint = "{your endpoint}"; + private const string projectId = "{your project id}"; + + private static void OtherInterfaceMain(string[] args) + { + var config = HttpConfig.GetDefaultConfig(); + config.IgnoreSslVerification = true; + var auth = new BasicCredentials(ak, sk, projectId); + var rabbitmqClient = RabbitmqClient.NewBuilder() + .WithCredential(auth) + .WithEndPoint(endpoint) + .WithHttpConfig(config).Build(); + + // listAvailableZones(rabbitmqClient); + // listProducts(rabbitmqClient); + showMaintainWindows(rabbitmqClient); + } + + private static void listAvailableZones(RabbitmqClient client) + { + var req = new ListAvailableZonesRequest(); + + try + { + var resp = client.ListAvailableZones(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + + private static void listProducts(RabbitmqClient client) + { + var req = new ListProductsRequest + { + Engine = ListProductsRequest.EngineEnum.RABBITMQ, + }; + + try + { + var resp = client.ListProducts(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + + private static void showMaintainWindows(RabbitmqClient client) + { + var req = new ShowMaintainWindowsRequest(); + + try + { + var resp = client.ShowMaintainWindows(req); + Console.WriteLine(resp.GetHttpBody()); + } + catch (RequestTimeoutException requestTimeoutException) + { + Console.WriteLine(requestTimeoutException.ErrorMessage); + } + catch (ServiceResponseException clientRequestException) + { + Console.WriteLine(clientRequestException.HttpStatusCode); + Console.WriteLine(clientRequestException.ErrorCode); + Console.WriteLine(clientRequestException.ErrorMsg); + } + catch (ConnectionException connectionException) + { + Console.WriteLine(connectionException.ErrorMessage); + } + } + } +} \ No newline at end of file diff --git a/HuaweiCloud.sln b/HuaweiCloud.sln index 29fc29fab..c507d609a 100644 --- a/HuaweiCloud.sln +++ b/HuaweiCloud.sln @@ -5,43 +5,49 @@ VisualStudioVersion = 15.0.26124.0 MinimumVisualStudioVersion = 15.0.26124.0 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "Core\Core.csproj", "{863F0212-886F-42E1-89D6-D05075529D8A}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Services", "Services", "{80A3EFE5-408F-428B-BB03-05C5D44EADFA}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Services", "Services", "{14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FunctionGraph", "Services\FunctionGraph\FunctionGraph.csproj", "{33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ims", "Services\Ims\Ims.csproj", "{5B7BFA6B-B85E-4222-8988-16CCF9558393}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectMan", "Services\ProjectMan\ProjectMan.csproj", "{535cfc94-6d5b-4da2-bbbd-e9faa9014012}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "As", "Services\As\As.csproj", "{D9FEA963-ED3C-416B-B01E-1FF7EE009EA4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Image", "Services\Image\Image.csproj", "{38F2C59A-6FAA-498E-9DAB-6CE2640A539A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rabbitmq", "Services\Rabbitmq\Rabbitmq.csproj", "{defe4a95-5592-47cc-8dee-9810e0da0ba0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dcs", "Services\Dcs\Dcs.csproj", "{c66dd549-8ef4-48f1-a85b-eaffaa736cee}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Classroom", "Services\Classroom\Classroom.csproj", "{D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo", "Services\Demo\Demo.csproj", "{2763ec40-c4dd-11ea-87d0-0242ac130003}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IoTDA", "Services\IoTDA\IoTDA.csproj", "{12F2C43A-6FAA-437E-9DAB-6CE8640A524A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dds", "Services\Dds\Dds.csproj", "{ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectMan", "Services\ProjectMan\ProjectMan.csproj", "{535cfc94-6d5b-4da2-bbbd-e9faa9014012}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ecs", "Services\Ecs\Ecs.csproj", "{c3aaea74-f41e-4c56-b64e-7a2496ff6551}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FunctionGraph", "Services\FunctionGraph\FunctionGraph.csproj", "{33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Iam", "Services\Iam\Iam.csproj", "{09E55113-08BD-46BC-B5A3-6440F4410AC8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Evs", "Services\Evs\Evs.csproj", "{B6D999F9-9335-433F-BCD2-1E07409AFA39}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ces", "Services\Ces\Ces.csproj", "{E2E79C4D-9E38-443B-BF8B-83C087271443}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dcs", "Services\Dcs\Dcs.csproj", "{c66dd549-8ef4-48f1-a85b-eaffaa736cee}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tms", "Services\Tms\Tms.csproj", "{38D1B59C-9F0A-648E-9DAB-6CE4640A539A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ims", "Services\Ims\Ims.csproj", "{5B7BFA6B-B85E-4222-8988-16CCF9558393}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Iam", "Services\Iam\Iam.csproj", "{09E55113-08BD-46BC-B5A3-6440F4410AC8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vpc", "Services\Vpc\Vpc.csproj", "{96f50236-7030-47ab-af32-bb76484fadec}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Image", "Services\Image\Image.csproj", "{38F2C59A-6FAA-498E-9DAB-6CE2640A539A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Eps", "Services\Eps\Eps.csproj", "{F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "As", "Services\As\As.csproj", "{D9FEA963-ED3C-416B-B01E-1FF7EE009EA4}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kms", "Services\Kms\Kms.csproj", "{ECB1152B-9F28-414F-B3E8-B596E421779B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Evs", "Services\Evs\Evs.csproj", "{B6D999F9-9335-433F-BCD2-1E07409AFA39}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dds", "Services\Dds\Dds.csproj", "{ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ces", "Services\Ces\Ces.csproj", "{E2E79C4D-9E38-443B-BF8B-83C087271443}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kafka", "Services\Kafka\Kafka.csproj", "{1635d3a9-f723-4184-8328-018a761bb661}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vpc", "Services\Vpc\Vpc.csproj", "{96f50236-7030-47ab-af32-bb76484fadec}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ecs", "Services\Ecs\Ecs.csproj", "{c3aaea74-f41e-4c56-b64e-7a2496ff6551}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kms", "Services\Kms\Kms.csproj", "{ECB1152B-9F28-414F-B3E8-B596E421779B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dms", "Services\Dms\Dms.csproj", "{7e275afe-aa55-4625-a007-89abd0b0af16}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo", "Services\Demo\Demo.csproj", "{2763ec40-c4dd-11ea-87d0-0242ac130003}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Classroom", "Services\Classroom\Classroom.csproj", "{D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -68,126 +74,6 @@ Global {863F0212-886F-42E1-89D6-D05075529D8A}.Release|x64.Build.0 = Release|Any CPU {863F0212-886F-42E1-89D6-D05075529D8A}.Release|x86.ActiveCfg = Release|Any CPU {863F0212-886F-42E1-89D6-D05075529D8A}.Release|x86.Build.0 = Release|Any CPU - {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Debug|x64.ActiveCfg = Debug|Any CPU - {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Debug|x64.Build.0 = Debug|Any CPU - {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Debug|x86.ActiveCfg = Debug|Any CPU - {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Debug|x86.Build.0 = Debug|Any CPU - {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Release|Any CPU.Build.0 = Release|Any CPU - {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Release|x64.ActiveCfg = Release|Any CPU - {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Release|x64.Build.0 = Release|Any CPU - {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Release|x86.ActiveCfg = Release|Any CPU - {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Release|x86.Build.0 = Release|Any CPU - {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Debug|Any CPU.Build.0 = Debug|Any CPU - {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Debug|x64.ActiveCfg = Debug|Any CPU - {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Debug|x64.Build.0 = Debug|Any CPU - {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Debug|x86.ActiveCfg = Debug|Any CPU - {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Debug|x86.Build.0 = Debug|Any CPU - {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Release|Any CPU.ActiveCfg = Release|Any CPU - {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Release|Any CPU.Build.0 = Release|Any CPU - {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Release|x64.ActiveCfg = Release|Any CPU - {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Release|x64.Build.0 = Release|Any CPU - {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Release|x86.ActiveCfg = Release|Any CPU - {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Release|x86.Build.0 = Release|Any CPU - {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Debug|x64.ActiveCfg = Debug|Any CPU - {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Debug|x64.Build.0 = Debug|Any CPU - {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Debug|x86.ActiveCfg = Debug|Any CPU - {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Debug|x86.Build.0 = Debug|Any CPU - {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Release|Any CPU.Build.0 = Release|Any CPU - {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Release|x64.ActiveCfg = Release|Any CPU - {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Release|x64.Build.0 = Release|Any CPU - {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Release|x86.ActiveCfg = Release|Any CPU - {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Release|x86.Build.0 = Release|Any CPU - {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Debug|Any CPU.Build.0 = Debug|Any CPU - {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Debug|x64.ActiveCfg = Debug|Any CPU - {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Debug|x64.Build.0 = Debug|Any CPU - {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Debug|x86.ActiveCfg = Debug|Any CPU - {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Debug|x86.Build.0 = Debug|Any CPU - {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Release|Any CPU.ActiveCfg = Release|Any CPU - {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Release|Any CPU.Build.0 = Release|Any CPU - {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Release|x64.ActiveCfg = Release|Any CPU - {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Release|x64.Build.0 = Release|Any CPU - {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Release|x86.ActiveCfg = Release|Any CPU - {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Release|x86.Build.0 = Release|Any CPU - {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Debug|x64.ActiveCfg = Debug|Any CPU - {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Debug|x64.Build.0 = Debug|Any CPU - {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Debug|x86.ActiveCfg = Debug|Any CPU - {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Debug|x86.Build.0 = Debug|Any CPU - {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Release|Any CPU.Build.0 = Release|Any CPU - {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Release|x64.ActiveCfg = Release|Any CPU - {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Release|x64.Build.0 = Release|Any CPU - {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Release|x86.ActiveCfg = Release|Any CPU - {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Release|x86.Build.0 = Release|Any CPU - {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Debug|x64.ActiveCfg = Debug|Any CPU - {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Debug|x64.Build.0 = Debug|Any CPU - {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Debug|x86.ActiveCfg = Debug|Any CPU - {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Debug|x86.Build.0 = Debug|Any CPU - {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Release|Any CPU.Build.0 = Release|Any CPU - {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Release|x64.ActiveCfg = Release|Any CPU - {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Release|x64.Build.0 = Release|Any CPU - {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Release|x86.ActiveCfg = Release|Any CPU - {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Release|x86.Build.0 = Release|Any CPU - {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Debug|x64.ActiveCfg = Debug|Any CPU - {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Debug|x64.Build.0 = Debug|Any CPU - {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Debug|x86.ActiveCfg = Debug|Any CPU - {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Debug|x86.Build.0 = Debug|Any CPU - {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Release|Any CPU.Build.0 = Release|Any CPU - {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Release|x64.ActiveCfg = Release|Any CPU - {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Release|x64.Build.0 = Release|Any CPU - {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Release|x86.ActiveCfg = Release|Any CPU - {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Release|x86.Build.0 = Release|Any CPU - {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Debug|Any CPU.Build.0 = Debug|Any CPU - {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Debug|x64.ActiveCfg = Debug|Any CPU - {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Debug|x64.Build.0 = Debug|Any CPU - {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Debug|x86.ActiveCfg = Debug|Any CPU - {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Debug|x86.Build.0 = Debug|Any CPU - {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Release|Any CPU.ActiveCfg = Release|Any CPU - {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Release|Any CPU.Build.0 = Release|Any CPU - {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Release|x64.ActiveCfg = Release|Any CPU - {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Release|x64.Build.0 = Release|Any CPU - {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Release|x86.ActiveCfg = Release|Any CPU - {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Release|x86.Build.0 = Release|Any CPU - {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Debug|x64.ActiveCfg = Debug|Any CPU - {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Debug|x64.Build.0 = Debug|Any CPU - {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Debug|x86.ActiveCfg = Debug|Any CPU - {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Debug|x86.Build.0 = Debug|Any CPU - {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Release|Any CPU.Build.0 = Release|Any CPU - {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Release|x64.ActiveCfg = Release|Any CPU - {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Release|x64.Build.0 = Release|Any CPU - {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Release|x86.ActiveCfg = Release|Any CPU - {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Release|x86.Build.0 = Release|Any CPU - {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Debug|x64.ActiveCfg = Debug|Any CPU - {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Debug|x64.Build.0 = Debug|Any CPU - {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Debug|x86.ActiveCfg = Debug|Any CPU - {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Debug|x86.Build.0 = Debug|Any CPU - {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Release|Any CPU.Build.0 = Release|Any CPU - {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Release|x64.ActiveCfg = Release|Any CPU - {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Release|x64.Build.0 = Release|Any CPU - {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Release|x86.ActiveCfg = Release|Any CPU - {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Release|x86.Build.0 = Release|Any CPU {5B7BFA6B-B85E-4222-8988-16CCF9558393}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7BFA6B-B85E-4222-8988-16CCF9558393}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7BFA6B-B85E-4222-8988-16CCF9558393}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -200,18 +86,6 @@ Global {5B7BFA6B-B85E-4222-8988-16CCF9558393}.Release|x64.Build.0 = Release|Any CPU {5B7BFA6B-B85E-4222-8988-16CCF9558393}.Release|x86.ActiveCfg = Release|Any CPU {5B7BFA6B-B85E-4222-8988-16CCF9558393}.Release|x86.Build.0 = Release|Any CPU - {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Debug|x64.ActiveCfg = Debug|Any CPU - {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Debug|x64.Build.0 = Debug|Any CPU - {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Debug|x86.ActiveCfg = Debug|Any CPU - {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Debug|x86.Build.0 = Debug|Any CPU - {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Release|Any CPU.Build.0 = Release|Any CPU - {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Release|x64.ActiveCfg = Release|Any CPU - {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Release|x64.Build.0 = Release|Any CPU - {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Release|x86.ActiveCfg = Release|Any CPU - {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Release|x86.Build.0 = Release|Any CPU {D9FEA963-ED3C-416B-B01E-1FF7EE009EA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D9FEA963-ED3C-416B-B01E-1FF7EE009EA4}.Debug|Any CPU.Build.0 = Debug|Any CPU {D9FEA963-ED3C-416B-B01E-1FF7EE009EA4}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -224,6 +98,66 @@ Global {D9FEA963-ED3C-416B-B01E-1FF7EE009EA4}.Release|x64.Build.0 = Release|Any CPU {D9FEA963-ED3C-416B-B01E-1FF7EE009EA4}.Release|x86.ActiveCfg = Release|Any CPU {D9FEA963-ED3C-416B-B01E-1FF7EE009EA4}.Release|x86.Build.0 = Release|Any CPU + {defe4a95-5592-47cc-8dee-9810e0da0ba0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {defe4a95-5592-47cc-8dee-9810e0da0ba0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {defe4a95-5592-47cc-8dee-9810e0da0ba0}.Debug|x64.ActiveCfg = Debug|Any CPU + {defe4a95-5592-47cc-8dee-9810e0da0ba0}.Debug|x64.Build.0 = Debug|Any CPU + {defe4a95-5592-47cc-8dee-9810e0da0ba0}.Debug|x86.ActiveCfg = Debug|Any CPU + {defe4a95-5592-47cc-8dee-9810e0da0ba0}.Debug|x86.Build.0 = Debug|Any CPU + {defe4a95-5592-47cc-8dee-9810e0da0ba0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {defe4a95-5592-47cc-8dee-9810e0da0ba0}.Release|Any CPU.Build.0 = Release|Any CPU + {defe4a95-5592-47cc-8dee-9810e0da0ba0}.Release|x64.ActiveCfg = Release|Any CPU + {defe4a95-5592-47cc-8dee-9810e0da0ba0}.Release|x64.Build.0 = Release|Any CPU + {defe4a95-5592-47cc-8dee-9810e0da0ba0}.Release|x86.ActiveCfg = Release|Any CPU + {defe4a95-5592-47cc-8dee-9810e0da0ba0}.Release|x86.Build.0 = Release|Any CPU + {2763ec40-c4dd-11ea-87d0-0242ac130003}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2763ec40-c4dd-11ea-87d0-0242ac130003}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2763ec40-c4dd-11ea-87d0-0242ac130003}.Debug|x64.ActiveCfg = Debug|Any CPU + {2763ec40-c4dd-11ea-87d0-0242ac130003}.Debug|x64.Build.0 = Debug|Any CPU + {2763ec40-c4dd-11ea-87d0-0242ac130003}.Debug|x86.ActiveCfg = Debug|Any CPU + {2763ec40-c4dd-11ea-87d0-0242ac130003}.Debug|x86.Build.0 = Debug|Any CPU + {2763ec40-c4dd-11ea-87d0-0242ac130003}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2763ec40-c4dd-11ea-87d0-0242ac130003}.Release|Any CPU.Build.0 = Release|Any CPU + {2763ec40-c4dd-11ea-87d0-0242ac130003}.Release|x64.ActiveCfg = Release|Any CPU + {2763ec40-c4dd-11ea-87d0-0242ac130003}.Release|x64.Build.0 = Release|Any CPU + {2763ec40-c4dd-11ea-87d0-0242ac130003}.Release|x86.ActiveCfg = Release|Any CPU + {2763ec40-c4dd-11ea-87d0-0242ac130003}.Release|x86.Build.0 = Release|Any CPU + {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Debug|x64.ActiveCfg = Debug|Any CPU + {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Debug|x64.Build.0 = Debug|Any CPU + {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Debug|x86.ActiveCfg = Debug|Any CPU + {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Debug|x86.Build.0 = Debug|Any CPU + {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Release|Any CPU.Build.0 = Release|Any CPU + {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Release|x64.ActiveCfg = Release|Any CPU + {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Release|x64.Build.0 = Release|Any CPU + {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Release|x86.ActiveCfg = Release|Any CPU + {12F2C43A-6FAA-437E-9DAB-6CE8640A524A}.Release|x86.Build.0 = Release|Any CPU + {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Debug|Any CPU.Build.0 = Debug|Any CPU + {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Debug|x64.ActiveCfg = Debug|Any CPU + {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Debug|x64.Build.0 = Debug|Any CPU + {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Debug|x86.ActiveCfg = Debug|Any CPU + {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Debug|x86.Build.0 = Debug|Any CPU + {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Release|Any CPU.ActiveCfg = Release|Any CPU + {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Release|Any CPU.Build.0 = Release|Any CPU + {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Release|x64.ActiveCfg = Release|Any CPU + {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Release|x64.Build.0 = Release|Any CPU + {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Release|x86.ActiveCfg = Release|Any CPU + {535cfc94-6d5b-4da2-bbbd-e9faa9014012}.Release|x86.Build.0 = Release|Any CPU + {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Debug|x64.ActiveCfg = Debug|Any CPU + {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Debug|x64.Build.0 = Debug|Any CPU + {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Debug|x86.ActiveCfg = Debug|Any CPU + {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Debug|x86.Build.0 = Debug|Any CPU + {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Release|Any CPU.Build.0 = Release|Any CPU + {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Release|x64.ActiveCfg = Release|Any CPU + {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Release|x64.Build.0 = Release|Any CPU + {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Release|x86.ActiveCfg = Release|Any CPU + {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A}.Release|x86.Build.0 = Release|Any CPU {B6D999F9-9335-433F-BCD2-1E07409AFA39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B6D999F9-9335-433F-BCD2-1E07409AFA39}.Debug|Any CPU.Build.0 = Debug|Any CPU {B6D999F9-9335-433F-BCD2-1E07409AFA39}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -248,6 +182,42 @@ Global {E2E79C4D-9E38-443B-BF8B-83C087271443}.Release|x64.Build.0 = Release|Any CPU {E2E79C4D-9E38-443B-BF8B-83C087271443}.Release|x86.ActiveCfg = Release|Any CPU {E2E79C4D-9E38-443B-BF8B-83C087271443}.Release|x86.Build.0 = Release|Any CPU + {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Debug|Any CPU.Build.0 = Debug|Any CPU + {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Debug|x64.ActiveCfg = Debug|Any CPU + {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Debug|x64.Build.0 = Debug|Any CPU + {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Debug|x86.ActiveCfg = Debug|Any CPU + {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Debug|x86.Build.0 = Debug|Any CPU + {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Release|Any CPU.ActiveCfg = Release|Any CPU + {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Release|Any CPU.Build.0 = Release|Any CPU + {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Release|x64.ActiveCfg = Release|Any CPU + {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Release|x64.Build.0 = Release|Any CPU + {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Release|x86.ActiveCfg = Release|Any CPU + {c66dd549-8ef4-48f1-a85b-eaffaa736cee}.Release|x86.Build.0 = Release|Any CPU + {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Debug|x64.ActiveCfg = Debug|Any CPU + {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Debug|x64.Build.0 = Debug|Any CPU + {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Debug|x86.ActiveCfg = Debug|Any CPU + {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Debug|x86.Build.0 = Debug|Any CPU + {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Release|Any CPU.Build.0 = Release|Any CPU + {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Release|x64.ActiveCfg = Release|Any CPU + {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Release|x64.Build.0 = Release|Any CPU + {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Release|x86.ActiveCfg = Release|Any CPU + {38D1B59C-9F0A-648E-9DAB-6CE4640A539A}.Release|x86.Build.0 = Release|Any CPU + {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Debug|x64.ActiveCfg = Debug|Any CPU + {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Debug|x64.Build.0 = Debug|Any CPU + {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Debug|x86.ActiveCfg = Debug|Any CPU + {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Debug|x86.Build.0 = Debug|Any CPU + {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Release|Any CPU.Build.0 = Release|Any CPU + {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Release|x64.ActiveCfg = Release|Any CPU + {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Release|x64.Build.0 = Release|Any CPU + {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Release|x86.ActiveCfg = Release|Any CPU + {09E55113-08BD-46BC-B5A3-6440F4410AC8}.Release|x86.Build.0 = Release|Any CPU {96f50236-7030-47ab-af32-bb76484fadec}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {96f50236-7030-47ab-af32-bb76484fadec}.Debug|Any CPU.Build.0 = Debug|Any CPU {96f50236-7030-47ab-af32-bb76484fadec}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -260,6 +230,30 @@ Global {96f50236-7030-47ab-af32-bb76484fadec}.Release|x64.Build.0 = Release|Any CPU {96f50236-7030-47ab-af32-bb76484fadec}.Release|x86.ActiveCfg = Release|Any CPU {96f50236-7030-47ab-af32-bb76484fadec}.Release|x86.Build.0 = Release|Any CPU + {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Debug|x64.ActiveCfg = Debug|Any CPU + {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Debug|x64.Build.0 = Debug|Any CPU + {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Debug|x86.ActiveCfg = Debug|Any CPU + {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Debug|x86.Build.0 = Debug|Any CPU + {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Release|Any CPU.Build.0 = Release|Any CPU + {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Release|x64.ActiveCfg = Release|Any CPU + {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Release|x64.Build.0 = Release|Any CPU + {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Release|x86.ActiveCfg = Release|Any CPU + {38F2C59A-6FAA-498E-9DAB-6CE2640A539A}.Release|x86.Build.0 = Release|Any CPU + {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Debug|x64.ActiveCfg = Debug|Any CPU + {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Debug|x64.Build.0 = Debug|Any CPU + {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Debug|x86.ActiveCfg = Debug|Any CPU + {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Debug|x86.Build.0 = Debug|Any CPU + {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Release|Any CPU.Build.0 = Release|Any CPU + {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Release|x64.ActiveCfg = Release|Any CPU + {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Release|x64.Build.0 = Release|Any CPU + {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Release|x86.ActiveCfg = Release|Any CPU + {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A}.Release|x86.Build.0 = Release|Any CPU {ECB1152B-9F28-414F-B3E8-B596E421779B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ECB1152B-9F28-414F-B3E8-B596E421779B}.Debug|Any CPU.Build.0 = Debug|Any CPU {ECB1152B-9F28-414F-B3E8-B596E421779B}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -272,37 +266,88 @@ Global {ECB1152B-9F28-414F-B3E8-B596E421779B}.Release|x64.Build.0 = Release|Any CPU {ECB1152B-9F28-414F-B3E8-B596E421779B}.Release|x86.ActiveCfg = Release|Any CPU {ECB1152B-9F28-414F-B3E8-B596E421779B}.Release|x86.Build.0 = Release|Any CPU - {2763ec40-c4dd-11ea-87d0-0242ac130003}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2763ec40-c4dd-11ea-87d0-0242ac130003}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2763ec40-c4dd-11ea-87d0-0242ac130003}.Debug|x64.ActiveCfg = Debug|Any CPU - {2763ec40-c4dd-11ea-87d0-0242ac130003}.Debug|x64.Build.0 = Debug|Any CPU - {2763ec40-c4dd-11ea-87d0-0242ac130003}.Debug|x86.ActiveCfg = Debug|Any CPU - {2763ec40-c4dd-11ea-87d0-0242ac130003}.Debug|x86.Build.0 = Debug|Any CPU - {2763ec40-c4dd-11ea-87d0-0242ac130003}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2763ec40-c4dd-11ea-87d0-0242ac130003}.Release|Any CPU.Build.0 = Release|Any CPU - {2763ec40-c4dd-11ea-87d0-0242ac130003}.Release|x64.ActiveCfg = Release|Any CPU - {2763ec40-c4dd-11ea-87d0-0242ac130003}.Release|x64.Build.0 = Release|Any CPU - {2763ec40-c4dd-11ea-87d0-0242ac130003}.Release|x86.ActiveCfg = Release|Any CPU - {2763ec40-c4dd-11ea-87d0-0242ac130003}.Release|x86.Build.0 = Release|Any CPU + {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Debug|x64.ActiveCfg = Debug|Any CPU + {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Debug|x64.Build.0 = Debug|Any CPU + {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Debug|x86.ActiveCfg = Debug|Any CPU + {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Debug|x86.Build.0 = Debug|Any CPU + {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Release|Any CPU.Build.0 = Release|Any CPU + {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Release|x64.ActiveCfg = Release|Any CPU + {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Release|x64.Build.0 = Release|Any CPU + {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Release|x86.ActiveCfg = Release|Any CPU + {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2}.Release|x86.Build.0 = Release|Any CPU + {1635d3a9-f723-4184-8328-018a761bb661}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1635d3a9-f723-4184-8328-018a761bb661}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1635d3a9-f723-4184-8328-018a761bb661}.Debug|x64.ActiveCfg = Debug|Any CPU + {1635d3a9-f723-4184-8328-018a761bb661}.Debug|x64.Build.0 = Debug|Any CPU + {1635d3a9-f723-4184-8328-018a761bb661}.Debug|x86.ActiveCfg = Debug|Any CPU + {1635d3a9-f723-4184-8328-018a761bb661}.Debug|x86.Build.0 = Debug|Any CPU + {1635d3a9-f723-4184-8328-018a761bb661}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1635d3a9-f723-4184-8328-018a761bb661}.Release|Any CPU.Build.0 = Release|Any CPU + {1635d3a9-f723-4184-8328-018a761bb661}.Release|x64.ActiveCfg = Release|Any CPU + {1635d3a9-f723-4184-8328-018a761bb661}.Release|x64.Build.0 = Release|Any CPU + {1635d3a9-f723-4184-8328-018a761bb661}.Release|x86.ActiveCfg = Release|Any CPU + {1635d3a9-f723-4184-8328-018a761bb661}.Release|x86.Build.0 = Release|Any CPU + {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Debug|Any CPU.Build.0 = Debug|Any CPU + {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Debug|x64.ActiveCfg = Debug|Any CPU + {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Debug|x64.Build.0 = Debug|Any CPU + {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Debug|x86.ActiveCfg = Debug|Any CPU + {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Debug|x86.Build.0 = Debug|Any CPU + {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Release|Any CPU.ActiveCfg = Release|Any CPU + {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Release|Any CPU.Build.0 = Release|Any CPU + {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Release|x64.ActiveCfg = Release|Any CPU + {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Release|x64.Build.0 = Release|Any CPU + {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Release|x86.ActiveCfg = Release|Any CPU + {c3aaea74-f41e-4c56-b64e-7a2496ff6551}.Release|x86.Build.0 = Release|Any CPU + {7e275afe-aa55-4625-a007-89abd0b0af16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7e275afe-aa55-4625-a007-89abd0b0af16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7e275afe-aa55-4625-a007-89abd0b0af16}.Debug|x64.ActiveCfg = Debug|Any CPU + {7e275afe-aa55-4625-a007-89abd0b0af16}.Debug|x64.Build.0 = Debug|Any CPU + {7e275afe-aa55-4625-a007-89abd0b0af16}.Debug|x86.ActiveCfg = Debug|Any CPU + {7e275afe-aa55-4625-a007-89abd0b0af16}.Debug|x86.Build.0 = Debug|Any CPU + {7e275afe-aa55-4625-a007-89abd0b0af16}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7e275afe-aa55-4625-a007-89abd0b0af16}.Release|Any CPU.Build.0 = Release|Any CPU + {7e275afe-aa55-4625-a007-89abd0b0af16}.Release|x64.ActiveCfg = Release|Any CPU + {7e275afe-aa55-4625-a007-89abd0b0af16}.Release|x64.Build.0 = Release|Any CPU + {7e275afe-aa55-4625-a007-89abd0b0af16}.Release|x86.ActiveCfg = Release|Any CPU + {7e275afe-aa55-4625-a007-89abd0b0af16}.Release|x86.Build.0 = Release|Any CPU + {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Debug|x64.ActiveCfg = Debug|Any CPU + {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Debug|x64.Build.0 = Debug|Any CPU + {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Debug|x86.ActiveCfg = Debug|Any CPU + {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Debug|x86.Build.0 = Debug|Any CPU + {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Release|Any CPU.Build.0 = Release|Any CPU + {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Release|x64.ActiveCfg = Release|Any CPU + {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Release|x64.Build.0 = Release|Any CPU + {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Release|x86.ActiveCfg = Release|Any CPU + {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution - {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {535cfc94-6d5b-4da2-bbbd-e9faa9014012} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {38F2C59A-6FAA-498E-9DAB-6CE2640A539A} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {c66dd549-8ef4-48f1-a85b-eaffaa736cee} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {12F2C43A-6FAA-437E-9DAB-6CE8640A524A} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {c3aaea74-f41e-4c56-b64e-7a2496ff6551} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {09E55113-08BD-46BC-B5A3-6440F4410AC8} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {38D1B59C-9F0A-648E-9DAB-6CE4640A539A} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {5B7BFA6B-B85E-4222-8988-16CCF9558393} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {D9FEA963-ED3C-416B-B01E-1FF7EE009EA4} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {B6D999F9-9335-433F-BCD2-1E07409AFA39} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {E2E79C4D-9E38-443B-BF8B-83C087271443} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {96f50236-7030-47ab-af32-bb76484fadec} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {ECB1152B-9F28-414F-B3E8-B596E421779B} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} - {2763ec40-c4dd-11ea-87d0-0242ac130003} = {80A3EFE5-408F-428B-BB03-05C5D44EADFA} + {5B7BFA6B-B85E-4222-8988-16CCF9558393} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {D9FEA963-ED3C-416B-B01E-1FF7EE009EA4} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {defe4a95-5592-47cc-8dee-9810e0da0ba0} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {2763ec40-c4dd-11ea-87d0-0242ac130003} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {12F2C43A-6FAA-437E-9DAB-6CE8640A524A} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {535cfc94-6d5b-4da2-bbbd-e9faa9014012} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {33B457D0-A3A8-416E-9FE4-72ECDA5CF07A} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {B6D999F9-9335-433F-BCD2-1E07409AFA39} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {E2E79C4D-9E38-443B-BF8B-83C087271443} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {c66dd549-8ef4-48f1-a85b-eaffaa736cee} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {38D1B59C-9F0A-648E-9DAB-6CE4640A539A} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {09E55113-08BD-46BC-B5A3-6440F4410AC8} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {96f50236-7030-47ab-af32-bb76484fadec} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {38F2C59A-6FAA-498E-9DAB-6CE2640A539A} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {F7ABA0D7-E3F9-4F81-BAA3-7A327D52228A} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {ECB1152B-9F28-414F-B3E8-B596E421779B} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {ABF52EA6-B4B8-49B2-8C7E-9F110B3C91C2} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {1635d3a9-f723-4184-8328-018a761bb661} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {c3aaea74-f41e-4c56-b64e-7a2496ff6551} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {7e275afe-aa55-4625-a007-89abd0b0af16} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} + {D5AE7329-60CD-49A7-B9F9-15E9D6D44FB5} = {14CB7CAF-DB8D-4288-9928-EB8FC08AA9D5} EndGlobalSection EndGlobal diff --git a/Services/As/As.csproj b/Services/As/As.csproj index 8a3d61e1b..0a43d5e6d 100644 --- a/Services/As/As.csproj +++ b/Services/As/As.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.As - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/Ces/Ces.csproj b/Services/Ces/Ces.csproj index 17f2dbf5a..91df54a76 100644 --- a/Services/Ces/Ces.csproj +++ b/Services/Ces/Ces.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.Ces - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/Classroom/Classroom.csproj b/Services/Classroom/Classroom.csproj index 0211aa998..644703fc6 100644 --- a/Services/Classroom/Classroom.csproj +++ b/Services/Classroom/Classroom.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.Classroom - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/Dcs/Dcs.csproj b/Services/Dcs/Dcs.csproj index e23624616..6b08bf6df 100644 --- a/Services/Dcs/Dcs.csproj +++ b/Services/Dcs/Dcs.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.Dcs - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/Dds/Dds.csproj b/Services/Dds/Dds.csproj index 4b5b0a186..58c31f958 100644 --- a/Services/Dds/Dds.csproj +++ b/Services/Dds/Dds.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.Dds - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/Demo/Demo.csproj b/Services/Demo/Demo.csproj index 1928d6c7f..091a76b92 100644 --- a/Services/Demo/Demo.csproj +++ b/Services/Demo/Demo.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.Demo - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/Dms/Dms.csproj b/Services/Dms/Dms.csproj new file mode 100644 index 000000000..da169e84c --- /dev/null +++ b/Services/Dms/Dms.csproj @@ -0,0 +1,34 @@ + + + + + HuaweiCloud.SDK.Dms + HuaweiCloud.SDK.Dms + netstandard2.0 + false + false + false + false + false + false + false + false + false + HuaweiCloud.SDK.Dms + 3.0.11-beta + HuaweiCloud + Copyright 2020 Huawei Technologies Co., Ltd. + Huawei Technologies Co., Ltd. + HuaweiCloud .net SDK + LICENSE + + + + + + + + + + + diff --git a/Services/Dms/Dms.sln b/Services/Dms/Dms.sln new file mode 100644 index 000000000..e62100f80 --- /dev/null +++ b/Services/Dms/Dms.sln @@ -0,0 +1,18 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dms", "Dms.csproj", "{7e275afe-aa55-4625-a007-89abd0b0af16}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7e275afe-aa55-4625-a007-89abd0b0af16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7e275afe-aa55-4625-a007-89abd0b0af16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7e275afe-aa55-4625-a007-89abd0b0af16}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7e275afe-aa55-4625-a007-89abd0b0af16}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal \ No newline at end of file diff --git a/Services/Dms/V2/DmsAsyncClient.cs b/Services/Dms/V2/DmsAsyncClient.cs new file mode 100644 index 000000000..eff53bb95 --- /dev/null +++ b/Services/Dms/V2/DmsAsyncClient.cs @@ -0,0 +1,231 @@ +using System.Net.Http; +using System.Collections.Generic; +using System.Threading.Tasks; +using HuaweiCloud.SDK.Core; +using HuaweiCloud.SDK.Dms.V2.Model; + +namespace HuaweiCloud.SDK.Dms.V2 +{ + public partial class DmsAsyncClient : Client + { + public static ClientBuilder NewBuilder() + { + return new ClientBuilder(); + } + + + /// + /// 批量添加或删除队列标签 + /// + public async Task BatchCreateOrDeleteQueueTagAsync(BatchCreateOrDeleteQueueTagRequest batchCreateOrDeleteQueueTagRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , batchCreateOrDeleteQueueTagRequest.QueueId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queue/{queue_id}/tags/action",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", batchCreateOrDeleteQueueTagRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 确认已消费指定消息 + /// + public async Task ConfirmConsumptionMessagesAsync(ConfirmConsumptionMessagesRequest confirmConsumptionMessagesRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , confirmConsumptionMessagesRequest.QueueId.ToString()); + urlParam.Add("consumer_group_id" , confirmConsumptionMessagesRequest.ConsumerGroupId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}/groups/{consumer_group_id}/ack",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", confirmConsumptionMessagesRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 确认已消费死信消息 + /// + public async Task ConfirmDeadLettersMessagesAsync(ConfirmDeadLettersMessagesRequest confirmDeadLettersMessagesRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , confirmDeadLettersMessagesRequest.QueueId.ToString()); + urlParam.Add("consumer_group_id" , confirmDeadLettersMessagesRequest.ConsumerGroupId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}/groups/{consumer_group_id}/deadletters/ack",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", confirmDeadLettersMessagesRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 消费死信消息 + /// + public async Task ConsumeDeadlettersMessageAsync(ConsumeDeadlettersMessageRequest consumeDeadlettersMessageRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , consumeDeadlettersMessageRequest.QueueId.ToString()); + urlParam.Add("consumer_group_id" , consumeDeadlettersMessageRequest.ConsumerGroupId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}/groups/{consumer_group_id}/deadletters",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, consumeDeadlettersMessageRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + ConsumeDeadlettersMessageResponse consumeDeadlettersMessageResponse = JsonUtils.DeSerializeNull(response); + consumeDeadlettersMessageResponse.Body = JsonUtils.DeSerializeList(response); + return consumeDeadlettersMessageResponse; + } + + /// + /// 消费消息 + /// + public async Task ConsumeMessagesAsync(ConsumeMessagesRequest consumeMessagesRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , consumeMessagesRequest.QueueId.ToString()); + urlParam.Add("consumer_group_id" , consumeMessagesRequest.ConsumerGroupId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}/groups/{consumer_group_id}/messages",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, consumeMessagesRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + ConsumeMessagesResponse consumeMessagesResponse = JsonUtils.DeSerializeNull(response); + consumeMessagesResponse.Body = JsonUtils.DeSerializeList(response); + return consumeMessagesResponse; + } + + /// + /// 创建消费组 + /// + public async Task CreateConsumerGroupAsync(CreateConsumerGroupRequest createConsumerGroupRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , createConsumerGroupRequest.QueueId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}/groups",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", createConsumerGroupRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 创建队列 + /// + public async Task CreateQueueAsync(CreateQueueRequest createQueueRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", createQueueRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 删除指定队列 + /// + public async Task DeleteQueueAsync(DeleteQueueRequest deleteQueueRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , deleteQueueRequest.QueueId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, deleteQueueRequest); + HttpResponseMessage response = await DoHttpRequestAsync("DELETE",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 删除指定消费组 + /// + public async Task DeleteSpecifiedConsumerGroupAsync(DeleteSpecifiedConsumerGroupRequest deleteSpecifiedConsumerGroupRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , deleteSpecifiedConsumerGroupRequest.QueueId.ToString()); + urlParam.Add("group_id" , deleteSpecifiedConsumerGroupRequest.GroupId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}/groups/{group_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, deleteSpecifiedConsumerGroupRequest); + HttpResponseMessage response = await DoHttpRequestAsync("DELETE",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 查看指定队列的所有消费组 + /// + public async Task ListConsumerGroupsAsync(ListConsumerGroupsRequest listConsumerGroupsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , listConsumerGroupsRequest.QueueId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}/groups",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listConsumerGroupsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查看所有队列 + /// + public async Task ListQueuesAsync(ListQueuesRequest listQueuesRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listQueuesRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 向指定队列发送消息 + /// + public async Task SendMessagesAsync(SendMessagesRequest sendMessagesRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , sendMessagesRequest.QueueId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}/messages",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", sendMessagesRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询项目标签 + /// + public async Task ShowProjectTagsAsync(ShowProjectTagsRequest showProjectTagsRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queue/tags",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showProjectTagsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查看指定队列 + /// + public async Task ShowQueueAsync(ShowQueueRequest showQueueRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , showQueueRequest.QueueId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showQueueRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询队列标签 + /// + public async Task ShowQueueTagsAsync(ShowQueueTagsRequest showQueueTagsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , showQueueTagsRequest.QueueId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queue/{queue_id}/tags",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showQueueTagsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查看租户配额 + /// + public async Task ShowQuotasAsync(ShowQuotasRequest showQuotasRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/quotas",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showQuotasRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + } +} \ No newline at end of file diff --git a/Services/Dms/V2/DmsClient.cs b/Services/Dms/V2/DmsClient.cs new file mode 100644 index 000000000..02ca38fdc --- /dev/null +++ b/Services/Dms/V2/DmsClient.cs @@ -0,0 +1,230 @@ +using System.Net.Http; +using System.Collections.Generic; +using HuaweiCloud.SDK.Core; +using HuaweiCloud.SDK.Dms.V2.Model; + +namespace HuaweiCloud.SDK.Dms.V2 +{ + public partial class DmsClient : Client + { + public static ClientBuilder NewBuilder() + { + return new ClientBuilder(); + } + + + /// + /// 批量添加或删除队列标签 + /// + public BatchCreateOrDeleteQueueTagResponse BatchCreateOrDeleteQueueTag(BatchCreateOrDeleteQueueTagRequest batchCreateOrDeleteQueueTagRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , batchCreateOrDeleteQueueTagRequest.QueueId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queue/{queue_id}/tags/action",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", batchCreateOrDeleteQueueTagRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 确认已消费指定消息 + /// + public ConfirmConsumptionMessagesResponse ConfirmConsumptionMessages(ConfirmConsumptionMessagesRequest confirmConsumptionMessagesRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , confirmConsumptionMessagesRequest.QueueId.ToString()); + urlParam.Add("consumer_group_id" , confirmConsumptionMessagesRequest.ConsumerGroupId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}/groups/{consumer_group_id}/ack",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", confirmConsumptionMessagesRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 确认已消费死信消息 + /// + public ConfirmDeadLettersMessagesResponse ConfirmDeadLettersMessages(ConfirmDeadLettersMessagesRequest confirmDeadLettersMessagesRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , confirmDeadLettersMessagesRequest.QueueId.ToString()); + urlParam.Add("consumer_group_id" , confirmDeadLettersMessagesRequest.ConsumerGroupId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}/groups/{consumer_group_id}/deadletters/ack",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", confirmDeadLettersMessagesRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 消费死信消息 + /// + public ConsumeDeadlettersMessageResponse ConsumeDeadlettersMessage(ConsumeDeadlettersMessageRequest consumeDeadlettersMessageRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , consumeDeadlettersMessageRequest.QueueId.ToString()); + urlParam.Add("consumer_group_id" , consumeDeadlettersMessageRequest.ConsumerGroupId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}/groups/{consumer_group_id}/deadletters",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, consumeDeadlettersMessageRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + ConsumeDeadlettersMessageResponse consumeDeadlettersMessageResponse = JsonUtils.DeSerializeNull(response); + consumeDeadlettersMessageResponse.Body = JsonUtils.DeSerializeList(response); + return consumeDeadlettersMessageResponse; + } + + /// + /// 消费消息 + /// + public ConsumeMessagesResponse ConsumeMessages(ConsumeMessagesRequest consumeMessagesRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , consumeMessagesRequest.QueueId.ToString()); + urlParam.Add("consumer_group_id" , consumeMessagesRequest.ConsumerGroupId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}/groups/{consumer_group_id}/messages",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, consumeMessagesRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + ConsumeMessagesResponse consumeMessagesResponse = JsonUtils.DeSerializeNull(response); + consumeMessagesResponse.Body = JsonUtils.DeSerializeList(response); + return consumeMessagesResponse; + } + + /// + /// 创建消费组 + /// + public CreateConsumerGroupResponse CreateConsumerGroup(CreateConsumerGroupRequest createConsumerGroupRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , createConsumerGroupRequest.QueueId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}/groups",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", createConsumerGroupRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 创建队列 + /// + public CreateQueueResponse CreateQueue(CreateQueueRequest createQueueRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", createQueueRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 删除指定队列 + /// + public DeleteQueueResponse DeleteQueue(DeleteQueueRequest deleteQueueRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , deleteQueueRequest.QueueId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, deleteQueueRequest); + HttpResponseMessage response = DoHttpRequestSync("DELETE",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 删除指定消费组 + /// + public DeleteSpecifiedConsumerGroupResponse DeleteSpecifiedConsumerGroup(DeleteSpecifiedConsumerGroupRequest deleteSpecifiedConsumerGroupRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , deleteSpecifiedConsumerGroupRequest.QueueId.ToString()); + urlParam.Add("group_id" , deleteSpecifiedConsumerGroupRequest.GroupId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}/groups/{group_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, deleteSpecifiedConsumerGroupRequest); + HttpResponseMessage response = DoHttpRequestSync("DELETE",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 查看指定队列的所有消费组 + /// + public ListConsumerGroupsResponse ListConsumerGroups(ListConsumerGroupsRequest listConsumerGroupsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , listConsumerGroupsRequest.QueueId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}/groups",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listConsumerGroupsRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查看所有队列 + /// + public ListQueuesResponse ListQueues(ListQueuesRequest listQueuesRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listQueuesRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 向指定队列发送消息 + /// + public SendMessagesResponse SendMessages(SendMessagesRequest sendMessagesRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , sendMessagesRequest.QueueId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}/messages",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", sendMessagesRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询项目标签 + /// + public ShowProjectTagsResponse ShowProjectTags(ShowProjectTagsRequest showProjectTagsRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queue/tags",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showProjectTagsRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查看指定队列 + /// + public ShowQueueResponse ShowQueue(ShowQueueRequest showQueueRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , showQueueRequest.QueueId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queues/{queue_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showQueueRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询队列标签 + /// + public ShowQueueTagsResponse ShowQueueTags(ShowQueueTagsRequest showQueueTagsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("queue_id" , showQueueTagsRequest.QueueId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/queue/{queue_id}/tags",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showQueueTagsRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查看租户配额 + /// + public ShowQuotasResponse ShowQuotas(ShowQuotasRequest showQuotasRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/quotas",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showQuotasRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + } +} \ No newline at end of file diff --git a/Services/Dms/V2/Model/BatchCreateOrDeleteQueueTagRequest.cs b/Services/Dms/V2/Model/BatchCreateOrDeleteQueueTagRequest.cs new file mode 100644 index 000000000..cad2c104b --- /dev/null +++ b/Services/Dms/V2/Model/BatchCreateOrDeleteQueueTagRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Request Object + /// + public class BatchCreateOrDeleteQueueTagRequest + { + + /// + /// + /// + [SDKProperty("queue_id", IsPath = true)] + [JsonProperty("queue_id", NullValueHandling = NullValueHandling.Ignore)] + public string QueueId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public BatchCreateOrDeleteTagReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchCreateOrDeleteQueueTagRequest {\n"); + sb.Append(" queueId: ").Append(QueueId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchCreateOrDeleteQueueTagRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchCreateOrDeleteQueueTagRequest input) + { + if (input == null) + return false; + + return + ( + this.QueueId == input.QueueId || + (this.QueueId != null && + this.QueueId.Equals(input.QueueId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.QueueId != null) + hashCode = hashCode * 59 + this.QueueId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/BatchCreateOrDeleteQueueTagResponse.cs b/Services/Dms/V2/Model/BatchCreateOrDeleteQueueTagResponse.cs new file mode 100644 index 000000000..df13e72e4 --- /dev/null +++ b/Services/Dms/V2/Model/BatchCreateOrDeleteQueueTagResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Response Object + /// + public class BatchCreateOrDeleteQueueTagResponse : SdkResponse + { + + + } +} diff --git a/Services/Dms/V2/Model/BatchCreateOrDeleteTagReq.cs b/Services/Dms/V2/Model/BatchCreateOrDeleteTagReq.cs new file mode 100644 index 000000000..7482f5f68 --- /dev/null +++ b/Services/Dms/V2/Model/BatchCreateOrDeleteTagReq.cs @@ -0,0 +1,194 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class BatchCreateOrDeleteTagReq + { + /// + /// 操作标识(仅支持小写): - create(创建) - delete(删除) + /// + /// 操作标识(仅支持小写): - create(创建) - delete(删除) + [JsonConverter(typeof(EnumClassConverter))] + public class ActionEnum + { + /// + /// Enum CREATE for value: create + /// + public static readonly ActionEnum CREATE = new ActionEnum("create"); + + /// + /// Enum DELETE for value: delete + /// + public static readonly ActionEnum DELETE = new ActionEnum("delete"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"create", CREATE}, + {"delete", DELETE}, + }; + + private string Value; + + public ActionEnum(string Value) + { + this.Value = Value; + } + + public static ActionEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as ActionEnum)) + { + return true; + } + + return false; + } + + public bool Equals(ActionEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(ActionEnum a, ActionEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(ActionEnum a, ActionEnum b) + { + return !(a == b); + } + } + + + /// + /// 操作标识(仅支持小写): - create(创建) - delete(删除) + /// + [JsonProperty("action", NullValueHandling = NullValueHandling.Ignore)] + public ActionEnum Action { get; set; } + /// + /// 标签列表。 + /// + [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] + public List Tags { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchCreateOrDeleteTagReq {\n"); + sb.Append(" action: ").Append(Action).Append("\n"); + sb.Append(" tags: ").Append(Tags).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchCreateOrDeleteTagReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchCreateOrDeleteTagReq input) + { + if (input == null) + return false; + + return + ( + this.Action == input.Action || + (this.Action != null && + this.Action.Equals(input.Action)) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Action != null) + hashCode = hashCode * 59 + this.Action.GetHashCode(); + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/BatchCreateOrDeleteTagReqTags.cs b/Services/Dms/V2/Model/BatchCreateOrDeleteTagReqTags.cs new file mode 100644 index 000000000..b53b0a89f --- /dev/null +++ b/Services/Dms/V2/Model/BatchCreateOrDeleteTagReqTags.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class BatchCreateOrDeleteTagReqTags + { + + /// + /// 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + /// + [JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)] + public string Key { get; set; } + + /// + /// 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + /// + [JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)] + public string Value { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchCreateOrDeleteTagReqTags {\n"); + sb.Append(" key: ").Append(Key).Append("\n"); + sb.Append(" value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchCreateOrDeleteTagReqTags); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchCreateOrDeleteTagReqTags input) + { + if (input == null) + return false; + + return + ( + this.Key == input.Key || + (this.Key != null && + this.Key.Equals(input.Key)) + ) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Key != null) + hashCode = hashCode * 59 + this.Key.GetHashCode(); + if (this.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ConfirmConsumptionMessagesReq.cs b/Services/Dms/V2/Model/ConfirmConsumptionMessagesReq.cs new file mode 100644 index 000000000..4caf89e56 --- /dev/null +++ b/Services/Dms/V2/Model/ConfirmConsumptionMessagesReq.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class ConfirmConsumptionMessagesReq + { + + /// + /// 确认消息数组。 + /// + [JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)] + public List Message { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConfirmConsumptionMessagesReq {\n"); + sb.Append(" message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ConfirmConsumptionMessagesReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ConfirmConsumptionMessagesReq input) + { + if (input == null) + return false; + + return + ( + this.Message == input.Message || + this.Message != null && + input.Message != null && + this.Message.SequenceEqual(input.Message) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Message != null) + hashCode = hashCode * 59 + this.Message.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ConfirmConsumptionMessagesRequest.cs b/Services/Dms/V2/Model/ConfirmConsumptionMessagesRequest.cs new file mode 100644 index 000000000..4a5d12aec --- /dev/null +++ b/Services/Dms/V2/Model/ConfirmConsumptionMessagesRequest.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Request Object + /// + public class ConfirmConsumptionMessagesRequest + { + + /// + /// + /// + [SDKProperty("queue_id", IsPath = true)] + [JsonProperty("queue_id", NullValueHandling = NullValueHandling.Ignore)] + public string QueueId { get; set; } + + /// + /// + /// + [SDKProperty("consumer_group_id", IsPath = true)] + [JsonProperty("consumer_group_id", NullValueHandling = NullValueHandling.Ignore)] + public string ConsumerGroupId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public ConfirmConsumptionMessagesReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConfirmConsumptionMessagesRequest {\n"); + sb.Append(" queueId: ").Append(QueueId).Append("\n"); + sb.Append(" consumerGroupId: ").Append(ConsumerGroupId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ConfirmConsumptionMessagesRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ConfirmConsumptionMessagesRequest input) + { + if (input == null) + return false; + + return + ( + this.QueueId == input.QueueId || + (this.QueueId != null && + this.QueueId.Equals(input.QueueId)) + ) && + ( + this.ConsumerGroupId == input.ConsumerGroupId || + (this.ConsumerGroupId != null && + this.ConsumerGroupId.Equals(input.ConsumerGroupId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.QueueId != null) + hashCode = hashCode * 59 + this.QueueId.GetHashCode(); + if (this.ConsumerGroupId != null) + hashCode = hashCode * 59 + this.ConsumerGroupId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ConfirmConsumptionMessagesResponse.cs b/Services/Dms/V2/Model/ConfirmConsumptionMessagesResponse.cs new file mode 100644 index 000000000..a31738b31 --- /dev/null +++ b/Services/Dms/V2/Model/ConfirmConsumptionMessagesResponse.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Response Object + /// + public class ConfirmConsumptionMessagesResponse : SdkResponse + { + + /// + /// 确认成功的数目(如果为N,则表示前N条消息确认成功)。 + /// + [JsonProperty("success", NullValueHandling = NullValueHandling.Ignore)] + public int? Success { get; set; } + + /// + /// 确认失败的数目(如果为N,则表示后N条消息确认失败)。 + /// + [JsonProperty("fail", NullValueHandling = NullValueHandling.Ignore)] + public int? Fail { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConfirmConsumptionMessagesResponse {\n"); + sb.Append(" success: ").Append(Success).Append("\n"); + sb.Append(" fail: ").Append(Fail).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ConfirmConsumptionMessagesResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ConfirmConsumptionMessagesResponse input) + { + if (input == null) + return false; + + return + ( + this.Success == input.Success || + (this.Success != null && + this.Success.Equals(input.Success)) + ) && + ( + this.Fail == input.Fail || + (this.Fail != null && + this.Fail.Equals(input.Fail)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Success != null) + hashCode = hashCode * 59 + this.Success.GetHashCode(); + if (this.Fail != null) + hashCode = hashCode * 59 + this.Fail.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ConfirmDeadLettersMessagesReq.cs b/Services/Dms/V2/Model/ConfirmDeadLettersMessagesReq.cs new file mode 100644 index 000000000..b47d49c1d --- /dev/null +++ b/Services/Dms/V2/Model/ConfirmDeadLettersMessagesReq.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class ConfirmDeadLettersMessagesReq + { + + /// + /// 确认消息数组。 + /// + [JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)] + public List Message { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConfirmDeadLettersMessagesReq {\n"); + sb.Append(" message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ConfirmDeadLettersMessagesReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ConfirmDeadLettersMessagesReq input) + { + if (input == null) + return false; + + return + ( + this.Message == input.Message || + this.Message != null && + input.Message != null && + this.Message.SequenceEqual(input.Message) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Message != null) + hashCode = hashCode * 59 + this.Message.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ConfirmDeadLettersMessagesReqMessage.cs b/Services/Dms/V2/Model/ConfirmDeadLettersMessagesReqMessage.cs new file mode 100644 index 000000000..544959415 --- /dev/null +++ b/Services/Dms/V2/Model/ConfirmDeadLettersMessagesReqMessage.cs @@ -0,0 +1,193 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class ConfirmDeadLettersMessagesReqMessage + { + /// + /// 客户端处理数据的状态。 取值为“success”或者“fail”。 + /// + /// 客户端处理数据的状态。 取值为“success”或者“fail”。 + [JsonConverter(typeof(EnumClassConverter))] + public class StatusEnum + { + /// + /// Enum SUCCESS for value: success + /// + public static readonly StatusEnum SUCCESS = new StatusEnum("success"); + + /// + /// Enum FAIL for value: fail + /// + public static readonly StatusEnum FAIL = new StatusEnum("fail"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"success", SUCCESS}, + {"fail", FAIL}, + }; + + private string Value; + + public StatusEnum(string Value) + { + this.Value = Value; + } + + public static StatusEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as StatusEnum)) + { + return true; + } + + return false; + } + + public bool Equals(StatusEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(StatusEnum a, StatusEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(StatusEnum a, StatusEnum b) + { + return !(a == b); + } + } + + + /// + /// 消费时返回的ID。 + /// + [JsonProperty("handler", NullValueHandling = NullValueHandling.Ignore)] + public string Handler { get; set; } + + /// + /// 客户端处理数据的状态。 取值为“success”或者“fail”。 + /// + [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] + public StatusEnum Status { get; set; } + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConfirmDeadLettersMessagesReqMessage {\n"); + sb.Append(" handler: ").Append(Handler).Append("\n"); + sb.Append(" status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ConfirmDeadLettersMessagesReqMessage); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ConfirmDeadLettersMessagesReqMessage input) + { + if (input == null) + return false; + + return + ( + this.Handler == input.Handler || + (this.Handler != null && + this.Handler.Equals(input.Handler)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Handler != null) + hashCode = hashCode * 59 + this.Handler.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ConfirmDeadLettersMessagesRequest.cs b/Services/Dms/V2/Model/ConfirmDeadLettersMessagesRequest.cs new file mode 100644 index 000000000..8d386fa88 --- /dev/null +++ b/Services/Dms/V2/Model/ConfirmDeadLettersMessagesRequest.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Request Object + /// + public class ConfirmDeadLettersMessagesRequest + { + + /// + /// + /// + [SDKProperty("queue_id", IsPath = true)] + [JsonProperty("queue_id", NullValueHandling = NullValueHandling.Ignore)] + public string QueueId { get; set; } + + /// + /// + /// + [SDKProperty("consumer_group_id", IsPath = true)] + [JsonProperty("consumer_group_id", NullValueHandling = NullValueHandling.Ignore)] + public string ConsumerGroupId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public ConfirmDeadLettersMessagesReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConfirmDeadLettersMessagesRequest {\n"); + sb.Append(" queueId: ").Append(QueueId).Append("\n"); + sb.Append(" consumerGroupId: ").Append(ConsumerGroupId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ConfirmDeadLettersMessagesRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ConfirmDeadLettersMessagesRequest input) + { + if (input == null) + return false; + + return + ( + this.QueueId == input.QueueId || + (this.QueueId != null && + this.QueueId.Equals(input.QueueId)) + ) && + ( + this.ConsumerGroupId == input.ConsumerGroupId || + (this.ConsumerGroupId != null && + this.ConsumerGroupId.Equals(input.ConsumerGroupId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.QueueId != null) + hashCode = hashCode * 59 + this.QueueId.GetHashCode(); + if (this.ConsumerGroupId != null) + hashCode = hashCode * 59 + this.ConsumerGroupId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ConfirmDeadLettersMessagesResponse.cs b/Services/Dms/V2/Model/ConfirmDeadLettersMessagesResponse.cs new file mode 100644 index 000000000..bb41adb86 --- /dev/null +++ b/Services/Dms/V2/Model/ConfirmDeadLettersMessagesResponse.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Response Object + /// + public class ConfirmDeadLettersMessagesResponse : SdkResponse + { + + /// + /// 确认成功的数目(如果为N,则表示前N条消息确认成功)。 + /// + [JsonProperty("success", NullValueHandling = NullValueHandling.Ignore)] + public int? Success { get; set; } + + /// + /// 确认失败的数目(如果为N,则表示后N条消息确认失败)。 + /// + [JsonProperty("fail", NullValueHandling = NullValueHandling.Ignore)] + public int? Fail { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConfirmDeadLettersMessagesResponse {\n"); + sb.Append(" success: ").Append(Success).Append("\n"); + sb.Append(" fail: ").Append(Fail).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ConfirmDeadLettersMessagesResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ConfirmDeadLettersMessagesResponse input) + { + if (input == null) + return false; + + return + ( + this.Success == input.Success || + (this.Success != null && + this.Success.Equals(input.Success)) + ) && + ( + this.Fail == input.Fail || + (this.Fail != null && + this.Fail.Equals(input.Fail)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Success != null) + hashCode = hashCode * 59 + this.Success.GetHashCode(); + if (this.Fail != null) + hashCode = hashCode * 59 + this.Fail.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ConsumeDeadlettersMessage.cs b/Services/Dms/V2/Model/ConsumeDeadlettersMessage.cs new file mode 100644 index 000000000..64cc594d7 --- /dev/null +++ b/Services/Dms/V2/Model/ConsumeDeadlettersMessage.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class ConsumeDeadlettersMessage + { + + /// + /// + /// + [JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)] + public ConsumeDeadlettersMessageMessage Message { get; set; } + + /// + /// 消息handler。 + /// + [JsonProperty("handler", NullValueHandling = NullValueHandling.Ignore)] + public string Handler { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConsumeDeadlettersMessage {\n"); + sb.Append(" message: ").Append(Message).Append("\n"); + sb.Append(" handler: ").Append(Handler).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ConsumeDeadlettersMessage); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ConsumeDeadlettersMessage input) + { + if (input == null) + return false; + + return + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && + ( + this.Handler == input.Handler || + (this.Handler != null && + this.Handler.Equals(input.Handler)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Message != null) + hashCode = hashCode * 59 + this.Message.GetHashCode(); + if (this.Handler != null) + hashCode = hashCode * 59 + this.Handler.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ConsumeDeadlettersMessageMessage.cs b/Services/Dms/V2/Model/ConsumeDeadlettersMessageMessage.cs new file mode 100644 index 000000000..ab2b92ff9 --- /dev/null +++ b/Services/Dms/V2/Model/ConsumeDeadlettersMessageMessage.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// 消息的内容。 + /// + public class ConsumeDeadlettersMessageMessage + { + + /// + /// 消息体的内容。 + /// + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public Object Body { get; set; } + + /// + /// 属性的列表。 + /// + [JsonProperty("attributes", NullValueHandling = NullValueHandling.Ignore)] + public Object Attributes { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConsumeDeadlettersMessageMessage {\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append(" attributes: ").Append(Attributes).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ConsumeDeadlettersMessageMessage); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ConsumeDeadlettersMessageMessage input) + { + if (input == null) + return false; + + return + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ) && + ( + this.Attributes == input.Attributes || + (this.Attributes != null && + this.Attributes.Equals(input.Attributes)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + if (this.Attributes != null) + hashCode = hashCode * 59 + this.Attributes.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ConsumeDeadlettersMessageRequest.cs b/Services/Dms/V2/Model/ConsumeDeadlettersMessageRequest.cs new file mode 100644 index 000000000..d311a2d73 --- /dev/null +++ b/Services/Dms/V2/Model/ConsumeDeadlettersMessageRequest.cs @@ -0,0 +1,136 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Request Object + /// + public class ConsumeDeadlettersMessageRequest + { + + /// + /// + /// + [SDKProperty("queue_id", IsPath = true)] + [JsonProperty("queue_id", NullValueHandling = NullValueHandling.Ignore)] + public string QueueId { get; set; } + + /// + /// + /// + [SDKProperty("consumer_group_id", IsPath = true)] + [JsonProperty("consumer_group_id", NullValueHandling = NullValueHandling.Ignore)] + public string ConsumerGroupId { get; set; } + + /// + /// + /// + [SDKProperty("max_msgs", IsQuery = true)] + [JsonProperty("max_msgs", NullValueHandling = NullValueHandling.Ignore)] + public int? MaxMsgs { get; set; } + + /// + /// + /// + [SDKProperty("time_wait", IsQuery = true)] + [JsonProperty("time_wait", NullValueHandling = NullValueHandling.Ignore)] + public int? TimeWait { get; set; } + + /// + /// + /// + [SDKProperty("ack_wait", IsQuery = true)] + [JsonProperty("ack_wait", NullValueHandling = NullValueHandling.Ignore)] + public int? AckWait { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConsumeDeadlettersMessageRequest {\n"); + sb.Append(" queueId: ").Append(QueueId).Append("\n"); + sb.Append(" consumerGroupId: ").Append(ConsumerGroupId).Append("\n"); + sb.Append(" maxMsgs: ").Append(MaxMsgs).Append("\n"); + sb.Append(" timeWait: ").Append(TimeWait).Append("\n"); + sb.Append(" ackWait: ").Append(AckWait).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ConsumeDeadlettersMessageRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ConsumeDeadlettersMessageRequest input) + { + if (input == null) + return false; + + return + ( + this.QueueId == input.QueueId || + (this.QueueId != null && + this.QueueId.Equals(input.QueueId)) + ) && + ( + this.ConsumerGroupId == input.ConsumerGroupId || + (this.ConsumerGroupId != null && + this.ConsumerGroupId.Equals(input.ConsumerGroupId)) + ) && + ( + this.MaxMsgs == input.MaxMsgs || + (this.MaxMsgs != null && + this.MaxMsgs.Equals(input.MaxMsgs)) + ) && + ( + this.TimeWait == input.TimeWait || + (this.TimeWait != null && + this.TimeWait.Equals(input.TimeWait)) + ) && + ( + this.AckWait == input.AckWait || + (this.AckWait != null && + this.AckWait.Equals(input.AckWait)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.QueueId != null) + hashCode = hashCode * 59 + this.QueueId.GetHashCode(); + if (this.ConsumerGroupId != null) + hashCode = hashCode * 59 + this.ConsumerGroupId.GetHashCode(); + if (this.MaxMsgs != null) + hashCode = hashCode * 59 + this.MaxMsgs.GetHashCode(); + if (this.TimeWait != null) + hashCode = hashCode * 59 + this.TimeWait.GetHashCode(); + if (this.AckWait != null) + hashCode = hashCode * 59 + this.AckWait.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ConsumeDeadlettersMessageResponse.cs b/Services/Dms/V2/Model/ConsumeDeadlettersMessageResponse.cs new file mode 100644 index 000000000..328455f63 --- /dev/null +++ b/Services/Dms/V2/Model/ConsumeDeadlettersMessageResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Response Object + /// + public class ConsumeDeadlettersMessageResponse : SdkResponse + { + + /// + /// 消息数组。 + /// + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public List Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConsumeDeadlettersMessageResponse {\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ConsumeDeadlettersMessageResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ConsumeDeadlettersMessageResponse input) + { + if (input == null) + return false; + + return + ( + this.Body == input.Body || + this.Body != null && + input.Body != null && + this.Body.SequenceEqual(input.Body) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ConsumeMessage.cs b/Services/Dms/V2/Model/ConsumeMessage.cs new file mode 100644 index 000000000..20d1c8fdc --- /dev/null +++ b/Services/Dms/V2/Model/ConsumeMessage.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class ConsumeMessage + { + + /// + /// + /// + [JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)] + public ConsumeMessageMessage Message { get; set; } + + /// + /// 消息handler。 + /// + [JsonProperty("handler", NullValueHandling = NullValueHandling.Ignore)] + public string Handler { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConsumeMessage {\n"); + sb.Append(" message: ").Append(Message).Append("\n"); + sb.Append(" handler: ").Append(Handler).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ConsumeMessage); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ConsumeMessage input) + { + if (input == null) + return false; + + return + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && + ( + this.Handler == input.Handler || + (this.Handler != null && + this.Handler.Equals(input.Handler)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Message != null) + hashCode = hashCode * 59 + this.Message.GetHashCode(); + if (this.Handler != null) + hashCode = hashCode * 59 + this.Handler.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ConsumeMessageMessage.cs b/Services/Dms/V2/Model/ConsumeMessageMessage.cs new file mode 100644 index 000000000..441424248 --- /dev/null +++ b/Services/Dms/V2/Model/ConsumeMessageMessage.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// 消息的内容。 + /// + public class ConsumeMessageMessage + { + + /// + /// 消息体的内容。 + /// + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public Object Body { get; set; } + + /// + /// 属性的列表。 + /// + [JsonProperty("attributes", NullValueHandling = NullValueHandling.Ignore)] + public Object Attributes { get; set; } + + /// + /// 标签值。 + /// + [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] + public List Tags { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConsumeMessageMessage {\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append(" attributes: ").Append(Attributes).Append("\n"); + sb.Append(" tags: ").Append(Tags).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ConsumeMessageMessage); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ConsumeMessageMessage input) + { + if (input == null) + return false; + + return + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ) && + ( + this.Attributes == input.Attributes || + (this.Attributes != null && + this.Attributes.Equals(input.Attributes)) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + if (this.Attributes != null) + hashCode = hashCode * 59 + this.Attributes.GetHashCode(); + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ConsumeMessagesRequest.cs b/Services/Dms/V2/Model/ConsumeMessagesRequest.cs new file mode 100644 index 000000000..b8956f157 --- /dev/null +++ b/Services/Dms/V2/Model/ConsumeMessagesRequest.cs @@ -0,0 +1,166 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Request Object + /// + public class ConsumeMessagesRequest + { + + /// + /// + /// + [SDKProperty("queue_id", IsPath = true)] + [JsonProperty("queue_id", NullValueHandling = NullValueHandling.Ignore)] + public string QueueId { get; set; } + + /// + /// + /// + [SDKProperty("consumer_group_id", IsPath = true)] + [JsonProperty("consumer_group_id", NullValueHandling = NullValueHandling.Ignore)] + public string ConsumerGroupId { get; set; } + + /// + /// + /// + [SDKProperty("max_msgs", IsQuery = true)] + [JsonProperty("max_msgs", NullValueHandling = NullValueHandling.Ignore)] + public int? MaxMsgs { get; set; } + + /// + /// + /// + [SDKProperty("time_wait", IsQuery = true)] + [JsonProperty("time_wait", NullValueHandling = NullValueHandling.Ignore)] + public int? TimeWait { get; set; } + + /// + /// + /// + [SDKProperty("ack_wait", IsQuery = true)] + [JsonProperty("ack_wait", NullValueHandling = NullValueHandling.Ignore)] + public int? AckWait { get; set; } + + /// + /// + /// + [SDKProperty("tag", IsQuery = true)] + [JsonProperty("tag", NullValueHandling = NullValueHandling.Ignore)] + public string Tag { get; set; } + + /// + /// + /// + [SDKProperty("tag_type", IsQuery = true)] + [JsonProperty("tag_type", NullValueHandling = NullValueHandling.Ignore)] + public string TagType { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConsumeMessagesRequest {\n"); + sb.Append(" queueId: ").Append(QueueId).Append("\n"); + sb.Append(" consumerGroupId: ").Append(ConsumerGroupId).Append("\n"); + sb.Append(" maxMsgs: ").Append(MaxMsgs).Append("\n"); + sb.Append(" timeWait: ").Append(TimeWait).Append("\n"); + sb.Append(" ackWait: ").Append(AckWait).Append("\n"); + sb.Append(" tag: ").Append(Tag).Append("\n"); + sb.Append(" tagType: ").Append(TagType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ConsumeMessagesRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ConsumeMessagesRequest input) + { + if (input == null) + return false; + + return + ( + this.QueueId == input.QueueId || + (this.QueueId != null && + this.QueueId.Equals(input.QueueId)) + ) && + ( + this.ConsumerGroupId == input.ConsumerGroupId || + (this.ConsumerGroupId != null && + this.ConsumerGroupId.Equals(input.ConsumerGroupId)) + ) && + ( + this.MaxMsgs == input.MaxMsgs || + (this.MaxMsgs != null && + this.MaxMsgs.Equals(input.MaxMsgs)) + ) && + ( + this.TimeWait == input.TimeWait || + (this.TimeWait != null && + this.TimeWait.Equals(input.TimeWait)) + ) && + ( + this.AckWait == input.AckWait || + (this.AckWait != null && + this.AckWait.Equals(input.AckWait)) + ) && + ( + this.Tag == input.Tag || + (this.Tag != null && + this.Tag.Equals(input.Tag)) + ) && + ( + this.TagType == input.TagType || + (this.TagType != null && + this.TagType.Equals(input.TagType)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.QueueId != null) + hashCode = hashCode * 59 + this.QueueId.GetHashCode(); + if (this.ConsumerGroupId != null) + hashCode = hashCode * 59 + this.ConsumerGroupId.GetHashCode(); + if (this.MaxMsgs != null) + hashCode = hashCode * 59 + this.MaxMsgs.GetHashCode(); + if (this.TimeWait != null) + hashCode = hashCode * 59 + this.TimeWait.GetHashCode(); + if (this.AckWait != null) + hashCode = hashCode * 59 + this.AckWait.GetHashCode(); + if (this.Tag != null) + hashCode = hashCode * 59 + this.Tag.GetHashCode(); + if (this.TagType != null) + hashCode = hashCode * 59 + this.TagType.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ConsumeMessagesResponse.cs b/Services/Dms/V2/Model/ConsumeMessagesResponse.cs new file mode 100644 index 000000000..2584ac3e3 --- /dev/null +++ b/Services/Dms/V2/Model/ConsumeMessagesResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Response Object + /// + public class ConsumeMessagesResponse : SdkResponse + { + + /// + /// 消息数组。 + /// + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public List Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ConsumeMessagesResponse {\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ConsumeMessagesResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ConsumeMessagesResponse input) + { + if (input == null) + return false; + + return + ( + this.Body == input.Body || + this.Body != null && + input.Body != null && + this.Body.SequenceEqual(input.Body) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/CreateConsumerGroupReq.cs b/Services/Dms/V2/Model/CreateConsumerGroupReq.cs new file mode 100644 index 000000000..0ea901caa --- /dev/null +++ b/Services/Dms/V2/Model/CreateConsumerGroupReq.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class CreateConsumerGroupReq + { + + /// + /// 消费组信息。 每个队列最多能创建3个消费组,如果请求中的消费组个数超过3个,请求校验不通过,无法创建消费组。 + /// + [JsonProperty("groups", NullValueHandling = NullValueHandling.Ignore)] + public List Groups { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateConsumerGroupReq {\n"); + sb.Append(" groups: ").Append(Groups).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateConsumerGroupReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateConsumerGroupReq input) + { + if (input == null) + return false; + + return + ( + this.Groups == input.Groups || + this.Groups != null && + input.Groups != null && + this.Groups.SequenceEqual(input.Groups) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Groups != null) + hashCode = hashCode * 59 + this.Groups.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/CreateConsumerGroupRequest.cs b/Services/Dms/V2/Model/CreateConsumerGroupRequest.cs new file mode 100644 index 000000000..704141e5c --- /dev/null +++ b/Services/Dms/V2/Model/CreateConsumerGroupRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Request Object + /// + public class CreateConsumerGroupRequest + { + + /// + /// + /// + [SDKProperty("queue_id", IsPath = true)] + [JsonProperty("queue_id", NullValueHandling = NullValueHandling.Ignore)] + public string QueueId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public CreateConsumerGroupReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateConsumerGroupRequest {\n"); + sb.Append(" queueId: ").Append(QueueId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateConsumerGroupRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateConsumerGroupRequest input) + { + if (input == null) + return false; + + return + ( + this.QueueId == input.QueueId || + (this.QueueId != null && + this.QueueId.Equals(input.QueueId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.QueueId != null) + hashCode = hashCode * 59 + this.QueueId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/CreateConsumerGroupRespGroups.cs b/Services/Dms/V2/Model/CreateConsumerGroupRespGroups.cs new file mode 100644 index 000000000..c59fce999 --- /dev/null +++ b/Services/Dms/V2/Model/CreateConsumerGroupRespGroups.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class CreateConsumerGroupRespGroups + { + + /// + /// 消费组的ID。 + /// + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// 消费组的名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateConsumerGroupRespGroups {\n"); + sb.Append(" id: ").Append(Id).Append("\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateConsumerGroupRespGroups); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateConsumerGroupRespGroups input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/CreateConsumerGroupResponse.cs b/Services/Dms/V2/Model/CreateConsumerGroupResponse.cs new file mode 100644 index 000000000..647270853 --- /dev/null +++ b/Services/Dms/V2/Model/CreateConsumerGroupResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Response Object + /// + public class CreateConsumerGroupResponse : SdkResponse + { + + /// + /// 消费组信息。 + /// + [JsonProperty("groups", NullValueHandling = NullValueHandling.Ignore)] + public List Groups { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateConsumerGroupResponse {\n"); + sb.Append(" groups: ").Append(Groups).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateConsumerGroupResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateConsumerGroupResponse input) + { + if (input == null) + return false; + + return + ( + this.Groups == input.Groups || + this.Groups != null && + input.Groups != null && + this.Groups.SequenceEqual(input.Groups) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Groups != null) + hashCode = hashCode * 59 + this.Groups.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/CreateQueueReq.cs b/Services/Dms/V2/Model/CreateQueueReq.cs new file mode 100644 index 000000000..84e3418de --- /dev/null +++ b/Services/Dms/V2/Model/CreateQueueReq.cs @@ -0,0 +1,365 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class CreateQueueReq + { + /// + /// 队列类型。 取值范围: - NORMAL:普通队列,更高的并发性能,不保证先入先出(FIFO)的严格顺序。 - FIFO:有序队列,保证消息先入先出(FIFO)的严格顺序。 - KAFKA_HA:高可靠模式的kafka队列。消息多副本同步落盘,保证消息的可靠性。 - KAFKA_HT:高吞吐模式的kafka队列。消息副本异步落盘,具有较高的性能。 默认值:NORMAL + /// + /// 队列类型。 取值范围: - NORMAL:普通队列,更高的并发性能,不保证先入先出(FIFO)的严格顺序。 - FIFO:有序队列,保证消息先入先出(FIFO)的严格顺序。 - KAFKA_HA:高可靠模式的kafka队列。消息多副本同步落盘,保证消息的可靠性。 - KAFKA_HT:高吞吐模式的kafka队列。消息副本异步落盘,具有较高的性能。 默认值:NORMAL + [JsonConverter(typeof(EnumClassConverter))] + public class QueueModeEnum + { + /// + /// Enum NORMAL for value: NORMAL + /// + public static readonly QueueModeEnum NORMAL = new QueueModeEnum("NORMAL"); + + /// + /// Enum FIFO for value: FIFO + /// + public static readonly QueueModeEnum FIFO = new QueueModeEnum("FIFO"); + + /// + /// Enum KAFKA_HA for value: KAFKA_HA + /// + public static readonly QueueModeEnum KAFKA_HA = new QueueModeEnum("KAFKA_HA"); + + /// + /// Enum KAFKA_HT for value: KAFKA_HT + /// + public static readonly QueueModeEnum KAFKA_HT = new QueueModeEnum("KAFKA_HT"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"NORMAL", NORMAL}, + {"FIFO", FIFO}, + {"KAFKA_HA", KAFKA_HA}, + {"KAFKA_HT", KAFKA_HT}, + }; + + private string Value; + + public QueueModeEnum(string Value) + { + this.Value = Value; + } + + public static QueueModeEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as QueueModeEnum)) + { + return true; + } + + return false; + } + + public bool Equals(QueueModeEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(QueueModeEnum a, QueueModeEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(QueueModeEnum a, QueueModeEnum b) + { + return !(a == b); + } + } + + /// + /// 仅当queue_mode为“NORMAL”或者“FIFO”时,该参数有效。 是否开启死信消息,死信消息是指无法被正常消费的消息。 当达到最大消费次数仍然失败后,DMS会将该条消息转存到死信队列中,有效期为72小时,用户可以根据需要对死信消息进行重新消费。 消费死信消息时,只能消费该消费组产生的死信消息。 有序队列的死信消息依然按照先入先出(FIFO)的顺序存储在死信队列中。 取值范围: - enable:开启 - disable:不开启 默认值:disable + /// + /// 仅当queue_mode为“NORMAL”或者“FIFO”时,该参数有效。 是否开启死信消息,死信消息是指无法被正常消费的消息。 当达到最大消费次数仍然失败后,DMS会将该条消息转存到死信队列中,有效期为72小时,用户可以根据需要对死信消息进行重新消费。 消费死信消息时,只能消费该消费组产生的死信消息。 有序队列的死信消息依然按照先入先出(FIFO)的顺序存储在死信队列中。 取值范围: - enable:开启 - disable:不开启 默认值:disable + [JsonConverter(typeof(EnumClassConverter))] + public class RedrivePolicyEnum + { + /// + /// Enum ENABLE for value: enable + /// + public static readonly RedrivePolicyEnum ENABLE = new RedrivePolicyEnum("enable"); + + /// + /// Enum DISABLE for value: disable + /// + public static readonly RedrivePolicyEnum DISABLE = new RedrivePolicyEnum("disable"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"enable", ENABLE}, + {"disable", DISABLE}, + }; + + private string Value; + + public RedrivePolicyEnum(string Value) + { + this.Value = Value; + } + + public static RedrivePolicyEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as RedrivePolicyEnum)) + { + return true; + } + + return false; + } + + public bool Equals(RedrivePolicyEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(RedrivePolicyEnum a, RedrivePolicyEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(RedrivePolicyEnum a, RedrivePolicyEnum b) + { + return !(a == b); + } + } + + + /// + /// 队列的名称,必须唯一。 长度不超过64位的字符串,包含a~z,A~Z,0~9、中划线(-)和下划线(_)。 创建队列后无法修改名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 队列类型。 取值范围: - NORMAL:普通队列,更高的并发性能,不保证先入先出(FIFO)的严格顺序。 - FIFO:有序队列,保证消息先入先出(FIFO)的严格顺序。 - KAFKA_HA:高可靠模式的kafka队列。消息多副本同步落盘,保证消息的可靠性。 - KAFKA_HT:高吞吐模式的kafka队列。消息副本异步落盘,具有较高的性能。 默认值:NORMAL + /// + [JsonProperty("queue_mode", NullValueHandling = NullValueHandling.Ignore)] + public QueueModeEnum QueueMode { get; set; } + /// + /// 队列的描述信息。 长度不超过160位的字符串,不能包含尖括号<>。 + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// 仅当queue_mode为“NORMAL”或者“FIFO”时,该参数有效。 是否开启死信消息,死信消息是指无法被正常消费的消息。 当达到最大消费次数仍然失败后,DMS会将该条消息转存到死信队列中,有效期为72小时,用户可以根据需要对死信消息进行重新消费。 消费死信消息时,只能消费该消费组产生的死信消息。 有序队列的死信消息依然按照先入先出(FIFO)的顺序存储在死信队列中。 取值范围: - enable:开启 - disable:不开启 默认值:disable + /// + [JsonProperty("redrive_policy", NullValueHandling = NullValueHandling.Ignore)] + public RedrivePolicyEnum RedrivePolicy { get; set; } + /// + /// 仅当redrive_policy为enable时,该参数必选。 最大确认消费失败的次数,当达到最大确认失败次数后,DMS会将该条消息转存到死信队列中。 取值范围:1~100 + /// + [JsonProperty("max_consume_count", NullValueHandling = NullValueHandling.Ignore)] + public int? MaxConsumeCount { get; set; } + + /// + /// 指定kafka队列的消息保存时间,单位为小时。 仅当queue_mode为KAFKA_HA或者KAFKA_HT才有效。 取值范围: 1-72(小时) + /// + [JsonProperty("retention_hours", NullValueHandling = NullValueHandling.Ignore)] + public int? RetentionHours { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateQueueReq {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" queueMode: ").Append(QueueMode).Append("\n"); + sb.Append(" description: ").Append(Description).Append("\n"); + sb.Append(" redrivePolicy: ").Append(RedrivePolicy).Append("\n"); + sb.Append(" maxConsumeCount: ").Append(MaxConsumeCount).Append("\n"); + sb.Append(" retentionHours: ").Append(RetentionHours).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateQueueReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateQueueReq input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.QueueMode == input.QueueMode || + (this.QueueMode != null && + this.QueueMode.Equals(input.QueueMode)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.RedrivePolicy == input.RedrivePolicy || + (this.RedrivePolicy != null && + this.RedrivePolicy.Equals(input.RedrivePolicy)) + ) && + ( + this.MaxConsumeCount == input.MaxConsumeCount || + (this.MaxConsumeCount != null && + this.MaxConsumeCount.Equals(input.MaxConsumeCount)) + ) && + ( + this.RetentionHours == input.RetentionHours || + (this.RetentionHours != null && + this.RetentionHours.Equals(input.RetentionHours)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.QueueMode != null) + hashCode = hashCode * 59 + this.QueueMode.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.RedrivePolicy != null) + hashCode = hashCode * 59 + this.RedrivePolicy.GetHashCode(); + if (this.MaxConsumeCount != null) + hashCode = hashCode * 59 + this.MaxConsumeCount.GetHashCode(); + if (this.RetentionHours != null) + hashCode = hashCode * 59 + this.RetentionHours.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/CreateQueueRequest.cs b/Services/Dms/V2/Model/CreateQueueRequest.cs new file mode 100644 index 000000000..8c4818fad --- /dev/null +++ b/Services/Dms/V2/Model/CreateQueueRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Request Object + /// + public class CreateQueueRequest + { + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public CreateQueueReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateQueueRequest {\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateQueueRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateQueueRequest input) + { + if (input == null) + return false; + + return + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/CreateQueueResponse.cs b/Services/Dms/V2/Model/CreateQueueResponse.cs new file mode 100644 index 000000000..8da2b2430 --- /dev/null +++ b/Services/Dms/V2/Model/CreateQueueResponse.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Response Object + /// + public class CreateQueueResponse : SdkResponse + { + + /// + /// 队列ID。 + /// + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// 队列的名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 仅Kafka队列才有该响应参数。 使用Kafka SDK时的Kafka topic的ID。 + /// + [JsonProperty("kafka_topic", NullValueHandling = NullValueHandling.Ignore)] + public string KafkaTopic { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateQueueResponse {\n"); + sb.Append(" id: ").Append(Id).Append("\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" kafkaTopic: ").Append(KafkaTopic).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateQueueResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateQueueResponse input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.KafkaTopic == input.KafkaTopic || + (this.KafkaTopic != null && + this.KafkaTopic.Equals(input.KafkaTopic)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.KafkaTopic != null) + hashCode = hashCode * 59 + this.KafkaTopic.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/DeleteQueueRequest.cs b/Services/Dms/V2/Model/DeleteQueueRequest.cs new file mode 100644 index 000000000..d1d1334fc --- /dev/null +++ b/Services/Dms/V2/Model/DeleteQueueRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Request Object + /// + public class DeleteQueueRequest + { + + /// + /// + /// + [SDKProperty("queue_id", IsPath = true)] + [JsonProperty("queue_id", NullValueHandling = NullValueHandling.Ignore)] + public string QueueId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DeleteQueueRequest {\n"); + sb.Append(" queueId: ").Append(QueueId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as DeleteQueueRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(DeleteQueueRequest input) + { + if (input == null) + return false; + + return + ( + this.QueueId == input.QueueId || + (this.QueueId != null && + this.QueueId.Equals(input.QueueId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.QueueId != null) + hashCode = hashCode * 59 + this.QueueId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/DeleteQueueResponse.cs b/Services/Dms/V2/Model/DeleteQueueResponse.cs new file mode 100644 index 000000000..34d2d75fb --- /dev/null +++ b/Services/Dms/V2/Model/DeleteQueueResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Response Object + /// + public class DeleteQueueResponse : SdkResponse + { + + + } +} diff --git a/Services/Dms/V2/Model/DeleteSpecifiedConsumerGroupRequest.cs b/Services/Dms/V2/Model/DeleteSpecifiedConsumerGroupRequest.cs new file mode 100644 index 000000000..1abd3efcc --- /dev/null +++ b/Services/Dms/V2/Model/DeleteSpecifiedConsumerGroupRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Request Object + /// + public class DeleteSpecifiedConsumerGroupRequest + { + + /// + /// + /// + [SDKProperty("queue_id", IsPath = true)] + [JsonProperty("queue_id", NullValueHandling = NullValueHandling.Ignore)] + public string QueueId { get; set; } + + /// + /// + /// + [SDKProperty("group_id", IsPath = true)] + [JsonProperty("group_id", NullValueHandling = NullValueHandling.Ignore)] + public string GroupId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DeleteSpecifiedConsumerGroupRequest {\n"); + sb.Append(" queueId: ").Append(QueueId).Append("\n"); + sb.Append(" groupId: ").Append(GroupId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as DeleteSpecifiedConsumerGroupRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(DeleteSpecifiedConsumerGroupRequest input) + { + if (input == null) + return false; + + return + ( + this.QueueId == input.QueueId || + (this.QueueId != null && + this.QueueId.Equals(input.QueueId)) + ) && + ( + this.GroupId == input.GroupId || + (this.GroupId != null && + this.GroupId.Equals(input.GroupId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.QueueId != null) + hashCode = hashCode * 59 + this.QueueId.GetHashCode(); + if (this.GroupId != null) + hashCode = hashCode * 59 + this.GroupId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/DeleteSpecifiedConsumerGroupResponse.cs b/Services/Dms/V2/Model/DeleteSpecifiedConsumerGroupResponse.cs new file mode 100644 index 000000000..3fe08c1ce --- /dev/null +++ b/Services/Dms/V2/Model/DeleteSpecifiedConsumerGroupResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Response Object + /// + public class DeleteSpecifiedConsumerGroupResponse : SdkResponse + { + + + } +} diff --git a/Services/Dms/V2/Model/GroupEntity.cs b/Services/Dms/V2/Model/GroupEntity.cs new file mode 100644 index 000000000..c36b81dde --- /dev/null +++ b/Services/Dms/V2/Model/GroupEntity.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class GroupEntity + { + + /// + /// 消费组的名称。 长度不超过32位的字符串,仅包含a~z,A~Z,0~9、下划线(_)和中划线(-)。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GroupEntity {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as GroupEntity); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(GroupEntity input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ListConsumerGroupsRequest.cs b/Services/Dms/V2/Model/ListConsumerGroupsRequest.cs new file mode 100644 index 000000000..d42287098 --- /dev/null +++ b/Services/Dms/V2/Model/ListConsumerGroupsRequest.cs @@ -0,0 +1,136 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Request Object + /// + public class ListConsumerGroupsRequest + { + + /// + /// + /// + [SDKProperty("queue_id", IsPath = true)] + [JsonProperty("queue_id", NullValueHandling = NullValueHandling.Ignore)] + public string QueueId { get; set; } + + /// + /// + /// + [SDKProperty("include_deadletter", IsQuery = true)] + [JsonProperty("include_deadletter", NullValueHandling = NullValueHandling.Ignore)] + public bool? IncludeDeadletter { get; set; } + + /// + /// + /// + [SDKProperty("include_messages_num", IsQuery = true)] + [JsonProperty("include_messages_num", NullValueHandling = NullValueHandling.Ignore)] + public bool? IncludeMessagesNum { get; set; } + + /// + /// + /// + [SDKProperty("page_size", IsQuery = true)] + [JsonProperty("page_size", NullValueHandling = NullValueHandling.Ignore)] + public int? PageSize { get; set; } + + /// + /// + /// + [SDKProperty("current_page", IsQuery = true)] + [JsonProperty("current_page", NullValueHandling = NullValueHandling.Ignore)] + public int? CurrentPage { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListConsumerGroupsRequest {\n"); + sb.Append(" queueId: ").Append(QueueId).Append("\n"); + sb.Append(" includeDeadletter: ").Append(IncludeDeadletter).Append("\n"); + sb.Append(" includeMessagesNum: ").Append(IncludeMessagesNum).Append("\n"); + sb.Append(" pageSize: ").Append(PageSize).Append("\n"); + sb.Append(" currentPage: ").Append(CurrentPage).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListConsumerGroupsRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListConsumerGroupsRequest input) + { + if (input == null) + return false; + + return + ( + this.QueueId == input.QueueId || + (this.QueueId != null && + this.QueueId.Equals(input.QueueId)) + ) && + ( + this.IncludeDeadletter == input.IncludeDeadletter || + (this.IncludeDeadletter != null && + this.IncludeDeadletter.Equals(input.IncludeDeadletter)) + ) && + ( + this.IncludeMessagesNum == input.IncludeMessagesNum || + (this.IncludeMessagesNum != null && + this.IncludeMessagesNum.Equals(input.IncludeMessagesNum)) + ) && + ( + this.PageSize == input.PageSize || + (this.PageSize != null && + this.PageSize.Equals(input.PageSize)) + ) && + ( + this.CurrentPage == input.CurrentPage || + (this.CurrentPage != null && + this.CurrentPage.Equals(input.CurrentPage)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.QueueId != null) + hashCode = hashCode * 59 + this.QueueId.GetHashCode(); + if (this.IncludeDeadletter != null) + hashCode = hashCode * 59 + this.IncludeDeadletter.GetHashCode(); + if (this.IncludeMessagesNum != null) + hashCode = hashCode * 59 + this.IncludeMessagesNum.GetHashCode(); + if (this.PageSize != null) + hashCode = hashCode * 59 + this.PageSize.GetHashCode(); + if (this.CurrentPage != null) + hashCode = hashCode * 59 + this.CurrentPage.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ListConsumerGroupsResponse.cs b/Services/Dms/V2/Model/ListConsumerGroupsResponse.cs new file mode 100644 index 000000000..55e633981 --- /dev/null +++ b/Services/Dms/V2/Model/ListConsumerGroupsResponse.cs @@ -0,0 +1,222 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Response Object + /// + public class ListConsumerGroupsResponse : SdkResponse + { + /// + /// 该队列是否开启死信消息。仅当include_deadletter为true时,才有该响应参数。 - enable:表示开启。 - disable:表示不开启。 + /// + /// 该队列是否开启死信消息。仅当include_deadletter为true时,才有该响应参数。 - enable:表示开启。 - disable:表示不开启。 + [JsonConverter(typeof(EnumClassConverter))] + public class RedrivePolicyEnum + { + /// + /// Enum ENABLE for value: enable + /// + public static readonly RedrivePolicyEnum ENABLE = new RedrivePolicyEnum("enable"); + + /// + /// Enum DISABLE for value: disable + /// + public static readonly RedrivePolicyEnum DISABLE = new RedrivePolicyEnum("disable"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"enable", ENABLE}, + {"disable", DISABLE}, + }; + + private string Value; + + public RedrivePolicyEnum(string Value) + { + this.Value = Value; + } + + public static RedrivePolicyEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as RedrivePolicyEnum)) + { + return true; + } + + return false; + } + + public bool Equals(RedrivePolicyEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(RedrivePolicyEnum a, RedrivePolicyEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(RedrivePolicyEnum a, RedrivePolicyEnum b) + { + return !(a == b); + } + } + + + /// + /// 队列ID。 + /// + [JsonProperty("queue_id", NullValueHandling = NullValueHandling.Ignore)] + public string QueueId { get; set; } + + /// + /// 队列的名称。 + /// + [JsonProperty("queue_name", NullValueHandling = NullValueHandling.Ignore)] + public string QueueName { get; set; } + + /// + /// 消费组列表。 + /// + [JsonProperty("groups", NullValueHandling = NullValueHandling.Ignore)] + public List Groups { get; set; } + + /// + /// 该队列是否开启死信消息。仅当include_deadletter为true时,才有该响应参数。 - enable:表示开启。 - disable:表示不开启。 + /// + [JsonProperty("redrive_policy", NullValueHandling = NullValueHandling.Ignore)] + public RedrivePolicyEnum RedrivePolicy { get; set; } + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListConsumerGroupsResponse {\n"); + sb.Append(" queueId: ").Append(QueueId).Append("\n"); + sb.Append(" queueName: ").Append(QueueName).Append("\n"); + sb.Append(" groups: ").Append(Groups).Append("\n"); + sb.Append(" redrivePolicy: ").Append(RedrivePolicy).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListConsumerGroupsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListConsumerGroupsResponse input) + { + if (input == null) + return false; + + return + ( + this.QueueId == input.QueueId || + (this.QueueId != null && + this.QueueId.Equals(input.QueueId)) + ) && + ( + this.QueueName == input.QueueName || + (this.QueueName != null && + this.QueueName.Equals(input.QueueName)) + ) && + ( + this.Groups == input.Groups || + this.Groups != null && + input.Groups != null && + this.Groups.SequenceEqual(input.Groups) + ) && + ( + this.RedrivePolicy == input.RedrivePolicy || + (this.RedrivePolicy != null && + this.RedrivePolicy.Equals(input.RedrivePolicy)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.QueueId != null) + hashCode = hashCode * 59 + this.QueueId.GetHashCode(); + if (this.QueueName != null) + hashCode = hashCode * 59 + this.QueueName.GetHashCode(); + if (this.Groups != null) + hashCode = hashCode * 59 + this.Groups.GetHashCode(); + if (this.RedrivePolicy != null) + hashCode = hashCode * 59 + this.RedrivePolicy.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ListQueueGroupsRespGroups.cs b/Services/Dms/V2/Model/ListQueueGroupsRespGroups.cs new file mode 100644 index 000000000..6943ac9e1 --- /dev/null +++ b/Services/Dms/V2/Model/ListQueueGroupsRespGroups.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// 消费组信息 + /// + public class ListQueueGroupsRespGroups + { + + /// + /// 队列的名称。 + /// + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// 队列的名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 队列的消息总数,不包含过期删除的消息数。 + /// + [JsonProperty("produced_messages", NullValueHandling = NullValueHandling.Ignore)] + public int? ProducedMessages { get; set; } + + /// + /// 已正常消费的消息总数。 + /// + [JsonProperty("consumed_messages", NullValueHandling = NullValueHandling.Ignore)] + public int? ConsumedMessages { get; set; } + + /// + /// 该消费组可以消费的普通消息数。 + /// + [JsonProperty("available_messages", NullValueHandling = NullValueHandling.Ignore)] + public int? AvailableMessages { get; set; } + + /// + /// 该消费组产生的死信息消息总数。仅当include_deadletter为true时,才有该响应参数。 + /// + [JsonProperty("produced_deadletters", NullValueHandling = NullValueHandling.Ignore)] + public int? ProducedDeadletters { get; set; } + + /// + /// 该消费组未消费的死信消息数。仅当include_deadletter为true时,才有该响应参数。 + /// + [JsonProperty("available_deadletters", NullValueHandling = NullValueHandling.Ignore)] + public int? AvailableDeadletters { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListQueueGroupsRespGroups {\n"); + sb.Append(" id: ").Append(Id).Append("\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" producedMessages: ").Append(ProducedMessages).Append("\n"); + sb.Append(" consumedMessages: ").Append(ConsumedMessages).Append("\n"); + sb.Append(" availableMessages: ").Append(AvailableMessages).Append("\n"); + sb.Append(" producedDeadletters: ").Append(ProducedDeadletters).Append("\n"); + sb.Append(" availableDeadletters: ").Append(AvailableDeadletters).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListQueueGroupsRespGroups); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListQueueGroupsRespGroups input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.ProducedMessages == input.ProducedMessages || + (this.ProducedMessages != null && + this.ProducedMessages.Equals(input.ProducedMessages)) + ) && + ( + this.ConsumedMessages == input.ConsumedMessages || + (this.ConsumedMessages != null && + this.ConsumedMessages.Equals(input.ConsumedMessages)) + ) && + ( + this.AvailableMessages == input.AvailableMessages || + (this.AvailableMessages != null && + this.AvailableMessages.Equals(input.AvailableMessages)) + ) && + ( + this.ProducedDeadletters == input.ProducedDeadletters || + (this.ProducedDeadletters != null && + this.ProducedDeadletters.Equals(input.ProducedDeadletters)) + ) && + ( + this.AvailableDeadletters == input.AvailableDeadletters || + (this.AvailableDeadletters != null && + this.AvailableDeadletters.Equals(input.AvailableDeadletters)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.ProducedMessages != null) + hashCode = hashCode * 59 + this.ProducedMessages.GetHashCode(); + if (this.ConsumedMessages != null) + hashCode = hashCode * 59 + this.ConsumedMessages.GetHashCode(); + if (this.AvailableMessages != null) + hashCode = hashCode * 59 + this.AvailableMessages.GetHashCode(); + if (this.ProducedDeadletters != null) + hashCode = hashCode * 59 + this.ProducedDeadletters.GetHashCode(); + if (this.AvailableDeadletters != null) + hashCode = hashCode * 59 + this.AvailableDeadletters.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ListQueuesRequest.cs b/Services/Dms/V2/Model/ListQueuesRequest.cs new file mode 100644 index 000000000..312256f7e --- /dev/null +++ b/Services/Dms/V2/Model/ListQueuesRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Request Object + /// + public class ListQueuesRequest + { + + /// + /// + /// + [SDKProperty("include_deadletter", IsQuery = true)] + [JsonProperty("include_deadletter", NullValueHandling = NullValueHandling.Ignore)] + public bool? IncludeDeadletter { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListQueuesRequest {\n"); + sb.Append(" includeDeadletter: ").Append(IncludeDeadletter).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListQueuesRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListQueuesRequest input) + { + if (input == null) + return false; + + return + ( + this.IncludeDeadletter == input.IncludeDeadletter || + (this.IncludeDeadletter != null && + this.IncludeDeadletter.Equals(input.IncludeDeadletter)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.IncludeDeadletter != null) + hashCode = hashCode * 59 + this.IncludeDeadletter.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ListQueuesRespQueues.cs b/Services/Dms/V2/Model/ListQueuesRespQueues.cs new file mode 100644 index 000000000..204b8096c --- /dev/null +++ b/Services/Dms/V2/Model/ListQueuesRespQueues.cs @@ -0,0 +1,229 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class ListQueuesRespQueues + { + + /// + /// 队列ID。 + /// + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// 队列的名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 创建队列的时间。 + /// + [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] + public string Created { get; set; } + + /// + /// 队列的描述信息。 + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// 队列类型。 + /// + [JsonProperty("queue_mode", NullValueHandling = NullValueHandling.Ignore)] + public string QueueMode { get; set; } + + /// + /// 消息在队列中允许保留的时长(单位分钟)。 + /// + [JsonProperty("reservation", NullValueHandling = NullValueHandling.Ignore)] + public int? Reservation { get; set; } + + /// + /// 队列中允许的最大消息大小(单位Byte)。 + /// + [JsonProperty("max_msg_size_byte", NullValueHandling = NullValueHandling.Ignore)] + public int? MaxMsgSizeByte { get; set; } + + /// + /// 队列的消息总数。 + /// + [JsonProperty("produced_messages", NullValueHandling = NullValueHandling.Ignore)] + public int? ProducedMessages { get; set; } + + /// + /// 该队列是否开启死信消息。仅当include_deadletter为true时,才有该响应参数。 - enable:表示开启。 - disable:表示不开启。 + /// + [JsonProperty("redrive_policy", NullValueHandling = NullValueHandling.Ignore)] + public string RedrivePolicy { get; set; } + + /// + /// 最大确认消费失败的次数,当达到最大确认失败次数后,DMS会将该条消息转存到死信队列中。 仅当include_deadletter为true时,才有该响应参数。 + /// + [JsonProperty("max_consume_count", NullValueHandling = NullValueHandling.Ignore)] + public int? MaxConsumeCount { get; set; } + + /// + /// 该队列下的消费组数量。 + /// + [JsonProperty("group_count", NullValueHandling = NullValueHandling.Ignore)] + public int? GroupCount { get; set; } + + /// + /// 创建队列的时间。 + /// + [JsonProperty("eff_date", NullValueHandling = NullValueHandling.Ignore)] + public string EffDate { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListQueuesRespQueues {\n"); + sb.Append(" id: ").Append(Id).Append("\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" created: ").Append(Created).Append("\n"); + sb.Append(" description: ").Append(Description).Append("\n"); + sb.Append(" queueMode: ").Append(QueueMode).Append("\n"); + sb.Append(" reservation: ").Append(Reservation).Append("\n"); + sb.Append(" maxMsgSizeByte: ").Append(MaxMsgSizeByte).Append("\n"); + sb.Append(" producedMessages: ").Append(ProducedMessages).Append("\n"); + sb.Append(" redrivePolicy: ").Append(RedrivePolicy).Append("\n"); + sb.Append(" maxConsumeCount: ").Append(MaxConsumeCount).Append("\n"); + sb.Append(" groupCount: ").Append(GroupCount).Append("\n"); + sb.Append(" effDate: ").Append(EffDate).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListQueuesRespQueues); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListQueuesRespQueues input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Created == input.Created || + (this.Created != null && + this.Created.Equals(input.Created)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.QueueMode == input.QueueMode || + (this.QueueMode != null && + this.QueueMode.Equals(input.QueueMode)) + ) && + ( + this.Reservation == input.Reservation || + (this.Reservation != null && + this.Reservation.Equals(input.Reservation)) + ) && + ( + this.MaxMsgSizeByte == input.MaxMsgSizeByte || + (this.MaxMsgSizeByte != null && + this.MaxMsgSizeByte.Equals(input.MaxMsgSizeByte)) + ) && + ( + this.ProducedMessages == input.ProducedMessages || + (this.ProducedMessages != null && + this.ProducedMessages.Equals(input.ProducedMessages)) + ) && + ( + this.RedrivePolicy == input.RedrivePolicy || + (this.RedrivePolicy != null && + this.RedrivePolicy.Equals(input.RedrivePolicy)) + ) && + ( + this.MaxConsumeCount == input.MaxConsumeCount || + (this.MaxConsumeCount != null && + this.MaxConsumeCount.Equals(input.MaxConsumeCount)) + ) && + ( + this.GroupCount == input.GroupCount || + (this.GroupCount != null && + this.GroupCount.Equals(input.GroupCount)) + ) && + ( + this.EffDate == input.EffDate || + (this.EffDate != null && + this.EffDate.Equals(input.EffDate)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Created != null) + hashCode = hashCode * 59 + this.Created.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.QueueMode != null) + hashCode = hashCode * 59 + this.QueueMode.GetHashCode(); + if (this.Reservation != null) + hashCode = hashCode * 59 + this.Reservation.GetHashCode(); + if (this.MaxMsgSizeByte != null) + hashCode = hashCode * 59 + this.MaxMsgSizeByte.GetHashCode(); + if (this.ProducedMessages != null) + hashCode = hashCode * 59 + this.ProducedMessages.GetHashCode(); + if (this.RedrivePolicy != null) + hashCode = hashCode * 59 + this.RedrivePolicy.GetHashCode(); + if (this.MaxConsumeCount != null) + hashCode = hashCode * 59 + this.MaxConsumeCount.GetHashCode(); + if (this.GroupCount != null) + hashCode = hashCode * 59 + this.GroupCount.GetHashCode(); + if (this.EffDate != null) + hashCode = hashCode * 59 + this.EffDate.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ListQueuesResponse.cs b/Services/Dms/V2/Model/ListQueuesResponse.cs new file mode 100644 index 000000000..1e899dd74 --- /dev/null +++ b/Services/Dms/V2/Model/ListQueuesResponse.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Response Object + /// + public class ListQueuesResponse : SdkResponse + { + + /// + /// 该租户的所有队列总数。 + /// + [JsonProperty("total", NullValueHandling = NullValueHandling.Ignore)] + public int? Total { get; set; } + + /// + /// 该租户的所有队列数组。 + /// + [JsonProperty("queues", NullValueHandling = NullValueHandling.Ignore)] + public List Queues { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListQueuesResponse {\n"); + sb.Append(" total: ").Append(Total).Append("\n"); + sb.Append(" queues: ").Append(Queues).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListQueuesResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListQueuesResponse input) + { + if (input == null) + return false; + + return + ( + this.Total == input.Total || + (this.Total != null && + this.Total.Equals(input.Total)) + ) && + ( + this.Queues == input.Queues || + this.Queues != null && + input.Queues != null && + this.Queues.SequenceEqual(input.Queues) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Total != null) + hashCode = hashCode * 59 + this.Total.GetHashCode(); + if (this.Queues != null) + hashCode = hashCode * 59 + this.Queues.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/SendMessageEntity.cs b/Services/Dms/V2/Model/SendMessageEntity.cs new file mode 100644 index 000000000..edc8dc95b --- /dev/null +++ b/Services/Dms/V2/Model/SendMessageEntity.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class SendMessageEntity + { + + /// + /// 消息正文。 + /// + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public Object Body { get; set; } + + /// + /// 属性列表,包含属性名称和属性值。 同一条消息的属性名称不可重复,否则属性值将被覆盖。 + /// + [JsonProperty("attributes", NullValueHandling = NullValueHandling.Ignore)] + public Object Attributes { get; set; } + + /// + /// 消息标签,即Label,是通过对消息增加Label来区分队列中的消息分类,DMS允许消费者按照Label对消息进行过滤,确保消费者最终只消费到他关心的消息类型。 消息标签只能包含a~z,A~Z,0-9,-,_,长度是[1,64]。 最多可添加3个标签。 + /// + [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] + public Object Tags { get; set; } + + /// + /// 延时消息的延时时长。 延时消息是指消息发送到DMS服务后,并不期望这条消息立即被消费,而是延迟一段时间后才能被消费。 取值范围:0~604800000 单位:毫秒 不配置该参数或者配置为0,表示无延时。 配置为浮点数时,自动取小数点前面的整数值,比如配置为6000.9,则自动取值为6000。 仅NORMAL队列和FIFO队列可以设置延时消息,Kafka队列不支持延时消息的功能,如果向Kafka队列生产延时消息,提示{\"code\":10540010, \"message\":\"Invalid request format: kafka queue message could not have delayTime.\"}。 + /// + [JsonProperty("delay_time", NullValueHandling = NullValueHandling.Ignore)] + public Object DelayTime { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendMessageEntity {\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append(" attributes: ").Append(Attributes).Append("\n"); + sb.Append(" tags: ").Append(Tags).Append("\n"); + sb.Append(" delayTime: ").Append(DelayTime).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as SendMessageEntity); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(SendMessageEntity input) + { + if (input == null) + return false; + + return + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ) && + ( + this.Attributes == input.Attributes || + (this.Attributes != null && + this.Attributes.Equals(input.Attributes)) + ) && + ( + this.Tags == input.Tags || + (this.Tags != null && + this.Tags.Equals(input.Tags)) + ) && + ( + this.DelayTime == input.DelayTime || + (this.DelayTime != null && + this.DelayTime.Equals(input.DelayTime)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + if (this.Attributes != null) + hashCode = hashCode * 59 + this.Attributes.GetHashCode(); + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + if (this.DelayTime != null) + hashCode = hashCode * 59 + this.DelayTime.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/SendMessagesReq.cs b/Services/Dms/V2/Model/SendMessagesReq.cs new file mode 100644 index 000000000..fbb565013 --- /dev/null +++ b/Services/Dms/V2/Model/SendMessagesReq.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class SendMessagesReq + { + + /// + /// 发送消息成功后,是否返回Message ID,默认为false,设置为true时,返回参数才有Message ID。 + /// + [JsonProperty("return_id", NullValueHandling = NullValueHandling.Ignore)] + public bool? ReturnId { get; set; } + + /// + /// 消息列表。 + /// + [JsonProperty("messages", NullValueHandling = NullValueHandling.Ignore)] + public List Messages { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendMessagesReq {\n"); + sb.Append(" returnId: ").Append(ReturnId).Append("\n"); + sb.Append(" messages: ").Append(Messages).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as SendMessagesReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(SendMessagesReq input) + { + if (input == null) + return false; + + return + ( + this.ReturnId == input.ReturnId || + (this.ReturnId != null && + this.ReturnId.Equals(input.ReturnId)) + ) && + ( + this.Messages == input.Messages || + this.Messages != null && + input.Messages != null && + this.Messages.SequenceEqual(input.Messages) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ReturnId != null) + hashCode = hashCode * 59 + this.ReturnId.GetHashCode(); + if (this.Messages != null) + hashCode = hashCode * 59 + this.Messages.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/SendMessagesRequest.cs b/Services/Dms/V2/Model/SendMessagesRequest.cs new file mode 100644 index 000000000..3558d9cf1 --- /dev/null +++ b/Services/Dms/V2/Model/SendMessagesRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Request Object + /// + public class SendMessagesRequest + { + + /// + /// + /// + [SDKProperty("queue_id", IsPath = true)] + [JsonProperty("queue_id", NullValueHandling = NullValueHandling.Ignore)] + public string QueueId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public SendMessagesReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendMessagesRequest {\n"); + sb.Append(" queueId: ").Append(QueueId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as SendMessagesRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(SendMessagesRequest input) + { + if (input == null) + return false; + + return + ( + this.QueueId == input.QueueId || + (this.QueueId != null && + this.QueueId.Equals(input.QueueId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.QueueId != null) + hashCode = hashCode * 59 + this.QueueId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/SendMessagesRespMessages.cs b/Services/Dms/V2/Model/SendMessagesRespMessages.cs new file mode 100644 index 000000000..0087e5b3a --- /dev/null +++ b/Services/Dms/V2/Model/SendMessagesRespMessages.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class SendMessagesRespMessages + { + + /// + /// 错误描述信息。 + /// + [JsonProperty("error", NullValueHandling = NullValueHandling.Ignore)] + public string Error { get; set; } + + /// + /// 错误码。 + /// + [JsonProperty("error_code", NullValueHandling = NullValueHandling.Ignore)] + public int? ErrorCode { get; set; } + + /// + /// 发送消息的状态。 0:表示发送成功。 1:表示发送失败,失败原因参考对应的error和error_code。 + /// + [JsonProperty("state", NullValueHandling = NullValueHandling.Ignore)] + public int? State { get; set; } + + /// + /// 消息ID。 + /// + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + public string Id { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendMessagesRespMessages {\n"); + sb.Append(" error: ").Append(Error).Append("\n"); + sb.Append(" errorCode: ").Append(ErrorCode).Append("\n"); + sb.Append(" state: ").Append(State).Append("\n"); + sb.Append(" id: ").Append(Id).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as SendMessagesRespMessages); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(SendMessagesRespMessages input) + { + if (input == null) + return false; + + return + ( + this.Error == input.Error || + (this.Error != null && + this.Error.Equals(input.Error)) + ) && + ( + this.ErrorCode == input.ErrorCode || + (this.ErrorCode != null && + this.ErrorCode.Equals(input.ErrorCode)) + ) && + ( + this.State == input.State || + (this.State != null && + this.State.Equals(input.State)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Error != null) + hashCode = hashCode * 59 + this.Error.GetHashCode(); + if (this.ErrorCode != null) + hashCode = hashCode * 59 + this.ErrorCode.GetHashCode(); + if (this.State != null) + hashCode = hashCode * 59 + this.State.GetHashCode(); + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/SendMessagesResponse.cs b/Services/Dms/V2/Model/SendMessagesResponse.cs new file mode 100644 index 000000000..7320f922f --- /dev/null +++ b/Services/Dms/V2/Model/SendMessagesResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Response Object + /// + public class SendMessagesResponse : SdkResponse + { + + /// + /// 消息列表。 + /// + [JsonProperty("messages", NullValueHandling = NullValueHandling.Ignore)] + public List Messages { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendMessagesResponse {\n"); + sb.Append(" messages: ").Append(Messages).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as SendMessagesResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(SendMessagesResponse input) + { + if (input == null) + return false; + + return + ( + this.Messages == input.Messages || + this.Messages != null && + input.Messages != null && + this.Messages.SequenceEqual(input.Messages) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Messages != null) + hashCode = hashCode * 59 + this.Messages.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ShowProjectTagsRequest.cs b/Services/Dms/V2/Model/ShowProjectTagsRequest.cs new file mode 100644 index 000000000..4d9f1339e --- /dev/null +++ b/Services/Dms/V2/Model/ShowProjectTagsRequest.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Request Object + /// + public class ShowProjectTagsRequest + { + + + } +} diff --git a/Services/Dms/V2/Model/ShowProjectTagsRespTags.cs b/Services/Dms/V2/Model/ShowProjectTagsRespTags.cs new file mode 100644 index 000000000..6752f0cce --- /dev/null +++ b/Services/Dms/V2/Model/ShowProjectTagsRespTags.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class ShowProjectTagsRespTags + { + + /// + /// 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + /// + [JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)] + public string Key { get; set; } + + /// + /// 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + /// + [JsonProperty("values", NullValueHandling = NullValueHandling.Ignore)] + public List Values { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowProjectTagsRespTags {\n"); + sb.Append(" key: ").Append(Key).Append("\n"); + sb.Append(" values: ").Append(Values).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowProjectTagsRespTags); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowProjectTagsRespTags input) + { + if (input == null) + return false; + + return + ( + this.Key == input.Key || + (this.Key != null && + this.Key.Equals(input.Key)) + ) && + ( + this.Values == input.Values || + this.Values != null && + input.Values != null && + this.Values.SequenceEqual(input.Values) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Key != null) + hashCode = hashCode * 59 + this.Key.GetHashCode(); + if (this.Values != null) + hashCode = hashCode * 59 + this.Values.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ShowProjectTagsResponse.cs b/Services/Dms/V2/Model/ShowProjectTagsResponse.cs new file mode 100644 index 000000000..62a06a512 --- /dev/null +++ b/Services/Dms/V2/Model/ShowProjectTagsResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Response Object + /// + public class ShowProjectTagsResponse : SdkResponse + { + + /// + /// 标签列表 + /// + [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] + public List Tags { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowProjectTagsResponse {\n"); + sb.Append(" tags: ").Append(Tags).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowProjectTagsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowProjectTagsResponse input) + { + if (input == null) + return false; + + return + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ShowQueueRequest.cs b/Services/Dms/V2/Model/ShowQueueRequest.cs new file mode 100644 index 000000000..027d88797 --- /dev/null +++ b/Services/Dms/V2/Model/ShowQueueRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Request Object + /// + public class ShowQueueRequest + { + + /// + /// + /// + [SDKProperty("queue_id", IsPath = true)] + [JsonProperty("queue_id", NullValueHandling = NullValueHandling.Ignore)] + public string QueueId { get; set; } + + /// + /// + /// + [SDKProperty("include_deadletter", IsQuery = true)] + [JsonProperty("include_deadletter", NullValueHandling = NullValueHandling.Ignore)] + public bool? IncludeDeadletter { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowQueueRequest {\n"); + sb.Append(" queueId: ").Append(QueueId).Append("\n"); + sb.Append(" includeDeadletter: ").Append(IncludeDeadletter).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowQueueRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowQueueRequest input) + { + if (input == null) + return false; + + return + ( + this.QueueId == input.QueueId || + (this.QueueId != null && + this.QueueId.Equals(input.QueueId)) + ) && + ( + this.IncludeDeadletter == input.IncludeDeadletter || + (this.IncludeDeadletter != null && + this.IncludeDeadletter.Equals(input.IncludeDeadletter)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.QueueId != null) + hashCode = hashCode * 59 + this.QueueId.GetHashCode(); + if (this.IncludeDeadletter != null) + hashCode = hashCode * 59 + this.IncludeDeadletter.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ShowQueueResponse.cs b/Services/Dms/V2/Model/ShowQueueResponse.cs new file mode 100644 index 000000000..e9530296f --- /dev/null +++ b/Services/Dms/V2/Model/ShowQueueResponse.cs @@ -0,0 +1,463 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Response Object + /// + public class ShowQueueResponse : SdkResponse + { + /// + /// 队列类型。 + /// + /// 队列类型。 + [JsonConverter(typeof(EnumClassConverter))] + public class QueueModeEnum + { + /// + /// Enum NORMAL for value: NORMAL + /// + public static readonly QueueModeEnum NORMAL = new QueueModeEnum("NORMAL"); + + /// + /// Enum FIFO for value: FIFO + /// + public static readonly QueueModeEnum FIFO = new QueueModeEnum("FIFO"); + + /// + /// Enum KAFKA_HA for value: KAFKA_HA + /// + public static readonly QueueModeEnum KAFKA_HA = new QueueModeEnum("KAFKA_HA"); + + /// + /// Enum KAFKA_HT for value: KAFKA_HT + /// + public static readonly QueueModeEnum KAFKA_HT = new QueueModeEnum("KAFKA_HT"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"NORMAL", NORMAL}, + {"FIFO", FIFO}, + {"KAFKA_HA", KAFKA_HA}, + {"KAFKA_HT", KAFKA_HT}, + }; + + private string Value; + + public QueueModeEnum(string Value) + { + this.Value = Value; + } + + public static QueueModeEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as QueueModeEnum)) + { + return true; + } + + return false; + } + + public bool Equals(QueueModeEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(QueueModeEnum a, QueueModeEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(QueueModeEnum a, QueueModeEnum b) + { + return !(a == b); + } + } + + /// + /// 该队列是否开启死信消息。仅当include_deadletter为true时,才有该响应参数。 - enable:表示开启。 - disable:表示不开启。 + /// + /// 该队列是否开启死信消息。仅当include_deadletter为true时,才有该响应参数。 - enable:表示开启。 - disable:表示不开启。 + [JsonConverter(typeof(EnumClassConverter))] + public class RedrivePolicyEnum + { + /// + /// Enum ENABLE for value: enable + /// + public static readonly RedrivePolicyEnum ENABLE = new RedrivePolicyEnum("enable"); + + /// + /// Enum DISABLE for value: disable + /// + public static readonly RedrivePolicyEnum DISABLE = new RedrivePolicyEnum("disable"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"enable", ENABLE}, + {"disable", DISABLE}, + }; + + private string Value; + + public RedrivePolicyEnum(string Value) + { + this.Value = Value; + } + + public static RedrivePolicyEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as RedrivePolicyEnum)) + { + return true; + } + + return false; + } + + public bool Equals(RedrivePolicyEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(RedrivePolicyEnum a, RedrivePolicyEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(RedrivePolicyEnum a, RedrivePolicyEnum b) + { + return !(a == b); + } + } + + + /// + /// 队列ID。 + /// + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// 队列的名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 创建队列的时间。 + /// + [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] + public string Created { get; set; } + + /// + /// 队列的描述信息。 + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// 队列类型。 + /// + [JsonProperty("queue_mode", NullValueHandling = NullValueHandling.Ignore)] + public QueueModeEnum QueueMode { get; set; } + /// + /// 消息在队列中允许保留的时长(单位分钟)。 + /// + [JsonProperty("reservation", NullValueHandling = NullValueHandling.Ignore)] + public int? Reservation { get; set; } + + /// + /// 队列中允许的最大消息大小(单位Byte)。 + /// + [JsonProperty("max_msg_size_byte", NullValueHandling = NullValueHandling.Ignore)] + public int? MaxMsgSizeByte { get; set; } + + /// + /// 队列的消息总数。 + /// + [JsonProperty("produced_messages", NullValueHandling = NullValueHandling.Ignore)] + public int? ProducedMessages { get; set; } + + /// + /// 该队列是否开启死信消息。仅当include_deadletter为true时,才有该响应参数。 - enable:表示开启。 - disable:表示不开启。 + /// + [JsonProperty("redrive_policy", NullValueHandling = NullValueHandling.Ignore)] + public RedrivePolicyEnum RedrivePolicy { get; set; } + /// + /// 最大确认消费失败的次数,当达到最大确认失败次数后,DMS会将该条消息转存到死信队列中。 仅当include_deadletter为true时,才有该响应参数。 + /// + [JsonProperty("max_consume_count", NullValueHandling = NullValueHandling.Ignore)] + public int? MaxConsumeCount { get; set; } + + /// + /// 该队列下的消费组数量。 + /// + [JsonProperty("group_count", NullValueHandling = NullValueHandling.Ignore)] + public int? GroupCount { get; set; } + + /// + /// 仅Kafka队列才有该参数。 + /// + [JsonProperty("kafka_topic", NullValueHandling = NullValueHandling.Ignore)] + public string KafkaTopic { get; set; } + + /// + /// 创建队列的时间。 + /// + [JsonProperty("eff_date", NullValueHandling = NullValueHandling.Ignore)] + public string EffDate { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowQueueResponse {\n"); + sb.Append(" id: ").Append(Id).Append("\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" created: ").Append(Created).Append("\n"); + sb.Append(" description: ").Append(Description).Append("\n"); + sb.Append(" queueMode: ").Append(QueueMode).Append("\n"); + sb.Append(" reservation: ").Append(Reservation).Append("\n"); + sb.Append(" maxMsgSizeByte: ").Append(MaxMsgSizeByte).Append("\n"); + sb.Append(" producedMessages: ").Append(ProducedMessages).Append("\n"); + sb.Append(" redrivePolicy: ").Append(RedrivePolicy).Append("\n"); + sb.Append(" maxConsumeCount: ").Append(MaxConsumeCount).Append("\n"); + sb.Append(" groupCount: ").Append(GroupCount).Append("\n"); + sb.Append(" kafkaTopic: ").Append(KafkaTopic).Append("\n"); + sb.Append(" effDate: ").Append(EffDate).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowQueueResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowQueueResponse input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Created == input.Created || + (this.Created != null && + this.Created.Equals(input.Created)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.QueueMode == input.QueueMode || + (this.QueueMode != null && + this.QueueMode.Equals(input.QueueMode)) + ) && + ( + this.Reservation == input.Reservation || + (this.Reservation != null && + this.Reservation.Equals(input.Reservation)) + ) && + ( + this.MaxMsgSizeByte == input.MaxMsgSizeByte || + (this.MaxMsgSizeByte != null && + this.MaxMsgSizeByte.Equals(input.MaxMsgSizeByte)) + ) && + ( + this.ProducedMessages == input.ProducedMessages || + (this.ProducedMessages != null && + this.ProducedMessages.Equals(input.ProducedMessages)) + ) && + ( + this.RedrivePolicy == input.RedrivePolicy || + (this.RedrivePolicy != null && + this.RedrivePolicy.Equals(input.RedrivePolicy)) + ) && + ( + this.MaxConsumeCount == input.MaxConsumeCount || + (this.MaxConsumeCount != null && + this.MaxConsumeCount.Equals(input.MaxConsumeCount)) + ) && + ( + this.GroupCount == input.GroupCount || + (this.GroupCount != null && + this.GroupCount.Equals(input.GroupCount)) + ) && + ( + this.KafkaTopic == input.KafkaTopic || + (this.KafkaTopic != null && + this.KafkaTopic.Equals(input.KafkaTopic)) + ) && + ( + this.EffDate == input.EffDate || + (this.EffDate != null && + this.EffDate.Equals(input.EffDate)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Created != null) + hashCode = hashCode * 59 + this.Created.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.QueueMode != null) + hashCode = hashCode * 59 + this.QueueMode.GetHashCode(); + if (this.Reservation != null) + hashCode = hashCode * 59 + this.Reservation.GetHashCode(); + if (this.MaxMsgSizeByte != null) + hashCode = hashCode * 59 + this.MaxMsgSizeByte.GetHashCode(); + if (this.ProducedMessages != null) + hashCode = hashCode * 59 + this.ProducedMessages.GetHashCode(); + if (this.RedrivePolicy != null) + hashCode = hashCode * 59 + this.RedrivePolicy.GetHashCode(); + if (this.MaxConsumeCount != null) + hashCode = hashCode * 59 + this.MaxConsumeCount.GetHashCode(); + if (this.GroupCount != null) + hashCode = hashCode * 59 + this.GroupCount.GetHashCode(); + if (this.KafkaTopic != null) + hashCode = hashCode * 59 + this.KafkaTopic.GetHashCode(); + if (this.EffDate != null) + hashCode = hashCode * 59 + this.EffDate.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ShowQueueTagsRequest.cs b/Services/Dms/V2/Model/ShowQueueTagsRequest.cs new file mode 100644 index 000000000..20535a49e --- /dev/null +++ b/Services/Dms/V2/Model/ShowQueueTagsRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Request Object + /// + public class ShowQueueTagsRequest + { + + /// + /// + /// + [SDKProperty("queue_id", IsPath = true)] + [JsonProperty("queue_id", NullValueHandling = NullValueHandling.Ignore)] + public string QueueId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowQueueTagsRequest {\n"); + sb.Append(" queueId: ").Append(QueueId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowQueueTagsRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowQueueTagsRequest input) + { + if (input == null) + return false; + + return + ( + this.QueueId == input.QueueId || + (this.QueueId != null && + this.QueueId.Equals(input.QueueId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.QueueId != null) + hashCode = hashCode * 59 + this.QueueId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ShowQueueTagsResponse.cs b/Services/Dms/V2/Model/ShowQueueTagsResponse.cs new file mode 100644 index 000000000..d63fbe5f2 --- /dev/null +++ b/Services/Dms/V2/Model/ShowQueueTagsResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Response Object + /// + public class ShowQueueTagsResponse : SdkResponse + { + + /// + /// 标签列表 + /// + [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] + public List Tags { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowQueueTagsResponse {\n"); + sb.Append(" tags: ").Append(Tags).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowQueueTagsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowQueueTagsResponse input) + { + if (input == null) + return false; + + return + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ShowQuotasRequest.cs b/Services/Dms/V2/Model/ShowQuotasRequest.cs new file mode 100644 index 000000000..7361023f4 --- /dev/null +++ b/Services/Dms/V2/Model/ShowQuotasRequest.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Request Object + /// + public class ShowQuotasRequest + { + + + } +} diff --git a/Services/Dms/V2/Model/ShowQuotasRespQuotas.cs b/Services/Dms/V2/Model/ShowQuotasRespQuotas.cs new file mode 100644 index 000000000..b277232e7 --- /dev/null +++ b/Services/Dms/V2/Model/ShowQuotasRespQuotas.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// 配额信息。 + /// + public class ShowQuotasRespQuotas + { + + /// + /// 配额列表。 + /// + [JsonProperty("resources", NullValueHandling = NullValueHandling.Ignore)] + public List Resources { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowQuotasRespQuotas {\n"); + sb.Append(" resources: ").Append(Resources).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowQuotasRespQuotas); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowQuotasRespQuotas input) + { + if (input == null) + return false; + + return + ( + this.Resources == input.Resources || + this.Resources != null && + input.Resources != null && + this.Resources.SequenceEqual(input.Resources) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Resources != null) + hashCode = hashCode * 59 + this.Resources.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ShowQuotasRespQuotasResources.cs b/Services/Dms/V2/Model/ShowQuotasRespQuotasResources.cs new file mode 100644 index 000000000..cbc565de8 --- /dev/null +++ b/Services/Dms/V2/Model/ShowQuotasRespQuotasResources.cs @@ -0,0 +1,131 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// + /// + public class ShowQuotasRespQuotasResources + { + + /// + /// 配额名称。 + /// + [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] + public string Type { get; set; } + + /// + /// 配额数量。 + /// + [JsonProperty("quota", NullValueHandling = NullValueHandling.Ignore)] + public int? Quota { get; set; } + + /// + /// 已使用的数量。 + /// + [JsonProperty("used", NullValueHandling = NullValueHandling.Ignore)] + public int? Used { get; set; } + + /// + /// 配额调整的最小值。 + /// + [JsonProperty("min", NullValueHandling = NullValueHandling.Ignore)] + public int? Min { get; set; } + + /// + /// 配额调整的最大值。 + /// + [JsonProperty("max", NullValueHandling = NullValueHandling.Ignore)] + public int? Max { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowQuotasRespQuotasResources {\n"); + sb.Append(" type: ").Append(Type).Append("\n"); + sb.Append(" quota: ").Append(Quota).Append("\n"); + sb.Append(" used: ").Append(Used).Append("\n"); + sb.Append(" min: ").Append(Min).Append("\n"); + sb.Append(" max: ").Append(Max).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowQuotasRespQuotasResources); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowQuotasRespQuotasResources input) + { + if (input == null) + return false; + + return + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.Quota == input.Quota || + (this.Quota != null && + this.Quota.Equals(input.Quota)) + ) && + ( + this.Used == input.Used || + (this.Used != null && + this.Used.Equals(input.Used)) + ) && + ( + this.Min == input.Min || + (this.Min != null && + this.Min.Equals(input.Min)) + ) && + ( + this.Max == input.Max || + (this.Max != null && + this.Max.Equals(input.Max)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Quota != null) + hashCode = hashCode * 59 + this.Quota.GetHashCode(); + if (this.Used != null) + hashCode = hashCode * 59 + this.Used.GetHashCode(); + if (this.Min != null) + hashCode = hashCode * 59 + this.Min.GetHashCode(); + if (this.Max != null) + hashCode = hashCode * 59 + this.Max.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Dms/V2/Model/ShowQuotasResponse.cs b/Services/Dms/V2/Model/ShowQuotasResponse.cs new file mode 100644 index 000000000..d1ade2390 --- /dev/null +++ b/Services/Dms/V2/Model/ShowQuotasResponse.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Dms.V2.Model +{ + /// + /// Response Object + /// + public class ShowQuotasResponse : SdkResponse + { + + /// + /// + /// + [JsonProperty("quotas", NullValueHandling = NullValueHandling.Ignore)] + public ShowQuotasRespQuotas Quotas { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowQuotasResponse {\n"); + sb.Append(" quotas: ").Append(Quotas).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowQuotasResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowQuotasResponse input) + { + if (input == null) + return false; + + return + ( + this.Quotas == input.Quotas || + (this.Quotas != null && + this.Quotas.Equals(input.Quotas)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Quotas != null) + hashCode = hashCode * 59 + this.Quotas.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Ecs/Ecs.csproj b/Services/Ecs/Ecs.csproj index c14435e9e..7644f077e 100644 --- a/Services/Ecs/Ecs.csproj +++ b/Services/Ecs/Ecs.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.Ecs - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/Eps/Eps.csproj b/Services/Eps/Eps.csproj index 6831706c4..73d02b42b 100644 --- a/Services/Eps/Eps.csproj +++ b/Services/Eps/Eps.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.Eps - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/Evs/Evs.csproj b/Services/Evs/Evs.csproj index 89b8d33ca..176e92d3d 100644 --- a/Services/Evs/Evs.csproj +++ b/Services/Evs/Evs.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.Evs - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/FunctionGraph/FunctionGraph.csproj b/Services/FunctionGraph/FunctionGraph.csproj index ebeb78089..0f6f6dd16 100644 --- a/Services/FunctionGraph/FunctionGraph.csproj +++ b/Services/FunctionGraph/FunctionGraph.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.FunctionGraph - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/Iam/Iam.csproj b/Services/Iam/Iam.csproj index 9d872bf4e..54e3ac615 100644 --- a/Services/Iam/Iam.csproj +++ b/Services/Iam/Iam.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.Iam - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/Image/Image.csproj b/Services/Image/Image.csproj index 4b3412b21..d7fce497a 100644 --- a/Services/Image/Image.csproj +++ b/Services/Image/Image.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.Image - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/Ims/Ims.csproj b/Services/Ims/Ims.csproj index 812cace99..994270e4a 100644 --- a/Services/Ims/Ims.csproj +++ b/Services/Ims/Ims.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.Ims - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/IoTDA/IoTDA.csproj b/Services/IoTDA/IoTDA.csproj index a415e6a74..ee00ddbc2 100644 --- a/Services/IoTDA/IoTDA.csproj +++ b/Services/IoTDA/IoTDA.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.IoTDA - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/Kafka/Kafka.csproj b/Services/Kafka/Kafka.csproj new file mode 100644 index 000000000..9e9c8340e --- /dev/null +++ b/Services/Kafka/Kafka.csproj @@ -0,0 +1,34 @@ + + + + + HuaweiCloud.SDK.Kafka + HuaweiCloud.SDK.Kafka + netstandard2.0 + false + false + false + false + false + false + false + false + false + HuaweiCloud.SDK.Kafka + 3.0.11-beta + HuaweiCloud + Copyright 2020 Huawei Technologies Co., Ltd. + Huawei Technologies Co., Ltd. + HuaweiCloud .net SDK + LICENSE + + + + + + + + + + + diff --git a/Services/Kafka/Kafka.sln b/Services/Kafka/Kafka.sln new file mode 100644 index 000000000..f2068d68a --- /dev/null +++ b/Services/Kafka/Kafka.sln @@ -0,0 +1,18 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kafka", "Kafka.csproj", "{1635d3a9-f723-4184-8328-018a761bb661}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1635d3a9-f723-4184-8328-018a761bb661}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1635d3a9-f723-4184-8328-018a761bb661}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1635d3a9-f723-4184-8328-018a761bb661}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1635d3a9-f723-4184-8328-018a761bb661}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal \ No newline at end of file diff --git a/Services/Kafka/V2/KafkaAsyncClient.cs b/Services/Kafka/V2/KafkaAsyncClient.cs new file mode 100644 index 000000000..41874056f --- /dev/null +++ b/Services/Kafka/V2/KafkaAsyncClient.cs @@ -0,0 +1,599 @@ +using System.Net.Http; +using System.Collections.Generic; +using System.Threading.Tasks; +using HuaweiCloud.SDK.Core; +using HuaweiCloud.SDK.Kafka.V2.Model; + +namespace HuaweiCloud.SDK.Kafka.V2 +{ + public partial class KafkaAsyncClient : Client + { + public static ClientBuilder NewBuilder() + { + return new ClientBuilder(); + } + + + /// + /// 批量添加或删除实例标签 + /// + public async Task BatchCreateOrDeleteInstanceTagAsync(BatchCreateOrDeleteInstanceTagRequest batchCreateOrDeleteInstanceTagRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , batchCreateOrDeleteInstanceTagRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/kafka/{instance_id}/tags/action",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", batchCreateOrDeleteInstanceTagRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// Kafka实例批量删除Topic + /// + public async Task BatchDeleteInstanceTopicAsync(BatchDeleteInstanceTopicRequest batchDeleteInstanceTopicRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , batchDeleteInstanceTopicRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/topics/delete",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", batchDeleteInstanceTopicRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 批量重启或删除实例 + /// + public async Task BatchRestartOrDeleteInstancesAsync(BatchRestartOrDeleteInstancesRequest batchRestartOrDeleteInstancesRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/action",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", batchRestartOrDeleteInstancesRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 创建实例的转储节点 + /// + public async Task CreateConnectorAsync(CreateConnectorRequest createConnectorRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , createConnectorRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/connector",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", createConnectorRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// Kafka实例创建Topic + /// + public async Task CreateInstanceTopicAsync(CreateInstanceTopicRequest createInstanceTopicRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , createInstanceTopicRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/topics",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", createInstanceTopicRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 新增Kafka实例指定Topic分区 + /// + public async Task CreatePartitionAsync(CreatePartitionRequest createPartitionRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , createPartitionRequest.InstanceId.ToString()); + urlParam.Add("topic" , createPartitionRequest.Topic.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions-reassignment",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", createPartitionRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 创建实例(按需) + /// + public async Task CreatePostPaidInstanceAsync(CreatePostPaidInstanceRequest createPostPaidInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", createPostPaidInstanceRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 创建转储任务 + /// + public async Task CreateSinkTaskAsync(CreateSinkTaskRequest createSinkTaskRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("connector_id" , createSinkTaskRequest.ConnectorId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/connectors/{connector_id}/sink-tasks",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", createSinkTaskRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 删除后台任务管理中的指定记录 + /// + public async Task DeleteBackgroundTaskAsync(DeleteBackgroundTaskRequest deleteBackgroundTaskRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , deleteBackgroundTaskRequest.InstanceId.ToString()); + urlParam.Add("task_id" , deleteBackgroundTaskRequest.TaskId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/tasks/{task_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, deleteBackgroundTaskRequest); + HttpResponseMessage response = await DoHttpRequestAsync("DELETE",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 删除指定的实例 + /// + public async Task DeleteInstanceAsync(DeleteInstanceRequest deleteInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , deleteInstanceRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, deleteInstanceRequest); + HttpResponseMessage response = await DoHttpRequestAsync("DELETE",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 删除单个转储任务 + /// + public async Task DeleteSinkTaskAsync(DeleteSinkTaskRequest deleteSinkTaskRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("connector_id" , deleteSinkTaskRequest.ConnectorId.ToString()); + urlParam.Add("task_id" , deleteSinkTaskRequest.TaskId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/connectors/{connector_id}/sink-tasks/{task_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, deleteSinkTaskRequest); + HttpResponseMessage response = await DoHttpRequestAsync("DELETE",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 查询可用区信息 + /// + public async Task ListAvailableZonesAsync(ListAvailableZonesRequest listAvailableZonesRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/available-zones",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listAvailableZonesRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询实例的后台任务列表 + /// + public async Task ListBackgroundTasksAsync(ListBackgroundTasksRequest listBackgroundTasksRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , listBackgroundTasksRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/tasks",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listBackgroundTasksRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// Kafka实例查询Topic + /// + public async Task ListInstanceTopicsAsync(ListInstanceTopicsRequest listInstanceTopicsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , listInstanceTopicsRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/topics",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listInstanceTopicsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询所有实例列表 + /// + public async Task ListInstancesAsync(ListInstancesRequest listInstancesRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listInstancesRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询产品规格列表 + /// + public async Task ListProductsAsync(ListProductsRequest listProductsRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/products",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listProductsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询转储任务列表 + /// + public async Task ListSinkTasksAsync(ListSinkTasksRequest listSinkTasksRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("connector_id" , listSinkTasksRequest.ConnectorId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/connectors/{connector_id}/sink-tasks",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listSinkTasksRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 重置Manager密码 + /// + public async Task ResetManagerPasswordAsync(ResetManagerPasswordRequest resetManagerPasswordRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , resetManagerPasswordRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/kafka-manager-password",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", resetManagerPasswordRequest); + HttpResponseMessage response = await DoHttpRequestAsync("PUT",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 重置消费组消费进度到指定位置 + /// + public async Task ResetMessageOffsetAsync(ResetMessageOffsetRequest resetMessageOffsetRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , resetMessageOffsetRequest.InstanceId.ToString()); + urlParam.Add("group" , resetMessageOffsetRequest.Group.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/groups/{group}/reset-message-offset",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", resetMessageOffsetRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 重置密码 + /// + public async Task ResetPasswordAsync(ResetPasswordRequest resetPasswordRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , resetPasswordRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/password",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", resetPasswordRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 实例规格变更 + /// + public async Task ResizeInstanceAsync(ResizeInstanceRequest resizeInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , resizeInstanceRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/extend",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", resizeInstanceRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 重启Manager + /// + public async Task RestartManagerAsync(RestartManagerRequest restartManagerRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , restartManagerRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/restart-kafka-manager",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, restartManagerRequest); + HttpResponseMessage response = await DoHttpRequestAsync("PUT",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 查询后台任务管理中的指定记录 + /// + public async Task ShowBackgroundTaskAsync(ShowBackgroundTaskRequest showBackgroundTaskRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showBackgroundTaskRequest.InstanceId.ToString()); + urlParam.Add("task_id" , showBackgroundTaskRequest.TaskId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/tasks/{task_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showBackgroundTaskRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询实例在CES的监控层级关系 + /// + public async Task ShowCesHierarchyAsync(ShowCesHierarchyRequest showCesHierarchyRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showCesHierarchyRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/ces-hierarchy",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showCesHierarchyRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询Kafka集群元数据信息 + /// + public async Task ShowClusterAsync(ShowClusterRequest showClusterRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showClusterRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/cluster",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showClusterRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询Kafka实例的协调器信息 + /// + public async Task ShowCoordinatorsAsync(ShowCoordinatorsRequest showCoordinatorsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showCoordinatorsRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/coordinators",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showCoordinatorsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询消费组信息 + /// + public async Task ShowGroupsAsync(ShowGroupsRequest showGroupsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showGroupsRequest.InstanceId.ToString()); + urlParam.Add("group" , showGroupsRequest.Group.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/groups/{group}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showGroupsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询指定实例 + /// + public async Task ShowInstanceAsync(ShowInstanceRequest showInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showInstanceRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showInstanceRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询实例的扩容规格列表 + /// + public async Task ShowInstanceExtendProductInfoAsync(ShowInstanceExtendProductInfoRequest showInstanceExtendProductInfoRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showInstanceExtendProductInfoRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/extend",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showInstanceExtendProductInfoRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询实例标签 + /// + public async Task ShowInstanceTagsAsync(ShowInstanceTagsRequest showInstanceTagsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showInstanceTagsRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/kafka/{instance_id}/tags",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showInstanceTagsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询Kafka实例Topic详细信息 + /// + public async Task ShowInstanceTopicDetailAsync(ShowInstanceTopicDetailRequest showInstanceTopicDetailRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showInstanceTopicDetailRequest.InstanceId.ToString()); + urlParam.Add("topic" , showInstanceTopicDetailRequest.Topic.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/topics/{topic}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showInstanceTopicDetailRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询维护时间窗时间段 + /// + public async Task ShowMaintainWindowsAsync(ShowMaintainWindowsRequest showMaintainWindowsRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/instances/maintain-windows",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showMaintainWindowsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询分区指定时间段的消息 + /// + public async Task ShowMessagesAsync(ShowMessagesRequest showMessagesRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showMessagesRequest.InstanceId.ToString()); + urlParam.Add("topic" , showMessagesRequest.Topic.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/messages",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showMessagesRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询分区最新消息的位置 + /// + public async Task ShowPartitionBeginningMessageAsync(ShowPartitionBeginningMessageRequest showPartitionBeginningMessageRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showPartitionBeginningMessageRequest.InstanceId.ToString()); + urlParam.Add("topic" , showPartitionBeginningMessageRequest.Topic.ToString()); + urlParam.Add("partition" , showPartitionBeginningMessageRequest.Partition.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions/{partition}/beginning-message",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showPartitionBeginningMessageRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询分区最早消息的位置 + /// + public async Task ShowPartitionEndMessageAsync(ShowPartitionEndMessageRequest showPartitionEndMessageRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showPartitionEndMessageRequest.InstanceId.ToString()); + urlParam.Add("topic" , showPartitionEndMessageRequest.Topic.ToString()); + urlParam.Add("partition" , showPartitionEndMessageRequest.Partition.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions/{partition}/end-message",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showPartitionEndMessageRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询分区指定偏移量的消息 + /// + public async Task ShowPartitionMessageAsync(ShowPartitionMessageRequest showPartitionMessageRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showPartitionMessageRequest.InstanceId.ToString()); + urlParam.Add("topic" , showPartitionMessageRequest.Topic.ToString()); + urlParam.Add("partition" , showPartitionMessageRequest.Partition.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions/{partition}/message",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showPartitionMessageRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询项目标签 + /// + public async Task ShowProjectTagsAsync(ShowProjectTagsRequest showProjectTagsRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/kafka/tags",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showProjectTagsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询单个转储任务 + /// + public async Task ShowSinkTaskDetailAsync(ShowSinkTaskDetailRequest showSinkTaskDetailRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("connector_id" , showSinkTaskDetailRequest.ConnectorId.ToString()); + urlParam.Add("task_id" , showSinkTaskDetailRequest.TaskId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/connectors/{connector_id}/sink-tasks/{task_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showSinkTaskDetailRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 修改实例信息 + /// + public async Task UpdateInstanceAsync(UpdateInstanceRequest updateInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , updateInstanceRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", updateInstanceRequest); + HttpResponseMessage response = await DoHttpRequestAsync("PUT",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 开启或关闭实例自动创建topic功能 + /// + public async Task UpdateInstanceAutoCreateTopicAsync(UpdateInstanceAutoCreateTopicRequest updateInstanceAutoCreateTopicRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , updateInstanceAutoCreateTopicRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/autotopic",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", updateInstanceAutoCreateTopicRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 修改实例跨VPC访问的内网IP + /// + public async Task UpdateInstanceCrossVPCIPAsync(UpdateInstanceCrossVPCIPRequest updateInstanceCrossVPCIPRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , updateInstanceCrossVPCIPRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/crossvpc/modify",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", updateInstanceCrossVPCIPRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 修改Kafka实例Topic + /// + public async Task UpdateInstanceTopicAsync(UpdateInstanceTopicRequest updateInstanceTopicRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , updateInstanceTopicRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/topics",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", updateInstanceTopicRequest); + HttpResponseMessage response = await DoHttpRequestAsync("PUT",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 修改转储任务的配额 + /// + public async Task UpdateSinkTaskQuotaAsync(UpdateSinkTaskQuotaRequest updateSinkTaskQuotaRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("connector_id" , updateSinkTaskQuotaRequest.ConnectorId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/connectors/{connector_id}/sink-tasks",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", updateSinkTaskQuotaRequest); + HttpResponseMessage response = await DoHttpRequestAsync("PUT",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 修改Kafka实例Topic分区的副本 + /// + public async Task UpdateTopicReplicaAsync(UpdateTopicReplicaRequest updateTopicReplicaRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , updateTopicReplicaRequest.InstanceId.ToString()); + urlParam.Add("topic" , updateTopicReplicaRequest.Topic.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/replicas-reassignment",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", updateTopicReplicaRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + } +} \ No newline at end of file diff --git a/Services/Kafka/V2/KafkaClient.cs b/Services/Kafka/V2/KafkaClient.cs new file mode 100644 index 000000000..a34467338 --- /dev/null +++ b/Services/Kafka/V2/KafkaClient.cs @@ -0,0 +1,598 @@ +using System.Net.Http; +using System.Collections.Generic; +using HuaweiCloud.SDK.Core; +using HuaweiCloud.SDK.Kafka.V2.Model; + +namespace HuaweiCloud.SDK.Kafka.V2 +{ + public partial class KafkaClient : Client + { + public static ClientBuilder NewBuilder() + { + return new ClientBuilder(); + } + + + /// + /// 批量添加或删除实例标签 + /// + public BatchCreateOrDeleteInstanceTagResponse BatchCreateOrDeleteInstanceTag(BatchCreateOrDeleteInstanceTagRequest batchCreateOrDeleteInstanceTagRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , batchCreateOrDeleteInstanceTagRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/kafka/{instance_id}/tags/action",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", batchCreateOrDeleteInstanceTagRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// Kafka实例批量删除Topic + /// + public BatchDeleteInstanceTopicResponse BatchDeleteInstanceTopic(BatchDeleteInstanceTopicRequest batchDeleteInstanceTopicRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , batchDeleteInstanceTopicRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/topics/delete",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", batchDeleteInstanceTopicRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 批量重启或删除实例 + /// + public BatchRestartOrDeleteInstancesResponse BatchRestartOrDeleteInstances(BatchRestartOrDeleteInstancesRequest batchRestartOrDeleteInstancesRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/action",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", batchRestartOrDeleteInstancesRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 创建实例的转储节点 + /// + public CreateConnectorResponse CreateConnector(CreateConnectorRequest createConnectorRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , createConnectorRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/connector",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", createConnectorRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// Kafka实例创建Topic + /// + public CreateInstanceTopicResponse CreateInstanceTopic(CreateInstanceTopicRequest createInstanceTopicRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , createInstanceTopicRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/topics",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", createInstanceTopicRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 新增Kafka实例指定Topic分区 + /// + public CreatePartitionResponse CreatePartition(CreatePartitionRequest createPartitionRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , createPartitionRequest.InstanceId.ToString()); + urlParam.Add("topic" , createPartitionRequest.Topic.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions-reassignment",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", createPartitionRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 创建实例(按需) + /// + public CreatePostPaidInstanceResponse CreatePostPaidInstance(CreatePostPaidInstanceRequest createPostPaidInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", createPostPaidInstanceRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 创建转储任务 + /// + public CreateSinkTaskResponse CreateSinkTask(CreateSinkTaskRequest createSinkTaskRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("connector_id" , createSinkTaskRequest.ConnectorId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/connectors/{connector_id}/sink-tasks",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", createSinkTaskRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 删除后台任务管理中的指定记录 + /// + public DeleteBackgroundTaskResponse DeleteBackgroundTask(DeleteBackgroundTaskRequest deleteBackgroundTaskRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , deleteBackgroundTaskRequest.InstanceId.ToString()); + urlParam.Add("task_id" , deleteBackgroundTaskRequest.TaskId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/tasks/{task_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, deleteBackgroundTaskRequest); + HttpResponseMessage response = DoHttpRequestSync("DELETE",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 删除指定的实例 + /// + public DeleteInstanceResponse DeleteInstance(DeleteInstanceRequest deleteInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , deleteInstanceRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, deleteInstanceRequest); + HttpResponseMessage response = DoHttpRequestSync("DELETE",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 删除单个转储任务 + /// + public DeleteSinkTaskResponse DeleteSinkTask(DeleteSinkTaskRequest deleteSinkTaskRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("connector_id" , deleteSinkTaskRequest.ConnectorId.ToString()); + urlParam.Add("task_id" , deleteSinkTaskRequest.TaskId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/connectors/{connector_id}/sink-tasks/{task_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, deleteSinkTaskRequest); + HttpResponseMessage response = DoHttpRequestSync("DELETE",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 查询可用区信息 + /// + public ListAvailableZonesResponse ListAvailableZones(ListAvailableZonesRequest listAvailableZonesRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/available-zones",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listAvailableZonesRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询实例的后台任务列表 + /// + public ListBackgroundTasksResponse ListBackgroundTasks(ListBackgroundTasksRequest listBackgroundTasksRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , listBackgroundTasksRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/tasks",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listBackgroundTasksRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// Kafka实例查询Topic + /// + public ListInstanceTopicsResponse ListInstanceTopics(ListInstanceTopicsRequest listInstanceTopicsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , listInstanceTopicsRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/topics",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listInstanceTopicsRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询所有实例列表 + /// + public ListInstancesResponse ListInstances(ListInstancesRequest listInstancesRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listInstancesRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询产品规格列表 + /// + public ListProductsResponse ListProducts(ListProductsRequest listProductsRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/products",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listProductsRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询转储任务列表 + /// + public ListSinkTasksResponse ListSinkTasks(ListSinkTasksRequest listSinkTasksRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("connector_id" , listSinkTasksRequest.ConnectorId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/connectors/{connector_id}/sink-tasks",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listSinkTasksRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 重置Manager密码 + /// + public ResetManagerPasswordResponse ResetManagerPassword(ResetManagerPasswordRequest resetManagerPasswordRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , resetManagerPasswordRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/kafka-manager-password",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", resetManagerPasswordRequest); + HttpResponseMessage response = DoHttpRequestSync("PUT",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 重置消费组消费进度到指定位置 + /// + public ResetMessageOffsetResponse ResetMessageOffset(ResetMessageOffsetRequest resetMessageOffsetRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , resetMessageOffsetRequest.InstanceId.ToString()); + urlParam.Add("group" , resetMessageOffsetRequest.Group.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/groups/{group}/reset-message-offset",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", resetMessageOffsetRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 重置密码 + /// + public ResetPasswordResponse ResetPassword(ResetPasswordRequest resetPasswordRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , resetPasswordRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/password",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", resetPasswordRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 实例规格变更 + /// + public ResizeInstanceResponse ResizeInstance(ResizeInstanceRequest resizeInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , resizeInstanceRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/extend",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", resizeInstanceRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 重启Manager + /// + public RestartManagerResponse RestartManager(RestartManagerRequest restartManagerRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , restartManagerRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/restart-kafka-manager",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, restartManagerRequest); + HttpResponseMessage response = DoHttpRequestSync("PUT",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 查询后台任务管理中的指定记录 + /// + public ShowBackgroundTaskResponse ShowBackgroundTask(ShowBackgroundTaskRequest showBackgroundTaskRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showBackgroundTaskRequest.InstanceId.ToString()); + urlParam.Add("task_id" , showBackgroundTaskRequest.TaskId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/tasks/{task_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showBackgroundTaskRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询实例在CES的监控层级关系 + /// + public ShowCesHierarchyResponse ShowCesHierarchy(ShowCesHierarchyRequest showCesHierarchyRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showCesHierarchyRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/ces-hierarchy",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showCesHierarchyRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询Kafka集群元数据信息 + /// + public ShowClusterResponse ShowCluster(ShowClusterRequest showClusterRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showClusterRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/cluster",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showClusterRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询Kafka实例的协调器信息 + /// + public ShowCoordinatorsResponse ShowCoordinators(ShowCoordinatorsRequest showCoordinatorsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showCoordinatorsRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/coordinators",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showCoordinatorsRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询消费组信息 + /// + public ShowGroupsResponse ShowGroups(ShowGroupsRequest showGroupsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showGroupsRequest.InstanceId.ToString()); + urlParam.Add("group" , showGroupsRequest.Group.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/groups/{group}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showGroupsRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询指定实例 + /// + public ShowInstanceResponse ShowInstance(ShowInstanceRequest showInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showInstanceRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showInstanceRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询实例的扩容规格列表 + /// + public ShowInstanceExtendProductInfoResponse ShowInstanceExtendProductInfo(ShowInstanceExtendProductInfoRequest showInstanceExtendProductInfoRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showInstanceExtendProductInfoRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/extend",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showInstanceExtendProductInfoRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询实例标签 + /// + public ShowInstanceTagsResponse ShowInstanceTags(ShowInstanceTagsRequest showInstanceTagsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showInstanceTagsRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/kafka/{instance_id}/tags",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showInstanceTagsRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询Kafka实例Topic详细信息 + /// + public ShowInstanceTopicDetailResponse ShowInstanceTopicDetail(ShowInstanceTopicDetailRequest showInstanceTopicDetailRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showInstanceTopicDetailRequest.InstanceId.ToString()); + urlParam.Add("topic" , showInstanceTopicDetailRequest.Topic.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/topics/{topic}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showInstanceTopicDetailRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询维护时间窗时间段 + /// + public ShowMaintainWindowsResponse ShowMaintainWindows(ShowMaintainWindowsRequest showMaintainWindowsRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/instances/maintain-windows",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showMaintainWindowsRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询分区指定时间段的消息 + /// + public ShowMessagesResponse ShowMessages(ShowMessagesRequest showMessagesRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showMessagesRequest.InstanceId.ToString()); + urlParam.Add("topic" , showMessagesRequest.Topic.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/messages",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showMessagesRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询分区最新消息的位置 + /// + public ShowPartitionBeginningMessageResponse ShowPartitionBeginningMessage(ShowPartitionBeginningMessageRequest showPartitionBeginningMessageRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showPartitionBeginningMessageRequest.InstanceId.ToString()); + urlParam.Add("topic" , showPartitionBeginningMessageRequest.Topic.ToString()); + urlParam.Add("partition" , showPartitionBeginningMessageRequest.Partition.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions/{partition}/beginning-message",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showPartitionBeginningMessageRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询分区最早消息的位置 + /// + public ShowPartitionEndMessageResponse ShowPartitionEndMessage(ShowPartitionEndMessageRequest showPartitionEndMessageRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showPartitionEndMessageRequest.InstanceId.ToString()); + urlParam.Add("topic" , showPartitionEndMessageRequest.Topic.ToString()); + urlParam.Add("partition" , showPartitionEndMessageRequest.Partition.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions/{partition}/end-message",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showPartitionEndMessageRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询分区指定偏移量的消息 + /// + public ShowPartitionMessageResponse ShowPartitionMessage(ShowPartitionMessageRequest showPartitionMessageRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showPartitionMessageRequest.InstanceId.ToString()); + urlParam.Add("topic" , showPartitionMessageRequest.Topic.ToString()); + urlParam.Add("partition" , showPartitionMessageRequest.Partition.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions/{partition}/message",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showPartitionMessageRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询项目标签 + /// + public ShowProjectTagsResponse ShowProjectTags(ShowProjectTagsRequest showProjectTagsRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/kafka/tags",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showProjectTagsRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询单个转储任务 + /// + public ShowSinkTaskDetailResponse ShowSinkTaskDetail(ShowSinkTaskDetailRequest showSinkTaskDetailRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("connector_id" , showSinkTaskDetailRequest.ConnectorId.ToString()); + urlParam.Add("task_id" , showSinkTaskDetailRequest.TaskId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/connectors/{connector_id}/sink-tasks/{task_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showSinkTaskDetailRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 修改实例信息 + /// + public UpdateInstanceResponse UpdateInstance(UpdateInstanceRequest updateInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , updateInstanceRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", updateInstanceRequest); + HttpResponseMessage response = DoHttpRequestSync("PUT",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 开启或关闭实例自动创建topic功能 + /// + public UpdateInstanceAutoCreateTopicResponse UpdateInstanceAutoCreateTopic(UpdateInstanceAutoCreateTopicRequest updateInstanceAutoCreateTopicRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , updateInstanceAutoCreateTopicRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/autotopic",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", updateInstanceAutoCreateTopicRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 修改实例跨VPC访问的内网IP + /// + public UpdateInstanceCrossVPCIPResponse UpdateInstanceCrossVPCIP(UpdateInstanceCrossVPCIPRequest updateInstanceCrossVPCIPRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , updateInstanceCrossVPCIPRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/crossvpc/modify",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", updateInstanceCrossVPCIPRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 修改Kafka实例Topic + /// + public UpdateInstanceTopicResponse UpdateInstanceTopic(UpdateInstanceTopicRequest updateInstanceTopicRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , updateInstanceTopicRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/topics",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", updateInstanceTopicRequest); + HttpResponseMessage response = DoHttpRequestSync("PUT",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 修改转储任务的配额 + /// + public UpdateSinkTaskQuotaResponse UpdateSinkTaskQuota(UpdateSinkTaskQuotaRequest updateSinkTaskQuotaRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("connector_id" , updateSinkTaskQuotaRequest.ConnectorId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/connectors/{connector_id}/sink-tasks",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", updateSinkTaskQuotaRequest); + HttpResponseMessage response = DoHttpRequestSync("PUT",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 修改Kafka实例Topic分区的副本 + /// + public UpdateTopicReplicaResponse UpdateTopicReplica(UpdateTopicReplicaRequest updateTopicReplicaRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , updateTopicReplicaRequest.InstanceId.ToString()); + urlParam.Add("topic" , updateTopicReplicaRequest.Topic.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/replicas-reassignment",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", updateTopicReplicaRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + } +} \ No newline at end of file diff --git a/Services/Kafka/V2/Model/BatchCreateOrDeleteInstanceTagRequest.cs b/Services/Kafka/V2/Model/BatchCreateOrDeleteInstanceTagRequest.cs new file mode 100644 index 000000000..75e1ba6d1 --- /dev/null +++ b/Services/Kafka/V2/Model/BatchCreateOrDeleteInstanceTagRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class BatchCreateOrDeleteInstanceTagRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public BatchCreateOrDeleteTagReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchCreateOrDeleteInstanceTagRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchCreateOrDeleteInstanceTagRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchCreateOrDeleteInstanceTagRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/BatchCreateOrDeleteInstanceTagResponse.cs b/Services/Kafka/V2/Model/BatchCreateOrDeleteInstanceTagResponse.cs new file mode 100644 index 000000000..186446fd5 --- /dev/null +++ b/Services/Kafka/V2/Model/BatchCreateOrDeleteInstanceTagResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class BatchCreateOrDeleteInstanceTagResponse : SdkResponse + { + + + } +} diff --git a/Services/Kafka/V2/Model/BatchCreateOrDeleteTagReq.cs b/Services/Kafka/V2/Model/BatchCreateOrDeleteTagReq.cs new file mode 100644 index 000000000..09a9b354a --- /dev/null +++ b/Services/Kafka/V2/Model/BatchCreateOrDeleteTagReq.cs @@ -0,0 +1,194 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class BatchCreateOrDeleteTagReq + { + /// + /// 操作标识(仅支持小写): - create(创建) - delete(删除) + /// + /// 操作标识(仅支持小写): - create(创建) - delete(删除) + [JsonConverter(typeof(EnumClassConverter))] + public class ActionEnum + { + /// + /// Enum CREATE for value: create + /// + public static readonly ActionEnum CREATE = new ActionEnum("create"); + + /// + /// Enum DELETE for value: delete + /// + public static readonly ActionEnum DELETE = new ActionEnum("delete"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"create", CREATE}, + {"delete", DELETE}, + }; + + private string Value; + + public ActionEnum(string Value) + { + this.Value = Value; + } + + public static ActionEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as ActionEnum)) + { + return true; + } + + return false; + } + + public bool Equals(ActionEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(ActionEnum a, ActionEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(ActionEnum a, ActionEnum b) + { + return !(a == b); + } + } + + + /// + /// 操作标识(仅支持小写): - create(创建) - delete(删除) + /// + [JsonProperty("action", NullValueHandling = NullValueHandling.Ignore)] + public ActionEnum Action { get; set; } + /// + /// 标签列表。 + /// + [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] + public List Tags { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchCreateOrDeleteTagReq {\n"); + sb.Append(" action: ").Append(Action).Append("\n"); + sb.Append(" tags: ").Append(Tags).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchCreateOrDeleteTagReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchCreateOrDeleteTagReq input) + { + if (input == null) + return false; + + return + ( + this.Action == input.Action || + (this.Action != null && + this.Action.Equals(input.Action)) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Action != null) + hashCode = hashCode * 59 + this.Action.GetHashCode(); + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/BatchDeleteInstanceTopicReq.cs b/Services/Kafka/V2/Model/BatchDeleteInstanceTopicReq.cs new file mode 100644 index 000000000..89824a74b --- /dev/null +++ b/Services/Kafka/V2/Model/BatchDeleteInstanceTopicReq.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class BatchDeleteInstanceTopicReq + { + + /// + /// 待删除的topic列表。 + /// + [JsonProperty("topics", NullValueHandling = NullValueHandling.Ignore)] + public List Topics { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchDeleteInstanceTopicReq {\n"); + sb.Append(" topics: ").Append(Topics).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchDeleteInstanceTopicReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchDeleteInstanceTopicReq input) + { + if (input == null) + return false; + + return + ( + this.Topics == input.Topics || + this.Topics != null && + input.Topics != null && + this.Topics.SequenceEqual(input.Topics) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Topics != null) + hashCode = hashCode * 59 + this.Topics.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/BatchDeleteInstanceTopicRequest.cs b/Services/Kafka/V2/Model/BatchDeleteInstanceTopicRequest.cs new file mode 100644 index 000000000..54f13908e --- /dev/null +++ b/Services/Kafka/V2/Model/BatchDeleteInstanceTopicRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class BatchDeleteInstanceTopicRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public BatchDeleteInstanceTopicReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchDeleteInstanceTopicRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchDeleteInstanceTopicRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchDeleteInstanceTopicRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/BatchDeleteInstanceTopicRespTopics.cs b/Services/Kafka/V2/Model/BatchDeleteInstanceTopicRespTopics.cs new file mode 100644 index 000000000..f57973363 --- /dev/null +++ b/Services/Kafka/V2/Model/BatchDeleteInstanceTopicRespTopics.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class BatchDeleteInstanceTopicRespTopics + { + + /// + /// Topic名称。 + /// + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// topic名称。 + /// + [JsonProperty("success", NullValueHandling = NullValueHandling.Ignore)] + public string Success { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchDeleteInstanceTopicRespTopics {\n"); + sb.Append(" id: ").Append(Id).Append("\n"); + sb.Append(" success: ").Append(Success).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchDeleteInstanceTopicRespTopics); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchDeleteInstanceTopicRespTopics input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Success == input.Success || + (this.Success != null && + this.Success.Equals(input.Success)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Success != null) + hashCode = hashCode * 59 + this.Success.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/BatchDeleteInstanceTopicResponse.cs b/Services/Kafka/V2/Model/BatchDeleteInstanceTopicResponse.cs new file mode 100644 index 000000000..236244c4d --- /dev/null +++ b/Services/Kafka/V2/Model/BatchDeleteInstanceTopicResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class BatchDeleteInstanceTopicResponse : SdkResponse + { + + /// + /// Topic列表。 + /// + [JsonProperty("topics", NullValueHandling = NullValueHandling.Ignore)] + public List Topics { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchDeleteInstanceTopicResponse {\n"); + sb.Append(" topics: ").Append(Topics).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchDeleteInstanceTopicResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchDeleteInstanceTopicResponse input) + { + if (input == null) + return false; + + return + ( + this.Topics == input.Topics || + this.Topics != null && + input.Topics != null && + this.Topics.SequenceEqual(input.Topics) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Topics != null) + hashCode = hashCode * 59 + this.Topics.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/BatchRestartOrDeleteInstanceReq.cs b/Services/Kafka/V2/Model/BatchRestartOrDeleteInstanceReq.cs new file mode 100644 index 000000000..b923fd776 --- /dev/null +++ b/Services/Kafka/V2/Model/BatchRestartOrDeleteInstanceReq.cs @@ -0,0 +1,318 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class BatchRestartOrDeleteInstanceReq + { + /// + /// 对实例的操作:restart、delete + /// + /// 对实例的操作:restart、delete + [JsonConverter(typeof(EnumClassConverter))] + public class ActionEnum + { + /// + /// Enum RESTART for value: restart + /// + public static readonly ActionEnum RESTART = new ActionEnum("restart"); + + /// + /// Enum DELETE for value: delete + /// + public static readonly ActionEnum DELETE = new ActionEnum("delete"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"restart", RESTART}, + {"delete", DELETE}, + }; + + private string Value; + + public ActionEnum(string Value) + { + this.Value = Value; + } + + public static ActionEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as ActionEnum)) + { + return true; + } + + return false; + } + + public bool Equals(ActionEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(ActionEnum a, ActionEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(ActionEnum a, ActionEnum b) + { + return !(a == b); + } + } + + /// + /// 参数值为kafka,表示删除租户所有创建失败的Kafka实例。 + /// + /// 参数值为kafka,表示删除租户所有创建失败的Kafka实例。 + [JsonConverter(typeof(EnumClassConverter))] + public class AllFailureEnum + { + /// + /// Enum TRUE for value: true + /// + public static readonly AllFailureEnum TRUE = new AllFailureEnum("true"); + + /// + /// Enum FALSE for value: false + /// + public static readonly AllFailureEnum FALSE = new AllFailureEnum("false"); + + /// + /// Enum KAFKA for value: kafka + /// + public static readonly AllFailureEnum KAFKA = new AllFailureEnum("kafka"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"true", TRUE}, + {"false", FALSE}, + {"kafka", KAFKA}, + }; + + private string Value; + + public AllFailureEnum(string Value) + { + this.Value = Value; + } + + public static AllFailureEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as AllFailureEnum)) + { + return true; + } + + return false; + } + + public bool Equals(AllFailureEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(AllFailureEnum a, AllFailureEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(AllFailureEnum a, AllFailureEnum b) + { + return !(a == b); + } + } + + + /// + /// 实例的ID列表。 + /// + [JsonProperty("instances", NullValueHandling = NullValueHandling.Ignore)] + public List Instances { get; set; } + + /// + /// 对实例的操作:restart、delete + /// + [JsonProperty("action", NullValueHandling = NullValueHandling.Ignore)] + public ActionEnum Action { get; set; } + /// + /// 参数值为kafka,表示删除租户所有创建失败的Kafka实例。 + /// + [JsonProperty("all_failure", NullValueHandling = NullValueHandling.Ignore)] + public AllFailureEnum AllFailure { get; set; } + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchRestartOrDeleteInstanceReq {\n"); + sb.Append(" instances: ").Append(Instances).Append("\n"); + sb.Append(" action: ").Append(Action).Append("\n"); + sb.Append(" allFailure: ").Append(AllFailure).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchRestartOrDeleteInstanceReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchRestartOrDeleteInstanceReq input) + { + if (input == null) + return false; + + return + ( + this.Instances == input.Instances || + this.Instances != null && + input.Instances != null && + this.Instances.SequenceEqual(input.Instances) + ) && + ( + this.Action == input.Action || + (this.Action != null && + this.Action.Equals(input.Action)) + ) && + ( + this.AllFailure == input.AllFailure || + (this.AllFailure != null && + this.AllFailure.Equals(input.AllFailure)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Instances != null) + hashCode = hashCode * 59 + this.Instances.GetHashCode(); + if (this.Action != null) + hashCode = hashCode * 59 + this.Action.GetHashCode(); + if (this.AllFailure != null) + hashCode = hashCode * 59 + this.AllFailure.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/BatchRestartOrDeleteInstanceRespResults.cs b/Services/Kafka/V2/Model/BatchRestartOrDeleteInstanceRespResults.cs new file mode 100644 index 000000000..9e883c642 --- /dev/null +++ b/Services/Kafka/V2/Model/BatchRestartOrDeleteInstanceRespResults.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class BatchRestartOrDeleteInstanceRespResults + { + + /// + /// 操作结果。 - 'success: 操作成功' - 'failed: 操作失败' + /// + [JsonProperty("result", NullValueHandling = NullValueHandling.Ignore)] + public string Result { get; set; } + + /// + /// 实例ID。 + /// + [JsonProperty("instance", NullValueHandling = NullValueHandling.Ignore)] + public string Instance { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchRestartOrDeleteInstanceRespResults {\n"); + sb.Append(" result: ").Append(Result).Append("\n"); + sb.Append(" instance: ").Append(Instance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchRestartOrDeleteInstanceRespResults); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchRestartOrDeleteInstanceRespResults input) + { + if (input == null) + return false; + + return + ( + this.Result == input.Result || + (this.Result != null && + this.Result.Equals(input.Result)) + ) && + ( + this.Instance == input.Instance || + (this.Instance != null && + this.Instance.Equals(input.Instance)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Result != null) + hashCode = hashCode * 59 + this.Result.GetHashCode(); + if (this.Instance != null) + hashCode = hashCode * 59 + this.Instance.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/BatchRestartOrDeleteInstancesRequest.cs b/Services/Kafka/V2/Model/BatchRestartOrDeleteInstancesRequest.cs new file mode 100644 index 000000000..158f7d040 --- /dev/null +++ b/Services/Kafka/V2/Model/BatchRestartOrDeleteInstancesRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class BatchRestartOrDeleteInstancesRequest + { + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public BatchRestartOrDeleteInstanceReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchRestartOrDeleteInstancesRequest {\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchRestartOrDeleteInstancesRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchRestartOrDeleteInstancesRequest input) + { + if (input == null) + return false; + + return + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/BatchRestartOrDeleteInstancesResponse.cs b/Services/Kafka/V2/Model/BatchRestartOrDeleteInstancesResponse.cs new file mode 100644 index 000000000..d0287044c --- /dev/null +++ b/Services/Kafka/V2/Model/BatchRestartOrDeleteInstancesResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class BatchRestartOrDeleteInstancesResponse : SdkResponse + { + + /// + /// 修改实例的结果。 + /// + [JsonProperty("results", NullValueHandling = NullValueHandling.Ignore)] + public List Results { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchRestartOrDeleteInstancesResponse {\n"); + sb.Append(" results: ").Append(Results).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchRestartOrDeleteInstancesResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchRestartOrDeleteInstancesResponse input) + { + if (input == null) + return false; + + return + ( + this.Results == input.Results || + this.Results != null && + input.Results != null && + this.Results.SequenceEqual(input.Results) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Results != null) + hashCode = hashCode * 59 + this.Results.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/CreateConnectorReq.cs b/Services/Kafka/V2/Model/CreateConnectorReq.cs new file mode 100644 index 000000000..7284fab09 --- /dev/null +++ b/Services/Kafka/V2/Model/CreateConnectorReq.cs @@ -0,0 +1,219 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class CreateConnectorReq + { + /// + /// 部署connector的规格,基准带宽,表示单位时间内传送的最大数据量,单位Byte/秒。 取值范围: - 100MB - 300MB - 600MB - 1200MB 可以不填,则默认跟当前实例的规格是一致。 第一阶段实现先不填,保持和当前实例规格一致,后面再扩展可以选择不同的规格。 + /// + /// 部署connector的规格,基准带宽,表示单位时间内传送的最大数据量,单位Byte/秒。 取值范围: - 100MB - 300MB - 600MB - 1200MB 可以不填,则默认跟当前实例的规格是一致。 第一阶段实现先不填,保持和当前实例规格一致,后面再扩展可以选择不同的规格。 + [JsonConverter(typeof(EnumClassConverter))] + public class SpecificationEnum + { + /// + /// Enum _100MB for value: 100MB + /// + public static readonly SpecificationEnum _100MB = new SpecificationEnum("100MB"); + + /// + /// Enum _300MB for value: 300MB + /// + public static readonly SpecificationEnum _300MB = new SpecificationEnum("300MB"); + + /// + /// Enum _600MB for value: 600MB + /// + public static readonly SpecificationEnum _600MB = new SpecificationEnum("600MB"); + + /// + /// Enum _1200MB for value: 1200MB + /// + public static readonly SpecificationEnum _1200MB = new SpecificationEnum("1200MB"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"100MB", _100MB}, + {"300MB", _300MB}, + {"600MB", _600MB}, + {"1200MB", _1200MB}, + }; + + private string Value; + + public SpecificationEnum(string Value) + { + this.Value = Value; + } + + public static SpecificationEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as SpecificationEnum)) + { + return true; + } + + return false; + } + + public bool Equals(SpecificationEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(SpecificationEnum a, SpecificationEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(SpecificationEnum a, SpecificationEnum b) + { + return !(a == b); + } + } + + + /// + /// 部署connector的规格,基准带宽,表示单位时间内传送的最大数据量,单位Byte/秒。 取值范围: - 100MB - 300MB - 600MB - 1200MB 可以不填,则默认跟当前实例的规格是一致。 第一阶段实现先不填,保持和当前实例规格一致,后面再扩展可以选择不同的规格。 + /// + [JsonProperty("specification", NullValueHandling = NullValueHandling.Ignore)] + public SpecificationEnum Specification { get; set; } + /// + /// 转储节点数量。不能小于2个。 默认是2个。 + /// + [JsonProperty("node_cnt", NullValueHandling = NullValueHandling.Ignore)] + public string NodeCnt { get; set; } + + /// + /// 转储节点规格编码。 + /// + [JsonProperty("spec_code", NullValueHandling = NullValueHandling.Ignore)] + public string SpecCode { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateConnectorReq {\n"); + sb.Append(" specification: ").Append(Specification).Append("\n"); + sb.Append(" nodeCnt: ").Append(NodeCnt).Append("\n"); + sb.Append(" specCode: ").Append(SpecCode).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateConnectorReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateConnectorReq input) + { + if (input == null) + return false; + + return + ( + this.Specification == input.Specification || + (this.Specification != null && + this.Specification.Equals(input.Specification)) + ) && + ( + this.NodeCnt == input.NodeCnt || + (this.NodeCnt != null && + this.NodeCnt.Equals(input.NodeCnt)) + ) && + ( + this.SpecCode == input.SpecCode || + (this.SpecCode != null && + this.SpecCode.Equals(input.SpecCode)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Specification != null) + hashCode = hashCode * 59 + this.Specification.GetHashCode(); + if (this.NodeCnt != null) + hashCode = hashCode * 59 + this.NodeCnt.GetHashCode(); + if (this.SpecCode != null) + hashCode = hashCode * 59 + this.SpecCode.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/CreateConnectorRequest.cs b/Services/Kafka/V2/Model/CreateConnectorRequest.cs new file mode 100644 index 000000000..1618a4b04 --- /dev/null +++ b/Services/Kafka/V2/Model/CreateConnectorRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class CreateConnectorRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public CreateConnectorReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateConnectorRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateConnectorRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateConnectorRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/CreateConnectorResponse.cs b/Services/Kafka/V2/Model/CreateConnectorResponse.cs new file mode 100644 index 000000000..df0c1beb5 --- /dev/null +++ b/Services/Kafka/V2/Model/CreateConnectorResponse.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class CreateConnectorResponse : SdkResponse + { + + /// + /// 任务ID。 + /// + [JsonProperty("job_id", NullValueHandling = NullValueHandling.Ignore)] + public string JobId { get; set; } + + /// + /// 实例转储ID。 + /// + [JsonProperty("connector_id", NullValueHandling = NullValueHandling.Ignore)] + public string ConnectorId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateConnectorResponse {\n"); + sb.Append(" jobId: ").Append(JobId).Append("\n"); + sb.Append(" connectorId: ").Append(ConnectorId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateConnectorResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateConnectorResponse input) + { + if (input == null) + return false; + + return + ( + this.JobId == input.JobId || + (this.JobId != null && + this.JobId.Equals(input.JobId)) + ) && + ( + this.ConnectorId == input.ConnectorId || + (this.ConnectorId != null && + this.ConnectorId.Equals(input.ConnectorId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.JobId != null) + hashCode = hashCode * 59 + this.JobId.GetHashCode(); + if (this.ConnectorId != null) + hashCode = hashCode * 59 + this.ConnectorId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/CreateInstanceTopicReq.cs b/Services/Kafka/V2/Model/CreateInstanceTopicReq.cs new file mode 100644 index 000000000..c866b8eef --- /dev/null +++ b/Services/Kafka/V2/Model/CreateInstanceTopicReq.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class CreateInstanceTopicReq + { + + /// + /// topic名称,长度为4-64,以字母开头且只支持大小写字母、中横线、下划线以及数字。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 副本数,配置数据的可靠性。 取值范围:1-3。 + /// + [JsonProperty("replication", NullValueHandling = NullValueHandling.Ignore)] + public int? Replication { get; set; } + + /// + /// 是否使用同步落盘。默认值为false。同步落盘会导致性能降低。 + /// + [JsonProperty("sync_message_flush", NullValueHandling = NullValueHandling.Ignore)] + public bool? SyncMessageFlush { get; set; } + + /// + /// topic分区数,设置消费的并发数。 取值范围:1-20。 + /// + [JsonProperty("partition", NullValueHandling = NullValueHandling.Ignore)] + public int? Partition { get; set; } + + /// + /// 是否开启同步复制,开启后,客户端生产消息时相应的也要设置acks=-1,否则不生效,默认关闭。 + /// + [JsonProperty("sync_replication", NullValueHandling = NullValueHandling.Ignore)] + public bool? SyncReplication { get; set; } + + /// + /// 消息老化时间。默认值为72。取值范围1~168,单位小时。 + /// + [JsonProperty("retention_time", NullValueHandling = NullValueHandling.Ignore)] + public int? RetentionTime { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateInstanceTopicReq {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" replication: ").Append(Replication).Append("\n"); + sb.Append(" syncMessageFlush: ").Append(SyncMessageFlush).Append("\n"); + sb.Append(" partition: ").Append(Partition).Append("\n"); + sb.Append(" syncReplication: ").Append(SyncReplication).Append("\n"); + sb.Append(" retentionTime: ").Append(RetentionTime).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateInstanceTopicReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateInstanceTopicReq input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Replication == input.Replication || + (this.Replication != null && + this.Replication.Equals(input.Replication)) + ) && + ( + this.SyncMessageFlush == input.SyncMessageFlush || + (this.SyncMessageFlush != null && + this.SyncMessageFlush.Equals(input.SyncMessageFlush)) + ) && + ( + this.Partition == input.Partition || + (this.Partition != null && + this.Partition.Equals(input.Partition)) + ) && + ( + this.SyncReplication == input.SyncReplication || + (this.SyncReplication != null && + this.SyncReplication.Equals(input.SyncReplication)) + ) && + ( + this.RetentionTime == input.RetentionTime || + (this.RetentionTime != null && + this.RetentionTime.Equals(input.RetentionTime)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Replication != null) + hashCode = hashCode * 59 + this.Replication.GetHashCode(); + if (this.SyncMessageFlush != null) + hashCode = hashCode * 59 + this.SyncMessageFlush.GetHashCode(); + if (this.Partition != null) + hashCode = hashCode * 59 + this.Partition.GetHashCode(); + if (this.SyncReplication != null) + hashCode = hashCode * 59 + this.SyncReplication.GetHashCode(); + if (this.RetentionTime != null) + hashCode = hashCode * 59 + this.RetentionTime.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/CreateInstanceTopicRequest.cs b/Services/Kafka/V2/Model/CreateInstanceTopicRequest.cs new file mode 100644 index 000000000..0b1bb8be5 --- /dev/null +++ b/Services/Kafka/V2/Model/CreateInstanceTopicRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class CreateInstanceTopicRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public CreateInstanceTopicReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateInstanceTopicRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateInstanceTopicRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateInstanceTopicRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/CreateInstanceTopicResponse.cs b/Services/Kafka/V2/Model/CreateInstanceTopicResponse.cs new file mode 100644 index 000000000..a0b782801 --- /dev/null +++ b/Services/Kafka/V2/Model/CreateInstanceTopicResponse.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class CreateInstanceTopicResponse : SdkResponse + { + + /// + /// topic名称。 + /// + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + public string Id { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateInstanceTopicResponse {\n"); + sb.Append(" id: ").Append(Id).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateInstanceTopicResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateInstanceTopicResponse input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/CreatePartitionReq.cs b/Services/Kafka/V2/Model/CreatePartitionReq.cs new file mode 100644 index 000000000..768df89dc --- /dev/null +++ b/Services/Kafka/V2/Model/CreatePartitionReq.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class CreatePartitionReq + { + + /// + /// 期望调整分区后的数量,必须大于当前分区数量,小于等于20。 + /// + [JsonProperty("partition", NullValueHandling = NullValueHandling.Ignore)] + public int? Partition { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreatePartitionReq {\n"); + sb.Append(" partition: ").Append(Partition).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreatePartitionReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreatePartitionReq input) + { + if (input == null) + return false; + + return + ( + this.Partition == input.Partition || + (this.Partition != null && + this.Partition.Equals(input.Partition)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Partition != null) + hashCode = hashCode * 59 + this.Partition.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/CreatePartitionRequest.cs b/Services/Kafka/V2/Model/CreatePartitionRequest.cs new file mode 100644 index 000000000..657f9f351 --- /dev/null +++ b/Services/Kafka/V2/Model/CreatePartitionRequest.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class CreatePartitionRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("topic", IsPath = true)] + [JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] + public string Topic { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public CreatePartitionReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreatePartitionRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" topic: ").Append(Topic).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreatePartitionRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreatePartitionRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Topic == input.Topic || + (this.Topic != null && + this.Topic.Equals(input.Topic)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Topic != null) + hashCode = hashCode * 59 + this.Topic.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/CreatePartitionResponse.cs b/Services/Kafka/V2/Model/CreatePartitionResponse.cs new file mode 100644 index 000000000..b6629095e --- /dev/null +++ b/Services/Kafka/V2/Model/CreatePartitionResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class CreatePartitionResponse : SdkResponse + { + + + } +} diff --git a/Services/Kafka/V2/Model/CreatePostPaidInstanceReq.cs b/Services/Kafka/V2/Model/CreatePostPaidInstanceReq.cs new file mode 100644 index 000000000..a7517e7bf --- /dev/null +++ b/Services/Kafka/V2/Model/CreatePostPaidInstanceReq.cs @@ -0,0 +1,1091 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// 创建实例请求体。 + /// + public class CreatePostPaidInstanceReq + { + /// + /// 消息引擎。取值填写为:kafka。 + /// + /// 消息引擎。取值填写为:kafka。 + [JsonConverter(typeof(EnumClassConverter))] + public class EngineEnum + { + /// + /// Enum KAFKA for value: kafka + /// + public static readonly EngineEnum KAFKA = new EngineEnum("kafka"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"kafka", KAFKA}, + }; + + private string Value; + + public EngineEnum(string Value) + { + this.Value = Value; + } + + public static EngineEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as EngineEnum)) + { + return true; + } + + return false; + } + + public bool Equals(EngineEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(EngineEnum a, EngineEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(EngineEnum a, EngineEnum b) + { + return !(a == b); + } + } + + /// + /// 消息引擎的版本。取值填写为:1.1.0。 + /// + /// 消息引擎的版本。取值填写为:1.1.0。 + [JsonConverter(typeof(EnumClassConverter))] + public class EngineVersionEnum + { + /// + /// Enum _1_1_0 for value: 1.1.0 + /// + public static readonly EngineVersionEnum _1_1_0 = new EngineVersionEnum("1.1.0"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"1.1.0", _1_1_0}, + }; + + private string Value; + + public EngineVersionEnum(string Value) + { + this.Value = Value; + } + + public static EngineVersionEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as EngineVersionEnum)) + { + return true; + } + + return false; + } + + public bool Equals(EngineVersionEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(EngineVersionEnum a, EngineVersionEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(EngineVersionEnum a, EngineVersionEnum b) + { + return !(a == b); + } + } + + /// + /// Kafka实例的基准带宽,表示单位时间内传送的最大数据量,单位MB。 取值范围: - 100MB - 300MB - 600MB - 1200MB + /// + /// Kafka实例的基准带宽,表示单位时间内传送的最大数据量,单位MB。 取值范围: - 100MB - 300MB - 600MB - 1200MB + [JsonConverter(typeof(EnumClassConverter))] + public class SpecificationEnum + { + /// + /// Enum _100MB for value: 100MB + /// + public static readonly SpecificationEnum _100MB = new SpecificationEnum("100MB"); + + /// + /// Enum _300MB for value: 300MB + /// + public static readonly SpecificationEnum _300MB = new SpecificationEnum("300MB"); + + /// + /// Enum _600MB for value: 600MB + /// + public static readonly SpecificationEnum _600MB = new SpecificationEnum("600MB"); + + /// + /// Enum _1200MB for value: 1200MB + /// + public static readonly SpecificationEnum _1200MB = new SpecificationEnum("1200MB"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"100MB", _100MB}, + {"300MB", _300MB}, + {"600MB", _600MB}, + {"1200MB", _1200MB}, + }; + + private string Value; + + public SpecificationEnum(string Value) + { + this.Value = Value; + } + + public static SpecificationEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as SpecificationEnum)) + { + return true; + } + + return false; + } + + public bool Equals(SpecificationEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(SpecificationEnum a, SpecificationEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(SpecificationEnum a, SpecificationEnum b) + { + return !(a == b); + } + } + + /// + /// Kafka实例的最大分区数量。 - 参数specification为100MB时,取值300 - 参数specification为300MB时,取值900 - 参数specification为600MB时,取值1800 - 参数specification为1200MB时,取值1800 + /// + /// Kafka实例的最大分区数量。 - 参数specification为100MB时,取值300 - 参数specification为300MB时,取值900 - 参数specification为600MB时,取值1800 - 参数specification为1200MB时,取值1800 + [JsonConverter(typeof(EnumClassConverter))] + public class PartitionNumEnum + { + /// + /// Enum NUMBER_300 for value: 300 + /// + public static readonly PartitionNumEnum NUMBER_300 = new PartitionNumEnum("300"); + + /// + /// Enum NUMBER_900 for value: 900 + /// + public static readonly PartitionNumEnum NUMBER_900 = new PartitionNumEnum("900"); + + /// + /// Enum NUMBER_1800 for value: 1800 + /// + public static readonly PartitionNumEnum NUMBER_1800 = new PartitionNumEnum("1800"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"300", NUMBER_300}, + {"900", NUMBER_900}, + {"1800", NUMBER_1800}, + }; + + private string Value; + + public PartitionNumEnum(string Value) + { + this.Value = Value; + } + + public static PartitionNumEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as PartitionNumEnum)) + { + return true; + } + + return false; + } + + public bool Equals(PartitionNumEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(PartitionNumEnum a, PartitionNumEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(PartitionNumEnum a, PartitionNumEnum b) + { + return !(a == b); + } + } + + /// + /// 磁盘的容量到达容量阈值后,对于消息的处理策略。 取值如下: - produce_reject:表示拒绝消息写入。 - time_base:表示自动删除最老消息。 + /// + /// 磁盘的容量到达容量阈值后,对于消息的处理策略。 取值如下: - produce_reject:表示拒绝消息写入。 - time_base:表示自动删除最老消息。 + [JsonConverter(typeof(EnumClassConverter))] + public class RetentionPolicyEnum + { + /// + /// Enum TIME_BASE for value: time_base + /// + public static readonly RetentionPolicyEnum TIME_BASE = new RetentionPolicyEnum("time_base"); + + /// + /// Enum PRODUCE_REJECT for value: produce_reject + /// + public static readonly RetentionPolicyEnum PRODUCE_REJECT = new RetentionPolicyEnum("produce_reject"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"time_base", TIME_BASE}, + {"produce_reject", PRODUCE_REJECT}, + }; + + private string Value; + + public RetentionPolicyEnum(string Value) + { + this.Value = Value; + } + + public static RetentionPolicyEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as RetentionPolicyEnum)) + { + return true; + } + + return false; + } + + public bool Equals(RetentionPolicyEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(RetentionPolicyEnum a, RetentionPolicyEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(RetentionPolicyEnum a, RetentionPolicyEnum b) + { + return !(a == b); + } + } + + /// + /// 存储IO规格。如何选择磁盘类型请参考[磁盘类型及性能介绍](https://support.huaweicloud.com/productdesc-evs/zh-cn_topic_0044524691.html)。 取值范围: - 参数specification为100MB时,取值dms.physical.storage.high或者dms.physical.storage.ultra - 参数specification为300MB时,取值dms.physical.storage.high或者dms.physical.storage.ultra - 参数specification为600MB时,取值dms.physical.storage.ultra - 参数specification为1200MB时,取值dms.physical.storage.ultra存储IO规格。如何选择磁盘类型请参考磁盘类型及性能介绍。 + /// + /// 存储IO规格。如何选择磁盘类型请参考[磁盘类型及性能介绍](https://support.huaweicloud.com/productdesc-evs/zh-cn_topic_0044524691.html)。 取值范围: - 参数specification为100MB时,取值dms.physical.storage.high或者dms.physical.storage.ultra - 参数specification为300MB时,取值dms.physical.storage.high或者dms.physical.storage.ultra - 参数specification为600MB时,取值dms.physical.storage.ultra - 参数specification为1200MB时,取值dms.physical.storage.ultra存储IO规格。如何选择磁盘类型请参考磁盘类型及性能介绍。 + [JsonConverter(typeof(EnumClassConverter))] + public class StorageSpecCodeEnum + { + /// + /// Enum DMS_PHYSICAL_STORAGE_NORMAL for value: dms.physical.storage.normal + /// + public static readonly StorageSpecCodeEnum DMS_PHYSICAL_STORAGE_NORMAL = new StorageSpecCodeEnum("dms.physical.storage.normal"); + + /// + /// Enum DMS_PHYSICAL_STORAGE_HIGH for value: dms.physical.storage.high + /// + public static readonly StorageSpecCodeEnum DMS_PHYSICAL_STORAGE_HIGH = new StorageSpecCodeEnum("dms.physical.storage.high"); + + /// + /// Enum DMS_PHYSICAL_STORAGE_ULTRA for value: dms.physical.storage.ultra + /// + public static readonly StorageSpecCodeEnum DMS_PHYSICAL_STORAGE_ULTRA = new StorageSpecCodeEnum("dms.physical.storage.ultra"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"dms.physical.storage.normal", DMS_PHYSICAL_STORAGE_NORMAL}, + {"dms.physical.storage.high", DMS_PHYSICAL_STORAGE_HIGH}, + {"dms.physical.storage.ultra", DMS_PHYSICAL_STORAGE_ULTRA}, + }; + + private string Value; + + public StorageSpecCodeEnum(string Value) + { + this.Value = Value; + } + + public static StorageSpecCodeEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as StorageSpecCodeEnum)) + { + return true; + } + + return false; + } + + public bool Equals(StorageSpecCodeEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(StorageSpecCodeEnum a, StorageSpecCodeEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(StorageSpecCodeEnum a, StorageSpecCodeEnum b) + { + return !(a == b); + } + } + + + /// + /// 实例名称。 由英文字符开头,只能由英文字母、数字、中划线、下划线组成,长度为4~64的字符。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 实例的描述信息。 长度不超过1024的字符串。 > \\与\"在json报文中属于特殊字符,如果参数值中需要显示\\或者\"字符,请在字符前增加转义字符\\,比如\\\\或者\\\"。 + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// 消息引擎。取值填写为:kafka。 + /// + [JsonProperty("engine", NullValueHandling = NullValueHandling.Ignore)] + public EngineEnum Engine { get; set; } + /// + /// 消息引擎的版本。取值填写为:1.1.0。 + /// + [JsonProperty("engine_version", NullValueHandling = NullValueHandling.Ignore)] + public EngineVersionEnum EngineVersion { get; set; } + /// + /// Kafka实例的基准带宽,表示单位时间内传送的最大数据量,单位MB。 取值范围: - 100MB - 300MB - 600MB - 1200MB + /// + [JsonProperty("specification", NullValueHandling = NullValueHandling.Ignore)] + public SpecificationEnum Specification { get; set; } + /// + /// 消息存储空间,单位GB。 - Kafka实例规格为100MB时,存储空间取值范围600GB ~ 90000GB。 - Kafka实例规格为300MB时,存储空间取值范围1200GB ~ 90000GB。 - Kafka实例规格为600MB时,存储空间取值范围2400GB ~ 90000GB。 - Kafka实例规格为1200MB,存储空间取值范围4800GB ~ 90000GB。 + /// + [JsonProperty("storage_space", NullValueHandling = NullValueHandling.Ignore)] + public int? StorageSpace { get; set; } + + /// + /// Kafka实例的最大分区数量。 - 参数specification为100MB时,取值300 - 参数specification为300MB时,取值900 - 参数specification为600MB时,取值1800 - 参数specification为1200MB时,取值1800 + /// + [JsonProperty("partition_num", NullValueHandling = NullValueHandling.Ignore)] + public PartitionNumEnum PartitionNum { get; set; } + /// + /// 当ssl_enable为true时,该参数必选,ssl_enable为false时,该参数无效。 认证用户名,只能由英文字母、数字、中划线组成,长度为4~64的字符。 + /// + [JsonProperty("access_user", NullValueHandling = NullValueHandling.Ignore)] + public string AccessUser { get; set; } + + /// + /// 当ssl_enable为true时,该参数必选,ssl_enable为false时,该参数无效。 实例的认证密码。 复杂度要求: - 输入长度为8到32位的字符串。 - 必须包含如下四种字符中的两种组合: - 小写字母 - 大写字母 - 数字 - 特殊字符包括(`~!@#$%^&*()-_=+\\|[{}]:'\",<.>/?) + /// + [JsonProperty("password", NullValueHandling = NullValueHandling.Ignore)] + public string Password { get; set; } + + /// + /// 虚拟私有云ID。 获取方法如下: - 方法1:登录虚拟私有云服务的控制台界面,在虚拟私有云的详情页面查找VPC ID。 - 方法2:通过虚拟私有云服务的API接口查询,具体操作可参考[查询VPC列表](https://support.huaweicloud.com/api-vpc/vpc_api01_0003.html)。 + /// + [JsonProperty("vpc_id", NullValueHandling = NullValueHandling.Ignore)] + public string VpcId { get; set; } + + /// + /// 指定实例所属的安全组。 获取方法如下: - 方法1:登录虚拟私有云服务的控制台界面,在安全组的详情页面查找安全组ID。 - 方法2:通过虚拟私有云服务的API接口查询,具体操作可参考[查询安全组列表](https://support.huaweicloud.com/api-vpc/vpc_sg01_0002.html)。 + /// + [JsonProperty("security_group_id", NullValueHandling = NullValueHandling.Ignore)] + public string SecurityGroupId { get; set; } + + /// + /// 子网信息。 获取方法如下: - 方法1:登录虚拟私有云服务的控制台界面,单击VPC下的子网,进入子网详情页面,查找网络ID。 - 方法2:通过虚拟私有云服务的API接口查询,具体操作可参考[查询子网列表](https://support.huaweicloud.com/api-vpc/vpc_subnet01_0003.html)。 + /// + [JsonProperty("subnet_id", NullValueHandling = NullValueHandling.Ignore)] + public string SubnetId { get; set; } + + /// + /// 创建节点到指定且有资源的可用区ID。该参数不能为空数组或者数组的值为空,详情请参考[查询可用区信息](https://support.huaweicloud.com/api-kafka/ListAvailableZones.html)查询得到。在查询时,请注意查看该可用区是否有资源。 创建Kafka实例,支持节点部署在1个或3个及3个以上的可用区。在为节点指定可用区时,用逗号分隔开。 + /// + [JsonProperty("available_zones", NullValueHandling = NullValueHandling.Ignore)] + public List AvailableZones { get; set; } + + /// + /// 产品标识。 获取方法,请参考查询[产品规格列表](https://support.huaweicloud.com/api-kafka/ListProducts.html)。 + /// + [JsonProperty("product_id", NullValueHandling = NullValueHandling.Ignore)] + public string ProductId { get; set; } + + /// + /// 表示登录Kafka Manager的用户名。只能由英文字母、数字、中划线组成,长度为4~64的字符。 + /// + [JsonProperty("kafka_manager_user", NullValueHandling = NullValueHandling.Ignore)] + public string KafkaManagerUser { get; set; } + + /// + /// 表示登录Kafka Manager的密码。 复杂度要求: - 输入长度为8到32位的字符串。 - 必须包含如下四种字符中的两种组合: - 小写字母 - 大写字母 - 数字 - 特殊字符包括(`~!@#$%^&*()-_=+\\|[{}]:'\",<.>/?) + /// + [JsonProperty("kafka_manager_password", NullValueHandling = NullValueHandling.Ignore)] + public string KafkaManagerPassword { get; set; } + + /// + /// 维护时间窗开始时间,格式为HH:mm。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-kafka/ShowMaintainWindows.html)获取。 - 开始时间必须为22:00、02:00、06:00、10:00、14:00和18:00。 - 该参数不能单独为空,若该值为空,则结束时间也为空。系统分配一个默认开始时间02:00。 + /// + [JsonProperty("maintain_begin", NullValueHandling = NullValueHandling.Ignore)] + public string MaintainBegin { get; set; } + + /// + /// 维护时间窗结束时间,格式为HH:mm。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-kafka/ShowMaintainWindows.html)获取。 - 结束时间在开始时间基础上加四个小时,即当开始时间为22:00时,结束时间为02:00。 - 该参数不能单独为空,若该值为空,则开始时间也为空,系统分配一个默认结束时间06:00。 + /// + [JsonProperty("maintain_end", NullValueHandling = NullValueHandling.Ignore)] + public string MaintainEnd { get; set; } + + /// + /// 是否开启公网访问功能。默认不开启公网。 - true:开启 - false:不开启 + /// + [JsonProperty("enable_publicip", NullValueHandling = NullValueHandling.Ignore)] + public bool? EnablePublicip { get; set; } + + /// + /// 表示公网带宽,单位是Mbit/s。 取值范围: - Kafka实例规格为100MB时,公网带宽取值范围3到900,且必须为实例节点个数的倍数。 - Kafka实例规格为300MB时,公网带宽取值范围3到900,且必须为实例节点个数的倍数。 - Kafka实例规格为600MB时,公网带宽取值范围4到1200,且必须为实例节点个数的倍数。 - Kafka实例规格为1200MB时,公网带宽取值范围8到2400,且必须为实例节点个数的倍数。 + /// + [JsonProperty("public_bandwidth", NullValueHandling = NullValueHandling.Ignore)] + public int? PublicBandwidth { get; set; } + + /// + /// 实例绑定的弹性IP地址的ID。 如果开启了公网访问功能(即enable_publicip为true),该字段为必选。 + /// + [JsonProperty("publicip_id", NullValueHandling = NullValueHandling.Ignore)] + public string PublicipId { get; set; } + + /// + /// 是否打开SSL加密访问。 - true:打开SSL加密访问。 - false:不打开SSL加密访问。 + /// + [JsonProperty("ssl_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? SslEnable { get; set; } + + /// + /// 磁盘的容量到达容量阈值后,对于消息的处理策略。 取值如下: - produce_reject:表示拒绝消息写入。 - time_base:表示自动删除最老消息。 + /// + [JsonProperty("retention_policy", NullValueHandling = NullValueHandling.Ignore)] + public RetentionPolicyEnum RetentionPolicy { get; set; } + /// + /// 是否开启消息转储功能。 默认不开启消息转储。 + /// + [JsonProperty("connector_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? ConnectorEnable { get; set; } + + /// + /// 是否打开kafka自动创建topic功能。 - true:开启 - false:关闭 当您选择开启,表示生产或消费一个未创建的Topic时,会自动创建一个包含3个分区和3个副本的Topic。 + /// + [JsonProperty("enable_auto_topic", NullValueHandling = NullValueHandling.Ignore)] + public bool? EnableAutoTopic { get; set; } + + /// + /// 存储IO规格。如何选择磁盘类型请参考[磁盘类型及性能介绍](https://support.huaweicloud.com/productdesc-evs/zh-cn_topic_0044524691.html)。 取值范围: - 参数specification为100MB时,取值dms.physical.storage.high或者dms.physical.storage.ultra - 参数specification为300MB时,取值dms.physical.storage.high或者dms.physical.storage.ultra - 参数specification为600MB时,取值dms.physical.storage.ultra - 参数specification为1200MB时,取值dms.physical.storage.ultra存储IO规格。如何选择磁盘类型请参考磁盘类型及性能介绍。 + /// + [JsonProperty("storage_spec_code", NullValueHandling = NullValueHandling.Ignore)] + public StorageSpecCodeEnum StorageSpecCode { get; set; } + /// + /// 企业项目ID。若为企业项目账号,该参数必填。 + /// + [JsonProperty("enterprise_project_id", NullValueHandling = NullValueHandling.Ignore)] + public string EnterpriseProjectId { get; set; } + + /// + /// 标签列表。 + /// + [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] + public List Tags { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreatePostPaidInstanceReq {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" description: ").Append(Description).Append("\n"); + sb.Append(" engine: ").Append(Engine).Append("\n"); + sb.Append(" engineVersion: ").Append(EngineVersion).Append("\n"); + sb.Append(" specification: ").Append(Specification).Append("\n"); + sb.Append(" storageSpace: ").Append(StorageSpace).Append("\n"); + sb.Append(" partitionNum: ").Append(PartitionNum).Append("\n"); + sb.Append(" accessUser: ").Append(AccessUser).Append("\n"); + sb.Append(" password: ").Append(Password).Append("\n"); + sb.Append(" vpcId: ").Append(VpcId).Append("\n"); + sb.Append(" securityGroupId: ").Append(SecurityGroupId).Append("\n"); + sb.Append(" subnetId: ").Append(SubnetId).Append("\n"); + sb.Append(" availableZones: ").Append(AvailableZones).Append("\n"); + sb.Append(" productId: ").Append(ProductId).Append("\n"); + sb.Append(" kafkaManagerUser: ").Append(KafkaManagerUser).Append("\n"); + sb.Append(" kafkaManagerPassword: ").Append(KafkaManagerPassword).Append("\n"); + sb.Append(" maintainBegin: ").Append(MaintainBegin).Append("\n"); + sb.Append(" maintainEnd: ").Append(MaintainEnd).Append("\n"); + sb.Append(" enablePublicip: ").Append(EnablePublicip).Append("\n"); + sb.Append(" publicBandwidth: ").Append(PublicBandwidth).Append("\n"); + sb.Append(" publicipId: ").Append(PublicipId).Append("\n"); + sb.Append(" sslEnable: ").Append(SslEnable).Append("\n"); + sb.Append(" retentionPolicy: ").Append(RetentionPolicy).Append("\n"); + sb.Append(" connectorEnable: ").Append(ConnectorEnable).Append("\n"); + sb.Append(" enableAutoTopic: ").Append(EnableAutoTopic).Append("\n"); + sb.Append(" storageSpecCode: ").Append(StorageSpecCode).Append("\n"); + sb.Append(" enterpriseProjectId: ").Append(EnterpriseProjectId).Append("\n"); + sb.Append(" tags: ").Append(Tags).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreatePostPaidInstanceReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreatePostPaidInstanceReq input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.Engine == input.Engine || + (this.Engine != null && + this.Engine.Equals(input.Engine)) + ) && + ( + this.EngineVersion == input.EngineVersion || + (this.EngineVersion != null && + this.EngineVersion.Equals(input.EngineVersion)) + ) && + ( + this.Specification == input.Specification || + (this.Specification != null && + this.Specification.Equals(input.Specification)) + ) && + ( + this.StorageSpace == input.StorageSpace || + (this.StorageSpace != null && + this.StorageSpace.Equals(input.StorageSpace)) + ) && + ( + this.PartitionNum == input.PartitionNum || + (this.PartitionNum != null && + this.PartitionNum.Equals(input.PartitionNum)) + ) && + ( + this.AccessUser == input.AccessUser || + (this.AccessUser != null && + this.AccessUser.Equals(input.AccessUser)) + ) && + ( + this.Password == input.Password || + (this.Password != null && + this.Password.Equals(input.Password)) + ) && + ( + this.VpcId == input.VpcId || + (this.VpcId != null && + this.VpcId.Equals(input.VpcId)) + ) && + ( + this.SecurityGroupId == input.SecurityGroupId || + (this.SecurityGroupId != null && + this.SecurityGroupId.Equals(input.SecurityGroupId)) + ) && + ( + this.SubnetId == input.SubnetId || + (this.SubnetId != null && + this.SubnetId.Equals(input.SubnetId)) + ) && + ( + this.AvailableZones == input.AvailableZones || + this.AvailableZones != null && + input.AvailableZones != null && + this.AvailableZones.SequenceEqual(input.AvailableZones) + ) && + ( + this.ProductId == input.ProductId || + (this.ProductId != null && + this.ProductId.Equals(input.ProductId)) + ) && + ( + this.KafkaManagerUser == input.KafkaManagerUser || + (this.KafkaManagerUser != null && + this.KafkaManagerUser.Equals(input.KafkaManagerUser)) + ) && + ( + this.KafkaManagerPassword == input.KafkaManagerPassword || + (this.KafkaManagerPassword != null && + this.KafkaManagerPassword.Equals(input.KafkaManagerPassword)) + ) && + ( + this.MaintainBegin == input.MaintainBegin || + (this.MaintainBegin != null && + this.MaintainBegin.Equals(input.MaintainBegin)) + ) && + ( + this.MaintainEnd == input.MaintainEnd || + (this.MaintainEnd != null && + this.MaintainEnd.Equals(input.MaintainEnd)) + ) && + ( + this.EnablePublicip == input.EnablePublicip || + (this.EnablePublicip != null && + this.EnablePublicip.Equals(input.EnablePublicip)) + ) && + ( + this.PublicBandwidth == input.PublicBandwidth || + (this.PublicBandwidth != null && + this.PublicBandwidth.Equals(input.PublicBandwidth)) + ) && + ( + this.PublicipId == input.PublicipId || + (this.PublicipId != null && + this.PublicipId.Equals(input.PublicipId)) + ) && + ( + this.SslEnable == input.SslEnable || + (this.SslEnable != null && + this.SslEnable.Equals(input.SslEnable)) + ) && + ( + this.RetentionPolicy == input.RetentionPolicy || + (this.RetentionPolicy != null && + this.RetentionPolicy.Equals(input.RetentionPolicy)) + ) && + ( + this.ConnectorEnable == input.ConnectorEnable || + (this.ConnectorEnable != null && + this.ConnectorEnable.Equals(input.ConnectorEnable)) + ) && + ( + this.EnableAutoTopic == input.EnableAutoTopic || + (this.EnableAutoTopic != null && + this.EnableAutoTopic.Equals(input.EnableAutoTopic)) + ) && + ( + this.StorageSpecCode == input.StorageSpecCode || + (this.StorageSpecCode != null && + this.StorageSpecCode.Equals(input.StorageSpecCode)) + ) && + ( + this.EnterpriseProjectId == input.EnterpriseProjectId || + (this.EnterpriseProjectId != null && + this.EnterpriseProjectId.Equals(input.EnterpriseProjectId)) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Engine != null) + hashCode = hashCode * 59 + this.Engine.GetHashCode(); + if (this.EngineVersion != null) + hashCode = hashCode * 59 + this.EngineVersion.GetHashCode(); + if (this.Specification != null) + hashCode = hashCode * 59 + this.Specification.GetHashCode(); + if (this.StorageSpace != null) + hashCode = hashCode * 59 + this.StorageSpace.GetHashCode(); + if (this.PartitionNum != null) + hashCode = hashCode * 59 + this.PartitionNum.GetHashCode(); + if (this.AccessUser != null) + hashCode = hashCode * 59 + this.AccessUser.GetHashCode(); + if (this.Password != null) + hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.VpcId != null) + hashCode = hashCode * 59 + this.VpcId.GetHashCode(); + if (this.SecurityGroupId != null) + hashCode = hashCode * 59 + this.SecurityGroupId.GetHashCode(); + if (this.SubnetId != null) + hashCode = hashCode * 59 + this.SubnetId.GetHashCode(); + if (this.AvailableZones != null) + hashCode = hashCode * 59 + this.AvailableZones.GetHashCode(); + if (this.ProductId != null) + hashCode = hashCode * 59 + this.ProductId.GetHashCode(); + if (this.KafkaManagerUser != null) + hashCode = hashCode * 59 + this.KafkaManagerUser.GetHashCode(); + if (this.KafkaManagerPassword != null) + hashCode = hashCode * 59 + this.KafkaManagerPassword.GetHashCode(); + if (this.MaintainBegin != null) + hashCode = hashCode * 59 + this.MaintainBegin.GetHashCode(); + if (this.MaintainEnd != null) + hashCode = hashCode * 59 + this.MaintainEnd.GetHashCode(); + if (this.EnablePublicip != null) + hashCode = hashCode * 59 + this.EnablePublicip.GetHashCode(); + if (this.PublicBandwidth != null) + hashCode = hashCode * 59 + this.PublicBandwidth.GetHashCode(); + if (this.PublicipId != null) + hashCode = hashCode * 59 + this.PublicipId.GetHashCode(); + if (this.SslEnable != null) + hashCode = hashCode * 59 + this.SslEnable.GetHashCode(); + if (this.RetentionPolicy != null) + hashCode = hashCode * 59 + this.RetentionPolicy.GetHashCode(); + if (this.ConnectorEnable != null) + hashCode = hashCode * 59 + this.ConnectorEnable.GetHashCode(); + if (this.EnableAutoTopic != null) + hashCode = hashCode * 59 + this.EnableAutoTopic.GetHashCode(); + if (this.StorageSpecCode != null) + hashCode = hashCode * 59 + this.StorageSpecCode.GetHashCode(); + if (this.EnterpriseProjectId != null) + hashCode = hashCode * 59 + this.EnterpriseProjectId.GetHashCode(); + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/CreatePostPaidInstanceReqTags.cs b/Services/Kafka/V2/Model/CreatePostPaidInstanceReqTags.cs new file mode 100644 index 000000000..b265fd7d2 --- /dev/null +++ b/Services/Kafka/V2/Model/CreatePostPaidInstanceReqTags.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class CreatePostPaidInstanceReqTags + { + + /// + /// 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + /// + [JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)] + public string Key { get; set; } + + /// + /// 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + /// + [JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)] + public string Value { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreatePostPaidInstanceReqTags {\n"); + sb.Append(" key: ").Append(Key).Append("\n"); + sb.Append(" value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreatePostPaidInstanceReqTags); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreatePostPaidInstanceReqTags input) + { + if (input == null) + return false; + + return + ( + this.Key == input.Key || + (this.Key != null && + this.Key.Equals(input.Key)) + ) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Key != null) + hashCode = hashCode * 59 + this.Key.GetHashCode(); + if (this.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/CreatePostPaidInstanceRequest.cs b/Services/Kafka/V2/Model/CreatePostPaidInstanceRequest.cs new file mode 100644 index 000000000..5e6669bf4 --- /dev/null +++ b/Services/Kafka/V2/Model/CreatePostPaidInstanceRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class CreatePostPaidInstanceRequest + { + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public CreatePostPaidInstanceReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreatePostPaidInstanceRequest {\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreatePostPaidInstanceRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreatePostPaidInstanceRequest input) + { + if (input == null) + return false; + + return + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/CreatePostPaidInstanceResponse.cs b/Services/Kafka/V2/Model/CreatePostPaidInstanceResponse.cs new file mode 100644 index 000000000..d7ca7cb7d --- /dev/null +++ b/Services/Kafka/V2/Model/CreatePostPaidInstanceResponse.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class CreatePostPaidInstanceResponse : SdkResponse + { + + /// + /// 实例ID + /// + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreatePostPaidInstanceResponse {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreatePostPaidInstanceResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreatePostPaidInstanceResponse input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/CreateSinkTaskReq.cs b/Services/Kafka/V2/Model/CreateSinkTaskReq.cs new file mode 100644 index 000000000..a9fda0f96 --- /dev/null +++ b/Services/Kafka/V2/Model/CreateSinkTaskReq.cs @@ -0,0 +1,313 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class CreateSinkTaskReq + { + /// + /// 源数据类型,目前只支持BLOB。 + /// + /// 源数据类型,目前只支持BLOB。 + [JsonConverter(typeof(EnumClassConverter))] + public class SourceTypeEnum + { + /// + /// Enum BLOB for value: BLOB + /// + public static readonly SourceTypeEnum BLOB = new SourceTypeEnum("BLOB"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"BLOB", BLOB}, + }; + + private string Value; + + public SourceTypeEnum(string Value) + { + this.Value = Value; + } + + public static SourceTypeEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as SourceTypeEnum)) + { + return true; + } + + return false; + } + + public bool Equals(SourceTypeEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(SourceTypeEnum a, SourceTypeEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(SourceTypeEnum a, SourceTypeEnum b) + { + return !(a == b); + } + } + + /// + /// 转存的目标类型,当前只支持OBS。 + /// + /// 转存的目标类型,当前只支持OBS。 + [JsonConverter(typeof(EnumClassConverter))] + public class DestinationTypeEnum + { + /// + /// Enum OBS for value: OBS + /// + public static readonly DestinationTypeEnum OBS = new DestinationTypeEnum("OBS"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"OBS", OBS}, + }; + + private string Value; + + public DestinationTypeEnum(string Value) + { + this.Value = Value; + } + + public static DestinationTypeEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as DestinationTypeEnum)) + { + return true; + } + + return false; + } + + public bool Equals(DestinationTypeEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(DestinationTypeEnum a, DestinationTypeEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(DestinationTypeEnum a, DestinationTypeEnum b) + { + return !(a == b); + } + } + + + /// + /// 源数据类型,目前只支持BLOB。 + /// + [JsonProperty("source_type", NullValueHandling = NullValueHandling.Ignore)] + public SourceTypeEnum SourceType { get; set; } + /// + /// 转储任务名称。 + /// + [JsonProperty("task_name", NullValueHandling = NullValueHandling.Ignore)] + public string TaskName { get; set; } + + /// + /// 转存的目标类型,当前只支持OBS。 + /// + [JsonProperty("destination_type", NullValueHandling = NullValueHandling.Ignore)] + public DestinationTypeEnum DestinationType { get; set; } + /// + /// + /// + [JsonProperty("obs_destination_descriptor", NullValueHandling = NullValueHandling.Ignore)] + public ObsDestinationDescriptor ObsDestinationDescriptor { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateSinkTaskReq {\n"); + sb.Append(" sourceType: ").Append(SourceType).Append("\n"); + sb.Append(" taskName: ").Append(TaskName).Append("\n"); + sb.Append(" destinationType: ").Append(DestinationType).Append("\n"); + sb.Append(" obsDestinationDescriptor: ").Append(ObsDestinationDescriptor).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateSinkTaskReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateSinkTaskReq input) + { + if (input == null) + return false; + + return + ( + this.SourceType == input.SourceType || + (this.SourceType != null && + this.SourceType.Equals(input.SourceType)) + ) && + ( + this.TaskName == input.TaskName || + (this.TaskName != null && + this.TaskName.Equals(input.TaskName)) + ) && + ( + this.DestinationType == input.DestinationType || + (this.DestinationType != null && + this.DestinationType.Equals(input.DestinationType)) + ) && + ( + this.ObsDestinationDescriptor == input.ObsDestinationDescriptor || + (this.ObsDestinationDescriptor != null && + this.ObsDestinationDescriptor.Equals(input.ObsDestinationDescriptor)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.SourceType != null) + hashCode = hashCode * 59 + this.SourceType.GetHashCode(); + if (this.TaskName != null) + hashCode = hashCode * 59 + this.TaskName.GetHashCode(); + if (this.DestinationType != null) + hashCode = hashCode * 59 + this.DestinationType.GetHashCode(); + if (this.ObsDestinationDescriptor != null) + hashCode = hashCode * 59 + this.ObsDestinationDescriptor.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/CreateSinkTaskRequest.cs b/Services/Kafka/V2/Model/CreateSinkTaskRequest.cs new file mode 100644 index 000000000..ceaafe026 --- /dev/null +++ b/Services/Kafka/V2/Model/CreateSinkTaskRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class CreateSinkTaskRequest + { + + /// + /// + /// + [SDKProperty("connector_id", IsPath = true)] + [JsonProperty("connector_id", NullValueHandling = NullValueHandling.Ignore)] + public string ConnectorId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public CreateSinkTaskReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateSinkTaskRequest {\n"); + sb.Append(" connectorId: ").Append(ConnectorId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateSinkTaskRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateSinkTaskRequest input) + { + if (input == null) + return false; + + return + ( + this.ConnectorId == input.ConnectorId || + (this.ConnectorId != null && + this.ConnectorId.Equals(input.ConnectorId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ConnectorId != null) + hashCode = hashCode * 59 + this.ConnectorId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/CreateSinkTaskResponse.cs b/Services/Kafka/V2/Model/CreateSinkTaskResponse.cs new file mode 100644 index 000000000..1e437854c --- /dev/null +++ b/Services/Kafka/V2/Model/CreateSinkTaskResponse.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class CreateSinkTaskResponse : SdkResponse + { + + /// + /// 任务ID。 + /// + [JsonProperty("task_id", NullValueHandling = NullValueHandling.Ignore)] + public string TaskId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateSinkTaskResponse {\n"); + sb.Append(" taskId: ").Append(TaskId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateSinkTaskResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateSinkTaskResponse input) + { + if (input == null) + return false; + + return + ( + this.TaskId == input.TaskId || + (this.TaskId != null && + this.TaskId.Equals(input.TaskId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.TaskId != null) + hashCode = hashCode * 59 + this.TaskId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/DeleteBackgroundTaskRequest.cs b/Services/Kafka/V2/Model/DeleteBackgroundTaskRequest.cs new file mode 100644 index 000000000..70368dfbb --- /dev/null +++ b/Services/Kafka/V2/Model/DeleteBackgroundTaskRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class DeleteBackgroundTaskRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("task_id", IsPath = true)] + [JsonProperty("task_id", NullValueHandling = NullValueHandling.Ignore)] + public string TaskId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DeleteBackgroundTaskRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" taskId: ").Append(TaskId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as DeleteBackgroundTaskRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(DeleteBackgroundTaskRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.TaskId == input.TaskId || + (this.TaskId != null && + this.TaskId.Equals(input.TaskId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.TaskId != null) + hashCode = hashCode * 59 + this.TaskId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/DeleteBackgroundTaskResponse.cs b/Services/Kafka/V2/Model/DeleteBackgroundTaskResponse.cs new file mode 100644 index 000000000..4a56d134f --- /dev/null +++ b/Services/Kafka/V2/Model/DeleteBackgroundTaskResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class DeleteBackgroundTaskResponse : SdkResponse + { + + + } +} diff --git a/Services/Kafka/V2/Model/DeleteInstanceRequest.cs b/Services/Kafka/V2/Model/DeleteInstanceRequest.cs new file mode 100644 index 000000000..26089ee60 --- /dev/null +++ b/Services/Kafka/V2/Model/DeleteInstanceRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class DeleteInstanceRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DeleteInstanceRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as DeleteInstanceRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(DeleteInstanceRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/DeleteInstanceResponse.cs b/Services/Kafka/V2/Model/DeleteInstanceResponse.cs new file mode 100644 index 000000000..e6f2d84bb --- /dev/null +++ b/Services/Kafka/V2/Model/DeleteInstanceResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class DeleteInstanceResponse : SdkResponse + { + + + } +} diff --git a/Services/Kafka/V2/Model/DeleteSinkTaskRequest.cs b/Services/Kafka/V2/Model/DeleteSinkTaskRequest.cs new file mode 100644 index 000000000..2e5eceae6 --- /dev/null +++ b/Services/Kafka/V2/Model/DeleteSinkTaskRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class DeleteSinkTaskRequest + { + + /// + /// + /// + [SDKProperty("connector_id", IsPath = true)] + [JsonProperty("connector_id", NullValueHandling = NullValueHandling.Ignore)] + public string ConnectorId { get; set; } + + /// + /// + /// + [SDKProperty("task_id", IsPath = true)] + [JsonProperty("task_id", NullValueHandling = NullValueHandling.Ignore)] + public string TaskId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DeleteSinkTaskRequest {\n"); + sb.Append(" connectorId: ").Append(ConnectorId).Append("\n"); + sb.Append(" taskId: ").Append(TaskId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as DeleteSinkTaskRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(DeleteSinkTaskRequest input) + { + if (input == null) + return false; + + return + ( + this.ConnectorId == input.ConnectorId || + (this.ConnectorId != null && + this.ConnectorId.Equals(input.ConnectorId)) + ) && + ( + this.TaskId == input.TaskId || + (this.TaskId != null && + this.TaskId.Equals(input.TaskId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ConnectorId != null) + hashCode = hashCode * 59 + this.ConnectorId.GetHashCode(); + if (this.TaskId != null) + hashCode = hashCode * 59 + this.TaskId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/DeleteSinkTaskResponse.cs b/Services/Kafka/V2/Model/DeleteSinkTaskResponse.cs new file mode 100644 index 000000000..4333606e0 --- /dev/null +++ b/Services/Kafka/V2/Model/DeleteSinkTaskResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class DeleteSinkTaskResponse : SdkResponse + { + + + } +} diff --git a/Services/Kafka/V2/Model/ListAvailableZonesRequest.cs b/Services/Kafka/V2/Model/ListAvailableZonesRequest.cs new file mode 100644 index 000000000..d46e44a7c --- /dev/null +++ b/Services/Kafka/V2/Model/ListAvailableZonesRequest.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ListAvailableZonesRequest + { + + + } +} diff --git a/Services/Kafka/V2/Model/ListAvailableZonesRespAvailableZones.cs b/Services/Kafka/V2/Model/ListAvailableZonesRespAvailableZones.cs new file mode 100644 index 000000000..05cc0a5b7 --- /dev/null +++ b/Services/Kafka/V2/Model/ListAvailableZonesRespAvailableZones.cs @@ -0,0 +1,173 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ListAvailableZonesRespAvailableZones + { + + /// + /// 是否售罄。 + /// + [JsonProperty("soldOut", NullValueHandling = NullValueHandling.Ignore)] + public bool? SoldOut { get; set; } + + /// + /// 可用区ID。 + /// + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// 可用区编码。 + /// + [JsonProperty("code", NullValueHandling = NullValueHandling.Ignore)] + public string Code { get; set; } + + /// + /// 可用区名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 可用区端口号。 + /// + [JsonProperty("port", NullValueHandling = NullValueHandling.Ignore)] + public string Port { get; set; } + + /// + /// 分区上是否还有可用资源。 + /// + [JsonProperty("resource_availability", NullValueHandling = NullValueHandling.Ignore)] + public string ResourceAvailability { get; set; } + + /// + /// 是否为默认可用区。 + /// + [JsonProperty("default_az", NullValueHandling = NullValueHandling.Ignore)] + public bool? DefaultAz { get; set; } + + /// + /// 是否支持IPv6。 + /// + [JsonProperty("ipv6_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? Ipv6Enable { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListAvailableZonesRespAvailableZones {\n"); + sb.Append(" soldOut: ").Append(SoldOut).Append("\n"); + sb.Append(" id: ").Append(Id).Append("\n"); + sb.Append(" code: ").Append(Code).Append("\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" port: ").Append(Port).Append("\n"); + sb.Append(" resourceAvailability: ").Append(ResourceAvailability).Append("\n"); + sb.Append(" defaultAz: ").Append(DefaultAz).Append("\n"); + sb.Append(" ipv6Enable: ").Append(Ipv6Enable).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListAvailableZonesRespAvailableZones); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListAvailableZonesRespAvailableZones input) + { + if (input == null) + return false; + + return + ( + this.SoldOut == input.SoldOut || + (this.SoldOut != null && + this.SoldOut.Equals(input.SoldOut)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Code == input.Code || + (this.Code != null && + this.Code.Equals(input.Code)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Port == input.Port || + (this.Port != null && + this.Port.Equals(input.Port)) + ) && + ( + this.ResourceAvailability == input.ResourceAvailability || + (this.ResourceAvailability != null && + this.ResourceAvailability.Equals(input.ResourceAvailability)) + ) && + ( + this.DefaultAz == input.DefaultAz || + (this.DefaultAz != null && + this.DefaultAz.Equals(input.DefaultAz)) + ) && + ( + this.Ipv6Enable == input.Ipv6Enable || + (this.Ipv6Enable != null && + this.Ipv6Enable.Equals(input.Ipv6Enable)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.SoldOut != null) + hashCode = hashCode * 59 + this.SoldOut.GetHashCode(); + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Code != null) + hashCode = hashCode * 59 + this.Code.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Port != null) + hashCode = hashCode * 59 + this.Port.GetHashCode(); + if (this.ResourceAvailability != null) + hashCode = hashCode * 59 + this.ResourceAvailability.GetHashCode(); + if (this.DefaultAz != null) + hashCode = hashCode * 59 + this.DefaultAz.GetHashCode(); + if (this.Ipv6Enable != null) + hashCode = hashCode * 59 + this.Ipv6Enable.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListAvailableZonesResponse.cs b/Services/Kafka/V2/Model/ListAvailableZonesResponse.cs new file mode 100644 index 000000000..03ecd98ec --- /dev/null +++ b/Services/Kafka/V2/Model/ListAvailableZonesResponse.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ListAvailableZonesResponse : SdkResponse + { + + /// + /// 区域ID。 + /// + [JsonProperty("region_id", NullValueHandling = NullValueHandling.Ignore)] + public string RegionId { get; set; } + + /// + /// 可用区数组。 + /// + [JsonProperty("available_zones", NullValueHandling = NullValueHandling.Ignore)] + public List AvailableZones { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListAvailableZonesResponse {\n"); + sb.Append(" regionId: ").Append(RegionId).Append("\n"); + sb.Append(" availableZones: ").Append(AvailableZones).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListAvailableZonesResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListAvailableZonesResponse input) + { + if (input == null) + return false; + + return + ( + this.RegionId == input.RegionId || + (this.RegionId != null && + this.RegionId.Equals(input.RegionId)) + ) && + ( + this.AvailableZones == input.AvailableZones || + this.AvailableZones != null && + input.AvailableZones != null && + this.AvailableZones.SequenceEqual(input.AvailableZones) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.RegionId != null) + hashCode = hashCode * 59 + this.RegionId.GetHashCode(); + if (this.AvailableZones != null) + hashCode = hashCode * 59 + this.AvailableZones.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListBackgroundTasksRequest.cs b/Services/Kafka/V2/Model/ListBackgroundTasksRequest.cs new file mode 100644 index 000000000..0b13eb36e --- /dev/null +++ b/Services/Kafka/V2/Model/ListBackgroundTasksRequest.cs @@ -0,0 +1,136 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ListBackgroundTasksRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("start", IsQuery = true)] + [JsonProperty("start", NullValueHandling = NullValueHandling.Ignore)] + public int? Start { get; set; } + + /// + /// + /// + [SDKProperty("limit", IsQuery = true)] + [JsonProperty("limit", NullValueHandling = NullValueHandling.Ignore)] + public int? Limit { get; set; } + + /// + /// + /// + [SDKProperty("begin_time", IsQuery = true)] + [JsonProperty("begin_time", NullValueHandling = NullValueHandling.Ignore)] + public string BeginTime { get; set; } + + /// + /// + /// + [SDKProperty("end_time", IsQuery = true)] + [JsonProperty("end_time", NullValueHandling = NullValueHandling.Ignore)] + public string EndTime { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListBackgroundTasksRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" start: ").Append(Start).Append("\n"); + sb.Append(" limit: ").Append(Limit).Append("\n"); + sb.Append(" beginTime: ").Append(BeginTime).Append("\n"); + sb.Append(" endTime: ").Append(EndTime).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListBackgroundTasksRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListBackgroundTasksRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Start == input.Start || + (this.Start != null && + this.Start.Equals(input.Start)) + ) && + ( + this.Limit == input.Limit || + (this.Limit != null && + this.Limit.Equals(input.Limit)) + ) && + ( + this.BeginTime == input.BeginTime || + (this.BeginTime != null && + this.BeginTime.Equals(input.BeginTime)) + ) && + ( + this.EndTime == input.EndTime || + (this.EndTime != null && + this.EndTime.Equals(input.EndTime)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Start != null) + hashCode = hashCode * 59 + this.Start.GetHashCode(); + if (this.Limit != null) + hashCode = hashCode * 59 + this.Limit.GetHashCode(); + if (this.BeginTime != null) + hashCode = hashCode * 59 + this.BeginTime.GetHashCode(); + if (this.EndTime != null) + hashCode = hashCode * 59 + this.EndTime.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListBackgroundTasksRespTasks.cs b/Services/Kafka/V2/Model/ListBackgroundTasksRespTasks.cs new file mode 100644 index 000000000..732d38559 --- /dev/null +++ b/Services/Kafka/V2/Model/ListBackgroundTasksRespTasks.cs @@ -0,0 +1,173 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ListBackgroundTasksRespTasks + { + + /// + /// 任务ID。 + /// + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// 任务名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 用户名。 + /// + [JsonProperty("user_name", NullValueHandling = NullValueHandling.Ignore)] + public string UserName { get; set; } + + /// + /// 用户ID。 + /// + [JsonProperty("user_id", NullValueHandling = NullValueHandling.Ignore)] + public string UserId { get; set; } + + /// + /// 任务参数。 + /// + [JsonProperty("params", NullValueHandling = NullValueHandling.Ignore)] + public string Params { get; set; } + + /// + /// 任务状态。 + /// + [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] + public string Status { get; set; } + + /// + /// 启动时间。 + /// + [JsonProperty("created_at", NullValueHandling = NullValueHandling.Ignore)] + public string CreatedAt { get; set; } + + /// + /// 结束时间。 + /// + [JsonProperty("updated_at", NullValueHandling = NullValueHandling.Ignore)] + public string UpdatedAt { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListBackgroundTasksRespTasks {\n"); + sb.Append(" id: ").Append(Id).Append("\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" userName: ").Append(UserName).Append("\n"); + sb.Append(" userId: ").Append(UserId).Append("\n"); + sb.Append(" Params: ").Append(Params).Append("\n"); + sb.Append(" status: ").Append(Status).Append("\n"); + sb.Append(" createdAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" updatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListBackgroundTasksRespTasks); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListBackgroundTasksRespTasks input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.UserName == input.UserName || + (this.UserName != null && + this.UserName.Equals(input.UserName)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.Params == input.Params || + (this.Params != null && + this.Params.Equals(input.Params)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.UserName != null) + hashCode = hashCode * 59 + this.UserName.GetHashCode(); + if (this.UserId != null) + hashCode = hashCode * 59 + this.UserId.GetHashCode(); + if (this.Params != null) + hashCode = hashCode * 59 + this.Params.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.UpdatedAt != null) + hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListBackgroundTasksResponse.cs b/Services/Kafka/V2/Model/ListBackgroundTasksResponse.cs new file mode 100644 index 000000000..79e893116 --- /dev/null +++ b/Services/Kafka/V2/Model/ListBackgroundTasksResponse.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ListBackgroundTasksResponse : SdkResponse + { + + /// + /// 任务数量。 + /// + [JsonProperty("task_count", NullValueHandling = NullValueHandling.Ignore)] + public string TaskCount { get; set; } + + /// + /// 任务列表。 + /// + [JsonProperty("tasks", NullValueHandling = NullValueHandling.Ignore)] + public List Tasks { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListBackgroundTasksResponse {\n"); + sb.Append(" taskCount: ").Append(TaskCount).Append("\n"); + sb.Append(" tasks: ").Append(Tasks).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListBackgroundTasksResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListBackgroundTasksResponse input) + { + if (input == null) + return false; + + return + ( + this.TaskCount == input.TaskCount || + (this.TaskCount != null && + this.TaskCount.Equals(input.TaskCount)) + ) && + ( + this.Tasks == input.Tasks || + this.Tasks != null && + input.Tasks != null && + this.Tasks.SequenceEqual(input.Tasks) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.TaskCount != null) + hashCode = hashCode * 59 + this.TaskCount.GetHashCode(); + if (this.Tasks != null) + hashCode = hashCode * 59 + this.Tasks.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListInstanceTopicsRequest.cs b/Services/Kafka/V2/Model/ListInstanceTopicsRequest.cs new file mode 100644 index 000000000..d6e296fbc --- /dev/null +++ b/Services/Kafka/V2/Model/ListInstanceTopicsRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ListInstanceTopicsRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListInstanceTopicsRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListInstanceTopicsRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListInstanceTopicsRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListInstanceTopicsRespTopics.cs b/Services/Kafka/V2/Model/ListInstanceTopicsRespTopics.cs new file mode 100644 index 000000000..5ce479d79 --- /dev/null +++ b/Services/Kafka/V2/Model/ListInstanceTopicsRespTopics.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ListInstanceTopicsRespTopics + { + + /// + /// topic名称。 + /// + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// 副本数,配置数据的可靠性。 + /// + [JsonProperty("replication", NullValueHandling = NullValueHandling.Ignore)] + public int? Replication { get; set; } + + /// + /// topic分区数,设置消费的并发数。 + /// + [JsonProperty("partition", NullValueHandling = NullValueHandling.Ignore)] + public int? Partition { get; set; } + + /// + /// 消息老化时间。 + /// + [JsonProperty("retention_time", NullValueHandling = NullValueHandling.Ignore)] + public int? RetentionTime { get; set; } + + /// + /// 是否开启同步复制,开启后,客户端生产消息时相应的也要设置acks=-1,否则不生效,默认关闭。 + /// + [JsonProperty("sync_replication", NullValueHandling = NullValueHandling.Ignore)] + public bool? SyncReplication { get; set; } + + /// + /// 是否使用同步落盘。默认值为false。同步落盘会导致性能降低。 + /// + [JsonProperty("sync_message_flush", NullValueHandling = NullValueHandling.Ignore)] + public bool? SyncMessageFlush { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListInstanceTopicsRespTopics {\n"); + sb.Append(" id: ").Append(Id).Append("\n"); + sb.Append(" replication: ").Append(Replication).Append("\n"); + sb.Append(" partition: ").Append(Partition).Append("\n"); + sb.Append(" retentionTime: ").Append(RetentionTime).Append("\n"); + sb.Append(" syncReplication: ").Append(SyncReplication).Append("\n"); + sb.Append(" syncMessageFlush: ").Append(SyncMessageFlush).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListInstanceTopicsRespTopics); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListInstanceTopicsRespTopics input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Replication == input.Replication || + (this.Replication != null && + this.Replication.Equals(input.Replication)) + ) && + ( + this.Partition == input.Partition || + (this.Partition != null && + this.Partition.Equals(input.Partition)) + ) && + ( + this.RetentionTime == input.RetentionTime || + (this.RetentionTime != null && + this.RetentionTime.Equals(input.RetentionTime)) + ) && + ( + this.SyncReplication == input.SyncReplication || + (this.SyncReplication != null && + this.SyncReplication.Equals(input.SyncReplication)) + ) && + ( + this.SyncMessageFlush == input.SyncMessageFlush || + (this.SyncMessageFlush != null && + this.SyncMessageFlush.Equals(input.SyncMessageFlush)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Replication != null) + hashCode = hashCode * 59 + this.Replication.GetHashCode(); + if (this.Partition != null) + hashCode = hashCode * 59 + this.Partition.GetHashCode(); + if (this.RetentionTime != null) + hashCode = hashCode * 59 + this.RetentionTime.GetHashCode(); + if (this.SyncReplication != null) + hashCode = hashCode * 59 + this.SyncReplication.GetHashCode(); + if (this.SyncMessageFlush != null) + hashCode = hashCode * 59 + this.SyncMessageFlush.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListInstanceTopicsResponse.cs b/Services/Kafka/V2/Model/ListInstanceTopicsResponse.cs new file mode 100644 index 000000000..dfb9dd252 --- /dev/null +++ b/Services/Kafka/V2/Model/ListInstanceTopicsResponse.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ListInstanceTopicsResponse : SdkResponse + { + + /// + /// topic总数。 + /// + [JsonProperty("count", NullValueHandling = NullValueHandling.Ignore)] + public int? Count { get; set; } + + /// + /// 分页查询的大小。 + /// + [JsonProperty("size", NullValueHandling = NullValueHandling.Ignore)] + public int? Size { get; set; } + + /// + /// Topic列表。 + /// + [JsonProperty("topics", NullValueHandling = NullValueHandling.Ignore)] + public List Topics { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListInstanceTopicsResponse {\n"); + sb.Append(" count: ").Append(Count).Append("\n"); + sb.Append(" size: ").Append(Size).Append("\n"); + sb.Append(" topics: ").Append(Topics).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListInstanceTopicsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListInstanceTopicsResponse input) + { + if (input == null) + return false; + + return + ( + this.Count == input.Count || + (this.Count != null && + this.Count.Equals(input.Count)) + ) && + ( + this.Size == input.Size || + (this.Size != null && + this.Size.Equals(input.Size)) + ) && + ( + this.Topics == input.Topics || + this.Topics != null && + input.Topics != null && + this.Topics.SequenceEqual(input.Topics) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Count != null) + hashCode = hashCode * 59 + this.Count.GetHashCode(); + if (this.Size != null) + hashCode = hashCode * 59 + this.Size.GetHashCode(); + if (this.Topics != null) + hashCode = hashCode * 59 + this.Topics.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListInstancesRequest.cs b/Services/Kafka/V2/Model/ListInstancesRequest.cs new file mode 100644 index 000000000..84493f7c0 --- /dev/null +++ b/Services/Kafka/V2/Model/ListInstancesRequest.cs @@ -0,0 +1,602 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ListInstancesRequest + { + /// + /// Defines engine + /// + [JsonConverter(typeof(EnumClassConverter))] + public class EngineEnum + { + /// + /// Enum KAFKA for value: kafka + /// + public static readonly EngineEnum KAFKA = new EngineEnum("kafka"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"kafka", KAFKA}, + }; + + private string Value; + + public EngineEnum(string Value) + { + this.Value = Value; + } + + public static EngineEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as EngineEnum)) + { + return true; + } + + return false; + } + + public bool Equals(EngineEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(EngineEnum a, EngineEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(EngineEnum a, EngineEnum b) + { + return !(a == b); + } + } + + /// + /// Defines status + /// + [JsonConverter(typeof(EnumClassConverter))] + public class StatusEnum + { + /// + /// Enum CREATING for value: CREATING + /// + public static readonly StatusEnum CREATING = new StatusEnum("CREATING"); + + /// + /// Enum RUNNING for value: RUNNING + /// + public static readonly StatusEnum RUNNING = new StatusEnum("RUNNING"); + + /// + /// Enum FAULTY for value: FAULTY + /// + public static readonly StatusEnum FAULTY = new StatusEnum("FAULTY"); + + /// + /// Enum RESTARTING for value: RESTARTING + /// + public static readonly StatusEnum RESTARTING = new StatusEnum("RESTARTING"); + + /// + /// Enum RESIZING for value: RESIZING + /// + public static readonly StatusEnum RESIZING = new StatusEnum("RESIZING"); + + /// + /// Enum RESIZING_FAILED for value: RESIZING FAILED + /// + public static readonly StatusEnum RESIZING_FAILED = new StatusEnum("RESIZING FAILED"); + + /// + /// Enum FROZEN for value: FROZEN + /// + public static readonly StatusEnum FROZEN = new StatusEnum("FROZEN"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"CREATING", CREATING}, + {"RUNNING", RUNNING}, + {"FAULTY", FAULTY}, + {"RESTARTING", RESTARTING}, + {"RESIZING", RESIZING}, + {"RESIZING FAILED", RESIZING_FAILED}, + {"FROZEN", FROZEN}, + }; + + private string Value; + + public StatusEnum(string Value) + { + this.Value = Value; + } + + public static StatusEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as StatusEnum)) + { + return true; + } + + return false; + } + + public bool Equals(StatusEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(StatusEnum a, StatusEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(StatusEnum a, StatusEnum b) + { + return !(a == b); + } + } + + /// + /// Defines includeFailure + /// + [JsonConverter(typeof(EnumClassConverter))] + public class IncludeFailureEnum + { + /// + /// Enum TRUE for value: true + /// + public static readonly IncludeFailureEnum TRUE = new IncludeFailureEnum("true"); + + /// + /// Enum FALSE for value: false + /// + public static readonly IncludeFailureEnum FALSE = new IncludeFailureEnum("false"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"true", TRUE}, + {"false", FALSE}, + }; + + private string Value; + + public IncludeFailureEnum(string Value) + { + this.Value = Value; + } + + public static IncludeFailureEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as IncludeFailureEnum)) + { + return true; + } + + return false; + } + + public bool Equals(IncludeFailureEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(IncludeFailureEnum a, IncludeFailureEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(IncludeFailureEnum a, IncludeFailureEnum b) + { + return !(a == b); + } + } + + /// + /// Defines exactMatchName + /// + [JsonConverter(typeof(EnumClassConverter))] + public class ExactMatchNameEnum + { + /// + /// Enum TRUE for value: true + /// + public static readonly ExactMatchNameEnum TRUE = new ExactMatchNameEnum("true"); + + /// + /// Enum FALSE for value: false + /// + public static readonly ExactMatchNameEnum FALSE = new ExactMatchNameEnum("false"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"true", TRUE}, + {"false", FALSE}, + }; + + private string Value; + + public ExactMatchNameEnum(string Value) + { + this.Value = Value; + } + + public static ExactMatchNameEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as ExactMatchNameEnum)) + { + return true; + } + + return false; + } + + public bool Equals(ExactMatchNameEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(ExactMatchNameEnum a, ExactMatchNameEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(ExactMatchNameEnum a, ExactMatchNameEnum b) + { + return !(a == b); + } + } + + + /// + /// + /// + [SDKProperty("engine", IsQuery = true)] + [JsonProperty("engine", NullValueHandling = NullValueHandling.Ignore)] + public EngineEnum Engine { get; set; } + /// + /// + /// + [SDKProperty("name", IsQuery = true)] + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// + /// + [SDKProperty("instance_id", IsQuery = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("status", IsQuery = true)] + [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] + public StatusEnum Status { get; set; } + /// + /// + /// + [SDKProperty("include_failure", IsQuery = true)] + [JsonProperty("include_failure", NullValueHandling = NullValueHandling.Ignore)] + public IncludeFailureEnum IncludeFailure { get; set; } + /// + /// + /// + [SDKProperty("exact_match_name", IsQuery = true)] + [JsonProperty("exact_match_name", NullValueHandling = NullValueHandling.Ignore)] + public ExactMatchNameEnum ExactMatchName { get; set; } + /// + /// + /// + [SDKProperty("enterprise_project_id", IsQuery = true)] + [JsonProperty("enterprise_project_id", NullValueHandling = NullValueHandling.Ignore)] + public string EnterpriseProjectId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListInstancesRequest {\n"); + sb.Append(" engine: ").Append(Engine).Append("\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" status: ").Append(Status).Append("\n"); + sb.Append(" includeFailure: ").Append(IncludeFailure).Append("\n"); + sb.Append(" exactMatchName: ").Append(ExactMatchName).Append("\n"); + sb.Append(" enterpriseProjectId: ").Append(EnterpriseProjectId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListInstancesRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListInstancesRequest input) + { + if (input == null) + return false; + + return + ( + this.Engine == input.Engine || + (this.Engine != null && + this.Engine.Equals(input.Engine)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.IncludeFailure == input.IncludeFailure || + (this.IncludeFailure != null && + this.IncludeFailure.Equals(input.IncludeFailure)) + ) && + ( + this.ExactMatchName == input.ExactMatchName || + (this.ExactMatchName != null && + this.ExactMatchName.Equals(input.ExactMatchName)) + ) && + ( + this.EnterpriseProjectId == input.EnterpriseProjectId || + (this.EnterpriseProjectId != null && + this.EnterpriseProjectId.Equals(input.EnterpriseProjectId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Engine != null) + hashCode = hashCode * 59 + this.Engine.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.IncludeFailure != null) + hashCode = hashCode * 59 + this.IncludeFailure.GetHashCode(); + if (this.ExactMatchName != null) + hashCode = hashCode * 59 + this.ExactMatchName.GetHashCode(); + if (this.EnterpriseProjectId != null) + hashCode = hashCode * 59 + this.EnterpriseProjectId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListInstancesRespInstances.cs b/Services/Kafka/V2/Model/ListInstancesRespInstances.cs new file mode 100644 index 000000000..9d3d80b4b --- /dev/null +++ b/Services/Kafka/V2/Model/ListInstancesRespInstances.cs @@ -0,0 +1,1111 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ListInstancesRespInstances + { + /// + /// 实例类型:集群,cluster。 + /// + /// 实例类型:集群,cluster。 + [JsonConverter(typeof(EnumClassConverter))] + public class TypeEnum + { + /// + /// Enum SINGLE for value: single + /// + public static readonly TypeEnum SINGLE = new TypeEnum("single"); + + /// + /// Enum CLUSTER for value: cluster + /// + public static readonly TypeEnum CLUSTER = new TypeEnum("cluster"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"single", SINGLE}, + {"cluster", CLUSTER}, + }; + + private string Value; + + public TypeEnum(string Value) + { + this.Value = Value; + } + + public static TypeEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as TypeEnum)) + { + return true; + } + + return false; + } + + public bool Equals(TypeEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(TypeEnum a, TypeEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(TypeEnum a, TypeEnum b) + { + return !(a == b); + } + } + + /// + /// 消息老化策略。 + /// + /// 消息老化策略。 + [JsonConverter(typeof(EnumClassConverter))] + public class RetentionPolicyEnum + { + /// + /// Enum TIME_BASE for value: time_base + /// + public static readonly RetentionPolicyEnum TIME_BASE = new RetentionPolicyEnum("time_base"); + + /// + /// Enum PRODUCE_REJECT for value: produce_reject + /// + public static readonly RetentionPolicyEnum PRODUCE_REJECT = new RetentionPolicyEnum("produce_reject"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"time_base", TIME_BASE}, + {"produce_reject", PRODUCE_REJECT}, + }; + + private string Value; + + public RetentionPolicyEnum(string Value) + { + this.Value = Value; + } + + public static RetentionPolicyEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as RetentionPolicyEnum)) + { + return true; + } + + return false; + } + + public bool Equals(RetentionPolicyEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(RetentionPolicyEnum a, RetentionPolicyEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(RetentionPolicyEnum a, RetentionPolicyEnum b) + { + return !(a == b); + } + } + + + /// + /// 实例名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 引擎。 + /// + [JsonProperty("engine", NullValueHandling = NullValueHandling.Ignore)] + public string Engine { get; set; } + + /// + /// 版本。 + /// + [JsonProperty("engine_version", NullValueHandling = NullValueHandling.Ignore)] + public string EngineVersion { get; set; } + + /// + /// 实例规格。 + /// + [JsonProperty("specification", NullValueHandling = NullValueHandling.Ignore)] + public string Specification { get; set; } + + /// + /// 消息存储空间,单位:GB。 + /// + [JsonProperty("storage_space", NullValueHandling = NullValueHandling.Ignore)] + public int? StorageSpace { get; set; } + + /// + /// Kafka实例的最大topic数。 + /// + [JsonProperty("partition_num", NullValueHandling = NullValueHandling.Ignore)] + public int? PartitionNum { get; set; } + + /// + /// 已使用的消息存储空间,单位:GB。 + /// + [JsonProperty("used_storage_space", NullValueHandling = NullValueHandling.Ignore)] + public int? UsedStorageSpace { get; set; } + + /// + /// 实例连接IP地址。 + /// + [JsonProperty("connect_address", NullValueHandling = NullValueHandling.Ignore)] + public string ConnectAddress { get; set; } + + /// + /// 实例连接端口。 + /// + [JsonProperty("port", NullValueHandling = NullValueHandling.Ignore)] + public int? Port { get; set; } + + /// + /// 实例的状态。详细状态说明见[实例状态说明](https://support.huaweicloud.com/api-kafka/kafka-api-180514012.html)。 + /// + [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] + public string Status { get; set; } + + /// + /// 实例ID。 + /// + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// 资源规格标识。 - dms.instance.kafka.cluster.c3.mini:Kafka实例的基准带宽为100MB。 - dms.instance.kafka.cluster.c3.small.2:Kafka实例的基准带宽为300MB。 - dms.instance.kafka.cluster.c3.middle.2:Kafka实例的基准带宽为600MB。 - dms.instance.kafka.cluster.c3.high.2:Kafka实例的基准带宽为1200MB。 + /// + [JsonProperty("resource_spec_code", NullValueHandling = NullValueHandling.Ignore)] + public string ResourceSpecCode { get; set; } + + /// + /// 付费模式,1表示按需计费,0表示包年/包月计费。 + /// + [JsonProperty("charging_mode", NullValueHandling = NullValueHandling.Ignore)] + public int? ChargingMode { get; set; } + + /// + /// VPC ID。 + /// + [JsonProperty("vpc_id", NullValueHandling = NullValueHandling.Ignore)] + public string VpcId { get; set; } + + /// + /// VPC的名称。 + /// + [JsonProperty("vpc_name", NullValueHandling = NullValueHandling.Ignore)] + public string VpcName { get; set; } + + /// + /// 完成创建时间。 格式为时间戳,指从格林威治时间 1970年01月01日00时00分00秒起至指定时间的偏差总毫秒数。 + /// + [JsonProperty("created_at", NullValueHandling = NullValueHandling.Ignore)] + public string CreatedAt { get; set; } + + /// + /// 用户ID。 + /// + [JsonProperty("user_id", NullValueHandling = NullValueHandling.Ignore)] + public string UserId { get; set; } + + /// + /// 用户名。 + /// + [JsonProperty("user_name", NullValueHandling = NullValueHandling.Ignore)] + public string UserName { get; set; } + + /// + /// 订单ID,只有在包周期计费时才会有order_id值,其他计费方式order_id值为空。 + /// + [JsonProperty("order_id", NullValueHandling = NullValueHandling.Ignore)] + public string OrderId { get; set; } + + /// + /// 维护时间窗开始时间,格式为HH:mm:ss。 + /// + [JsonProperty("maintain_begin", NullValueHandling = NullValueHandling.Ignore)] + public string MaintainBegin { get; set; } + + /// + /// 维护时间窗结束时间,格式为HH:mm:ss。 + /// + [JsonProperty("maintain_end", NullValueHandling = NullValueHandling.Ignore)] + public string MaintainEnd { get; set; } + + /// + /// 实例是否开启公网访问功能。 - true:开启 - false:未开启 + /// + [JsonProperty("enable_publicip", NullValueHandling = NullValueHandling.Ignore)] + public bool? EnablePublicip { get; set; } + + /// + /// Kafka实例的KafkaManager连接地址。 + /// + [JsonProperty("management_connect_address", NullValueHandling = NullValueHandling.Ignore)] + public string ManagementConnectAddress { get; set; } + + /// + /// 是否开启安全认证。 - true:开启 - false:未开启 + /// + [JsonProperty("ssl_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? SslEnable { get; set; } + + /// + /// 企业项目ID。 + /// + [JsonProperty("enterprise_project_id", NullValueHandling = NullValueHandling.Ignore)] + public string EnterpriseProjectId { get; set; } + + /// + /// 实例扩容时用于区分老实例与新实例。 - true:新创建的实例,允许磁盘动态扩容不需要重启。 - false:老实例 + /// + [JsonProperty("is_logical_volume", NullValueHandling = NullValueHandling.Ignore)] + public bool? IsLogicalVolume { get; set; } + + /// + /// 实例扩容磁盘次数,如果超过20次则无法扩容磁盘。 + /// + [JsonProperty("extend_times", NullValueHandling = NullValueHandling.Ignore)] + public int? ExtendTimes { get; set; } + + /// + /// 是否打开kafka自动创建topic功能。 - true:开启 - false:关闭 + /// + [JsonProperty("enable_auto_topic", NullValueHandling = NullValueHandling.Ignore)] + public bool? EnableAutoTopic { get; set; } + + /// + /// 实例类型:集群,cluster。 + /// + [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] + public TypeEnum Type { get; set; } + /// + /// 产品标识。 + /// + [JsonProperty("product_id", NullValueHandling = NullValueHandling.Ignore)] + public string ProductId { get; set; } + + /// + /// 安全组ID。 + /// + [JsonProperty("security_group_id", NullValueHandling = NullValueHandling.Ignore)] + public string SecurityGroupId { get; set; } + + /// + /// 租户安全组名称。 + /// + [JsonProperty("security_group_name", NullValueHandling = NullValueHandling.Ignore)] + public string SecurityGroupName { get; set; } + + /// + /// 子网ID。 + /// + [JsonProperty("subnet_id", NullValueHandling = NullValueHandling.Ignore)] + public string SubnetId { get; set; } + + /// + /// 实例节点所在的可用区,返回“可用区ID”。 + /// + [JsonProperty("available_zones", NullValueHandling = NullValueHandling.Ignore)] + public List AvailableZones { get; set; } + + /// + /// 总共消息存储空间,单位:GB。 + /// + [JsonProperty("total_storage_space", NullValueHandling = NullValueHandling.Ignore)] + public int? TotalStorageSpace { get; set; } + + /// + /// 实例公网连接IP地址。当实例开启了公网访问,实例才包含该参数。 + /// + [JsonProperty("public_connect_address", NullValueHandling = NullValueHandling.Ignore)] + public string PublicConnectAddress { get; set; } + + /// + /// 存储资源ID。 + /// + [JsonProperty("storage_resource_id", NullValueHandling = NullValueHandling.Ignore)] + public string StorageResourceId { get; set; } + + /// + /// IO规格。 + /// + [JsonProperty("storage_spec_code", NullValueHandling = NullValueHandling.Ignore)] + public string StorageSpecCode { get; set; } + + /// + /// 服务类型。 + /// + [JsonProperty("service_type", NullValueHandling = NullValueHandling.Ignore)] + public string ServiceType { get; set; } + + /// + /// 存储类型。 + /// + [JsonProperty("storage_type", NullValueHandling = NullValueHandling.Ignore)] + public string StorageType { get; set; } + + /// + /// 消息老化策略。 + /// + [JsonProperty("retention_policy", NullValueHandling = NullValueHandling.Ignore)] + public RetentionPolicyEnum RetentionPolicy { get; set; } + /// + /// Kafka公网开启状态。 + /// + [JsonProperty("kafka_public_status", NullValueHandling = NullValueHandling.Ignore)] + public string KafkaPublicStatus { get; set; } + + /// + /// 公网带宽。 + /// + [JsonProperty("public_bandwidth", NullValueHandling = NullValueHandling.Ignore)] + public int? PublicBandwidth { get; set; } + + /// + /// 登录Kafka Manager的用户名。 + /// + [JsonProperty("kafka_manager_user", NullValueHandling = NullValueHandling.Ignore)] + public string KafkaManagerUser { get; set; } + + /// + /// 是否开启消息收集功能。 + /// + [JsonProperty("enable_log_collection", NullValueHandling = NullValueHandling.Ignore)] + public bool? EnableLogCollection { get; set; } + + /// + /// 跨VPC访问信息。 + /// + [JsonProperty("cross_vpc_info", NullValueHandling = NullValueHandling.Ignore)] + public string CrossVpcInfo { get; set; } + + /// + /// 是否开启ipv6。 + /// + [JsonProperty("ipv6_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? Ipv6Enable { get; set; } + + /// + /// IPv6的连接地址。 + /// + [JsonProperty("ipv6_connect_addresses", NullValueHandling = NullValueHandling.Ignore)] + public List Ipv6ConnectAddresses { get; set; } + + /// + /// 是否开启转储。 + /// + [JsonProperty("connector_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? ConnectorEnable { get; set; } + + /// + /// 转储任务ID。 + /// + [JsonProperty("connector_id", NullValueHandling = NullValueHandling.Ignore)] + public string ConnectorId { get; set; } + + /// + /// 是否开启Kafka rest功能。 + /// + [JsonProperty("rest_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? RestEnable { get; set; } + + /// + /// Kafka rest地址。 + /// + [JsonProperty("rest_connect_address", NullValueHandling = NullValueHandling.Ignore)] + public string RestConnectAddress { get; set; } + + /// + /// 是否开启消息查询功能。 + /// + [JsonProperty("message_query_inst_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? MessageQueryInstEnable { get; set; } + + /// + /// 是否开启VPC明文访问。 + /// + [JsonProperty("vpc_client_plain", NullValueHandling = NullValueHandling.Ignore)] + public bool? VpcClientPlain { get; set; } + + /// + /// Kafka实例支持的特性功能。 + /// + [JsonProperty("support_features", NullValueHandling = NullValueHandling.Ignore)] + public string SupportFeatures { get; set; } + + /// + /// 是否开启消息轨迹功能。 + /// + [JsonProperty("trace_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? TraceEnable { get; set; } + + /// + /// 租户侧连接地址。 + /// + [JsonProperty("pod_connect_address", NullValueHandling = NullValueHandling.Ignore)] + public string PodConnectAddress { get; set; } + + /// + /// 是否开启磁盘加密。 + /// + [JsonProperty("disk_encrypted", NullValueHandling = NullValueHandling.Ignore)] + public bool? DiskEncrypted { get; set; } + + /// + /// Kafka实例私有连接地址。 + /// + [JsonProperty("kafka_private_connect_address", NullValueHandling = NullValueHandling.Ignore)] + public string KafkaPrivateConnectAddress { get; set; } + + /// + /// 云监控版本。 + /// + [JsonProperty("ces_version", NullValueHandling = NullValueHandling.Ignore)] + public string CesVersion { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListInstancesRespInstances {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" engine: ").Append(Engine).Append("\n"); + sb.Append(" engineVersion: ").Append(EngineVersion).Append("\n"); + sb.Append(" specification: ").Append(Specification).Append("\n"); + sb.Append(" storageSpace: ").Append(StorageSpace).Append("\n"); + sb.Append(" partitionNum: ").Append(PartitionNum).Append("\n"); + sb.Append(" usedStorageSpace: ").Append(UsedStorageSpace).Append("\n"); + sb.Append(" connectAddress: ").Append(ConnectAddress).Append("\n"); + sb.Append(" port: ").Append(Port).Append("\n"); + sb.Append(" status: ").Append(Status).Append("\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" resourceSpecCode: ").Append(ResourceSpecCode).Append("\n"); + sb.Append(" chargingMode: ").Append(ChargingMode).Append("\n"); + sb.Append(" vpcId: ").Append(VpcId).Append("\n"); + sb.Append(" vpcName: ").Append(VpcName).Append("\n"); + sb.Append(" createdAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" userId: ").Append(UserId).Append("\n"); + sb.Append(" userName: ").Append(UserName).Append("\n"); + sb.Append(" orderId: ").Append(OrderId).Append("\n"); + sb.Append(" maintainBegin: ").Append(MaintainBegin).Append("\n"); + sb.Append(" maintainEnd: ").Append(MaintainEnd).Append("\n"); + sb.Append(" enablePublicip: ").Append(EnablePublicip).Append("\n"); + sb.Append(" managementConnectAddress: ").Append(ManagementConnectAddress).Append("\n"); + sb.Append(" sslEnable: ").Append(SslEnable).Append("\n"); + sb.Append(" enterpriseProjectId: ").Append(EnterpriseProjectId).Append("\n"); + sb.Append(" isLogicalVolume: ").Append(IsLogicalVolume).Append("\n"); + sb.Append(" extendTimes: ").Append(ExtendTimes).Append("\n"); + sb.Append(" enableAutoTopic: ").Append(EnableAutoTopic).Append("\n"); + sb.Append(" type: ").Append(Type).Append("\n"); + sb.Append(" productId: ").Append(ProductId).Append("\n"); + sb.Append(" securityGroupId: ").Append(SecurityGroupId).Append("\n"); + sb.Append(" securityGroupName: ").Append(SecurityGroupName).Append("\n"); + sb.Append(" subnetId: ").Append(SubnetId).Append("\n"); + sb.Append(" availableZones: ").Append(AvailableZones).Append("\n"); + sb.Append(" totalStorageSpace: ").Append(TotalStorageSpace).Append("\n"); + sb.Append(" publicConnectAddress: ").Append(PublicConnectAddress).Append("\n"); + sb.Append(" storageResourceId: ").Append(StorageResourceId).Append("\n"); + sb.Append(" storageSpecCode: ").Append(StorageSpecCode).Append("\n"); + sb.Append(" serviceType: ").Append(ServiceType).Append("\n"); + sb.Append(" storageType: ").Append(StorageType).Append("\n"); + sb.Append(" retentionPolicy: ").Append(RetentionPolicy).Append("\n"); + sb.Append(" kafkaPublicStatus: ").Append(KafkaPublicStatus).Append("\n"); + sb.Append(" publicBandwidth: ").Append(PublicBandwidth).Append("\n"); + sb.Append(" kafkaManagerUser: ").Append(KafkaManagerUser).Append("\n"); + sb.Append(" enableLogCollection: ").Append(EnableLogCollection).Append("\n"); + sb.Append(" crossVpcInfo: ").Append(CrossVpcInfo).Append("\n"); + sb.Append(" ipv6Enable: ").Append(Ipv6Enable).Append("\n"); + sb.Append(" ipv6ConnectAddresses: ").Append(Ipv6ConnectAddresses).Append("\n"); + sb.Append(" connectorEnable: ").Append(ConnectorEnable).Append("\n"); + sb.Append(" connectorId: ").Append(ConnectorId).Append("\n"); + sb.Append(" restEnable: ").Append(RestEnable).Append("\n"); + sb.Append(" restConnectAddress: ").Append(RestConnectAddress).Append("\n"); + sb.Append(" messageQueryInstEnable: ").Append(MessageQueryInstEnable).Append("\n"); + sb.Append(" vpcClientPlain: ").Append(VpcClientPlain).Append("\n"); + sb.Append(" supportFeatures: ").Append(SupportFeatures).Append("\n"); + sb.Append(" traceEnable: ").Append(TraceEnable).Append("\n"); + sb.Append(" podConnectAddress: ").Append(PodConnectAddress).Append("\n"); + sb.Append(" diskEncrypted: ").Append(DiskEncrypted).Append("\n"); + sb.Append(" kafkaPrivateConnectAddress: ").Append(KafkaPrivateConnectAddress).Append("\n"); + sb.Append(" cesVersion: ").Append(CesVersion).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListInstancesRespInstances); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListInstancesRespInstances input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Engine == input.Engine || + (this.Engine != null && + this.Engine.Equals(input.Engine)) + ) && + ( + this.EngineVersion == input.EngineVersion || + (this.EngineVersion != null && + this.EngineVersion.Equals(input.EngineVersion)) + ) && + ( + this.Specification == input.Specification || + (this.Specification != null && + this.Specification.Equals(input.Specification)) + ) && + ( + this.StorageSpace == input.StorageSpace || + (this.StorageSpace != null && + this.StorageSpace.Equals(input.StorageSpace)) + ) && + ( + this.PartitionNum == input.PartitionNum || + (this.PartitionNum != null && + this.PartitionNum.Equals(input.PartitionNum)) + ) && + ( + this.UsedStorageSpace == input.UsedStorageSpace || + (this.UsedStorageSpace != null && + this.UsedStorageSpace.Equals(input.UsedStorageSpace)) + ) && + ( + this.ConnectAddress == input.ConnectAddress || + (this.ConnectAddress != null && + this.ConnectAddress.Equals(input.ConnectAddress)) + ) && + ( + this.Port == input.Port || + (this.Port != null && + this.Port.Equals(input.Port)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.ResourceSpecCode == input.ResourceSpecCode || + (this.ResourceSpecCode != null && + this.ResourceSpecCode.Equals(input.ResourceSpecCode)) + ) && + ( + this.ChargingMode == input.ChargingMode || + (this.ChargingMode != null && + this.ChargingMode.Equals(input.ChargingMode)) + ) && + ( + this.VpcId == input.VpcId || + (this.VpcId != null && + this.VpcId.Equals(input.VpcId)) + ) && + ( + this.VpcName == input.VpcName || + (this.VpcName != null && + this.VpcName.Equals(input.VpcName)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.UserName == input.UserName || + (this.UserName != null && + this.UserName.Equals(input.UserName)) + ) && + ( + this.OrderId == input.OrderId || + (this.OrderId != null && + this.OrderId.Equals(input.OrderId)) + ) && + ( + this.MaintainBegin == input.MaintainBegin || + (this.MaintainBegin != null && + this.MaintainBegin.Equals(input.MaintainBegin)) + ) && + ( + this.MaintainEnd == input.MaintainEnd || + (this.MaintainEnd != null && + this.MaintainEnd.Equals(input.MaintainEnd)) + ) && + ( + this.EnablePublicip == input.EnablePublicip || + (this.EnablePublicip != null && + this.EnablePublicip.Equals(input.EnablePublicip)) + ) && + ( + this.ManagementConnectAddress == input.ManagementConnectAddress || + (this.ManagementConnectAddress != null && + this.ManagementConnectAddress.Equals(input.ManagementConnectAddress)) + ) && + ( + this.SslEnable == input.SslEnable || + (this.SslEnable != null && + this.SslEnable.Equals(input.SslEnable)) + ) && + ( + this.EnterpriseProjectId == input.EnterpriseProjectId || + (this.EnterpriseProjectId != null && + this.EnterpriseProjectId.Equals(input.EnterpriseProjectId)) + ) && + ( + this.IsLogicalVolume == input.IsLogicalVolume || + (this.IsLogicalVolume != null && + this.IsLogicalVolume.Equals(input.IsLogicalVolume)) + ) && + ( + this.ExtendTimes == input.ExtendTimes || + (this.ExtendTimes != null && + this.ExtendTimes.Equals(input.ExtendTimes)) + ) && + ( + this.EnableAutoTopic == input.EnableAutoTopic || + (this.EnableAutoTopic != null && + this.EnableAutoTopic.Equals(input.EnableAutoTopic)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.ProductId == input.ProductId || + (this.ProductId != null && + this.ProductId.Equals(input.ProductId)) + ) && + ( + this.SecurityGroupId == input.SecurityGroupId || + (this.SecurityGroupId != null && + this.SecurityGroupId.Equals(input.SecurityGroupId)) + ) && + ( + this.SecurityGroupName == input.SecurityGroupName || + (this.SecurityGroupName != null && + this.SecurityGroupName.Equals(input.SecurityGroupName)) + ) && + ( + this.SubnetId == input.SubnetId || + (this.SubnetId != null && + this.SubnetId.Equals(input.SubnetId)) + ) && + ( + this.AvailableZones == input.AvailableZones || + this.AvailableZones != null && + input.AvailableZones != null && + this.AvailableZones.SequenceEqual(input.AvailableZones) + ) && + ( + this.TotalStorageSpace == input.TotalStorageSpace || + (this.TotalStorageSpace != null && + this.TotalStorageSpace.Equals(input.TotalStorageSpace)) + ) && + ( + this.PublicConnectAddress == input.PublicConnectAddress || + (this.PublicConnectAddress != null && + this.PublicConnectAddress.Equals(input.PublicConnectAddress)) + ) && + ( + this.StorageResourceId == input.StorageResourceId || + (this.StorageResourceId != null && + this.StorageResourceId.Equals(input.StorageResourceId)) + ) && + ( + this.StorageSpecCode == input.StorageSpecCode || + (this.StorageSpecCode != null && + this.StorageSpecCode.Equals(input.StorageSpecCode)) + ) && + ( + this.ServiceType == input.ServiceType || + (this.ServiceType != null && + this.ServiceType.Equals(input.ServiceType)) + ) && + ( + this.StorageType == input.StorageType || + (this.StorageType != null && + this.StorageType.Equals(input.StorageType)) + ) && + ( + this.RetentionPolicy == input.RetentionPolicy || + (this.RetentionPolicy != null && + this.RetentionPolicy.Equals(input.RetentionPolicy)) + ) && + ( + this.KafkaPublicStatus == input.KafkaPublicStatus || + (this.KafkaPublicStatus != null && + this.KafkaPublicStatus.Equals(input.KafkaPublicStatus)) + ) && + ( + this.PublicBandwidth == input.PublicBandwidth || + (this.PublicBandwidth != null && + this.PublicBandwidth.Equals(input.PublicBandwidth)) + ) && + ( + this.KafkaManagerUser == input.KafkaManagerUser || + (this.KafkaManagerUser != null && + this.KafkaManagerUser.Equals(input.KafkaManagerUser)) + ) && + ( + this.EnableLogCollection == input.EnableLogCollection || + (this.EnableLogCollection != null && + this.EnableLogCollection.Equals(input.EnableLogCollection)) + ) && + ( + this.CrossVpcInfo == input.CrossVpcInfo || + (this.CrossVpcInfo != null && + this.CrossVpcInfo.Equals(input.CrossVpcInfo)) + ) && + ( + this.Ipv6Enable == input.Ipv6Enable || + (this.Ipv6Enable != null && + this.Ipv6Enable.Equals(input.Ipv6Enable)) + ) && + ( + this.Ipv6ConnectAddresses == input.Ipv6ConnectAddresses || + this.Ipv6ConnectAddresses != null && + input.Ipv6ConnectAddresses != null && + this.Ipv6ConnectAddresses.SequenceEqual(input.Ipv6ConnectAddresses) + ) && + ( + this.ConnectorEnable == input.ConnectorEnable || + (this.ConnectorEnable != null && + this.ConnectorEnable.Equals(input.ConnectorEnable)) + ) && + ( + this.ConnectorId == input.ConnectorId || + (this.ConnectorId != null && + this.ConnectorId.Equals(input.ConnectorId)) + ) && + ( + this.RestEnable == input.RestEnable || + (this.RestEnable != null && + this.RestEnable.Equals(input.RestEnable)) + ) && + ( + this.RestConnectAddress == input.RestConnectAddress || + (this.RestConnectAddress != null && + this.RestConnectAddress.Equals(input.RestConnectAddress)) + ) && + ( + this.MessageQueryInstEnable == input.MessageQueryInstEnable || + (this.MessageQueryInstEnable != null && + this.MessageQueryInstEnable.Equals(input.MessageQueryInstEnable)) + ) && + ( + this.VpcClientPlain == input.VpcClientPlain || + (this.VpcClientPlain != null && + this.VpcClientPlain.Equals(input.VpcClientPlain)) + ) && + ( + this.SupportFeatures == input.SupportFeatures || + (this.SupportFeatures != null && + this.SupportFeatures.Equals(input.SupportFeatures)) + ) && + ( + this.TraceEnable == input.TraceEnable || + (this.TraceEnable != null && + this.TraceEnable.Equals(input.TraceEnable)) + ) && + ( + this.PodConnectAddress == input.PodConnectAddress || + (this.PodConnectAddress != null && + this.PodConnectAddress.Equals(input.PodConnectAddress)) + ) && + ( + this.DiskEncrypted == input.DiskEncrypted || + (this.DiskEncrypted != null && + this.DiskEncrypted.Equals(input.DiskEncrypted)) + ) && + ( + this.KafkaPrivateConnectAddress == input.KafkaPrivateConnectAddress || + (this.KafkaPrivateConnectAddress != null && + this.KafkaPrivateConnectAddress.Equals(input.KafkaPrivateConnectAddress)) + ) && + ( + this.CesVersion == input.CesVersion || + (this.CesVersion != null && + this.CesVersion.Equals(input.CesVersion)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Engine != null) + hashCode = hashCode * 59 + this.Engine.GetHashCode(); + if (this.EngineVersion != null) + hashCode = hashCode * 59 + this.EngineVersion.GetHashCode(); + if (this.Specification != null) + hashCode = hashCode * 59 + this.Specification.GetHashCode(); + if (this.StorageSpace != null) + hashCode = hashCode * 59 + this.StorageSpace.GetHashCode(); + if (this.PartitionNum != null) + hashCode = hashCode * 59 + this.PartitionNum.GetHashCode(); + if (this.UsedStorageSpace != null) + hashCode = hashCode * 59 + this.UsedStorageSpace.GetHashCode(); + if (this.ConnectAddress != null) + hashCode = hashCode * 59 + this.ConnectAddress.GetHashCode(); + if (this.Port != null) + hashCode = hashCode * 59 + this.Port.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.ResourceSpecCode != null) + hashCode = hashCode * 59 + this.ResourceSpecCode.GetHashCode(); + if (this.ChargingMode != null) + hashCode = hashCode * 59 + this.ChargingMode.GetHashCode(); + if (this.VpcId != null) + hashCode = hashCode * 59 + this.VpcId.GetHashCode(); + if (this.VpcName != null) + hashCode = hashCode * 59 + this.VpcName.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.UserId != null) + hashCode = hashCode * 59 + this.UserId.GetHashCode(); + if (this.UserName != null) + hashCode = hashCode * 59 + this.UserName.GetHashCode(); + if (this.OrderId != null) + hashCode = hashCode * 59 + this.OrderId.GetHashCode(); + if (this.MaintainBegin != null) + hashCode = hashCode * 59 + this.MaintainBegin.GetHashCode(); + if (this.MaintainEnd != null) + hashCode = hashCode * 59 + this.MaintainEnd.GetHashCode(); + if (this.EnablePublicip != null) + hashCode = hashCode * 59 + this.EnablePublicip.GetHashCode(); + if (this.ManagementConnectAddress != null) + hashCode = hashCode * 59 + this.ManagementConnectAddress.GetHashCode(); + if (this.SslEnable != null) + hashCode = hashCode * 59 + this.SslEnable.GetHashCode(); + if (this.EnterpriseProjectId != null) + hashCode = hashCode * 59 + this.EnterpriseProjectId.GetHashCode(); + if (this.IsLogicalVolume != null) + hashCode = hashCode * 59 + this.IsLogicalVolume.GetHashCode(); + if (this.ExtendTimes != null) + hashCode = hashCode * 59 + this.ExtendTimes.GetHashCode(); + if (this.EnableAutoTopic != null) + hashCode = hashCode * 59 + this.EnableAutoTopic.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.ProductId != null) + hashCode = hashCode * 59 + this.ProductId.GetHashCode(); + if (this.SecurityGroupId != null) + hashCode = hashCode * 59 + this.SecurityGroupId.GetHashCode(); + if (this.SecurityGroupName != null) + hashCode = hashCode * 59 + this.SecurityGroupName.GetHashCode(); + if (this.SubnetId != null) + hashCode = hashCode * 59 + this.SubnetId.GetHashCode(); + if (this.AvailableZones != null) + hashCode = hashCode * 59 + this.AvailableZones.GetHashCode(); + if (this.TotalStorageSpace != null) + hashCode = hashCode * 59 + this.TotalStorageSpace.GetHashCode(); + if (this.PublicConnectAddress != null) + hashCode = hashCode * 59 + this.PublicConnectAddress.GetHashCode(); + if (this.StorageResourceId != null) + hashCode = hashCode * 59 + this.StorageResourceId.GetHashCode(); + if (this.StorageSpecCode != null) + hashCode = hashCode * 59 + this.StorageSpecCode.GetHashCode(); + if (this.ServiceType != null) + hashCode = hashCode * 59 + this.ServiceType.GetHashCode(); + if (this.StorageType != null) + hashCode = hashCode * 59 + this.StorageType.GetHashCode(); + if (this.RetentionPolicy != null) + hashCode = hashCode * 59 + this.RetentionPolicy.GetHashCode(); + if (this.KafkaPublicStatus != null) + hashCode = hashCode * 59 + this.KafkaPublicStatus.GetHashCode(); + if (this.PublicBandwidth != null) + hashCode = hashCode * 59 + this.PublicBandwidth.GetHashCode(); + if (this.KafkaManagerUser != null) + hashCode = hashCode * 59 + this.KafkaManagerUser.GetHashCode(); + if (this.EnableLogCollection != null) + hashCode = hashCode * 59 + this.EnableLogCollection.GetHashCode(); + if (this.CrossVpcInfo != null) + hashCode = hashCode * 59 + this.CrossVpcInfo.GetHashCode(); + if (this.Ipv6Enable != null) + hashCode = hashCode * 59 + this.Ipv6Enable.GetHashCode(); + if (this.Ipv6ConnectAddresses != null) + hashCode = hashCode * 59 + this.Ipv6ConnectAddresses.GetHashCode(); + if (this.ConnectorEnable != null) + hashCode = hashCode * 59 + this.ConnectorEnable.GetHashCode(); + if (this.ConnectorId != null) + hashCode = hashCode * 59 + this.ConnectorId.GetHashCode(); + if (this.RestEnable != null) + hashCode = hashCode * 59 + this.RestEnable.GetHashCode(); + if (this.RestConnectAddress != null) + hashCode = hashCode * 59 + this.RestConnectAddress.GetHashCode(); + if (this.MessageQueryInstEnable != null) + hashCode = hashCode * 59 + this.MessageQueryInstEnable.GetHashCode(); + if (this.VpcClientPlain != null) + hashCode = hashCode * 59 + this.VpcClientPlain.GetHashCode(); + if (this.SupportFeatures != null) + hashCode = hashCode * 59 + this.SupportFeatures.GetHashCode(); + if (this.TraceEnable != null) + hashCode = hashCode * 59 + this.TraceEnable.GetHashCode(); + if (this.PodConnectAddress != null) + hashCode = hashCode * 59 + this.PodConnectAddress.GetHashCode(); + if (this.DiskEncrypted != null) + hashCode = hashCode * 59 + this.DiskEncrypted.GetHashCode(); + if (this.KafkaPrivateConnectAddress != null) + hashCode = hashCode * 59 + this.KafkaPrivateConnectAddress.GetHashCode(); + if (this.CesVersion != null) + hashCode = hashCode * 59 + this.CesVersion.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListInstancesResponse.cs b/Services/Kafka/V2/Model/ListInstancesResponse.cs new file mode 100644 index 000000000..3e9f86fe0 --- /dev/null +++ b/Services/Kafka/V2/Model/ListInstancesResponse.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ListInstancesResponse : SdkResponse + { + + /// + /// 实例列表 + /// + [JsonProperty("instances", NullValueHandling = NullValueHandling.Ignore)] + public List Instances { get; set; } + + /// + /// 实例数量。 + /// + [JsonProperty("instance_num", NullValueHandling = NullValueHandling.Ignore)] + public int? InstanceNum { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListInstancesResponse {\n"); + sb.Append(" instances: ").Append(Instances).Append("\n"); + sb.Append(" instanceNum: ").Append(InstanceNum).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListInstancesResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListInstancesResponse input) + { + if (input == null) + return false; + + return + ( + this.Instances == input.Instances || + this.Instances != null && + input.Instances != null && + this.Instances.SequenceEqual(input.Instances) + ) && + ( + this.InstanceNum == input.InstanceNum || + (this.InstanceNum != null && + this.InstanceNum.Equals(input.InstanceNum)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Instances != null) + hashCode = hashCode * 59 + this.Instances.GetHashCode(); + if (this.InstanceNum != null) + hashCode = hashCode * 59 + this.InstanceNum.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListProductsRequest.cs b/Services/Kafka/V2/Model/ListProductsRequest.cs new file mode 100644 index 000000000..70c44d049 --- /dev/null +++ b/Services/Kafka/V2/Model/ListProductsRequest.cs @@ -0,0 +1,173 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ListProductsRequest + { + /// + /// Defines engine + /// + [JsonConverter(typeof(EnumClassConverter))] + public class EngineEnum + { + /// + /// Enum KAFKA for value: kafka + /// + public static readonly EngineEnum KAFKA = new EngineEnum("kafka"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"kafka", KAFKA}, + }; + + private string Value; + + public EngineEnum(string Value) + { + this.Value = Value; + } + + public static EngineEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as EngineEnum)) + { + return true; + } + + return false; + } + + public bool Equals(EngineEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(EngineEnum a, EngineEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(EngineEnum a, EngineEnum b) + { + return !(a == b); + } + } + + + /// + /// + /// + [SDKProperty("engine", IsQuery = true)] + [JsonProperty("engine", NullValueHandling = NullValueHandling.Ignore)] + public EngineEnum Engine { get; set; } + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListProductsRequest {\n"); + sb.Append(" engine: ").Append(Engine).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListProductsRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListProductsRequest input) + { + if (input == null) + return false; + + return + ( + this.Engine == input.Engine || + (this.Engine != null && + this.Engine.Equals(input.Engine)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Engine != null) + hashCode = hashCode * 59 + this.Engine.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListProductsRespDetail.cs b/Services/Kafka/V2/Model/ListProductsRespDetail.cs new file mode 100644 index 000000000..6d279cf26 --- /dev/null +++ b/Services/Kafka/V2/Model/ListProductsRespDetail.cs @@ -0,0 +1,218 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ListProductsRespDetail + { + + /// + /// 单位时间内的消息量最大值。 + /// + [JsonProperty("tps", NullValueHandling = NullValueHandling.Ignore)] + public string Tps { get; set; } + + /// + /// 消息存储空间。 + /// + [JsonProperty("storage", NullValueHandling = NullValueHandling.Ignore)] + public string Storage { get; set; } + + /// + /// Kafka实例的最大Topic数。 + /// + [JsonProperty("partition_num", NullValueHandling = NullValueHandling.Ignore)] + public string PartitionNum { get; set; } + + /// + /// 产品ID。 + /// + [JsonProperty("product_id", NullValueHandling = NullValueHandling.Ignore)] + public string ProductId { get; set; } + + /// + /// 规格ID。 + /// + [JsonProperty("spec_code", NullValueHandling = NullValueHandling.Ignore)] + public string SpecCode { get; set; } + + /// + /// IO信息。 + /// + [JsonProperty("io", NullValueHandling = NullValueHandling.Ignore)] + public List Io { get; set; } + + /// + /// Kafka实例的基准带宽。 + /// + [JsonProperty("bandwidth", NullValueHandling = NullValueHandling.Ignore)] + public string Bandwidth { get; set; } + + /// + /// 资源售罄的可用区列表。 + /// + [JsonProperty("unavailable_zones", NullValueHandling = NullValueHandling.Ignore)] + public List UnavailableZones { get; set; } + + /// + /// 有可用资源的可用区列表。 + /// + [JsonProperty("available_zones", NullValueHandling = NullValueHandling.Ignore)] + public List AvailableZones { get; set; } + + /// + /// 该产品规格对应的虚拟机规格。 + /// + [JsonProperty("ecs_flavor_id", NullValueHandling = NullValueHandling.Ignore)] + public string EcsFlavorId { get; set; } + + /// + /// 实例规格架构类型。当前仅支持X86。 + /// + [JsonProperty("arch_type", NullValueHandling = NullValueHandling.Ignore)] + public string ArchType { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListProductsRespDetail {\n"); + sb.Append(" tps: ").Append(Tps).Append("\n"); + sb.Append(" storage: ").Append(Storage).Append("\n"); + sb.Append(" partitionNum: ").Append(PartitionNum).Append("\n"); + sb.Append(" productId: ").Append(ProductId).Append("\n"); + sb.Append(" specCode: ").Append(SpecCode).Append("\n"); + sb.Append(" io: ").Append(Io).Append("\n"); + sb.Append(" bandwidth: ").Append(Bandwidth).Append("\n"); + sb.Append(" unavailableZones: ").Append(UnavailableZones).Append("\n"); + sb.Append(" availableZones: ").Append(AvailableZones).Append("\n"); + sb.Append(" ecsFlavorId: ").Append(EcsFlavorId).Append("\n"); + sb.Append(" archType: ").Append(ArchType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListProductsRespDetail); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListProductsRespDetail input) + { + if (input == null) + return false; + + return + ( + this.Tps == input.Tps || + (this.Tps != null && + this.Tps.Equals(input.Tps)) + ) && + ( + this.Storage == input.Storage || + (this.Storage != null && + this.Storage.Equals(input.Storage)) + ) && + ( + this.PartitionNum == input.PartitionNum || + (this.PartitionNum != null && + this.PartitionNum.Equals(input.PartitionNum)) + ) && + ( + this.ProductId == input.ProductId || + (this.ProductId != null && + this.ProductId.Equals(input.ProductId)) + ) && + ( + this.SpecCode == input.SpecCode || + (this.SpecCode != null && + this.SpecCode.Equals(input.SpecCode)) + ) && + ( + this.Io == input.Io || + this.Io != null && + input.Io != null && + this.Io.SequenceEqual(input.Io) + ) && + ( + this.Bandwidth == input.Bandwidth || + (this.Bandwidth != null && + this.Bandwidth.Equals(input.Bandwidth)) + ) && + ( + this.UnavailableZones == input.UnavailableZones || + this.UnavailableZones != null && + input.UnavailableZones != null && + this.UnavailableZones.SequenceEqual(input.UnavailableZones) + ) && + ( + this.AvailableZones == input.AvailableZones || + this.AvailableZones != null && + input.AvailableZones != null && + this.AvailableZones.SequenceEqual(input.AvailableZones) + ) && + ( + this.EcsFlavorId == input.EcsFlavorId || + (this.EcsFlavorId != null && + this.EcsFlavorId.Equals(input.EcsFlavorId)) + ) && + ( + this.ArchType == input.ArchType || + (this.ArchType != null && + this.ArchType.Equals(input.ArchType)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Tps != null) + hashCode = hashCode * 59 + this.Tps.GetHashCode(); + if (this.Storage != null) + hashCode = hashCode * 59 + this.Storage.GetHashCode(); + if (this.PartitionNum != null) + hashCode = hashCode * 59 + this.PartitionNum.GetHashCode(); + if (this.ProductId != null) + hashCode = hashCode * 59 + this.ProductId.GetHashCode(); + if (this.SpecCode != null) + hashCode = hashCode * 59 + this.SpecCode.GetHashCode(); + if (this.Io != null) + hashCode = hashCode * 59 + this.Io.GetHashCode(); + if (this.Bandwidth != null) + hashCode = hashCode * 59 + this.Bandwidth.GetHashCode(); + if (this.UnavailableZones != null) + hashCode = hashCode * 59 + this.UnavailableZones.GetHashCode(); + if (this.AvailableZones != null) + hashCode = hashCode * 59 + this.AvailableZones.GetHashCode(); + if (this.EcsFlavorId != null) + hashCode = hashCode * 59 + this.EcsFlavorId.GetHashCode(); + if (this.ArchType != null) + hashCode = hashCode * 59 + this.ArchType.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListProductsRespHourly.cs b/Services/Kafka/V2/Model/ListProductsRespHourly.cs new file mode 100644 index 000000000..daaf3f498 --- /dev/null +++ b/Services/Kafka/V2/Model/ListProductsRespHourly.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ListProductsRespHourly + { + + /// + /// 消息引擎的名称,该字段显示为kafka。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 消息引擎的版本,当前仅支持1.1.0。 + /// + [JsonProperty("version", NullValueHandling = NullValueHandling.Ignore)] + public string Version { get; set; } + + /// + /// 产品规格列表。 + /// + [JsonProperty("values", NullValueHandling = NullValueHandling.Ignore)] + public List Values { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListProductsRespHourly {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" version: ").Append(Version).Append("\n"); + sb.Append(" values: ").Append(Values).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListProductsRespHourly); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListProductsRespHourly input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Version == input.Version || + (this.Version != null && + this.Version.Equals(input.Version)) + ) && + ( + this.Values == input.Values || + this.Values != null && + input.Values != null && + this.Values.SequenceEqual(input.Values) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Version != null) + hashCode = hashCode * 59 + this.Version.GetHashCode(); + if (this.Values != null) + hashCode = hashCode * 59 + this.Values.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListProductsRespIo.cs b/Services/Kafka/V2/Model/ListProductsRespIo.cs new file mode 100644 index 000000000..5dc3f184c --- /dev/null +++ b/Services/Kafka/V2/Model/ListProductsRespIo.cs @@ -0,0 +1,133 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ListProductsRespIo + { + + /// + /// IO类型。 + /// + [JsonProperty("io_type", NullValueHandling = NullValueHandling.Ignore)] + public string IoType { get; set; } + + /// + /// IO规格。 + /// + [JsonProperty("storage_spec_code", NullValueHandling = NullValueHandling.Ignore)] + public string StorageSpecCode { get; set; } + + /// + /// IO未售罄的可用区列表。 + /// + [JsonProperty("available_zones", NullValueHandling = NullValueHandling.Ignore)] + public List AvailableZones { get; set; } + + /// + /// IO已售罄的不可用区列表。 + /// + [JsonProperty("unavailable_zones", NullValueHandling = NullValueHandling.Ignore)] + public List UnavailableZones { get; set; } + + /// + /// 磁盘类型。 + /// + [JsonProperty("volume_type", NullValueHandling = NullValueHandling.Ignore)] + public string VolumeType { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListProductsRespIo {\n"); + sb.Append(" ioType: ").Append(IoType).Append("\n"); + sb.Append(" storageSpecCode: ").Append(StorageSpecCode).Append("\n"); + sb.Append(" availableZones: ").Append(AvailableZones).Append("\n"); + sb.Append(" unavailableZones: ").Append(UnavailableZones).Append("\n"); + sb.Append(" volumeType: ").Append(VolumeType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListProductsRespIo); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListProductsRespIo input) + { + if (input == null) + return false; + + return + ( + this.IoType == input.IoType || + (this.IoType != null && + this.IoType.Equals(input.IoType)) + ) && + ( + this.StorageSpecCode == input.StorageSpecCode || + (this.StorageSpecCode != null && + this.StorageSpecCode.Equals(input.StorageSpecCode)) + ) && + ( + this.AvailableZones == input.AvailableZones || + this.AvailableZones != null && + input.AvailableZones != null && + this.AvailableZones.SequenceEqual(input.AvailableZones) + ) && + ( + this.UnavailableZones == input.UnavailableZones || + this.UnavailableZones != null && + input.UnavailableZones != null && + this.UnavailableZones.SequenceEqual(input.UnavailableZones) + ) && + ( + this.VolumeType == input.VolumeType || + (this.VolumeType != null && + this.VolumeType.Equals(input.VolumeType)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.IoType != null) + hashCode = hashCode * 59 + this.IoType.GetHashCode(); + if (this.StorageSpecCode != null) + hashCode = hashCode * 59 + this.StorageSpecCode.GetHashCode(); + if (this.AvailableZones != null) + hashCode = hashCode * 59 + this.AvailableZones.GetHashCode(); + if (this.UnavailableZones != null) + hashCode = hashCode * 59 + this.UnavailableZones.GetHashCode(); + if (this.VolumeType != null) + hashCode = hashCode * 59 + this.VolumeType.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListProductsRespValues.cs b/Services/Kafka/V2/Model/ListProductsRespValues.cs new file mode 100644 index 000000000..73e075a6d --- /dev/null +++ b/Services/Kafka/V2/Model/ListProductsRespValues.cs @@ -0,0 +1,120 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ListProductsRespValues + { + + /// + /// 规格详情。 + /// + [JsonProperty("detail", NullValueHandling = NullValueHandling.Ignore)] + public List Detail { get; set; } + + /// + /// 实例类型。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 资源售罄的可用区列表。 + /// + [JsonProperty("unavailable_zones", NullValueHandling = NullValueHandling.Ignore)] + public List UnavailableZones { get; set; } + + /// + /// 有可用资源的可用区列表。 + /// + [JsonProperty("available_zones", NullValueHandling = NullValueHandling.Ignore)] + public List AvailableZones { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListProductsRespValues {\n"); + sb.Append(" detail: ").Append(Detail).Append("\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" unavailableZones: ").Append(UnavailableZones).Append("\n"); + sb.Append(" availableZones: ").Append(AvailableZones).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListProductsRespValues); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListProductsRespValues input) + { + if (input == null) + return false; + + return + ( + this.Detail == input.Detail || + this.Detail != null && + input.Detail != null && + this.Detail.SequenceEqual(input.Detail) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.UnavailableZones == input.UnavailableZones || + this.UnavailableZones != null && + input.UnavailableZones != null && + this.UnavailableZones.SequenceEqual(input.UnavailableZones) + ) && + ( + this.AvailableZones == input.AvailableZones || + this.AvailableZones != null && + input.AvailableZones != null && + this.AvailableZones.SequenceEqual(input.AvailableZones) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Detail != null) + hashCode = hashCode * 59 + this.Detail.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.UnavailableZones != null) + hashCode = hashCode * 59 + this.UnavailableZones.GetHashCode(); + if (this.AvailableZones != null) + hashCode = hashCode * 59 + this.AvailableZones.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListProductsResponse.cs b/Services/Kafka/V2/Model/ListProductsResponse.cs new file mode 100644 index 000000000..b3d76930d --- /dev/null +++ b/Services/Kafka/V2/Model/ListProductsResponse.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ListProductsResponse : SdkResponse + { + + /// + /// 表示按需付费的产品列表。 + /// + [JsonProperty("Hourly", NullValueHandling = NullValueHandling.Ignore)] + public List Hourly { get; set; } + + /// + /// 表示包年包月的产品列表。当前暂不支持通过API创建包年包月的Kafka实例。 + /// + [JsonProperty("Monthly", NullValueHandling = NullValueHandling.Ignore)] + public List Monthly { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListProductsResponse {\n"); + sb.Append(" hourly: ").Append(Hourly).Append("\n"); + sb.Append(" monthly: ").Append(Monthly).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListProductsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListProductsResponse input) + { + if (input == null) + return false; + + return + ( + this.Hourly == input.Hourly || + this.Hourly != null && + input.Hourly != null && + this.Hourly.SequenceEqual(input.Hourly) + ) && + ( + this.Monthly == input.Monthly || + this.Monthly != null && + input.Monthly != null && + this.Monthly.SequenceEqual(input.Monthly) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Hourly != null) + hashCode = hashCode * 59 + this.Hourly.GetHashCode(); + if (this.Monthly != null) + hashCode = hashCode * 59 + this.Monthly.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListSinkTasksRequest.cs b/Services/Kafka/V2/Model/ListSinkTasksRequest.cs new file mode 100644 index 000000000..08f269ced --- /dev/null +++ b/Services/Kafka/V2/Model/ListSinkTasksRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ListSinkTasksRequest + { + + /// + /// + /// + [SDKProperty("connector_id", IsPath = true)] + [JsonProperty("connector_id", NullValueHandling = NullValueHandling.Ignore)] + public string ConnectorId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListSinkTasksRequest {\n"); + sb.Append(" connectorId: ").Append(ConnectorId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListSinkTasksRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListSinkTasksRequest input) + { + if (input == null) + return false; + + return + ( + this.ConnectorId == input.ConnectorId || + (this.ConnectorId != null && + this.ConnectorId.Equals(input.ConnectorId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ConnectorId != null) + hashCode = hashCode * 59 + this.ConnectorId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListSinkTasksRespTasks.cs b/Services/Kafka/V2/Model/ListSinkTasksRespTasks.cs new file mode 100644 index 000000000..fb8de4c63 --- /dev/null +++ b/Services/Kafka/V2/Model/ListSinkTasksRespTasks.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ListSinkTasksRespTasks + { + + /// + /// 任务ID。 + /// + [JsonProperty("task_id", NullValueHandling = NullValueHandling.Ignore)] + public string TaskId { get; set; } + + /// + /// 转储任务名称。 + /// + [JsonProperty("task_name", NullValueHandling = NullValueHandling.Ignore)] + public string TaskName { get; set; } + + /// + /// 转储任务类型。 + /// + [JsonProperty("destination_type", NullValueHandling = NullValueHandling.Ignore)] + public string DestinationType { get; set; } + + /// + /// 转储任务创建时间戳。 + /// + [JsonProperty("create_time", NullValueHandling = NullValueHandling.Ignore)] + public string CreateTime { get; set; } + + /// + /// 转储任务状态。 + /// + [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] + public string Status { get; set; } + + /// + /// 返回任务转存的topics列表或者正则表达式。 + /// + [JsonProperty("topics", NullValueHandling = NullValueHandling.Ignore)] + public string Topics { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListSinkTasksRespTasks {\n"); + sb.Append(" taskId: ").Append(TaskId).Append("\n"); + sb.Append(" taskName: ").Append(TaskName).Append("\n"); + sb.Append(" destinationType: ").Append(DestinationType).Append("\n"); + sb.Append(" createTime: ").Append(CreateTime).Append("\n"); + sb.Append(" status: ").Append(Status).Append("\n"); + sb.Append(" topics: ").Append(Topics).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListSinkTasksRespTasks); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListSinkTasksRespTasks input) + { + if (input == null) + return false; + + return + ( + this.TaskId == input.TaskId || + (this.TaskId != null && + this.TaskId.Equals(input.TaskId)) + ) && + ( + this.TaskName == input.TaskName || + (this.TaskName != null && + this.TaskName.Equals(input.TaskName)) + ) && + ( + this.DestinationType == input.DestinationType || + (this.DestinationType != null && + this.DestinationType.Equals(input.DestinationType)) + ) && + ( + this.CreateTime == input.CreateTime || + (this.CreateTime != null && + this.CreateTime.Equals(input.CreateTime)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.Topics == input.Topics || + (this.Topics != null && + this.Topics.Equals(input.Topics)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.TaskId != null) + hashCode = hashCode * 59 + this.TaskId.GetHashCode(); + if (this.TaskName != null) + hashCode = hashCode * 59 + this.TaskName.GetHashCode(); + if (this.DestinationType != null) + hashCode = hashCode * 59 + this.DestinationType.GetHashCode(); + if (this.CreateTime != null) + hashCode = hashCode * 59 + this.CreateTime.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.Topics != null) + hashCode = hashCode * 59 + this.Topics.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ListSinkTasksResponse.cs b/Services/Kafka/V2/Model/ListSinkTasksResponse.cs new file mode 100644 index 000000000..fa61f1380 --- /dev/null +++ b/Services/Kafka/V2/Model/ListSinkTasksResponse.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ListSinkTasksResponse : SdkResponse + { + + /// + /// 转储任务列表。 + /// + [JsonProperty("tasks", NullValueHandling = NullValueHandling.Ignore)] + public List Tasks { get; set; } + + /// + /// 转储任务总数。 + /// + [JsonProperty("total_number", NullValueHandling = NullValueHandling.Ignore)] + public int? TotalNumber { get; set; } + + /// + /// 总的支持任务个数。 + /// + [JsonProperty("max_tasks", NullValueHandling = NullValueHandling.Ignore)] + public int? MaxTasks { get; set; } + + /// + /// 任务总数的配额。 + /// + [JsonProperty("quota_tasks", NullValueHandling = NullValueHandling.Ignore)] + public int? QuotaTasks { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListSinkTasksResponse {\n"); + sb.Append(" tasks: ").Append(Tasks).Append("\n"); + sb.Append(" totalNumber: ").Append(TotalNumber).Append("\n"); + sb.Append(" maxTasks: ").Append(MaxTasks).Append("\n"); + sb.Append(" quotaTasks: ").Append(QuotaTasks).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListSinkTasksResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListSinkTasksResponse input) + { + if (input == null) + return false; + + return + ( + this.Tasks == input.Tasks || + this.Tasks != null && + input.Tasks != null && + this.Tasks.SequenceEqual(input.Tasks) + ) && + ( + this.TotalNumber == input.TotalNumber || + (this.TotalNumber != null && + this.TotalNumber.Equals(input.TotalNumber)) + ) && + ( + this.MaxTasks == input.MaxTasks || + (this.MaxTasks != null && + this.MaxTasks.Equals(input.MaxTasks)) + ) && + ( + this.QuotaTasks == input.QuotaTasks || + (this.QuotaTasks != null && + this.QuotaTasks.Equals(input.QuotaTasks)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Tasks != null) + hashCode = hashCode * 59 + this.Tasks.GetHashCode(); + if (this.TotalNumber != null) + hashCode = hashCode * 59 + this.TotalNumber.GetHashCode(); + if (this.MaxTasks != null) + hashCode = hashCode * 59 + this.MaxTasks.GetHashCode(); + if (this.QuotaTasks != null) + hashCode = hashCode * 59 + this.QuotaTasks.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ObsDestinationDescriptor.cs b/Services/Kafka/V2/Model/ObsDestinationDescriptor.cs new file mode 100644 index 000000000..b252efa12 --- /dev/null +++ b/Services/Kafka/V2/Model/ObsDestinationDescriptor.cs @@ -0,0 +1,417 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// 转存目标的描述。 + /// + public class ObsDestinationDescriptor + { + /// + /// 转储启动偏移量: - latest: 从Topic最后端开始消费。 - earliest: 从Topic最前端消息开始消费。 默认是latest。 + /// + /// 转储启动偏移量: - latest: 从Topic最后端开始消费。 - earliest: 从Topic最前端消息开始消费。 默认是latest。 + [JsonConverter(typeof(EnumClassConverter))] + public class ConsumerStrategyEnum + { + /// + /// Enum LATEST for value: latest + /// + public static readonly ConsumerStrategyEnum LATEST = new ConsumerStrategyEnum("latest"); + + /// + /// Enum EARLIEST for value: earliest + /// + public static readonly ConsumerStrategyEnum EARLIEST = new ConsumerStrategyEnum("earliest"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"latest", LATEST}, + {"earliest", EARLIEST}, + }; + + private string Value; + + public ConsumerStrategyEnum(string Value) + { + this.Value = Value; + } + + public static ConsumerStrategyEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as ConsumerStrategyEnum)) + { + return true; + } + + return false; + } + + public bool Equals(ConsumerStrategyEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(ConsumerStrategyEnum a, ConsumerStrategyEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(ConsumerStrategyEnum a, ConsumerStrategyEnum b) + { + return !(a == b); + } + } + + /// + /// 转储文件格式。当前只支持text。 + /// + /// 转储文件格式。当前只支持text。 + [JsonConverter(typeof(EnumClassConverter))] + public class DestinationFileTypeEnum + { + /// + /// Enum TEXT for value: TEXT + /// + public static readonly DestinationFileTypeEnum TEXT = new DestinationFileTypeEnum("TEXT"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"TEXT", TEXT}, + }; + + private string Value; + + public DestinationFileTypeEnum(string Value) + { + this.Value = Value; + } + + public static DestinationFileTypeEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as DestinationFileTypeEnum)) + { + return true; + } + + return false; + } + + public bool Equals(DestinationFileTypeEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(DestinationFileTypeEnum a, DestinationFileTypeEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(DestinationFileTypeEnum a, DestinationFileTypeEnum b) + { + return !(a == b); + } + } + + + /// + /// 转存的topic列表名称,支持多个topic同时放置,以逗号“,”分隔。同时支持正则表达式。 例如topic1,topic2。 + /// + [JsonProperty("topics", NullValueHandling = NullValueHandling.Ignore)] + public string Topics { get; set; } + + /// + /// 转存topic的正则表达式,与topics必须二选一,不能同时都设置或者“.*”。 + /// + [JsonProperty("topics_regex", NullValueHandling = NullValueHandling.Ignore)] + public string TopicsRegex { get; set; } + + /// + /// 转储启动偏移量: - latest: 从Topic最后端开始消费。 - earliest: 从Topic最前端消息开始消费。 默认是latest。 + /// + [JsonProperty("consumer_strategy", NullValueHandling = NullValueHandling.Ignore)] + public ConsumerStrategyEnum ConsumerStrategy { get; set; } + /// + /// 转储文件格式。当前只支持text。 + /// + [JsonProperty("destination_file_type", NullValueHandling = NullValueHandling.Ignore)] + public DestinationFileTypeEnum DestinationFileType { get; set; } + /// + /// 访问密钥AK。 + /// + [JsonProperty("access_key", NullValueHandling = NullValueHandling.Ignore)] + public string AccessKey { get; set; } + + /// + /// 访问密钥SK。 + /// + [JsonProperty("secret_key", NullValueHandling = NullValueHandling.Ignore)] + public string SecretKey { get; set; } + + /// + /// 存储该通道数据的OBS桶名称。 + /// + [JsonProperty("obs_bucket_name", NullValueHandling = NullValueHandling.Ignore)] + public string ObsBucketName { get; set; } + + /// + /// 存储在obs的路径,默认可以不填。 取值范围:英文字母、数字、下划线和斜杠,最大长度为50个字符。 默认配置为空。 + /// + [JsonProperty("obs_path", NullValueHandling = NullValueHandling.Ignore)] + public string ObsPath { get; set; } + + /// + /// 将转储文件的生成时间使用“yyyy/MM/dd/HH/mm”格式生成分区字符串,用来定义写到OBS的Object文件所在的目录层次结构。 - N/A:置空,不使用日期时间目录。 - yyyy:年 - yyyy/MM:年/月 - yyyy/MM/dd:年/月/日 - yyyy/MM/dd/HH:年/月/日/时 - yyyy/MM/dd/HH/mm:年/月/日/时/分,例如:2017/11/10/14/49,目录结构就是“2017 > 11 > 10 > 14 > 49”,“2017”表示最外层文件夹。 默认值:空 > 数据转储成功后,存储的目录结构为“obs_bucket_path/file_prefix/partition_format”。默认时间是GMT+8 时间 + /// + [JsonProperty("partition_format", NullValueHandling = NullValueHandling.Ignore)] + public string PartitionFormat { get; set; } + + /// + /// 转储文件的记录分隔符,用于分隔写入转储文件的用户数据。 取值范围: - 逗号“,” - 分号“;” - 竖线“|” - 换行符“\\n” - NULL 默认值:换行符“\\n”。 + /// + [JsonProperty("record_delimiter", NullValueHandling = NullValueHandling.Ignore)] + public string RecordDelimiter { get; set; } + + /// + /// 根据用户配置的时间,周期性的将数据导入OBS,若某个时间段内无数据,则此时间段不会生成打包文件。 取值范围:30~900 单位:秒。 > 使用OBS通道转储流式数据时该参数为必选配置。 + /// + [JsonProperty("deliver_time_interval", NullValueHandling = NullValueHandling.Ignore)] + public string DeliverTimeInterval { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ObsDestinationDescriptor {\n"); + sb.Append(" topics: ").Append(Topics).Append("\n"); + sb.Append(" topicsRegex: ").Append(TopicsRegex).Append("\n"); + sb.Append(" consumerStrategy: ").Append(ConsumerStrategy).Append("\n"); + sb.Append(" destinationFileType: ").Append(DestinationFileType).Append("\n"); + sb.Append(" accessKey: ").Append(AccessKey).Append("\n"); + sb.Append(" secretKey: ").Append(SecretKey).Append("\n"); + sb.Append(" obsBucketName: ").Append(ObsBucketName).Append("\n"); + sb.Append(" obsPath: ").Append(ObsPath).Append("\n"); + sb.Append(" partitionFormat: ").Append(PartitionFormat).Append("\n"); + sb.Append(" recordDelimiter: ").Append(RecordDelimiter).Append("\n"); + sb.Append(" deliverTimeInterval: ").Append(DeliverTimeInterval).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ObsDestinationDescriptor); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ObsDestinationDescriptor input) + { + if (input == null) + return false; + + return + ( + this.Topics == input.Topics || + (this.Topics != null && + this.Topics.Equals(input.Topics)) + ) && + ( + this.TopicsRegex == input.TopicsRegex || + (this.TopicsRegex != null && + this.TopicsRegex.Equals(input.TopicsRegex)) + ) && + ( + this.ConsumerStrategy == input.ConsumerStrategy || + (this.ConsumerStrategy != null && + this.ConsumerStrategy.Equals(input.ConsumerStrategy)) + ) && + ( + this.DestinationFileType == input.DestinationFileType || + (this.DestinationFileType != null && + this.DestinationFileType.Equals(input.DestinationFileType)) + ) && + ( + this.AccessKey == input.AccessKey || + (this.AccessKey != null && + this.AccessKey.Equals(input.AccessKey)) + ) && + ( + this.SecretKey == input.SecretKey || + (this.SecretKey != null && + this.SecretKey.Equals(input.SecretKey)) + ) && + ( + this.ObsBucketName == input.ObsBucketName || + (this.ObsBucketName != null && + this.ObsBucketName.Equals(input.ObsBucketName)) + ) && + ( + this.ObsPath == input.ObsPath || + (this.ObsPath != null && + this.ObsPath.Equals(input.ObsPath)) + ) && + ( + this.PartitionFormat == input.PartitionFormat || + (this.PartitionFormat != null && + this.PartitionFormat.Equals(input.PartitionFormat)) + ) && + ( + this.RecordDelimiter == input.RecordDelimiter || + (this.RecordDelimiter != null && + this.RecordDelimiter.Equals(input.RecordDelimiter)) + ) && + ( + this.DeliverTimeInterval == input.DeliverTimeInterval || + (this.DeliverTimeInterval != null && + this.DeliverTimeInterval.Equals(input.DeliverTimeInterval)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Topics != null) + hashCode = hashCode * 59 + this.Topics.GetHashCode(); + if (this.TopicsRegex != null) + hashCode = hashCode * 59 + this.TopicsRegex.GetHashCode(); + if (this.ConsumerStrategy != null) + hashCode = hashCode * 59 + this.ConsumerStrategy.GetHashCode(); + if (this.DestinationFileType != null) + hashCode = hashCode * 59 + this.DestinationFileType.GetHashCode(); + if (this.AccessKey != null) + hashCode = hashCode * 59 + this.AccessKey.GetHashCode(); + if (this.SecretKey != null) + hashCode = hashCode * 59 + this.SecretKey.GetHashCode(); + if (this.ObsBucketName != null) + hashCode = hashCode * 59 + this.ObsBucketName.GetHashCode(); + if (this.ObsPath != null) + hashCode = hashCode * 59 + this.ObsPath.GetHashCode(); + if (this.PartitionFormat != null) + hashCode = hashCode * 59 + this.PartitionFormat.GetHashCode(); + if (this.RecordDelimiter != null) + hashCode = hashCode * 59 + this.RecordDelimiter.GetHashCode(); + if (this.DeliverTimeInterval != null) + hashCode = hashCode * 59 + this.DeliverTimeInterval.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ResetManagerPasswordReq.cs b/Services/Kafka/V2/Model/ResetManagerPasswordReq.cs new file mode 100644 index 000000000..2a73dfc32 --- /dev/null +++ b/Services/Kafka/V2/Model/ResetManagerPasswordReq.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ResetManagerPasswordReq + { + + /// + /// 8-32个字符。 至少包含以下字符中的3种: - 大写字母 - 小写字母 - 数字 - 特殊字符`~!@#$%^&*()-_=+\\\\|[{}];:\\'\\\",<.>/? 和空格,并且不能以-开头。 + /// + [JsonProperty("new_password", NullValueHandling = NullValueHandling.Ignore)] + public string NewPassword { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResetManagerPasswordReq {\n"); + sb.Append(" newPassword: ").Append(NewPassword).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ResetManagerPasswordReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ResetManagerPasswordReq input) + { + if (input == null) + return false; + + return + ( + this.NewPassword == input.NewPassword || + (this.NewPassword != null && + this.NewPassword.Equals(input.NewPassword)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.NewPassword != null) + hashCode = hashCode * 59 + this.NewPassword.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ResetManagerPasswordRequest.cs b/Services/Kafka/V2/Model/ResetManagerPasswordRequest.cs new file mode 100644 index 000000000..ba54c7bde --- /dev/null +++ b/Services/Kafka/V2/Model/ResetManagerPasswordRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ResetManagerPasswordRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public ResetManagerPasswordReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResetManagerPasswordRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ResetManagerPasswordRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ResetManagerPasswordRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ResetManagerPasswordResponse.cs b/Services/Kafka/V2/Model/ResetManagerPasswordResponse.cs new file mode 100644 index 000000000..be2db2797 --- /dev/null +++ b/Services/Kafka/V2/Model/ResetManagerPasswordResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ResetManagerPasswordResponse : SdkResponse + { + + + } +} diff --git a/Services/Kafka/V2/Model/ResetMessageOffsetReq.cs b/Services/Kafka/V2/Model/ResetMessageOffsetReq.cs new file mode 100644 index 000000000..0c5d45a03 --- /dev/null +++ b/Services/Kafka/V2/Model/ResetMessageOffsetReq.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ResetMessageOffsetReq + { + + /// + /// topic名称。 + /// + [JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] + public string Topic { get; set; } + + /// + /// 分区编号,默认值为-1,若传入值为-1,则重置所有分区。 + /// + [JsonProperty("partition", NullValueHandling = NullValueHandling.Ignore)] + public int? Partition { get; set; } + + /// + /// 重置的消费进度到指定偏移量。 如果传入offset小于当前最小的offset,则重置到最小的offset。 如果大于最大的offset,则重置到最大的offset。 message_offset、timestamp二者必选其一。 + /// + [JsonProperty("message_offset", NullValueHandling = NullValueHandling.Ignore)] + public int? MessageOffset { get; set; } + + /// + /// 重置的消费进度到指定时间,格式为unix时间戳。 如果传入timestamp早于当前最早的timestamp,则重置到最早的timestamp。 如果晚于最晚的timestamp,则重置到最晚的timestamp。 message_offset、timestamp二者必选其一。 + /// + [JsonProperty("timestamp", NullValueHandling = NullValueHandling.Ignore)] + public int? Timestamp { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResetMessageOffsetReq {\n"); + sb.Append(" topic: ").Append(Topic).Append("\n"); + sb.Append(" partition: ").Append(Partition).Append("\n"); + sb.Append(" messageOffset: ").Append(MessageOffset).Append("\n"); + sb.Append(" timestamp: ").Append(Timestamp).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ResetMessageOffsetReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ResetMessageOffsetReq input) + { + if (input == null) + return false; + + return + ( + this.Topic == input.Topic || + (this.Topic != null && + this.Topic.Equals(input.Topic)) + ) && + ( + this.Partition == input.Partition || + (this.Partition != null && + this.Partition.Equals(input.Partition)) + ) && + ( + this.MessageOffset == input.MessageOffset || + (this.MessageOffset != null && + this.MessageOffset.Equals(input.MessageOffset)) + ) && + ( + this.Timestamp == input.Timestamp || + (this.Timestamp != null && + this.Timestamp.Equals(input.Timestamp)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Topic != null) + hashCode = hashCode * 59 + this.Topic.GetHashCode(); + if (this.Partition != null) + hashCode = hashCode * 59 + this.Partition.GetHashCode(); + if (this.MessageOffset != null) + hashCode = hashCode * 59 + this.MessageOffset.GetHashCode(); + if (this.Timestamp != null) + hashCode = hashCode * 59 + this.Timestamp.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ResetMessageOffsetRequest.cs b/Services/Kafka/V2/Model/ResetMessageOffsetRequest.cs new file mode 100644 index 000000000..8d42d293e --- /dev/null +++ b/Services/Kafka/V2/Model/ResetMessageOffsetRequest.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ResetMessageOffsetRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("group", IsPath = true)] + [JsonProperty("group", NullValueHandling = NullValueHandling.Ignore)] + public string Group { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public ResetMessageOffsetReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResetMessageOffsetRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" group: ").Append(Group).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ResetMessageOffsetRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ResetMessageOffsetRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Group != null) + hashCode = hashCode * 59 + this.Group.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ResetMessageOffsetResponse.cs b/Services/Kafka/V2/Model/ResetMessageOffsetResponse.cs new file mode 100644 index 000000000..6db1268f4 --- /dev/null +++ b/Services/Kafka/V2/Model/ResetMessageOffsetResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ResetMessageOffsetResponse : SdkResponse + { + + + } +} diff --git a/Services/Kafka/V2/Model/ResetPasswordReq.cs b/Services/Kafka/V2/Model/ResetPasswordReq.cs new file mode 100644 index 000000000..35b5c72f5 --- /dev/null +++ b/Services/Kafka/V2/Model/ResetPasswordReq.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ResetPasswordReq + { + + /// + /// 8-32个字符。 至少包含以下字符中的3种: - 大写字母 - 小写字母 - 数字 - 特殊字符`~!@#$%^&*()-_=+\\\\|[{}];:\\'\\\",<.>/? 和空格,并且不能以-开头。 + /// + [JsonProperty("new_password", NullValueHandling = NullValueHandling.Ignore)] + public string NewPassword { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResetPasswordReq {\n"); + sb.Append(" newPassword: ").Append(NewPassword).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ResetPasswordReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ResetPasswordReq input) + { + if (input == null) + return false; + + return + ( + this.NewPassword == input.NewPassword || + (this.NewPassword != null && + this.NewPassword.Equals(input.NewPassword)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.NewPassword != null) + hashCode = hashCode * 59 + this.NewPassword.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ResetPasswordRequest.cs b/Services/Kafka/V2/Model/ResetPasswordRequest.cs new file mode 100644 index 000000000..3171d0d71 --- /dev/null +++ b/Services/Kafka/V2/Model/ResetPasswordRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ResetPasswordRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public ResetPasswordReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResetPasswordRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ResetPasswordRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ResetPasswordRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ResetPasswordResponse.cs b/Services/Kafka/V2/Model/ResetPasswordResponse.cs new file mode 100644 index 000000000..debdf4adc --- /dev/null +++ b/Services/Kafka/V2/Model/ResetPasswordResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ResetPasswordResponse : SdkResponse + { + + + } +} diff --git a/Services/Kafka/V2/Model/ResetReplicaReq.cs b/Services/Kafka/V2/Model/ResetReplicaReq.cs new file mode 100644 index 000000000..a86433da4 --- /dev/null +++ b/Services/Kafka/V2/Model/ResetReplicaReq.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// 期望调整的分区副本分配情况。 + /// + public class ResetReplicaReq + { + + /// + /// 期望调整的分区副本分配情况。 + /// + [JsonProperty("partitions", NullValueHandling = NullValueHandling.Ignore)] + public List Partitions { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResetReplicaReq {\n"); + sb.Append(" partitions: ").Append(Partitions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ResetReplicaReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ResetReplicaReq input) + { + if (input == null) + return false; + + return + ( + this.Partitions == input.Partitions || + this.Partitions != null && + input.Partitions != null && + this.Partitions.SequenceEqual(input.Partitions) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Partitions != null) + hashCode = hashCode * 59 + this.Partitions.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ResetReplicaReqPartitions.cs b/Services/Kafka/V2/Model/ResetReplicaReqPartitions.cs new file mode 100644 index 000000000..9858b01b8 --- /dev/null +++ b/Services/Kafka/V2/Model/ResetReplicaReqPartitions.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ResetReplicaReqPartitions + { + + /// + /// 分区ID。 + /// + [JsonProperty("partition", NullValueHandling = NullValueHandling.Ignore)] + public int? Partition { get; set; } + + /// + /// 副本期望所在的broker ID。其中Array首位为leader副本,所有分区需要有同样数量的副本,副本数不能大于总broker的数量。 + /// + [JsonProperty("replicas", NullValueHandling = NullValueHandling.Ignore)] + public List Replicas { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResetReplicaReqPartitions {\n"); + sb.Append(" partition: ").Append(Partition).Append("\n"); + sb.Append(" replicas: ").Append(Replicas).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ResetReplicaReqPartitions); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ResetReplicaReqPartitions input) + { + if (input == null) + return false; + + return + ( + this.Partition == input.Partition || + (this.Partition != null && + this.Partition.Equals(input.Partition)) + ) && + ( + this.Replicas == input.Replicas || + this.Replicas != null && + input.Replicas != null && + this.Replicas.SequenceEqual(input.Replicas) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Partition != null) + hashCode = hashCode * 59 + this.Partition.GetHashCode(); + if (this.Replicas != null) + hashCode = hashCode * 59 + this.Replicas.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ResizeInstanceReq.cs b/Services/Kafka/V2/Model/ResizeInstanceReq.cs new file mode 100644 index 000000000..1ab948859 --- /dev/null +++ b/Services/Kafka/V2/Model/ResizeInstanceReq.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ResizeInstanceReq + { + + /// + /// 规格变更后的规格ID。 若只扩展磁盘大小,则规格ID保持和原实例不变。 规格ID请参考[查询实例的扩容规格列表](https://support.huaweicloud.com/api-kafka/ShowInstanceExtendProductInfo.html)接口。 + /// + [JsonProperty("new_spec_code", NullValueHandling = NullValueHandling.Ignore)] + public string NewSpecCode { get; set; } + + /// + /// 规格变更后的消息存储空间,单位:GB。 若扩展实例基准带宽,则new_storage_space不能低于基准带宽规定的最小磁盘大小。 磁盘空间大小请参考[查询实例的扩容规格列表](https://support.huaweicloud.com/api-kafka/ShowInstanceExtendProductInfo.html)接口。 + /// + [JsonProperty("new_storage_space", NullValueHandling = NullValueHandling.Ignore)] + public int? NewStorageSpace { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResizeInstanceReq {\n"); + sb.Append(" newSpecCode: ").Append(NewSpecCode).Append("\n"); + sb.Append(" newStorageSpace: ").Append(NewStorageSpace).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ResizeInstanceReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ResizeInstanceReq input) + { + if (input == null) + return false; + + return + ( + this.NewSpecCode == input.NewSpecCode || + (this.NewSpecCode != null && + this.NewSpecCode.Equals(input.NewSpecCode)) + ) && + ( + this.NewStorageSpace == input.NewStorageSpace || + (this.NewStorageSpace != null && + this.NewStorageSpace.Equals(input.NewStorageSpace)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.NewSpecCode != null) + hashCode = hashCode * 59 + this.NewSpecCode.GetHashCode(); + if (this.NewStorageSpace != null) + hashCode = hashCode * 59 + this.NewStorageSpace.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ResizeInstanceRequest.cs b/Services/Kafka/V2/Model/ResizeInstanceRequest.cs new file mode 100644 index 000000000..bfc216d40 --- /dev/null +++ b/Services/Kafka/V2/Model/ResizeInstanceRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ResizeInstanceRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public ResizeInstanceReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResizeInstanceRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ResizeInstanceRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ResizeInstanceRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ResizeInstanceResponse.cs b/Services/Kafka/V2/Model/ResizeInstanceResponse.cs new file mode 100644 index 000000000..40226988f --- /dev/null +++ b/Services/Kafka/V2/Model/ResizeInstanceResponse.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ResizeInstanceResponse : SdkResponse + { + + /// + /// 规格变更任务ID。 + /// + [JsonProperty("job_id", NullValueHandling = NullValueHandling.Ignore)] + public string JobId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResizeInstanceResponse {\n"); + sb.Append(" jobId: ").Append(JobId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ResizeInstanceResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ResizeInstanceResponse input) + { + if (input == null) + return false; + + return + ( + this.JobId == input.JobId || + (this.JobId != null && + this.JobId.Equals(input.JobId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.JobId != null) + hashCode = hashCode * 59 + this.JobId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/RestartManagerRequest.cs b/Services/Kafka/V2/Model/RestartManagerRequest.cs new file mode 100644 index 000000000..f331051a2 --- /dev/null +++ b/Services/Kafka/V2/Model/RestartManagerRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class RestartManagerRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RestartManagerRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as RestartManagerRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(RestartManagerRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/RestartManagerResponse.cs b/Services/Kafka/V2/Model/RestartManagerResponse.cs new file mode 100644 index 000000000..1f813b308 --- /dev/null +++ b/Services/Kafka/V2/Model/RestartManagerResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class RestartManagerResponse : SdkResponse + { + + + } +} diff --git a/Services/Kafka/V2/Model/ShowBackgroundTaskRequest.cs b/Services/Kafka/V2/Model/ShowBackgroundTaskRequest.cs new file mode 100644 index 000000000..d94ee3070 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowBackgroundTaskRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ShowBackgroundTaskRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("task_id", IsPath = true)] + [JsonProperty("task_id", NullValueHandling = NullValueHandling.Ignore)] + public string TaskId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowBackgroundTaskRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" taskId: ").Append(TaskId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowBackgroundTaskRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowBackgroundTaskRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.TaskId == input.TaskId || + (this.TaskId != null && + this.TaskId.Equals(input.TaskId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.TaskId != null) + hashCode = hashCode * 59 + this.TaskId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowBackgroundTaskResponse.cs b/Services/Kafka/V2/Model/ShowBackgroundTaskResponse.cs new file mode 100644 index 000000000..a783f81ef --- /dev/null +++ b/Services/Kafka/V2/Model/ShowBackgroundTaskResponse.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ShowBackgroundTaskResponse : SdkResponse + { + + /// + /// 任务数量。 + /// + [JsonProperty("task_count", NullValueHandling = NullValueHandling.Ignore)] + public string TaskCount { get; set; } + + /// + /// 任务列表。 + /// + [JsonProperty("tasks", NullValueHandling = NullValueHandling.Ignore)] + public List Tasks { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowBackgroundTaskResponse {\n"); + sb.Append(" taskCount: ").Append(TaskCount).Append("\n"); + sb.Append(" tasks: ").Append(Tasks).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowBackgroundTaskResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowBackgroundTaskResponse input) + { + if (input == null) + return false; + + return + ( + this.TaskCount == input.TaskCount || + (this.TaskCount != null && + this.TaskCount.Equals(input.TaskCount)) + ) && + ( + this.Tasks == input.Tasks || + this.Tasks != null && + input.Tasks != null && + this.Tasks.SequenceEqual(input.Tasks) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.TaskCount != null) + hashCode = hashCode * 59 + this.TaskCount.GetHashCode(); + if (this.Tasks != null) + hashCode = hashCode * 59 + this.Tasks.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowCesHierarchyRequest.cs b/Services/Kafka/V2/Model/ShowCesHierarchyRequest.cs new file mode 100644 index 000000000..c6ace8463 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowCesHierarchyRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ShowCesHierarchyRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowCesHierarchyRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowCesHierarchyRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowCesHierarchyRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowCesHierarchyResponse.cs b/Services/Kafka/V2/Model/ShowCesHierarchyResponse.cs new file mode 100644 index 000000000..05221c84d --- /dev/null +++ b/Services/Kafka/V2/Model/ShowCesHierarchyResponse.cs @@ -0,0 +1,136 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ShowCesHierarchyResponse : SdkResponse + { + + /// + /// 监控维度。 + /// + [JsonProperty("dimensions", NullValueHandling = NullValueHandling.Ignore)] + public List Dimensions { get; set; } + + /// + /// 实例信息。 + /// + [JsonProperty("instance_ids", NullValueHandling = NullValueHandling.Ignore)] + public List InstanceIds { get; set; } + + /// + /// 节点信息。 + /// + [JsonProperty("nodes", NullValueHandling = NullValueHandling.Ignore)] + public List Nodes { get; set; } + + /// + /// 队列信息。 + /// + [JsonProperty("queues", NullValueHandling = NullValueHandling.Ignore)] + public List Queues { get; set; } + + /// + /// 消费组信息。 + /// + [JsonProperty("groups", NullValueHandling = NullValueHandling.Ignore)] + public List Groups { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowCesHierarchyResponse {\n"); + sb.Append(" dimensions: ").Append(Dimensions).Append("\n"); + sb.Append(" instanceIds: ").Append(InstanceIds).Append("\n"); + sb.Append(" nodes: ").Append(Nodes).Append("\n"); + sb.Append(" queues: ").Append(Queues).Append("\n"); + sb.Append(" groups: ").Append(Groups).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowCesHierarchyResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowCesHierarchyResponse input) + { + if (input == null) + return false; + + return + ( + this.Dimensions == input.Dimensions || + this.Dimensions != null && + input.Dimensions != null && + this.Dimensions.SequenceEqual(input.Dimensions) + ) && + ( + this.InstanceIds == input.InstanceIds || + this.InstanceIds != null && + input.InstanceIds != null && + this.InstanceIds.SequenceEqual(input.InstanceIds) + ) && + ( + this.Nodes == input.Nodes || + this.Nodes != null && + input.Nodes != null && + this.Nodes.SequenceEqual(input.Nodes) + ) && + ( + this.Queues == input.Queues || + this.Queues != null && + input.Queues != null && + this.Queues.SequenceEqual(input.Queues) + ) && + ( + this.Groups == input.Groups || + this.Groups != null && + input.Groups != null && + this.Groups.SequenceEqual(input.Groups) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Dimensions != null) + hashCode = hashCode * 59 + this.Dimensions.GetHashCode(); + if (this.InstanceIds != null) + hashCode = hashCode * 59 + this.InstanceIds.GetHashCode(); + if (this.Nodes != null) + hashCode = hashCode * 59 + this.Nodes.GetHashCode(); + if (this.Queues != null) + hashCode = hashCode * 59 + this.Queues.GetHashCode(); + if (this.Groups != null) + hashCode = hashCode * 59 + this.Groups.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowCeshierarchyRespChildren.cs b/Services/Kafka/V2/Model/ShowCeshierarchyRespChildren.cs new file mode 100644 index 000000000..ed64cd302 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowCeshierarchyRespChildren.cs @@ -0,0 +1,120 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// 子维度信息。 + /// + public class ShowCeshierarchyRespChildren + { + + /// + /// 子维度名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 监控指标名称列表。 + /// + [JsonProperty("metrics", NullValueHandling = NullValueHandling.Ignore)] + public List Metrics { get; set; } + + /// + /// 监控查询使用的key。 + /// + [JsonProperty("key_name", NullValueHandling = NullValueHandling.Ignore)] + public List KeyName { get; set; } + + /// + /// 监控维度路由。 + /// + [JsonProperty("dim_router", NullValueHandling = NullValueHandling.Ignore)] + public List DimRouter { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowCeshierarchyRespChildren {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" metrics: ").Append(Metrics).Append("\n"); + sb.Append(" keyName: ").Append(KeyName).Append("\n"); + sb.Append(" dimRouter: ").Append(DimRouter).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowCeshierarchyRespChildren); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowCeshierarchyRespChildren input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Metrics == input.Metrics || + this.Metrics != null && + input.Metrics != null && + this.Metrics.SequenceEqual(input.Metrics) + ) && + ( + this.KeyName == input.KeyName || + this.KeyName != null && + input.KeyName != null && + this.KeyName.SequenceEqual(input.KeyName) + ) && + ( + this.DimRouter == input.DimRouter || + this.DimRouter != null && + input.DimRouter != null && + this.DimRouter.SequenceEqual(input.DimRouter) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Metrics != null) + hashCode = hashCode * 59 + this.Metrics.GetHashCode(); + if (this.KeyName != null) + hashCode = hashCode * 59 + this.KeyName.GetHashCode(); + if (this.DimRouter != null) + hashCode = hashCode * 59 + this.DimRouter.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowCeshierarchyRespDimensions.cs b/Services/Kafka/V2/Model/ShowCeshierarchyRespDimensions.cs new file mode 100644 index 000000000..d06607f69 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowCeshierarchyRespDimensions.cs @@ -0,0 +1,135 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ShowCeshierarchyRespDimensions + { + + /// + /// 监控维度名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 监控指标名称。请参考[支持的监控指标](https://support.huaweicloud.com/usermanual-kafka/kafka-ug-180413002.html)。 + /// + [JsonProperty("metrics", NullValueHandling = NullValueHandling.Ignore)] + public List Metrics { get; set; } + + /// + /// 监控查询使用的key。 + /// + [JsonProperty("key_name", NullValueHandling = NullValueHandling.Ignore)] + public List KeyName { get; set; } + + /// + /// 监控维度路由。 + /// + [JsonProperty("dim_router", NullValueHandling = NullValueHandling.Ignore)] + public List DimRouter { get; set; } + + /// + /// 子维度列表。 + /// + [JsonProperty("children", NullValueHandling = NullValueHandling.Ignore)] + public List Children { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowCeshierarchyRespDimensions {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" metrics: ").Append(Metrics).Append("\n"); + sb.Append(" keyName: ").Append(KeyName).Append("\n"); + sb.Append(" dimRouter: ").Append(DimRouter).Append("\n"); + sb.Append(" children: ").Append(Children).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowCeshierarchyRespDimensions); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowCeshierarchyRespDimensions input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Metrics == input.Metrics || + this.Metrics != null && + input.Metrics != null && + this.Metrics.SequenceEqual(input.Metrics) + ) && + ( + this.KeyName == input.KeyName || + this.KeyName != null && + input.KeyName != null && + this.KeyName.SequenceEqual(input.KeyName) + ) && + ( + this.DimRouter == input.DimRouter || + this.DimRouter != null && + input.DimRouter != null && + this.DimRouter.SequenceEqual(input.DimRouter) + ) && + ( + this.Children == input.Children || + this.Children != null && + input.Children != null && + this.Children.SequenceEqual(input.Children) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Metrics != null) + hashCode = hashCode * 59 + this.Metrics.GetHashCode(); + if (this.KeyName != null) + hashCode = hashCode * 59 + this.KeyName.GetHashCode(); + if (this.DimRouter != null) + hashCode = hashCode * 59 + this.DimRouter.GetHashCode(); + if (this.Children != null) + hashCode = hashCode * 59 + this.Children.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowCeshierarchyRespInstanceIds.cs b/Services/Kafka/V2/Model/ShowCeshierarchyRespInstanceIds.cs new file mode 100644 index 000000000..1df76a72d --- /dev/null +++ b/Services/Kafka/V2/Model/ShowCeshierarchyRespInstanceIds.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ShowCeshierarchyRespInstanceIds + { + + /// + /// 实例ID。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowCeshierarchyRespInstanceIds {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowCeshierarchyRespInstanceIds); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowCeshierarchyRespInstanceIds input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowCeshierarchyRespNodes.cs b/Services/Kafka/V2/Model/ShowCeshierarchyRespNodes.cs new file mode 100644 index 000000000..5107ada75 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowCeshierarchyRespNodes.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ShowCeshierarchyRespNodes + { + + /// + /// 节点名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowCeshierarchyRespNodes {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowCeshierarchyRespNodes); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowCeshierarchyRespNodes input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowCeshierarchyRespPartitions.cs b/Services/Kafka/V2/Model/ShowCeshierarchyRespPartitions.cs new file mode 100644 index 000000000..1aa9c0b5d --- /dev/null +++ b/Services/Kafka/V2/Model/ShowCeshierarchyRespPartitions.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ShowCeshierarchyRespPartitions + { + + /// + /// 分区名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowCeshierarchyRespPartitions {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowCeshierarchyRespPartitions); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowCeshierarchyRespPartitions input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowCeshierarchyRespQueues.cs b/Services/Kafka/V2/Model/ShowCeshierarchyRespQueues.cs new file mode 100644 index 000000000..74a76bd92 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowCeshierarchyRespQueues.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ShowCeshierarchyRespQueues + { + + /// + /// topic名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 分区列表。 + /// + [JsonProperty("partitions", NullValueHandling = NullValueHandling.Ignore)] + public List Partitions { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowCeshierarchyRespQueues {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" partitions: ").Append(Partitions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowCeshierarchyRespQueues); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowCeshierarchyRespQueues input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Partitions == input.Partitions || + this.Partitions != null && + input.Partitions != null && + this.Partitions.SequenceEqual(input.Partitions) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Partitions != null) + hashCode = hashCode * 59 + this.Partitions.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowClusterRequest.cs b/Services/Kafka/V2/Model/ShowClusterRequest.cs new file mode 100644 index 000000000..9c64d90f6 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowClusterRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ShowClusterRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowClusterRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowClusterRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowClusterRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowClusterRespCluster.cs b/Services/Kafka/V2/Model/ShowClusterRespCluster.cs new file mode 100644 index 000000000..f9769ce6e --- /dev/null +++ b/Services/Kafka/V2/Model/ShowClusterRespCluster.cs @@ -0,0 +1,174 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// 集群基本信息。 + /// + public class ShowClusterRespCluster + { + + /// + /// 控制器ID。 + /// + [JsonProperty("controller", NullValueHandling = NullValueHandling.Ignore)] + public string Controller { get; set; } + + /// + /// 节点列表。 + /// + [JsonProperty("brokers", NullValueHandling = NullValueHandling.Ignore)] + public List Brokers { get; set; } + + /// + /// 主题数量。 + /// + [JsonProperty("topics_count", NullValueHandling = NullValueHandling.Ignore)] + public int? TopicsCount { get; set; } + + /// + /// 分区数量。 + /// + [JsonProperty("partitions_count", NullValueHandling = NullValueHandling.Ignore)] + public int? PartitionsCount { get; set; } + + /// + /// 在线分区数量。 + /// + [JsonProperty("online_partitions_count", NullValueHandling = NullValueHandling.Ignore)] + public int? OnlinePartitionsCount { get; set; } + + /// + /// 副本数量。 + /// + [JsonProperty("replicas_count", NullValueHandling = NullValueHandling.Ignore)] + public int? ReplicasCount { get; set; } + + /// + /// ISR(In-Sync Replicas) 副本总数。 + /// + [JsonProperty("isr_replicas_count", NullValueHandling = NullValueHandling.Ignore)] + public int? IsrReplicasCount { get; set; } + + /// + /// 消费组数量。 + /// + [JsonProperty("consumers_count", NullValueHandling = NullValueHandling.Ignore)] + public int? ConsumersCount { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowClusterRespCluster {\n"); + sb.Append(" controller: ").Append(Controller).Append("\n"); + sb.Append(" brokers: ").Append(Brokers).Append("\n"); + sb.Append(" topicsCount: ").Append(TopicsCount).Append("\n"); + sb.Append(" partitionsCount: ").Append(PartitionsCount).Append("\n"); + sb.Append(" onlinePartitionsCount: ").Append(OnlinePartitionsCount).Append("\n"); + sb.Append(" replicasCount: ").Append(ReplicasCount).Append("\n"); + sb.Append(" isrReplicasCount: ").Append(IsrReplicasCount).Append("\n"); + sb.Append(" consumersCount: ").Append(ConsumersCount).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowClusterRespCluster); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowClusterRespCluster input) + { + if (input == null) + return false; + + return + ( + this.Controller == input.Controller || + (this.Controller != null && + this.Controller.Equals(input.Controller)) + ) && + ( + this.Brokers == input.Brokers || + this.Brokers != null && + input.Brokers != null && + this.Brokers.SequenceEqual(input.Brokers) + ) && + ( + this.TopicsCount == input.TopicsCount || + (this.TopicsCount != null && + this.TopicsCount.Equals(input.TopicsCount)) + ) && + ( + this.PartitionsCount == input.PartitionsCount || + (this.PartitionsCount != null && + this.PartitionsCount.Equals(input.PartitionsCount)) + ) && + ( + this.OnlinePartitionsCount == input.OnlinePartitionsCount || + (this.OnlinePartitionsCount != null && + this.OnlinePartitionsCount.Equals(input.OnlinePartitionsCount)) + ) && + ( + this.ReplicasCount == input.ReplicasCount || + (this.ReplicasCount != null && + this.ReplicasCount.Equals(input.ReplicasCount)) + ) && + ( + this.IsrReplicasCount == input.IsrReplicasCount || + (this.IsrReplicasCount != null && + this.IsrReplicasCount.Equals(input.IsrReplicasCount)) + ) && + ( + this.ConsumersCount == input.ConsumersCount || + (this.ConsumersCount != null && + this.ConsumersCount.Equals(input.ConsumersCount)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Controller != null) + hashCode = hashCode * 59 + this.Controller.GetHashCode(); + if (this.Brokers != null) + hashCode = hashCode * 59 + this.Brokers.GetHashCode(); + if (this.TopicsCount != null) + hashCode = hashCode * 59 + this.TopicsCount.GetHashCode(); + if (this.PartitionsCount != null) + hashCode = hashCode * 59 + this.PartitionsCount.GetHashCode(); + if (this.OnlinePartitionsCount != null) + hashCode = hashCode * 59 + this.OnlinePartitionsCount.GetHashCode(); + if (this.ReplicasCount != null) + hashCode = hashCode * 59 + this.ReplicasCount.GetHashCode(); + if (this.IsrReplicasCount != null) + hashCode = hashCode * 59 + this.IsrReplicasCount.GetHashCode(); + if (this.ConsumersCount != null) + hashCode = hashCode * 59 + this.ConsumersCount.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowClusterRespClusterBrokers.cs b/Services/Kafka/V2/Model/ShowClusterRespClusterBrokers.cs new file mode 100644 index 000000000..793cd6c86 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowClusterRespClusterBrokers.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// 节点。 + /// + public class ShowClusterRespClusterBrokers + { + + /// + /// 节点IP。 + /// + [JsonProperty("host", NullValueHandling = NullValueHandling.Ignore)] + public string Host { get; set; } + + /// + /// 端口号。 + /// + [JsonProperty("port", NullValueHandling = NullValueHandling.Ignore)] + public int? Port { get; set; } + + /// + /// 节点id。 + /// + [JsonProperty("broker_id", NullValueHandling = NullValueHandling.Ignore)] + public string BrokerId { get; set; } + + /// + /// 是否为contoller节点。 + /// + [JsonProperty("is_controller", NullValueHandling = NullValueHandling.Ignore)] + public bool? IsController { get; set; } + + /// + /// 服务端版本。 + /// + [JsonProperty("version", NullValueHandling = NullValueHandling.Ignore)] + public string Version { get; set; } + + /// + /// broker注册时间,为unix时间戳格式。 + /// + [JsonProperty("register_time", NullValueHandling = NullValueHandling.Ignore)] + public string RegisterTime { get; set; } + + /// + /// Kafka实例节点的连通性是否正常。 + /// + [JsonProperty("is_health", NullValueHandling = NullValueHandling.Ignore)] + public bool? IsHealth { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowClusterRespClusterBrokers {\n"); + sb.Append(" host: ").Append(Host).Append("\n"); + sb.Append(" port: ").Append(Port).Append("\n"); + sb.Append(" brokerId: ").Append(BrokerId).Append("\n"); + sb.Append(" isController: ").Append(IsController).Append("\n"); + sb.Append(" version: ").Append(Version).Append("\n"); + sb.Append(" registerTime: ").Append(RegisterTime).Append("\n"); + sb.Append(" isHealth: ").Append(IsHealth).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowClusterRespClusterBrokers); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowClusterRespClusterBrokers input) + { + if (input == null) + return false; + + return + ( + this.Host == input.Host || + (this.Host != null && + this.Host.Equals(input.Host)) + ) && + ( + this.Port == input.Port || + (this.Port != null && + this.Port.Equals(input.Port)) + ) && + ( + this.BrokerId == input.BrokerId || + (this.BrokerId != null && + this.BrokerId.Equals(input.BrokerId)) + ) && + ( + this.IsController == input.IsController || + (this.IsController != null && + this.IsController.Equals(input.IsController)) + ) && + ( + this.Version == input.Version || + (this.Version != null && + this.Version.Equals(input.Version)) + ) && + ( + this.RegisterTime == input.RegisterTime || + (this.RegisterTime != null && + this.RegisterTime.Equals(input.RegisterTime)) + ) && + ( + this.IsHealth == input.IsHealth || + (this.IsHealth != null && + this.IsHealth.Equals(input.IsHealth)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Host != null) + hashCode = hashCode * 59 + this.Host.GetHashCode(); + if (this.Port != null) + hashCode = hashCode * 59 + this.Port.GetHashCode(); + if (this.BrokerId != null) + hashCode = hashCode * 59 + this.BrokerId.GetHashCode(); + if (this.IsController != null) + hashCode = hashCode * 59 + this.IsController.GetHashCode(); + if (this.Version != null) + hashCode = hashCode * 59 + this.Version.GetHashCode(); + if (this.RegisterTime != null) + hashCode = hashCode * 59 + this.RegisterTime.GetHashCode(); + if (this.IsHealth != null) + hashCode = hashCode * 59 + this.IsHealth.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowClusterResponse.cs b/Services/Kafka/V2/Model/ShowClusterResponse.cs new file mode 100644 index 000000000..0ac8b1e07 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowClusterResponse.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ShowClusterResponse : SdkResponse + { + + /// + /// + /// + [JsonProperty("cluster", NullValueHandling = NullValueHandling.Ignore)] + public ShowClusterRespCluster Cluster { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowClusterResponse {\n"); + sb.Append(" cluster: ").Append(Cluster).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowClusterResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowClusterResponse input) + { + if (input == null) + return false; + + return + ( + this.Cluster == input.Cluster || + (this.Cluster != null && + this.Cluster.Equals(input.Cluster)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Cluster != null) + hashCode = hashCode * 59 + this.Cluster.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowCoordinatorsRequest.cs b/Services/Kafka/V2/Model/ShowCoordinatorsRequest.cs new file mode 100644 index 000000000..dd3b8a96c --- /dev/null +++ b/Services/Kafka/V2/Model/ShowCoordinatorsRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ShowCoordinatorsRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowCoordinatorsRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowCoordinatorsRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowCoordinatorsRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowCoordinatorsRespCoordinators.cs b/Services/Kafka/V2/Model/ShowCoordinatorsRespCoordinators.cs new file mode 100644 index 000000000..875fcd116 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowCoordinatorsRespCoordinators.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// 协调器信息。 + /// + public class ShowCoordinatorsRespCoordinators + { + + /// + /// 消费组ID。 + /// + [JsonProperty("group_id", NullValueHandling = NullValueHandling.Ignore)] + public string GroupId { get; set; } + + /// + /// 对应协调器的broker id。 + /// + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + public int? Id { get; set; } + + /// + /// 对应协调器的地址。 + /// + [JsonProperty("host", NullValueHandling = NullValueHandling.Ignore)] + public string Host { get; set; } + + /// + /// 端口号。 + /// + [JsonProperty("port", NullValueHandling = NullValueHandling.Ignore)] + public int? Port { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowCoordinatorsRespCoordinators {\n"); + sb.Append(" groupId: ").Append(GroupId).Append("\n"); + sb.Append(" id: ").Append(Id).Append("\n"); + sb.Append(" host: ").Append(Host).Append("\n"); + sb.Append(" port: ").Append(Port).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowCoordinatorsRespCoordinators); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowCoordinatorsRespCoordinators input) + { + if (input == null) + return false; + + return + ( + this.GroupId == input.GroupId || + (this.GroupId != null && + this.GroupId.Equals(input.GroupId)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Host == input.Host || + (this.Host != null && + this.Host.Equals(input.Host)) + ) && + ( + this.Port == input.Port || + (this.Port != null && + this.Port.Equals(input.Port)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.GroupId != null) + hashCode = hashCode * 59 + this.GroupId.GetHashCode(); + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Host != null) + hashCode = hashCode * 59 + this.Host.GetHashCode(); + if (this.Port != null) + hashCode = hashCode * 59 + this.Port.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowCoordinatorsResponse.cs b/Services/Kafka/V2/Model/ShowCoordinatorsResponse.cs new file mode 100644 index 000000000..ae4df940b --- /dev/null +++ b/Services/Kafka/V2/Model/ShowCoordinatorsResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ShowCoordinatorsResponse : SdkResponse + { + + /// + /// 所有消费组对应的协调器列表。 + /// + [JsonProperty("coordinators", NullValueHandling = NullValueHandling.Ignore)] + public List Coordinators { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowCoordinatorsResponse {\n"); + sb.Append(" coordinators: ").Append(Coordinators).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowCoordinatorsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowCoordinatorsResponse input) + { + if (input == null) + return false; + + return + ( + this.Coordinators == input.Coordinators || + this.Coordinators != null && + input.Coordinators != null && + this.Coordinators.SequenceEqual(input.Coordinators) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Coordinators != null) + hashCode = hashCode * 59 + this.Coordinators.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowGroupsRequest.cs b/Services/Kafka/V2/Model/ShowGroupsRequest.cs new file mode 100644 index 000000000..397664b98 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowGroupsRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ShowGroupsRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("group", IsPath = true)] + [JsonProperty("group", NullValueHandling = NullValueHandling.Ignore)] + public string Group { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowGroupsRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" group: ").Append(Group).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowGroupsRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowGroupsRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Group != null) + hashCode = hashCode * 59 + this.Group.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowGroupsRespGroup.cs b/Services/Kafka/V2/Model/ShowGroupsRespGroup.cs new file mode 100644 index 000000000..8f7f91d61 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowGroupsRespGroup.cs @@ -0,0 +1,147 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// 消费组信息。 + /// + public class ShowGroupsRespGroup + { + + /// + /// 消费组名称。 + /// + [JsonProperty("group_id", NullValueHandling = NullValueHandling.Ignore)] + public string GroupId { get; set; } + + /// + /// 消费组状态。包含以下状态: - Dead:消费组内没有任何成员,且没有任何元数据。 - Empty:消费组内没有任何成员,存在元数据。 - PreparingRebalance:准备开启rebalance。 - CompletingRebalance:所有成员加入group。 - Stable:消费组内成员可正常消费。 + /// + [JsonProperty("state", NullValueHandling = NullValueHandling.Ignore)] + public string State { get; set; } + + /// + /// 协调器编号。 + /// + [JsonProperty("coordinator_id", NullValueHandling = NullValueHandling.Ignore)] + public int? CoordinatorId { get; set; } + + /// + /// 消费者列表。 + /// + [JsonProperty("members", NullValueHandling = NullValueHandling.Ignore)] + public List Members { get; set; } + + /// + /// 消费进度。 + /// + [JsonProperty("group_message_offsets", NullValueHandling = NullValueHandling.Ignore)] + public List GroupMessageOffsets { get; set; } + + /// + /// 分区分配策略。 + /// + [JsonProperty("assignment_strategy", NullValueHandling = NullValueHandling.Ignore)] + public string AssignmentStrategy { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowGroupsRespGroup {\n"); + sb.Append(" groupId: ").Append(GroupId).Append("\n"); + sb.Append(" state: ").Append(State).Append("\n"); + sb.Append(" coordinatorId: ").Append(CoordinatorId).Append("\n"); + sb.Append(" members: ").Append(Members).Append("\n"); + sb.Append(" groupMessageOffsets: ").Append(GroupMessageOffsets).Append("\n"); + sb.Append(" assignmentStrategy: ").Append(AssignmentStrategy).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowGroupsRespGroup); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowGroupsRespGroup input) + { + if (input == null) + return false; + + return + ( + this.GroupId == input.GroupId || + (this.GroupId != null && + this.GroupId.Equals(input.GroupId)) + ) && + ( + this.State == input.State || + (this.State != null && + this.State.Equals(input.State)) + ) && + ( + this.CoordinatorId == input.CoordinatorId || + (this.CoordinatorId != null && + this.CoordinatorId.Equals(input.CoordinatorId)) + ) && + ( + this.Members == input.Members || + this.Members != null && + input.Members != null && + this.Members.SequenceEqual(input.Members) + ) && + ( + this.GroupMessageOffsets == input.GroupMessageOffsets || + this.GroupMessageOffsets != null && + input.GroupMessageOffsets != null && + this.GroupMessageOffsets.SequenceEqual(input.GroupMessageOffsets) + ) && + ( + this.AssignmentStrategy == input.AssignmentStrategy || + (this.AssignmentStrategy != null && + this.AssignmentStrategy.Equals(input.AssignmentStrategy)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.GroupId != null) + hashCode = hashCode * 59 + this.GroupId.GetHashCode(); + if (this.State != null) + hashCode = hashCode * 59 + this.State.GetHashCode(); + if (this.CoordinatorId != null) + hashCode = hashCode * 59 + this.CoordinatorId.GetHashCode(); + if (this.Members != null) + hashCode = hashCode * 59 + this.Members.GetHashCode(); + if (this.GroupMessageOffsets != null) + hashCode = hashCode * 59 + this.GroupMessageOffsets.GetHashCode(); + if (this.AssignmentStrategy != null) + hashCode = hashCode * 59 + this.AssignmentStrategy.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowGroupsRespGroupAssignment.cs b/Services/Kafka/V2/Model/ShowGroupsRespGroupAssignment.cs new file mode 100644 index 000000000..20f0e4ff0 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowGroupsRespGroupAssignment.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ShowGroupsRespGroupAssignment + { + + /// + /// topic名称。 + /// + [JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] + public string Topic { get; set; } + + /// + /// 分区列表。 + /// + [JsonProperty("partitions", NullValueHandling = NullValueHandling.Ignore)] + public List Partitions { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowGroupsRespGroupAssignment {\n"); + sb.Append(" topic: ").Append(Topic).Append("\n"); + sb.Append(" partitions: ").Append(Partitions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowGroupsRespGroupAssignment); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowGroupsRespGroupAssignment input) + { + if (input == null) + return false; + + return + ( + this.Topic == input.Topic || + (this.Topic != null && + this.Topic.Equals(input.Topic)) + ) && + ( + this.Partitions == input.Partitions || + this.Partitions != null && + input.Partitions != null && + this.Partitions.SequenceEqual(input.Partitions) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Topic != null) + hashCode = hashCode * 59 + this.Topic.GetHashCode(); + if (this.Partitions != null) + hashCode = hashCode * 59 + this.Partitions.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowGroupsRespGroupGroupMessageOffsets.cs b/Services/Kafka/V2/Model/ShowGroupsRespGroupGroupMessageOffsets.cs new file mode 100644 index 000000000..7606c2d2b --- /dev/null +++ b/Services/Kafka/V2/Model/ShowGroupsRespGroupGroupMessageOffsets.cs @@ -0,0 +1,131 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ShowGroupsRespGroupGroupMessageOffsets + { + + /// + /// 分区编号。 + /// + [JsonProperty("partition", NullValueHandling = NullValueHandling.Ignore)] + public int? Partition { get; set; } + + /// + /// 剩余可消费消息数,即消息堆积数。 + /// + [JsonProperty("lag", NullValueHandling = NullValueHandling.Ignore)] + public int? Lag { get; set; } + + /// + /// topic名称。 + /// + [JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] + public string Topic { get; set; } + + /// + /// 当前消费进度。 + /// + [JsonProperty("message_current_offset", NullValueHandling = NullValueHandling.Ignore)] + public int? MessageCurrentOffset { get; set; } + + /// + /// 最大消息位置(LEO)。 + /// + [JsonProperty("message_log_end_offset", NullValueHandling = NullValueHandling.Ignore)] + public int? MessageLogEndOffset { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowGroupsRespGroupGroupMessageOffsets {\n"); + sb.Append(" partition: ").Append(Partition).Append("\n"); + sb.Append(" lag: ").Append(Lag).Append("\n"); + sb.Append(" topic: ").Append(Topic).Append("\n"); + sb.Append(" messageCurrentOffset: ").Append(MessageCurrentOffset).Append("\n"); + sb.Append(" messageLogEndOffset: ").Append(MessageLogEndOffset).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowGroupsRespGroupGroupMessageOffsets); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowGroupsRespGroupGroupMessageOffsets input) + { + if (input == null) + return false; + + return + ( + this.Partition == input.Partition || + (this.Partition != null && + this.Partition.Equals(input.Partition)) + ) && + ( + this.Lag == input.Lag || + (this.Lag != null && + this.Lag.Equals(input.Lag)) + ) && + ( + this.Topic == input.Topic || + (this.Topic != null && + this.Topic.Equals(input.Topic)) + ) && + ( + this.MessageCurrentOffset == input.MessageCurrentOffset || + (this.MessageCurrentOffset != null && + this.MessageCurrentOffset.Equals(input.MessageCurrentOffset)) + ) && + ( + this.MessageLogEndOffset == input.MessageLogEndOffset || + (this.MessageLogEndOffset != null && + this.MessageLogEndOffset.Equals(input.MessageLogEndOffset)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Partition != null) + hashCode = hashCode * 59 + this.Partition.GetHashCode(); + if (this.Lag != null) + hashCode = hashCode * 59 + this.Lag.GetHashCode(); + if (this.Topic != null) + hashCode = hashCode * 59 + this.Topic.GetHashCode(); + if (this.MessageCurrentOffset != null) + hashCode = hashCode * 59 + this.MessageCurrentOffset.GetHashCode(); + if (this.MessageLogEndOffset != null) + hashCode = hashCode * 59 + this.MessageLogEndOffset.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowGroupsRespGroupMembers.cs b/Services/Kafka/V2/Model/ShowGroupsRespGroupMembers.cs new file mode 100644 index 000000000..13ff07866 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowGroupsRespGroupMembers.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ShowGroupsRespGroupMembers + { + + /// + /// 消费组consumer地址。 + /// + [JsonProperty("host", NullValueHandling = NullValueHandling.Ignore)] + public string Host { get; set; } + + /// + /// consumer分配到的分区信息。 + /// + [JsonProperty("assignment", NullValueHandling = NullValueHandling.Ignore)] + public List Assignment { get; set; } + + /// + /// 消费组consumer的ID。 + /// + [JsonProperty("member_id", NullValueHandling = NullValueHandling.Ignore)] + public string MemberId { get; set; } + + /// + /// 客户端ID。 + /// + [JsonProperty("client_id", NullValueHandling = NullValueHandling.Ignore)] + public string ClientId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowGroupsRespGroupMembers {\n"); + sb.Append(" host: ").Append(Host).Append("\n"); + sb.Append(" assignment: ").Append(Assignment).Append("\n"); + sb.Append(" memberId: ").Append(MemberId).Append("\n"); + sb.Append(" clientId: ").Append(ClientId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowGroupsRespGroupMembers); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowGroupsRespGroupMembers input) + { + if (input == null) + return false; + + return + ( + this.Host == input.Host || + (this.Host != null && + this.Host.Equals(input.Host)) + ) && + ( + this.Assignment == input.Assignment || + this.Assignment != null && + input.Assignment != null && + this.Assignment.SequenceEqual(input.Assignment) + ) && + ( + this.MemberId == input.MemberId || + (this.MemberId != null && + this.MemberId.Equals(input.MemberId)) + ) && + ( + this.ClientId == input.ClientId || + (this.ClientId != null && + this.ClientId.Equals(input.ClientId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Host != null) + hashCode = hashCode * 59 + this.Host.GetHashCode(); + if (this.Assignment != null) + hashCode = hashCode * 59 + this.Assignment.GetHashCode(); + if (this.MemberId != null) + hashCode = hashCode * 59 + this.MemberId.GetHashCode(); + if (this.ClientId != null) + hashCode = hashCode * 59 + this.ClientId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowGroupsResponse.cs b/Services/Kafka/V2/Model/ShowGroupsResponse.cs new file mode 100644 index 000000000..801446987 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowGroupsResponse.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ShowGroupsResponse : SdkResponse + { + + /// + /// + /// + [JsonProperty("group", NullValueHandling = NullValueHandling.Ignore)] + public ShowGroupsRespGroup Group { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowGroupsResponse {\n"); + sb.Append(" group: ").Append(Group).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowGroupsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowGroupsResponse input) + { + if (input == null) + return false; + + return + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Group != null) + hashCode = hashCode * 59 + this.Group.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowInstanceExtendProductInfoRequest.cs b/Services/Kafka/V2/Model/ShowInstanceExtendProductInfoRequest.cs new file mode 100644 index 000000000..3387fc9fe --- /dev/null +++ b/Services/Kafka/V2/Model/ShowInstanceExtendProductInfoRequest.cs @@ -0,0 +1,318 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ShowInstanceExtendProductInfoRequest + { + /// + /// Defines type + /// + [JsonConverter(typeof(EnumClassConverter))] + public class TypeEnum + { + /// + /// Enum ADVANCED for value: advanced + /// + public static readonly TypeEnum ADVANCED = new TypeEnum("advanced"); + + /// + /// Enum PLATINUM for value: platinum + /// + public static readonly TypeEnum PLATINUM = new TypeEnum("platinum"); + + /// + /// Enum DEC for value: dec + /// + public static readonly TypeEnum DEC = new TypeEnum("dec"); + + /// + /// Enum EXP for value: exp + /// + public static readonly TypeEnum EXP = new TypeEnum("exp"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"advanced", ADVANCED}, + {"platinum", PLATINUM}, + {"dec", DEC}, + {"exp", EXP}, + }; + + private string Value; + + public TypeEnum(string Value) + { + this.Value = Value; + } + + public static TypeEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as TypeEnum)) + { + return true; + } + + return false; + } + + public bool Equals(TypeEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(TypeEnum a, TypeEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(TypeEnum a, TypeEnum b) + { + return !(a == b); + } + } + + /// + /// Defines engine + /// + [JsonConverter(typeof(EnumClassConverter))] + public class EngineEnum + { + /// + /// Enum KAFKA for value: kafka + /// + public static readonly EngineEnum KAFKA = new EngineEnum("kafka"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"kafka", KAFKA}, + }; + + private string Value; + + public EngineEnum(string Value) + { + this.Value = Value; + } + + public static EngineEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as EngineEnum)) + { + return true; + } + + return false; + } + + public bool Equals(EngineEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(EngineEnum a, EngineEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(EngineEnum a, EngineEnum b) + { + return !(a == b); + } + } + + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("type", IsQuery = true)] + [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] + public TypeEnum Type { get; set; } + /// + /// + /// + [SDKProperty("engine", IsQuery = true)] + [JsonProperty("engine", NullValueHandling = NullValueHandling.Ignore)] + public EngineEnum Engine { get; set; } + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowInstanceExtendProductInfoRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" type: ").Append(Type).Append("\n"); + sb.Append(" engine: ").Append(Engine).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowInstanceExtendProductInfoRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowInstanceExtendProductInfoRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.Engine == input.Engine || + (this.Engine != null && + this.Engine.Equals(input.Engine)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Engine != null) + hashCode = hashCode * 59 + this.Engine.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowInstanceExtendProductInfoResponse.cs b/Services/Kafka/V2/Model/ShowInstanceExtendProductInfoResponse.cs new file mode 100644 index 000000000..f325e0e72 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowInstanceExtendProductInfoResponse.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ShowInstanceExtendProductInfoResponse : SdkResponse + { + + /// + /// 表示按需付费的产品列表。 + /// + [JsonProperty("hourly", NullValueHandling = NullValueHandling.Ignore)] + public List Hourly { get; set; } + + /// + /// 表示包年包月的产品列表。当前暂不支持通过API创建包年包月的Kafka实例。 + /// + [JsonProperty("monthly", NullValueHandling = NullValueHandling.Ignore)] + public List Monthly { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowInstanceExtendProductInfoResponse {\n"); + sb.Append(" hourly: ").Append(Hourly).Append("\n"); + sb.Append(" monthly: ").Append(Monthly).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowInstanceExtendProductInfoResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowInstanceExtendProductInfoResponse input) + { + if (input == null) + return false; + + return + ( + this.Hourly == input.Hourly || + this.Hourly != null && + input.Hourly != null && + this.Hourly.SequenceEqual(input.Hourly) + ) && + ( + this.Monthly == input.Monthly || + this.Monthly != null && + input.Monthly != null && + this.Monthly.SequenceEqual(input.Monthly) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Hourly != null) + hashCode = hashCode * 59 + this.Hourly.GetHashCode(); + if (this.Monthly != null) + hashCode = hashCode * 59 + this.Monthly.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowInstanceRequest.cs b/Services/Kafka/V2/Model/ShowInstanceRequest.cs new file mode 100644 index 000000000..76d4f51fd --- /dev/null +++ b/Services/Kafka/V2/Model/ShowInstanceRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ShowInstanceRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowInstanceRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowInstanceRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowInstanceRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowInstanceResponse.cs b/Services/Kafka/V2/Model/ShowInstanceResponse.cs new file mode 100644 index 000000000..a56e58f1f --- /dev/null +++ b/Services/Kafka/V2/Model/ShowInstanceResponse.cs @@ -0,0 +1,1111 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ShowInstanceResponse : SdkResponse + { + /// + /// 实例类型:集群,cluster。 + /// + /// 实例类型:集群,cluster。 + [JsonConverter(typeof(EnumClassConverter))] + public class TypeEnum + { + /// + /// Enum SINGLE for value: single + /// + public static readonly TypeEnum SINGLE = new TypeEnum("single"); + + /// + /// Enum CLUSTER for value: cluster + /// + public static readonly TypeEnum CLUSTER = new TypeEnum("cluster"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"single", SINGLE}, + {"cluster", CLUSTER}, + }; + + private string Value; + + public TypeEnum(string Value) + { + this.Value = Value; + } + + public static TypeEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as TypeEnum)) + { + return true; + } + + return false; + } + + public bool Equals(TypeEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(TypeEnum a, TypeEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(TypeEnum a, TypeEnum b) + { + return !(a == b); + } + } + + /// + /// 消息老化策略。 + /// + /// 消息老化策略。 + [JsonConverter(typeof(EnumClassConverter))] + public class RetentionPolicyEnum + { + /// + /// Enum TIME_BASE for value: time_base + /// + public static readonly RetentionPolicyEnum TIME_BASE = new RetentionPolicyEnum("time_base"); + + /// + /// Enum PRODUCE_REJECT for value: produce_reject + /// + public static readonly RetentionPolicyEnum PRODUCE_REJECT = new RetentionPolicyEnum("produce_reject"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"time_base", TIME_BASE}, + {"produce_reject", PRODUCE_REJECT}, + }; + + private string Value; + + public RetentionPolicyEnum(string Value) + { + this.Value = Value; + } + + public static RetentionPolicyEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as RetentionPolicyEnum)) + { + return true; + } + + return false; + } + + public bool Equals(RetentionPolicyEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(RetentionPolicyEnum a, RetentionPolicyEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(RetentionPolicyEnum a, RetentionPolicyEnum b) + { + return !(a == b); + } + } + + + /// + /// 实例名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 引擎。 + /// + [JsonProperty("engine", NullValueHandling = NullValueHandling.Ignore)] + public string Engine { get; set; } + + /// + /// 版本。 + /// + [JsonProperty("engine_version", NullValueHandling = NullValueHandling.Ignore)] + public string EngineVersion { get; set; } + + /// + /// 实例规格。 + /// + [JsonProperty("specification", NullValueHandling = NullValueHandling.Ignore)] + public string Specification { get; set; } + + /// + /// 消息存储空间,单位:GB。 + /// + [JsonProperty("storage_space", NullValueHandling = NullValueHandling.Ignore)] + public int? StorageSpace { get; set; } + + /// + /// Kafka实例的最大topic数。 + /// + [JsonProperty("partition_num", NullValueHandling = NullValueHandling.Ignore)] + public int? PartitionNum { get; set; } + + /// + /// 已使用的消息存储空间,单位:GB。 + /// + [JsonProperty("used_storage_space", NullValueHandling = NullValueHandling.Ignore)] + public int? UsedStorageSpace { get; set; } + + /// + /// 实例连接IP地址。 + /// + [JsonProperty("connect_address", NullValueHandling = NullValueHandling.Ignore)] + public string ConnectAddress { get; set; } + + /// + /// 实例连接端口。 + /// + [JsonProperty("port", NullValueHandling = NullValueHandling.Ignore)] + public int? Port { get; set; } + + /// + /// 实例的状态。详细状态说明见[实例状态说明](https://support.huaweicloud.com/api-kafka/kafka-api-180514012.html)。 + /// + [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] + public string Status { get; set; } + + /// + /// 实例ID。 + /// + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// 资源规格标识。 - dms.instance.kafka.cluster.c3.mini:Kafka实例的基准带宽为100MByte/秒。 - dms.instance.kafka.cluster.c3.small.2:Kafka实例的基准带宽为300MByte/秒。 - dms.instance.kafka.cluster.c3.middle.2:Kafka实例的基准带宽为600MByte/秒。 - dms.instance.kafka.cluster.c3.high.2:Kafka实例的基准带宽为1200MByte/秒。 + /// + [JsonProperty("resource_spec_code", NullValueHandling = NullValueHandling.Ignore)] + public string ResourceSpecCode { get; set; } + + /// + /// 付费模式,1表示按需计费,0表示包年/包月计费。 + /// + [JsonProperty("charging_mode", NullValueHandling = NullValueHandling.Ignore)] + public int? ChargingMode { get; set; } + + /// + /// VPC ID。 + /// + [JsonProperty("vpc_id", NullValueHandling = NullValueHandling.Ignore)] + public string VpcId { get; set; } + + /// + /// VPC的名称。 + /// + [JsonProperty("vpc_name", NullValueHandling = NullValueHandling.Ignore)] + public string VpcName { get; set; } + + /// + /// 完成创建时间。 格式为时间戳,指从格林威治时间 1970年01月01日00时00分00秒起至指定时间的偏差总毫秒数。 + /// + [JsonProperty("created_at", NullValueHandling = NullValueHandling.Ignore)] + public string CreatedAt { get; set; } + + /// + /// 用户ID。 + /// + [JsonProperty("user_id", NullValueHandling = NullValueHandling.Ignore)] + public string UserId { get; set; } + + /// + /// 用户名。 + /// + [JsonProperty("user_name", NullValueHandling = NullValueHandling.Ignore)] + public string UserName { get; set; } + + /// + /// 订单ID,只有在包周期计费时才会有order_id值,其他计费方式order_id值为空。 + /// + [JsonProperty("order_id", NullValueHandling = NullValueHandling.Ignore)] + public string OrderId { get; set; } + + /// + /// 维护时间窗开始时间,格式为HH:mm:ss。 + /// + [JsonProperty("maintain_begin", NullValueHandling = NullValueHandling.Ignore)] + public string MaintainBegin { get; set; } + + /// + /// 维护时间窗结束时间,格式为HH:mm:ss。 + /// + [JsonProperty("maintain_end", NullValueHandling = NullValueHandling.Ignore)] + public string MaintainEnd { get; set; } + + /// + /// 实例是否开启公网访问功能。 - true:开启 - false:未开启 + /// + [JsonProperty("enable_publicip", NullValueHandling = NullValueHandling.Ignore)] + public bool? EnablePublicip { get; set; } + + /// + /// Kafka实例的KafkaManager连接地址。 + /// + [JsonProperty("management_connect_address", NullValueHandling = NullValueHandling.Ignore)] + public string ManagementConnectAddress { get; set; } + + /// + /// 是否开启安全认证。 - true:开启 - false:未开启 + /// + [JsonProperty("ssl_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? SslEnable { get; set; } + + /// + /// 企业项目ID。 + /// + [JsonProperty("enterprise_project_id", NullValueHandling = NullValueHandling.Ignore)] + public string EnterpriseProjectId { get; set; } + + /// + /// 实例扩容时用于区分老实例与新实例。 - true:新创建的实例,允许磁盘动态扩容不需要重启。 - false:老实例 + /// + [JsonProperty("is_logical_volume", NullValueHandling = NullValueHandling.Ignore)] + public bool? IsLogicalVolume { get; set; } + + /// + /// 实例扩容磁盘次数,如果超过20次则无法扩容磁盘。 + /// + [JsonProperty("extend_times", NullValueHandling = NullValueHandling.Ignore)] + public int? ExtendTimes { get; set; } + + /// + /// 是否打开kafka自动创建topic功能。 - true:开启 - false:关闭 + /// + [JsonProperty("enable_auto_topic", NullValueHandling = NullValueHandling.Ignore)] + public bool? EnableAutoTopic { get; set; } + + /// + /// 实例类型:集群,cluster。 + /// + [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] + public TypeEnum Type { get; set; } + /// + /// 产品标识。 + /// + [JsonProperty("product_id", NullValueHandling = NullValueHandling.Ignore)] + public string ProductId { get; set; } + + /// + /// 安全组ID。 + /// + [JsonProperty("security_group_id", NullValueHandling = NullValueHandling.Ignore)] + public string SecurityGroupId { get; set; } + + /// + /// 租户安全组名称。 + /// + [JsonProperty("security_group_name", NullValueHandling = NullValueHandling.Ignore)] + public string SecurityGroupName { get; set; } + + /// + /// 子网ID。 + /// + [JsonProperty("subnet_id", NullValueHandling = NullValueHandling.Ignore)] + public string SubnetId { get; set; } + + /// + /// 实例节点所在的可用区,返回“可用区ID”。 + /// + [JsonProperty("available_zones", NullValueHandling = NullValueHandling.Ignore)] + public List AvailableZones { get; set; } + + /// + /// 总共消息存储空间,单位:GB。 + /// + [JsonProperty("total_storage_space", NullValueHandling = NullValueHandling.Ignore)] + public int? TotalStorageSpace { get; set; } + + /// + /// 实例公网连接IP地址。当实例开启了公网访问,实例才包含该参数。 + /// + [JsonProperty("public_connect_address", NullValueHandling = NullValueHandling.Ignore)] + public string PublicConnectAddress { get; set; } + + /// + /// 存储资源ID。 + /// + [JsonProperty("storage_resource_id", NullValueHandling = NullValueHandling.Ignore)] + public string StorageResourceId { get; set; } + + /// + /// IO规格。 + /// + [JsonProperty("storage_spec_code", NullValueHandling = NullValueHandling.Ignore)] + public string StorageSpecCode { get; set; } + + /// + /// 服务类型。 + /// + [JsonProperty("service_type", NullValueHandling = NullValueHandling.Ignore)] + public string ServiceType { get; set; } + + /// + /// 存储类型。 + /// + [JsonProperty("storage_type", NullValueHandling = NullValueHandling.Ignore)] + public string StorageType { get; set; } + + /// + /// 消息老化策略。 + /// + [JsonProperty("retention_policy", NullValueHandling = NullValueHandling.Ignore)] + public RetentionPolicyEnum RetentionPolicy { get; set; } + /// + /// Kafka公网开启状态。 + /// + [JsonProperty("kafka_public_status", NullValueHandling = NullValueHandling.Ignore)] + public string KafkaPublicStatus { get; set; } + + /// + /// 公网带宽。 + /// + [JsonProperty("public_bandwidth", NullValueHandling = NullValueHandling.Ignore)] + public int? PublicBandwidth { get; set; } + + /// + /// 登录Kafka Manager的用户名。 + /// + [JsonProperty("kafka_manager_user", NullValueHandling = NullValueHandling.Ignore)] + public string KafkaManagerUser { get; set; } + + /// + /// 是否开启消息收集功能。 + /// + [JsonProperty("enable_log_collection", NullValueHandling = NullValueHandling.Ignore)] + public bool? EnableLogCollection { get; set; } + + /// + /// 跨VPC访问信息。 + /// + [JsonProperty("cross_vpc_info", NullValueHandling = NullValueHandling.Ignore)] + public string CrossVpcInfo { get; set; } + + /// + /// 是否开启ipv6。 + /// + [JsonProperty("ipv6_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? Ipv6Enable { get; set; } + + /// + /// IPv6的连接地址。 + /// + [JsonProperty("ipv6_connect_addresses", NullValueHandling = NullValueHandling.Ignore)] + public List Ipv6ConnectAddresses { get; set; } + + /// + /// 是否开启转储。 + /// + [JsonProperty("connector_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? ConnectorEnable { get; set; } + + /// + /// 转储任务ID。 + /// + [JsonProperty("connector_id", NullValueHandling = NullValueHandling.Ignore)] + public string ConnectorId { get; set; } + + /// + /// 是否开启Kafka rest功能。 + /// + [JsonProperty("rest_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? RestEnable { get; set; } + + /// + /// Kafka rest连接地址。 + /// + [JsonProperty("rest_connect_address", NullValueHandling = NullValueHandling.Ignore)] + public string RestConnectAddress { get; set; } + + /// + /// 是否开启消息查询功能。 + /// + [JsonProperty("message_query_inst_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? MessageQueryInstEnable { get; set; } + + /// + /// 是否开启VPC明文访问。 + /// + [JsonProperty("vpc_client_plain", NullValueHandling = NullValueHandling.Ignore)] + public bool? VpcClientPlain { get; set; } + + /// + /// Kafka实例支持的特性功能。 + /// + [JsonProperty("support_features", NullValueHandling = NullValueHandling.Ignore)] + public string SupportFeatures { get; set; } + + /// + /// 是否开启消息轨迹功能。 + /// + [JsonProperty("trace_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? TraceEnable { get; set; } + + /// + /// 租户侧连接地址。 + /// + [JsonProperty("pod_connect_address", NullValueHandling = NullValueHandling.Ignore)] + public string PodConnectAddress { get; set; } + + /// + /// 是否开启磁盘加密。 + /// + [JsonProperty("disk_encrypted", NullValueHandling = NullValueHandling.Ignore)] + public bool? DiskEncrypted { get; set; } + + /// + /// Kafka实例私有连接地址。 + /// + [JsonProperty("kafka_private_connect_address", NullValueHandling = NullValueHandling.Ignore)] + public string KafkaPrivateConnectAddress { get; set; } + + /// + /// 云监控版本。 + /// + [JsonProperty("ces_version", NullValueHandling = NullValueHandling.Ignore)] + public string CesVersion { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowInstanceResponse {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" engine: ").Append(Engine).Append("\n"); + sb.Append(" engineVersion: ").Append(EngineVersion).Append("\n"); + sb.Append(" specification: ").Append(Specification).Append("\n"); + sb.Append(" storageSpace: ").Append(StorageSpace).Append("\n"); + sb.Append(" partitionNum: ").Append(PartitionNum).Append("\n"); + sb.Append(" usedStorageSpace: ").Append(UsedStorageSpace).Append("\n"); + sb.Append(" connectAddress: ").Append(ConnectAddress).Append("\n"); + sb.Append(" port: ").Append(Port).Append("\n"); + sb.Append(" status: ").Append(Status).Append("\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" resourceSpecCode: ").Append(ResourceSpecCode).Append("\n"); + sb.Append(" chargingMode: ").Append(ChargingMode).Append("\n"); + sb.Append(" vpcId: ").Append(VpcId).Append("\n"); + sb.Append(" vpcName: ").Append(VpcName).Append("\n"); + sb.Append(" createdAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" userId: ").Append(UserId).Append("\n"); + sb.Append(" userName: ").Append(UserName).Append("\n"); + sb.Append(" orderId: ").Append(OrderId).Append("\n"); + sb.Append(" maintainBegin: ").Append(MaintainBegin).Append("\n"); + sb.Append(" maintainEnd: ").Append(MaintainEnd).Append("\n"); + sb.Append(" enablePublicip: ").Append(EnablePublicip).Append("\n"); + sb.Append(" managementConnectAddress: ").Append(ManagementConnectAddress).Append("\n"); + sb.Append(" sslEnable: ").Append(SslEnable).Append("\n"); + sb.Append(" enterpriseProjectId: ").Append(EnterpriseProjectId).Append("\n"); + sb.Append(" isLogicalVolume: ").Append(IsLogicalVolume).Append("\n"); + sb.Append(" extendTimes: ").Append(ExtendTimes).Append("\n"); + sb.Append(" enableAutoTopic: ").Append(EnableAutoTopic).Append("\n"); + sb.Append(" type: ").Append(Type).Append("\n"); + sb.Append(" productId: ").Append(ProductId).Append("\n"); + sb.Append(" securityGroupId: ").Append(SecurityGroupId).Append("\n"); + sb.Append(" securityGroupName: ").Append(SecurityGroupName).Append("\n"); + sb.Append(" subnetId: ").Append(SubnetId).Append("\n"); + sb.Append(" availableZones: ").Append(AvailableZones).Append("\n"); + sb.Append(" totalStorageSpace: ").Append(TotalStorageSpace).Append("\n"); + sb.Append(" publicConnectAddress: ").Append(PublicConnectAddress).Append("\n"); + sb.Append(" storageResourceId: ").Append(StorageResourceId).Append("\n"); + sb.Append(" storageSpecCode: ").Append(StorageSpecCode).Append("\n"); + sb.Append(" serviceType: ").Append(ServiceType).Append("\n"); + sb.Append(" storageType: ").Append(StorageType).Append("\n"); + sb.Append(" retentionPolicy: ").Append(RetentionPolicy).Append("\n"); + sb.Append(" kafkaPublicStatus: ").Append(KafkaPublicStatus).Append("\n"); + sb.Append(" publicBandwidth: ").Append(PublicBandwidth).Append("\n"); + sb.Append(" kafkaManagerUser: ").Append(KafkaManagerUser).Append("\n"); + sb.Append(" enableLogCollection: ").Append(EnableLogCollection).Append("\n"); + sb.Append(" crossVpcInfo: ").Append(CrossVpcInfo).Append("\n"); + sb.Append(" ipv6Enable: ").Append(Ipv6Enable).Append("\n"); + sb.Append(" ipv6ConnectAddresses: ").Append(Ipv6ConnectAddresses).Append("\n"); + sb.Append(" connectorEnable: ").Append(ConnectorEnable).Append("\n"); + sb.Append(" connectorId: ").Append(ConnectorId).Append("\n"); + sb.Append(" restEnable: ").Append(RestEnable).Append("\n"); + sb.Append(" restConnectAddress: ").Append(RestConnectAddress).Append("\n"); + sb.Append(" messageQueryInstEnable: ").Append(MessageQueryInstEnable).Append("\n"); + sb.Append(" vpcClientPlain: ").Append(VpcClientPlain).Append("\n"); + sb.Append(" supportFeatures: ").Append(SupportFeatures).Append("\n"); + sb.Append(" traceEnable: ").Append(TraceEnable).Append("\n"); + sb.Append(" podConnectAddress: ").Append(PodConnectAddress).Append("\n"); + sb.Append(" diskEncrypted: ").Append(DiskEncrypted).Append("\n"); + sb.Append(" kafkaPrivateConnectAddress: ").Append(KafkaPrivateConnectAddress).Append("\n"); + sb.Append(" cesVersion: ").Append(CesVersion).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowInstanceResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowInstanceResponse input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Engine == input.Engine || + (this.Engine != null && + this.Engine.Equals(input.Engine)) + ) && + ( + this.EngineVersion == input.EngineVersion || + (this.EngineVersion != null && + this.EngineVersion.Equals(input.EngineVersion)) + ) && + ( + this.Specification == input.Specification || + (this.Specification != null && + this.Specification.Equals(input.Specification)) + ) && + ( + this.StorageSpace == input.StorageSpace || + (this.StorageSpace != null && + this.StorageSpace.Equals(input.StorageSpace)) + ) && + ( + this.PartitionNum == input.PartitionNum || + (this.PartitionNum != null && + this.PartitionNum.Equals(input.PartitionNum)) + ) && + ( + this.UsedStorageSpace == input.UsedStorageSpace || + (this.UsedStorageSpace != null && + this.UsedStorageSpace.Equals(input.UsedStorageSpace)) + ) && + ( + this.ConnectAddress == input.ConnectAddress || + (this.ConnectAddress != null && + this.ConnectAddress.Equals(input.ConnectAddress)) + ) && + ( + this.Port == input.Port || + (this.Port != null && + this.Port.Equals(input.Port)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.ResourceSpecCode == input.ResourceSpecCode || + (this.ResourceSpecCode != null && + this.ResourceSpecCode.Equals(input.ResourceSpecCode)) + ) && + ( + this.ChargingMode == input.ChargingMode || + (this.ChargingMode != null && + this.ChargingMode.Equals(input.ChargingMode)) + ) && + ( + this.VpcId == input.VpcId || + (this.VpcId != null && + this.VpcId.Equals(input.VpcId)) + ) && + ( + this.VpcName == input.VpcName || + (this.VpcName != null && + this.VpcName.Equals(input.VpcName)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.UserName == input.UserName || + (this.UserName != null && + this.UserName.Equals(input.UserName)) + ) && + ( + this.OrderId == input.OrderId || + (this.OrderId != null && + this.OrderId.Equals(input.OrderId)) + ) && + ( + this.MaintainBegin == input.MaintainBegin || + (this.MaintainBegin != null && + this.MaintainBegin.Equals(input.MaintainBegin)) + ) && + ( + this.MaintainEnd == input.MaintainEnd || + (this.MaintainEnd != null && + this.MaintainEnd.Equals(input.MaintainEnd)) + ) && + ( + this.EnablePublicip == input.EnablePublicip || + (this.EnablePublicip != null && + this.EnablePublicip.Equals(input.EnablePublicip)) + ) && + ( + this.ManagementConnectAddress == input.ManagementConnectAddress || + (this.ManagementConnectAddress != null && + this.ManagementConnectAddress.Equals(input.ManagementConnectAddress)) + ) && + ( + this.SslEnable == input.SslEnable || + (this.SslEnable != null && + this.SslEnable.Equals(input.SslEnable)) + ) && + ( + this.EnterpriseProjectId == input.EnterpriseProjectId || + (this.EnterpriseProjectId != null && + this.EnterpriseProjectId.Equals(input.EnterpriseProjectId)) + ) && + ( + this.IsLogicalVolume == input.IsLogicalVolume || + (this.IsLogicalVolume != null && + this.IsLogicalVolume.Equals(input.IsLogicalVolume)) + ) && + ( + this.ExtendTimes == input.ExtendTimes || + (this.ExtendTimes != null && + this.ExtendTimes.Equals(input.ExtendTimes)) + ) && + ( + this.EnableAutoTopic == input.EnableAutoTopic || + (this.EnableAutoTopic != null && + this.EnableAutoTopic.Equals(input.EnableAutoTopic)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.ProductId == input.ProductId || + (this.ProductId != null && + this.ProductId.Equals(input.ProductId)) + ) && + ( + this.SecurityGroupId == input.SecurityGroupId || + (this.SecurityGroupId != null && + this.SecurityGroupId.Equals(input.SecurityGroupId)) + ) && + ( + this.SecurityGroupName == input.SecurityGroupName || + (this.SecurityGroupName != null && + this.SecurityGroupName.Equals(input.SecurityGroupName)) + ) && + ( + this.SubnetId == input.SubnetId || + (this.SubnetId != null && + this.SubnetId.Equals(input.SubnetId)) + ) && + ( + this.AvailableZones == input.AvailableZones || + this.AvailableZones != null && + input.AvailableZones != null && + this.AvailableZones.SequenceEqual(input.AvailableZones) + ) && + ( + this.TotalStorageSpace == input.TotalStorageSpace || + (this.TotalStorageSpace != null && + this.TotalStorageSpace.Equals(input.TotalStorageSpace)) + ) && + ( + this.PublicConnectAddress == input.PublicConnectAddress || + (this.PublicConnectAddress != null && + this.PublicConnectAddress.Equals(input.PublicConnectAddress)) + ) && + ( + this.StorageResourceId == input.StorageResourceId || + (this.StorageResourceId != null && + this.StorageResourceId.Equals(input.StorageResourceId)) + ) && + ( + this.StorageSpecCode == input.StorageSpecCode || + (this.StorageSpecCode != null && + this.StorageSpecCode.Equals(input.StorageSpecCode)) + ) && + ( + this.ServiceType == input.ServiceType || + (this.ServiceType != null && + this.ServiceType.Equals(input.ServiceType)) + ) && + ( + this.StorageType == input.StorageType || + (this.StorageType != null && + this.StorageType.Equals(input.StorageType)) + ) && + ( + this.RetentionPolicy == input.RetentionPolicy || + (this.RetentionPolicy != null && + this.RetentionPolicy.Equals(input.RetentionPolicy)) + ) && + ( + this.KafkaPublicStatus == input.KafkaPublicStatus || + (this.KafkaPublicStatus != null && + this.KafkaPublicStatus.Equals(input.KafkaPublicStatus)) + ) && + ( + this.PublicBandwidth == input.PublicBandwidth || + (this.PublicBandwidth != null && + this.PublicBandwidth.Equals(input.PublicBandwidth)) + ) && + ( + this.KafkaManagerUser == input.KafkaManagerUser || + (this.KafkaManagerUser != null && + this.KafkaManagerUser.Equals(input.KafkaManagerUser)) + ) && + ( + this.EnableLogCollection == input.EnableLogCollection || + (this.EnableLogCollection != null && + this.EnableLogCollection.Equals(input.EnableLogCollection)) + ) && + ( + this.CrossVpcInfo == input.CrossVpcInfo || + (this.CrossVpcInfo != null && + this.CrossVpcInfo.Equals(input.CrossVpcInfo)) + ) && + ( + this.Ipv6Enable == input.Ipv6Enable || + (this.Ipv6Enable != null && + this.Ipv6Enable.Equals(input.Ipv6Enable)) + ) && + ( + this.Ipv6ConnectAddresses == input.Ipv6ConnectAddresses || + this.Ipv6ConnectAddresses != null && + input.Ipv6ConnectAddresses != null && + this.Ipv6ConnectAddresses.SequenceEqual(input.Ipv6ConnectAddresses) + ) && + ( + this.ConnectorEnable == input.ConnectorEnable || + (this.ConnectorEnable != null && + this.ConnectorEnable.Equals(input.ConnectorEnable)) + ) && + ( + this.ConnectorId == input.ConnectorId || + (this.ConnectorId != null && + this.ConnectorId.Equals(input.ConnectorId)) + ) && + ( + this.RestEnable == input.RestEnable || + (this.RestEnable != null && + this.RestEnable.Equals(input.RestEnable)) + ) && + ( + this.RestConnectAddress == input.RestConnectAddress || + (this.RestConnectAddress != null && + this.RestConnectAddress.Equals(input.RestConnectAddress)) + ) && + ( + this.MessageQueryInstEnable == input.MessageQueryInstEnable || + (this.MessageQueryInstEnable != null && + this.MessageQueryInstEnable.Equals(input.MessageQueryInstEnable)) + ) && + ( + this.VpcClientPlain == input.VpcClientPlain || + (this.VpcClientPlain != null && + this.VpcClientPlain.Equals(input.VpcClientPlain)) + ) && + ( + this.SupportFeatures == input.SupportFeatures || + (this.SupportFeatures != null && + this.SupportFeatures.Equals(input.SupportFeatures)) + ) && + ( + this.TraceEnable == input.TraceEnable || + (this.TraceEnable != null && + this.TraceEnable.Equals(input.TraceEnable)) + ) && + ( + this.PodConnectAddress == input.PodConnectAddress || + (this.PodConnectAddress != null && + this.PodConnectAddress.Equals(input.PodConnectAddress)) + ) && + ( + this.DiskEncrypted == input.DiskEncrypted || + (this.DiskEncrypted != null && + this.DiskEncrypted.Equals(input.DiskEncrypted)) + ) && + ( + this.KafkaPrivateConnectAddress == input.KafkaPrivateConnectAddress || + (this.KafkaPrivateConnectAddress != null && + this.KafkaPrivateConnectAddress.Equals(input.KafkaPrivateConnectAddress)) + ) && + ( + this.CesVersion == input.CesVersion || + (this.CesVersion != null && + this.CesVersion.Equals(input.CesVersion)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Engine != null) + hashCode = hashCode * 59 + this.Engine.GetHashCode(); + if (this.EngineVersion != null) + hashCode = hashCode * 59 + this.EngineVersion.GetHashCode(); + if (this.Specification != null) + hashCode = hashCode * 59 + this.Specification.GetHashCode(); + if (this.StorageSpace != null) + hashCode = hashCode * 59 + this.StorageSpace.GetHashCode(); + if (this.PartitionNum != null) + hashCode = hashCode * 59 + this.PartitionNum.GetHashCode(); + if (this.UsedStorageSpace != null) + hashCode = hashCode * 59 + this.UsedStorageSpace.GetHashCode(); + if (this.ConnectAddress != null) + hashCode = hashCode * 59 + this.ConnectAddress.GetHashCode(); + if (this.Port != null) + hashCode = hashCode * 59 + this.Port.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.ResourceSpecCode != null) + hashCode = hashCode * 59 + this.ResourceSpecCode.GetHashCode(); + if (this.ChargingMode != null) + hashCode = hashCode * 59 + this.ChargingMode.GetHashCode(); + if (this.VpcId != null) + hashCode = hashCode * 59 + this.VpcId.GetHashCode(); + if (this.VpcName != null) + hashCode = hashCode * 59 + this.VpcName.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.UserId != null) + hashCode = hashCode * 59 + this.UserId.GetHashCode(); + if (this.UserName != null) + hashCode = hashCode * 59 + this.UserName.GetHashCode(); + if (this.OrderId != null) + hashCode = hashCode * 59 + this.OrderId.GetHashCode(); + if (this.MaintainBegin != null) + hashCode = hashCode * 59 + this.MaintainBegin.GetHashCode(); + if (this.MaintainEnd != null) + hashCode = hashCode * 59 + this.MaintainEnd.GetHashCode(); + if (this.EnablePublicip != null) + hashCode = hashCode * 59 + this.EnablePublicip.GetHashCode(); + if (this.ManagementConnectAddress != null) + hashCode = hashCode * 59 + this.ManagementConnectAddress.GetHashCode(); + if (this.SslEnable != null) + hashCode = hashCode * 59 + this.SslEnable.GetHashCode(); + if (this.EnterpriseProjectId != null) + hashCode = hashCode * 59 + this.EnterpriseProjectId.GetHashCode(); + if (this.IsLogicalVolume != null) + hashCode = hashCode * 59 + this.IsLogicalVolume.GetHashCode(); + if (this.ExtendTimes != null) + hashCode = hashCode * 59 + this.ExtendTimes.GetHashCode(); + if (this.EnableAutoTopic != null) + hashCode = hashCode * 59 + this.EnableAutoTopic.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.ProductId != null) + hashCode = hashCode * 59 + this.ProductId.GetHashCode(); + if (this.SecurityGroupId != null) + hashCode = hashCode * 59 + this.SecurityGroupId.GetHashCode(); + if (this.SecurityGroupName != null) + hashCode = hashCode * 59 + this.SecurityGroupName.GetHashCode(); + if (this.SubnetId != null) + hashCode = hashCode * 59 + this.SubnetId.GetHashCode(); + if (this.AvailableZones != null) + hashCode = hashCode * 59 + this.AvailableZones.GetHashCode(); + if (this.TotalStorageSpace != null) + hashCode = hashCode * 59 + this.TotalStorageSpace.GetHashCode(); + if (this.PublicConnectAddress != null) + hashCode = hashCode * 59 + this.PublicConnectAddress.GetHashCode(); + if (this.StorageResourceId != null) + hashCode = hashCode * 59 + this.StorageResourceId.GetHashCode(); + if (this.StorageSpecCode != null) + hashCode = hashCode * 59 + this.StorageSpecCode.GetHashCode(); + if (this.ServiceType != null) + hashCode = hashCode * 59 + this.ServiceType.GetHashCode(); + if (this.StorageType != null) + hashCode = hashCode * 59 + this.StorageType.GetHashCode(); + if (this.RetentionPolicy != null) + hashCode = hashCode * 59 + this.RetentionPolicy.GetHashCode(); + if (this.KafkaPublicStatus != null) + hashCode = hashCode * 59 + this.KafkaPublicStatus.GetHashCode(); + if (this.PublicBandwidth != null) + hashCode = hashCode * 59 + this.PublicBandwidth.GetHashCode(); + if (this.KafkaManagerUser != null) + hashCode = hashCode * 59 + this.KafkaManagerUser.GetHashCode(); + if (this.EnableLogCollection != null) + hashCode = hashCode * 59 + this.EnableLogCollection.GetHashCode(); + if (this.CrossVpcInfo != null) + hashCode = hashCode * 59 + this.CrossVpcInfo.GetHashCode(); + if (this.Ipv6Enable != null) + hashCode = hashCode * 59 + this.Ipv6Enable.GetHashCode(); + if (this.Ipv6ConnectAddresses != null) + hashCode = hashCode * 59 + this.Ipv6ConnectAddresses.GetHashCode(); + if (this.ConnectorEnable != null) + hashCode = hashCode * 59 + this.ConnectorEnable.GetHashCode(); + if (this.ConnectorId != null) + hashCode = hashCode * 59 + this.ConnectorId.GetHashCode(); + if (this.RestEnable != null) + hashCode = hashCode * 59 + this.RestEnable.GetHashCode(); + if (this.RestConnectAddress != null) + hashCode = hashCode * 59 + this.RestConnectAddress.GetHashCode(); + if (this.MessageQueryInstEnable != null) + hashCode = hashCode * 59 + this.MessageQueryInstEnable.GetHashCode(); + if (this.VpcClientPlain != null) + hashCode = hashCode * 59 + this.VpcClientPlain.GetHashCode(); + if (this.SupportFeatures != null) + hashCode = hashCode * 59 + this.SupportFeatures.GetHashCode(); + if (this.TraceEnable != null) + hashCode = hashCode * 59 + this.TraceEnable.GetHashCode(); + if (this.PodConnectAddress != null) + hashCode = hashCode * 59 + this.PodConnectAddress.GetHashCode(); + if (this.DiskEncrypted != null) + hashCode = hashCode * 59 + this.DiskEncrypted.GetHashCode(); + if (this.KafkaPrivateConnectAddress != null) + hashCode = hashCode * 59 + this.KafkaPrivateConnectAddress.GetHashCode(); + if (this.CesVersion != null) + hashCode = hashCode * 59 + this.CesVersion.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowInstanceTagsRequest.cs b/Services/Kafka/V2/Model/ShowInstanceTagsRequest.cs new file mode 100644 index 000000000..c0b6900cc --- /dev/null +++ b/Services/Kafka/V2/Model/ShowInstanceTagsRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ShowInstanceTagsRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowInstanceTagsRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowInstanceTagsRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowInstanceTagsRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowInstanceTagsResponse.cs b/Services/Kafka/V2/Model/ShowInstanceTagsResponse.cs new file mode 100644 index 000000000..aa1e03cbc --- /dev/null +++ b/Services/Kafka/V2/Model/ShowInstanceTagsResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ShowInstanceTagsResponse : SdkResponse + { + + /// + /// 标签列表 + /// + [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] + public List Tags { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowInstanceTagsResponse {\n"); + sb.Append(" tags: ").Append(Tags).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowInstanceTagsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowInstanceTagsResponse input) + { + if (input == null) + return false; + + return + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowInstanceTopicDetailRequest.cs b/Services/Kafka/V2/Model/ShowInstanceTopicDetailRequest.cs new file mode 100644 index 000000000..baa6a60ea --- /dev/null +++ b/Services/Kafka/V2/Model/ShowInstanceTopicDetailRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ShowInstanceTopicDetailRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("topic", IsPath = true)] + [JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] + public string Topic { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowInstanceTopicDetailRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" topic: ").Append(Topic).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowInstanceTopicDetailRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowInstanceTopicDetailRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Topic == input.Topic || + (this.Topic != null && + this.Topic.Equals(input.Topic)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Topic != null) + hashCode = hashCode * 59 + this.Topic.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowInstanceTopicDetailRespPartitions.cs b/Services/Kafka/V2/Model/ShowInstanceTopicDetailRespPartitions.cs new file mode 100644 index 000000000..39418d212 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowInstanceTopicDetailRespPartitions.cs @@ -0,0 +1,160 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ShowInstanceTopicDetailRespPartitions + { + + /// + /// 分区ID。 + /// + [JsonProperty("partition", NullValueHandling = NullValueHandling.Ignore)] + public int? Partition { get; set; } + + /// + /// leader副本所在节点的id。 + /// + [JsonProperty("leader", NullValueHandling = NullValueHandling.Ignore)] + public int? Leader { get; set; } + + /// + /// 分区leader副本的LEO(Log End Offset)。 + /// + [JsonProperty("leo", NullValueHandling = NullValueHandling.Ignore)] + public int? Leo { get; set; } + + /// + /// 分区高水位(HW,High Watermark)。 + /// + [JsonProperty("hw", NullValueHandling = NullValueHandling.Ignore)] + public int? Hw { get; set; } + + /// + /// 分区leader副本的LSO(Log Start Offset)。 + /// + [JsonProperty("lso", NullValueHandling = NullValueHandling.Ignore)] + public int? Lso { get; set; } + + /// + /// 分区上次写入消息的时间。 + /// + [JsonProperty("last_update_timestamp", NullValueHandling = NullValueHandling.Ignore)] + public int? LastUpdateTimestamp { get; set; } + + /// + /// 副本列表。 + /// + [JsonProperty("replicas", NullValueHandling = NullValueHandling.Ignore)] + public List Replicas { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowInstanceTopicDetailRespPartitions {\n"); + sb.Append(" partition: ").Append(Partition).Append("\n"); + sb.Append(" leader: ").Append(Leader).Append("\n"); + sb.Append(" leo: ").Append(Leo).Append("\n"); + sb.Append(" hw: ").Append(Hw).Append("\n"); + sb.Append(" lso: ").Append(Lso).Append("\n"); + sb.Append(" lastUpdateTimestamp: ").Append(LastUpdateTimestamp).Append("\n"); + sb.Append(" replicas: ").Append(Replicas).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowInstanceTopicDetailRespPartitions); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowInstanceTopicDetailRespPartitions input) + { + if (input == null) + return false; + + return + ( + this.Partition == input.Partition || + (this.Partition != null && + this.Partition.Equals(input.Partition)) + ) && + ( + this.Leader == input.Leader || + (this.Leader != null && + this.Leader.Equals(input.Leader)) + ) && + ( + this.Leo == input.Leo || + (this.Leo != null && + this.Leo.Equals(input.Leo)) + ) && + ( + this.Hw == input.Hw || + (this.Hw != null && + this.Hw.Equals(input.Hw)) + ) && + ( + this.Lso == input.Lso || + (this.Lso != null && + this.Lso.Equals(input.Lso)) + ) && + ( + this.LastUpdateTimestamp == input.LastUpdateTimestamp || + (this.LastUpdateTimestamp != null && + this.LastUpdateTimestamp.Equals(input.LastUpdateTimestamp)) + ) && + ( + this.Replicas == input.Replicas || + this.Replicas != null && + input.Replicas != null && + this.Replicas.SequenceEqual(input.Replicas) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Partition != null) + hashCode = hashCode * 59 + this.Partition.GetHashCode(); + if (this.Leader != null) + hashCode = hashCode * 59 + this.Leader.GetHashCode(); + if (this.Leo != null) + hashCode = hashCode * 59 + this.Leo.GetHashCode(); + if (this.Hw != null) + hashCode = hashCode * 59 + this.Hw.GetHashCode(); + if (this.Lso != null) + hashCode = hashCode * 59 + this.Lso.GetHashCode(); + if (this.LastUpdateTimestamp != null) + hashCode = hashCode * 59 + this.LastUpdateTimestamp.GetHashCode(); + if (this.Replicas != null) + hashCode = hashCode * 59 + this.Replicas.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowInstanceTopicDetailRespReplicas.cs b/Services/Kafka/V2/Model/ShowInstanceTopicDetailRespReplicas.cs new file mode 100644 index 000000000..1a49f2aa6 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowInstanceTopicDetailRespReplicas.cs @@ -0,0 +1,131 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ShowInstanceTopicDetailRespReplicas + { + + /// + /// 副本所在的节点ID。 + /// + [JsonProperty("broker", NullValueHandling = NullValueHandling.Ignore)] + public int? Broker { get; set; } + + /// + /// 该副本是否为leader。 + /// + [JsonProperty("leader", NullValueHandling = NullValueHandling.Ignore)] + public bool? Leader { get; set; } + + /// + /// 该副本是否在ISR副本中。 + /// + [JsonProperty("in_sync", NullValueHandling = NullValueHandling.Ignore)] + public bool? InSync { get; set; } + + /// + /// 该副本当前日志大小。 + /// + [JsonProperty("size", NullValueHandling = NullValueHandling.Ignore)] + public int? Size { get; set; } + + /// + /// 该副本当前落后hw的消息数。 + /// + [JsonProperty("lag", NullValueHandling = NullValueHandling.Ignore)] + public int? Lag { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowInstanceTopicDetailRespReplicas {\n"); + sb.Append(" broker: ").Append(Broker).Append("\n"); + sb.Append(" leader: ").Append(Leader).Append("\n"); + sb.Append(" inSync: ").Append(InSync).Append("\n"); + sb.Append(" size: ").Append(Size).Append("\n"); + sb.Append(" lag: ").Append(Lag).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowInstanceTopicDetailRespReplicas); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowInstanceTopicDetailRespReplicas input) + { + if (input == null) + return false; + + return + ( + this.Broker == input.Broker || + (this.Broker != null && + this.Broker.Equals(input.Broker)) + ) && + ( + this.Leader == input.Leader || + (this.Leader != null && + this.Leader.Equals(input.Leader)) + ) && + ( + this.InSync == input.InSync || + (this.InSync != null && + this.InSync.Equals(input.InSync)) + ) && + ( + this.Size == input.Size || + (this.Size != null && + this.Size.Equals(input.Size)) + ) && + ( + this.Lag == input.Lag || + (this.Lag != null && + this.Lag.Equals(input.Lag)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Broker != null) + hashCode = hashCode * 59 + this.Broker.GetHashCode(); + if (this.Leader != null) + hashCode = hashCode * 59 + this.Leader.GetHashCode(); + if (this.InSync != null) + hashCode = hashCode * 59 + this.InSync.GetHashCode(); + if (this.Size != null) + hashCode = hashCode * 59 + this.Size.GetHashCode(); + if (this.Lag != null) + hashCode = hashCode * 59 + this.Lag.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowInstanceTopicDetailResponse.cs b/Services/Kafka/V2/Model/ShowInstanceTopicDetailResponse.cs new file mode 100644 index 000000000..d2f889a2c --- /dev/null +++ b/Services/Kafka/V2/Model/ShowInstanceTopicDetailResponse.cs @@ -0,0 +1,105 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ShowInstanceTopicDetailResponse : SdkResponse + { + + /// + /// topic名称。 + /// + [JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] + public string Topic { get; set; } + + /// + /// 分区列表。 + /// + [JsonProperty("partitions", NullValueHandling = NullValueHandling.Ignore)] + public List Partitions { get; set; } + + /// + /// 订阅该topic的消费组名称列表。 + /// + [JsonProperty("group_subscribed", NullValueHandling = NullValueHandling.Ignore)] + public List GroupSubscribed { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowInstanceTopicDetailResponse {\n"); + sb.Append(" topic: ").Append(Topic).Append("\n"); + sb.Append(" partitions: ").Append(Partitions).Append("\n"); + sb.Append(" groupSubscribed: ").Append(GroupSubscribed).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowInstanceTopicDetailResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowInstanceTopicDetailResponse input) + { + if (input == null) + return false; + + return + ( + this.Topic == input.Topic || + (this.Topic != null && + this.Topic.Equals(input.Topic)) + ) && + ( + this.Partitions == input.Partitions || + this.Partitions != null && + input.Partitions != null && + this.Partitions.SequenceEqual(input.Partitions) + ) && + ( + this.GroupSubscribed == input.GroupSubscribed || + this.GroupSubscribed != null && + input.GroupSubscribed != null && + this.GroupSubscribed.SequenceEqual(input.GroupSubscribed) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Topic != null) + hashCode = hashCode * 59 + this.Topic.GetHashCode(); + if (this.Partitions != null) + hashCode = hashCode * 59 + this.Partitions.GetHashCode(); + if (this.GroupSubscribed != null) + hashCode = hashCode * 59 + this.GroupSubscribed.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowMaintainWindowsRequest.cs b/Services/Kafka/V2/Model/ShowMaintainWindowsRequest.cs new file mode 100644 index 000000000..e6ae75852 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowMaintainWindowsRequest.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ShowMaintainWindowsRequest + { + + + } +} diff --git a/Services/Kafka/V2/Model/ShowMaintainWindowsRespMaintainWindows.cs b/Services/Kafka/V2/Model/ShowMaintainWindowsRespMaintainWindows.cs new file mode 100644 index 000000000..18352ff93 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowMaintainWindowsRespMaintainWindows.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ShowMaintainWindowsRespMaintainWindows + { + + /// + /// 是否为默认时间段。 + /// + [JsonProperty("default", NullValueHandling = NullValueHandling.Ignore)] + public bool? Default { get; set; } + + /// + /// 维护时间窗结束时间。 + /// + [JsonProperty("end", NullValueHandling = NullValueHandling.Ignore)] + public string End { get; set; } + + /// + /// 维护时间窗开始时间。 + /// + [JsonProperty("begin", NullValueHandling = NullValueHandling.Ignore)] + public string Begin { get; set; } + + /// + /// 序号。 + /// + [JsonProperty("seq", NullValueHandling = NullValueHandling.Ignore)] + public int? Seq { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowMaintainWindowsRespMaintainWindows {\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" end: ").Append(End).Append("\n"); + sb.Append(" begin: ").Append(Begin).Append("\n"); + sb.Append(" seq: ").Append(Seq).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowMaintainWindowsRespMaintainWindows); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowMaintainWindowsRespMaintainWindows input) + { + if (input == null) + return false; + + return + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && + ( + this.End == input.End || + (this.End != null && + this.End.Equals(input.End)) + ) && + ( + this.Begin == input.Begin || + (this.Begin != null && + this.Begin.Equals(input.Begin)) + ) && + ( + this.Seq == input.Seq || + (this.Seq != null && + this.Seq.Equals(input.Seq)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.End != null) + hashCode = hashCode * 59 + this.End.GetHashCode(); + if (this.Begin != null) + hashCode = hashCode * 59 + this.Begin.GetHashCode(); + if (this.Seq != null) + hashCode = hashCode * 59 + this.Seq.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowMaintainWindowsResponse.cs b/Services/Kafka/V2/Model/ShowMaintainWindowsResponse.cs new file mode 100644 index 000000000..cdc15177e --- /dev/null +++ b/Services/Kafka/V2/Model/ShowMaintainWindowsResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ShowMaintainWindowsResponse : SdkResponse + { + + /// + /// 支持的维护时间窗列表。 + /// + [JsonProperty("maintain_windows", NullValueHandling = NullValueHandling.Ignore)] + public List MaintainWindows { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowMaintainWindowsResponse {\n"); + sb.Append(" maintainWindows: ").Append(MaintainWindows).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowMaintainWindowsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowMaintainWindowsResponse input) + { + if (input == null) + return false; + + return + ( + this.MaintainWindows == input.MaintainWindows || + this.MaintainWindows != null && + input.MaintainWindows != null && + this.MaintainWindows.SequenceEqual(input.MaintainWindows) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MaintainWindows != null) + hashCode = hashCode * 59 + this.MaintainWindows.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowMessagesRequest.cs b/Services/Kafka/V2/Model/ShowMessagesRequest.cs new file mode 100644 index 000000000..71349ef53 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowMessagesRequest.cs @@ -0,0 +1,166 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ShowMessagesRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("topic", IsPath = true)] + [JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] + public string Topic { get; set; } + + /// + /// + /// + [SDKProperty("start_time", IsQuery = true)] + [JsonProperty("start_time", NullValueHandling = NullValueHandling.Ignore)] + public string StartTime { get; set; } + + /// + /// + /// + [SDKProperty("end_time", IsQuery = true)] + [JsonProperty("end_time", NullValueHandling = NullValueHandling.Ignore)] + public string EndTime { get; set; } + + /// + /// + /// + [SDKProperty("limit", IsQuery = true)] + [JsonProperty("limit", NullValueHandling = NullValueHandling.Ignore)] + public int? Limit { get; set; } + + /// + /// + /// + [SDKProperty("offset", IsQuery = true)] + [JsonProperty("offset", NullValueHandling = NullValueHandling.Ignore)] + public int? Offset { get; set; } + + /// + /// + /// + [SDKProperty("partition", IsQuery = true)] + [JsonProperty("partition", NullValueHandling = NullValueHandling.Ignore)] + public string Partition { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowMessagesRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" topic: ").Append(Topic).Append("\n"); + sb.Append(" startTime: ").Append(StartTime).Append("\n"); + sb.Append(" endTime: ").Append(EndTime).Append("\n"); + sb.Append(" limit: ").Append(Limit).Append("\n"); + sb.Append(" offset: ").Append(Offset).Append("\n"); + sb.Append(" partition: ").Append(Partition).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowMessagesRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowMessagesRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Topic == input.Topic || + (this.Topic != null && + this.Topic.Equals(input.Topic)) + ) && + ( + this.StartTime == input.StartTime || + (this.StartTime != null && + this.StartTime.Equals(input.StartTime)) + ) && + ( + this.EndTime == input.EndTime || + (this.EndTime != null && + this.EndTime.Equals(input.EndTime)) + ) && + ( + this.Limit == input.Limit || + (this.Limit != null && + this.Limit.Equals(input.Limit)) + ) && + ( + this.Offset == input.Offset || + (this.Offset != null && + this.Offset.Equals(input.Offset)) + ) && + ( + this.Partition == input.Partition || + (this.Partition != null && + this.Partition.Equals(input.Partition)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Topic != null) + hashCode = hashCode * 59 + this.Topic.GetHashCode(); + if (this.StartTime != null) + hashCode = hashCode * 59 + this.StartTime.GetHashCode(); + if (this.EndTime != null) + hashCode = hashCode * 59 + this.EndTime.GetHashCode(); + if (this.Limit != null) + hashCode = hashCode * 59 + this.Limit.GetHashCode(); + if (this.Offset != null) + hashCode = hashCode * 59 + this.Offset.GetHashCode(); + if (this.Partition != null) + hashCode = hashCode * 59 + this.Partition.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowMessagesRespMessages.cs b/Services/Kafka/V2/Model/ShowMessagesRespMessages.cs new file mode 100644 index 000000000..726d72faa --- /dev/null +++ b/Services/Kafka/V2/Model/ShowMessagesRespMessages.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ShowMessagesRespMessages + { + + /// + /// topic名称。 + /// + [JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] + public string Topic { get; set; } + + /// + /// 分区编号。 + /// + [JsonProperty("partition", NullValueHandling = NullValueHandling.Ignore)] + public int? Partition { get; set; } + + /// + /// 消息编号。 + /// + [JsonProperty("message_offset", NullValueHandling = NullValueHandling.Ignore)] + public int? MessageOffset { get; set; } + + /// + /// 消息大小,单位字节。 + /// + [JsonProperty("size", NullValueHandling = NullValueHandling.Ignore)] + public int? Size { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowMessagesRespMessages {\n"); + sb.Append(" topic: ").Append(Topic).Append("\n"); + sb.Append(" partition: ").Append(Partition).Append("\n"); + sb.Append(" messageOffset: ").Append(MessageOffset).Append("\n"); + sb.Append(" size: ").Append(Size).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowMessagesRespMessages); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowMessagesRespMessages input) + { + if (input == null) + return false; + + return + ( + this.Topic == input.Topic || + (this.Topic != null && + this.Topic.Equals(input.Topic)) + ) && + ( + this.Partition == input.Partition || + (this.Partition != null && + this.Partition.Equals(input.Partition)) + ) && + ( + this.MessageOffset == input.MessageOffset || + (this.MessageOffset != null && + this.MessageOffset.Equals(input.MessageOffset)) + ) && + ( + this.Size == input.Size || + (this.Size != null && + this.Size.Equals(input.Size)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Topic != null) + hashCode = hashCode * 59 + this.Topic.GetHashCode(); + if (this.Partition != null) + hashCode = hashCode * 59 + this.Partition.GetHashCode(); + if (this.MessageOffset != null) + hashCode = hashCode * 59 + this.MessageOffset.GetHashCode(); + if (this.Size != null) + hashCode = hashCode * 59 + this.Size.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowMessagesResponse.cs b/Services/Kafka/V2/Model/ShowMessagesResponse.cs new file mode 100644 index 000000000..ac23eeba8 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowMessagesResponse.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ShowMessagesResponse : SdkResponse + { + + /// + /// 消息列表。 + /// + [JsonProperty("messages", NullValueHandling = NullValueHandling.Ignore)] + public List Messages { get; set; } + + /// + /// 消息总数。 + /// + [JsonProperty("messages_count", NullValueHandling = NullValueHandling.Ignore)] + public int? MessagesCount { get; set; } + + /// + /// 总页数。 + /// + [JsonProperty("offsets_count", NullValueHandling = NullValueHandling.Ignore)] + public int? OffsetsCount { get; set; } + + /// + /// 当前页数。 + /// + [JsonProperty("offset", NullValueHandling = NullValueHandling.Ignore)] + public int? Offset { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowMessagesResponse {\n"); + sb.Append(" messages: ").Append(Messages).Append("\n"); + sb.Append(" messagesCount: ").Append(MessagesCount).Append("\n"); + sb.Append(" offsetsCount: ").Append(OffsetsCount).Append("\n"); + sb.Append(" offset: ").Append(Offset).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowMessagesResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowMessagesResponse input) + { + if (input == null) + return false; + + return + ( + this.Messages == input.Messages || + this.Messages != null && + input.Messages != null && + this.Messages.SequenceEqual(input.Messages) + ) && + ( + this.MessagesCount == input.MessagesCount || + (this.MessagesCount != null && + this.MessagesCount.Equals(input.MessagesCount)) + ) && + ( + this.OffsetsCount == input.OffsetsCount || + (this.OffsetsCount != null && + this.OffsetsCount.Equals(input.OffsetsCount)) + ) && + ( + this.Offset == input.Offset || + (this.Offset != null && + this.Offset.Equals(input.Offset)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Messages != null) + hashCode = hashCode * 59 + this.Messages.GetHashCode(); + if (this.MessagesCount != null) + hashCode = hashCode * 59 + this.MessagesCount.GetHashCode(); + if (this.OffsetsCount != null) + hashCode = hashCode * 59 + this.OffsetsCount.GetHashCode(); + if (this.Offset != null) + hashCode = hashCode * 59 + this.Offset.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowPartitionBeginningMessageRequest.cs b/Services/Kafka/V2/Model/ShowPartitionBeginningMessageRequest.cs new file mode 100644 index 000000000..784d7c6d6 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowPartitionBeginningMessageRequest.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ShowPartitionBeginningMessageRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("topic", IsPath = true)] + [JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] + public string Topic { get; set; } + + /// + /// + /// + [SDKProperty("partition", IsPath = true)] + [JsonProperty("partition", NullValueHandling = NullValueHandling.Ignore)] + public int? Partition { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowPartitionBeginningMessageRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" topic: ").Append(Topic).Append("\n"); + sb.Append(" partition: ").Append(Partition).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowPartitionBeginningMessageRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowPartitionBeginningMessageRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Topic == input.Topic || + (this.Topic != null && + this.Topic.Equals(input.Topic)) + ) && + ( + this.Partition == input.Partition || + (this.Partition != null && + this.Partition.Equals(input.Partition)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Topic != null) + hashCode = hashCode * 59 + this.Topic.GetHashCode(); + if (this.Partition != null) + hashCode = hashCode * 59 + this.Partition.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowPartitionBeginningMessageResponse.cs b/Services/Kafka/V2/Model/ShowPartitionBeginningMessageResponse.cs new file mode 100644 index 000000000..1e2c09adb --- /dev/null +++ b/Services/Kafka/V2/Model/ShowPartitionBeginningMessageResponse.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ShowPartitionBeginningMessageResponse : SdkResponse + { + + /// + /// Topic名称。 + /// + [JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] + public string Topic { get; set; } + + /// + /// 分区编号。 + /// + [JsonProperty("partition", NullValueHandling = NullValueHandling.Ignore)] + public int? Partition { get; set; } + + /// + /// 最新消息位置。 + /// + [JsonProperty("message_offset", NullValueHandling = NullValueHandling.Ignore)] + public int? MessageOffset { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowPartitionBeginningMessageResponse {\n"); + sb.Append(" topic: ").Append(Topic).Append("\n"); + sb.Append(" partition: ").Append(Partition).Append("\n"); + sb.Append(" messageOffset: ").Append(MessageOffset).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowPartitionBeginningMessageResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowPartitionBeginningMessageResponse input) + { + if (input == null) + return false; + + return + ( + this.Topic == input.Topic || + (this.Topic != null && + this.Topic.Equals(input.Topic)) + ) && + ( + this.Partition == input.Partition || + (this.Partition != null && + this.Partition.Equals(input.Partition)) + ) && + ( + this.MessageOffset == input.MessageOffset || + (this.MessageOffset != null && + this.MessageOffset.Equals(input.MessageOffset)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Topic != null) + hashCode = hashCode * 59 + this.Topic.GetHashCode(); + if (this.Partition != null) + hashCode = hashCode * 59 + this.Partition.GetHashCode(); + if (this.MessageOffset != null) + hashCode = hashCode * 59 + this.MessageOffset.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowPartitionEndMessageRequest.cs b/Services/Kafka/V2/Model/ShowPartitionEndMessageRequest.cs new file mode 100644 index 000000000..e744b1ee7 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowPartitionEndMessageRequest.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ShowPartitionEndMessageRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("topic", IsPath = true)] + [JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] + public string Topic { get; set; } + + /// + /// + /// + [SDKProperty("partition", IsPath = true)] + [JsonProperty("partition", NullValueHandling = NullValueHandling.Ignore)] + public int? Partition { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowPartitionEndMessageRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" topic: ").Append(Topic).Append("\n"); + sb.Append(" partition: ").Append(Partition).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowPartitionEndMessageRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowPartitionEndMessageRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Topic == input.Topic || + (this.Topic != null && + this.Topic.Equals(input.Topic)) + ) && + ( + this.Partition == input.Partition || + (this.Partition != null && + this.Partition.Equals(input.Partition)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Topic != null) + hashCode = hashCode * 59 + this.Topic.GetHashCode(); + if (this.Partition != null) + hashCode = hashCode * 59 + this.Partition.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowPartitionEndMessageResponse.cs b/Services/Kafka/V2/Model/ShowPartitionEndMessageResponse.cs new file mode 100644 index 000000000..4750ffcef --- /dev/null +++ b/Services/Kafka/V2/Model/ShowPartitionEndMessageResponse.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ShowPartitionEndMessageResponse : SdkResponse + { + + /// + /// Topic名称。 + /// + [JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] + public string Topic { get; set; } + + /// + /// 分区编号。 + /// + [JsonProperty("partition", NullValueHandling = NullValueHandling.Ignore)] + public int? Partition { get; set; } + + /// + /// 最新消息位置。 + /// + [JsonProperty("message_offset", NullValueHandling = NullValueHandling.Ignore)] + public int? MessageOffset { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowPartitionEndMessageResponse {\n"); + sb.Append(" topic: ").Append(Topic).Append("\n"); + sb.Append(" partition: ").Append(Partition).Append("\n"); + sb.Append(" messageOffset: ").Append(MessageOffset).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowPartitionEndMessageResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowPartitionEndMessageResponse input) + { + if (input == null) + return false; + + return + ( + this.Topic == input.Topic || + (this.Topic != null && + this.Topic.Equals(input.Topic)) + ) && + ( + this.Partition == input.Partition || + (this.Partition != null && + this.Partition.Equals(input.Partition)) + ) && + ( + this.MessageOffset == input.MessageOffset || + (this.MessageOffset != null && + this.MessageOffset.Equals(input.MessageOffset)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Topic != null) + hashCode = hashCode * 59 + this.Topic.GetHashCode(); + if (this.Partition != null) + hashCode = hashCode * 59 + this.Partition.GetHashCode(); + if (this.MessageOffset != null) + hashCode = hashCode * 59 + this.MessageOffset.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowPartitionMessageRequest.cs b/Services/Kafka/V2/Model/ShowPartitionMessageRequest.cs new file mode 100644 index 000000000..fddd171f0 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowPartitionMessageRequest.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ShowPartitionMessageRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("topic", IsPath = true)] + [JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] + public string Topic { get; set; } + + /// + /// + /// + [SDKProperty("partition", IsPath = true)] + [JsonProperty("partition", NullValueHandling = NullValueHandling.Ignore)] + public int? Partition { get; set; } + + /// + /// + /// + [SDKProperty("message_offset", IsQuery = true)] + [JsonProperty("message_offset", NullValueHandling = NullValueHandling.Ignore)] + public string MessageOffset { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowPartitionMessageRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" topic: ").Append(Topic).Append("\n"); + sb.Append(" partition: ").Append(Partition).Append("\n"); + sb.Append(" messageOffset: ").Append(MessageOffset).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowPartitionMessageRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowPartitionMessageRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Topic == input.Topic || + (this.Topic != null && + this.Topic.Equals(input.Topic)) + ) && + ( + this.Partition == input.Partition || + (this.Partition != null && + this.Partition.Equals(input.Partition)) + ) && + ( + this.MessageOffset == input.MessageOffset || + (this.MessageOffset != null && + this.MessageOffset.Equals(input.MessageOffset)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Topic != null) + hashCode = hashCode * 59 + this.Topic.GetHashCode(); + if (this.Partition != null) + hashCode = hashCode * 59 + this.Partition.GetHashCode(); + if (this.MessageOffset != null) + hashCode = hashCode * 59 + this.MessageOffset.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowPartitionMessageRespMessage.cs b/Services/Kafka/V2/Model/ShowPartitionMessageRespMessage.cs new file mode 100644 index 000000000..cb770151f --- /dev/null +++ b/Services/Kafka/V2/Model/ShowPartitionMessageRespMessage.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// 消息体。 + /// + public class ShowPartitionMessageRespMessage + { + + /// + /// 消息的key。 + /// + [JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)] + public string Key { get; set; } + + /// + /// 消息内容。 + /// + [JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)] + public string Value { get; set; } + + /// + /// Topic名称。 + /// + [JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] + public string Topic { get; set; } + + /// + /// 分区编号。 + /// + [JsonProperty("partition", NullValueHandling = NullValueHandling.Ignore)] + public int? Partition { get; set; } + + /// + /// 消息位置。 + /// + [JsonProperty("message_offset", NullValueHandling = NullValueHandling.Ignore)] + public int? MessageOffset { get; set; } + + /// + /// 消息大小,单位字节。 + /// + [JsonProperty("size", NullValueHandling = NullValueHandling.Ignore)] + public int? Size { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowPartitionMessageRespMessage {\n"); + sb.Append(" key: ").Append(Key).Append("\n"); + sb.Append(" value: ").Append(Value).Append("\n"); + sb.Append(" topic: ").Append(Topic).Append("\n"); + sb.Append(" partition: ").Append(Partition).Append("\n"); + sb.Append(" messageOffset: ").Append(MessageOffset).Append("\n"); + sb.Append(" size: ").Append(Size).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowPartitionMessageRespMessage); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowPartitionMessageRespMessage input) + { + if (input == null) + return false; + + return + ( + this.Key == input.Key || + (this.Key != null && + this.Key.Equals(input.Key)) + ) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && + ( + this.Topic == input.Topic || + (this.Topic != null && + this.Topic.Equals(input.Topic)) + ) && + ( + this.Partition == input.Partition || + (this.Partition != null && + this.Partition.Equals(input.Partition)) + ) && + ( + this.MessageOffset == input.MessageOffset || + (this.MessageOffset != null && + this.MessageOffset.Equals(input.MessageOffset)) + ) && + ( + this.Size == input.Size || + (this.Size != null && + this.Size.Equals(input.Size)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Key != null) + hashCode = hashCode * 59 + this.Key.GetHashCode(); + if (this.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + if (this.Topic != null) + hashCode = hashCode * 59 + this.Topic.GetHashCode(); + if (this.Partition != null) + hashCode = hashCode * 59 + this.Partition.GetHashCode(); + if (this.MessageOffset != null) + hashCode = hashCode * 59 + this.MessageOffset.GetHashCode(); + if (this.Size != null) + hashCode = hashCode * 59 + this.Size.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowPartitionMessageResponse.cs b/Services/Kafka/V2/Model/ShowPartitionMessageResponse.cs new file mode 100644 index 000000000..1545d6e34 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowPartitionMessageResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ShowPartitionMessageResponse : SdkResponse + { + + /// + /// 消息列表。 + /// + [JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)] + public List Message { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowPartitionMessageResponse {\n"); + sb.Append(" message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowPartitionMessageResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowPartitionMessageResponse input) + { + if (input == null) + return false; + + return + ( + this.Message == input.Message || + this.Message != null && + input.Message != null && + this.Message.SequenceEqual(input.Message) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Message != null) + hashCode = hashCode * 59 + this.Message.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowProjectTagsRequest.cs b/Services/Kafka/V2/Model/ShowProjectTagsRequest.cs new file mode 100644 index 000000000..f01b3c119 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowProjectTagsRequest.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ShowProjectTagsRequest + { + + + } +} diff --git a/Services/Kafka/V2/Model/ShowProjectTagsRespTags.cs b/Services/Kafka/V2/Model/ShowProjectTagsRespTags.cs new file mode 100644 index 000000000..77271e184 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowProjectTagsRespTags.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class ShowProjectTagsRespTags + { + + /// + /// 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + /// + [JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)] + public string Key { get; set; } + + /// + /// 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + /// + [JsonProperty("values", NullValueHandling = NullValueHandling.Ignore)] + public List Values { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowProjectTagsRespTags {\n"); + sb.Append(" key: ").Append(Key).Append("\n"); + sb.Append(" values: ").Append(Values).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowProjectTagsRespTags); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowProjectTagsRespTags input) + { + if (input == null) + return false; + + return + ( + this.Key == input.Key || + (this.Key != null && + this.Key.Equals(input.Key)) + ) && + ( + this.Values == input.Values || + this.Values != null && + input.Values != null && + this.Values.SequenceEqual(input.Values) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Key != null) + hashCode = hashCode * 59 + this.Key.GetHashCode(); + if (this.Values != null) + hashCode = hashCode * 59 + this.Values.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowProjectTagsResponse.cs b/Services/Kafka/V2/Model/ShowProjectTagsResponse.cs new file mode 100644 index 000000000..1ae3aa95c --- /dev/null +++ b/Services/Kafka/V2/Model/ShowProjectTagsResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ShowProjectTagsResponse : SdkResponse + { + + /// + /// 标签列表 + /// + [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] + public List Tags { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowProjectTagsResponse {\n"); + sb.Append(" tags: ").Append(Tags).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowProjectTagsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowProjectTagsResponse input) + { + if (input == null) + return false; + + return + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowSinkTaskDetailRequest.cs b/Services/Kafka/V2/Model/ShowSinkTaskDetailRequest.cs new file mode 100644 index 000000000..dc41db990 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowSinkTaskDetailRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class ShowSinkTaskDetailRequest + { + + /// + /// + /// + [SDKProperty("connector_id", IsPath = true)] + [JsonProperty("connector_id", NullValueHandling = NullValueHandling.Ignore)] + public string ConnectorId { get; set; } + + /// + /// + /// + [SDKProperty("task_id", IsPath = true)] + [JsonProperty("task_id", NullValueHandling = NullValueHandling.Ignore)] + public string TaskId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowSinkTaskDetailRequest {\n"); + sb.Append(" connectorId: ").Append(ConnectorId).Append("\n"); + sb.Append(" taskId: ").Append(TaskId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowSinkTaskDetailRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowSinkTaskDetailRequest input) + { + if (input == null) + return false; + + return + ( + this.ConnectorId == input.ConnectorId || + (this.ConnectorId != null && + this.ConnectorId.Equals(input.ConnectorId)) + ) && + ( + this.TaskId == input.TaskId || + (this.TaskId != null && + this.TaskId.Equals(input.TaskId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ConnectorId != null) + hashCode = hashCode * 59 + this.ConnectorId.GetHashCode(); + if (this.TaskId != null) + hashCode = hashCode * 59 + this.TaskId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowSinkTaskDetailRespObsDestinationDescriptor.cs b/Services/Kafka/V2/Model/ShowSinkTaskDetailRespObsDestinationDescriptor.cs new file mode 100644 index 000000000..3d1191b32 --- /dev/null +++ b/Services/Kafka/V2/Model/ShowSinkTaskDetailRespObsDestinationDescriptor.cs @@ -0,0 +1,173 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// 转存目标的描述。 + /// + public class ShowSinkTaskDetailRespObsDestinationDescriptor + { + + /// + /// 消费启动策略: - latest:从Topic最后端开始消费。 - earliest: 从Topic最前端消息开始消费。 默认是latest。 + /// + [JsonProperty("consumer_strategy", NullValueHandling = NullValueHandling.Ignore)] + public string ConsumerStrategy { get; set; } + + /// + /// 转储文件格式。目前只支持text格式。 + /// + [JsonProperty("destination_file_type", NullValueHandling = NullValueHandling.Ignore)] + public string DestinationFileType { get; set; } + + /// + /// 存储该通道数据的OBS桶名称。 + /// + [JsonProperty("obs_bucket_name", NullValueHandling = NullValueHandling.Ignore)] + public string ObsBucketName { get; set; } + + /// + /// 存储在obs的路径。 + /// + [JsonProperty("obs_path", NullValueHandling = NullValueHandling.Ignore)] + public string ObsPath { get; set; } + + /// + /// 将转储文件的生成时间使用“yyyy/MM/dd/HH/mm”格式生成分区字符串,用来定义写到OBS的Object文件所在的目录层次结构。 - N/A:置空,不使用日期时间目录。 - yyyy:年 - yyyy/MM:年/月 - yyyy/MM/dd:年/月/日 - yyyy/MM/dd/HH:年/月/日/时 - yyyy/MM/dd/HH/mm:年/月/日/时/分,例如:2017/11/10/14/49,目录结构就是“2017 > 11 > 10 > 14 > 49”,“2017”表示最外层文件夹。 默认值:空 > 数据转储成功后,存储的目录结构为“obs_bucket_path/file_prefix/partition_format”。默认时间是GMT+8 时间 + /// + [JsonProperty("partition_format", NullValueHandling = NullValueHandling.Ignore)] + public string PartitionFormat { get; set; } + + /// + /// 转储文件的记录分隔符,用于分隔写入转储文件的用户数据。 取值范围: - 逗号“,” - 分号“;” - 竖线“|” - 换行符“\\n” - NULL 默认值:换行符“\\n”。 + /// + [JsonProperty("record_delimiter", NullValueHandling = NullValueHandling.Ignore)] + public string RecordDelimiter { get; set; } + + /// + /// 根据用户配置的时间,周期性的将数据导入OBS,若某个时间段内无数据,则此时间段不会生成打包文件。 取值范围:30~900 缺省值:300 单位:秒。 > 使用OBS通道转储流式数据时该参数为必选配置。 + /// + [JsonProperty("deliver_time_interval", NullValueHandling = NullValueHandling.Ignore)] + public string DeliverTimeInterval { get; set; } + + /// + /// 每个传输文件多大后就开始上传,单位为byte。 默认值5242880。 + /// + [JsonProperty("obs_part_size", NullValueHandling = NullValueHandling.Ignore)] + public string ObsPartSize { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowSinkTaskDetailRespObsDestinationDescriptor {\n"); + sb.Append(" consumerStrategy: ").Append(ConsumerStrategy).Append("\n"); + sb.Append(" destinationFileType: ").Append(DestinationFileType).Append("\n"); + sb.Append(" obsBucketName: ").Append(ObsBucketName).Append("\n"); + sb.Append(" obsPath: ").Append(ObsPath).Append("\n"); + sb.Append(" partitionFormat: ").Append(PartitionFormat).Append("\n"); + sb.Append(" recordDelimiter: ").Append(RecordDelimiter).Append("\n"); + sb.Append(" deliverTimeInterval: ").Append(DeliverTimeInterval).Append("\n"); + sb.Append(" obsPartSize: ").Append(ObsPartSize).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowSinkTaskDetailRespObsDestinationDescriptor); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowSinkTaskDetailRespObsDestinationDescriptor input) + { + if (input == null) + return false; + + return + ( + this.ConsumerStrategy == input.ConsumerStrategy || + (this.ConsumerStrategy != null && + this.ConsumerStrategy.Equals(input.ConsumerStrategy)) + ) && + ( + this.DestinationFileType == input.DestinationFileType || + (this.DestinationFileType != null && + this.DestinationFileType.Equals(input.DestinationFileType)) + ) && + ( + this.ObsBucketName == input.ObsBucketName || + (this.ObsBucketName != null && + this.ObsBucketName.Equals(input.ObsBucketName)) + ) && + ( + this.ObsPath == input.ObsPath || + (this.ObsPath != null && + this.ObsPath.Equals(input.ObsPath)) + ) && + ( + this.PartitionFormat == input.PartitionFormat || + (this.PartitionFormat != null && + this.PartitionFormat.Equals(input.PartitionFormat)) + ) && + ( + this.RecordDelimiter == input.RecordDelimiter || + (this.RecordDelimiter != null && + this.RecordDelimiter.Equals(input.RecordDelimiter)) + ) && + ( + this.DeliverTimeInterval == input.DeliverTimeInterval || + (this.DeliverTimeInterval != null && + this.DeliverTimeInterval.Equals(input.DeliverTimeInterval)) + ) && + ( + this.ObsPartSize == input.ObsPartSize || + (this.ObsPartSize != null && + this.ObsPartSize.Equals(input.ObsPartSize)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ConsumerStrategy != null) + hashCode = hashCode * 59 + this.ConsumerStrategy.GetHashCode(); + if (this.DestinationFileType != null) + hashCode = hashCode * 59 + this.DestinationFileType.GetHashCode(); + if (this.ObsBucketName != null) + hashCode = hashCode * 59 + this.ObsBucketName.GetHashCode(); + if (this.ObsPath != null) + hashCode = hashCode * 59 + this.ObsPath.GetHashCode(); + if (this.PartitionFormat != null) + hashCode = hashCode * 59 + this.PartitionFormat.GetHashCode(); + if (this.RecordDelimiter != null) + hashCode = hashCode * 59 + this.RecordDelimiter.GetHashCode(); + if (this.DeliverTimeInterval != null) + hashCode = hashCode * 59 + this.DeliverTimeInterval.GetHashCode(); + if (this.ObsPartSize != null) + hashCode = hashCode * 59 + this.ObsPartSize.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/ShowSinkTaskDetailResponse.cs b/Services/Kafka/V2/Model/ShowSinkTaskDetailResponse.cs new file mode 100644 index 000000000..0569f1a9a --- /dev/null +++ b/Services/Kafka/V2/Model/ShowSinkTaskDetailResponse.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class ShowSinkTaskDetailResponse : SdkResponse + { + + /// + /// 转储任务名称。 + /// + [JsonProperty("task_name", NullValueHandling = NullValueHandling.Ignore)] + public string TaskName { get; set; } + + /// + /// 转储任务类型。 + /// + [JsonProperty("destination_type", NullValueHandling = NullValueHandling.Ignore)] + public string DestinationType { get; set; } + + /// + /// 转储任务创建时间戳。 + /// + [JsonProperty("create_time", NullValueHandling = NullValueHandling.Ignore)] + public string CreateTime { get; set; } + + /// + /// 转储任务状态。 + /// + [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] + public string Status { get; set; } + + /// + /// 返回任务转存的topics列表或者正则表达式。 + /// + [JsonProperty("topics", NullValueHandling = NullValueHandling.Ignore)] + public string Topics { get; set; } + + /// + /// + /// + [JsonProperty("obs_destination_descriptor", NullValueHandling = NullValueHandling.Ignore)] + public ShowSinkTaskDetailRespObsDestinationDescriptor ObsDestinationDescriptor { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowSinkTaskDetailResponse {\n"); + sb.Append(" taskName: ").Append(TaskName).Append("\n"); + sb.Append(" destinationType: ").Append(DestinationType).Append("\n"); + sb.Append(" createTime: ").Append(CreateTime).Append("\n"); + sb.Append(" status: ").Append(Status).Append("\n"); + sb.Append(" topics: ").Append(Topics).Append("\n"); + sb.Append(" obsDestinationDescriptor: ").Append(ObsDestinationDescriptor).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowSinkTaskDetailResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowSinkTaskDetailResponse input) + { + if (input == null) + return false; + + return + ( + this.TaskName == input.TaskName || + (this.TaskName != null && + this.TaskName.Equals(input.TaskName)) + ) && + ( + this.DestinationType == input.DestinationType || + (this.DestinationType != null && + this.DestinationType.Equals(input.DestinationType)) + ) && + ( + this.CreateTime == input.CreateTime || + (this.CreateTime != null && + this.CreateTime.Equals(input.CreateTime)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.Topics == input.Topics || + (this.Topics != null && + this.Topics.Equals(input.Topics)) + ) && + ( + this.ObsDestinationDescriptor == input.ObsDestinationDescriptor || + (this.ObsDestinationDescriptor != null && + this.ObsDestinationDescriptor.Equals(input.ObsDestinationDescriptor)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.TaskName != null) + hashCode = hashCode * 59 + this.TaskName.GetHashCode(); + if (this.DestinationType != null) + hashCode = hashCode * 59 + this.DestinationType.GetHashCode(); + if (this.CreateTime != null) + hashCode = hashCode * 59 + this.CreateTime.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.Topics != null) + hashCode = hashCode * 59 + this.Topics.GetHashCode(); + if (this.ObsDestinationDescriptor != null) + hashCode = hashCode * 59 + this.ObsDestinationDescriptor.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/UpdateInstanceAutoCreateTopicReq.cs b/Services/Kafka/V2/Model/UpdateInstanceAutoCreateTopicReq.cs new file mode 100644 index 000000000..e7cba80fd --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateInstanceAutoCreateTopicReq.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class UpdateInstanceAutoCreateTopicReq + { + + /// + /// 是否开启自动创建topic功能。 + /// + [JsonProperty("enable_auto_topic", NullValueHandling = NullValueHandling.Ignore)] + public bool? EnableAutoTopic { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateInstanceAutoCreateTopicReq {\n"); + sb.Append(" enableAutoTopic: ").Append(EnableAutoTopic).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdateInstanceAutoCreateTopicReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdateInstanceAutoCreateTopicReq input) + { + if (input == null) + return false; + + return + ( + this.EnableAutoTopic == input.EnableAutoTopic || + (this.EnableAutoTopic != null && + this.EnableAutoTopic.Equals(input.EnableAutoTopic)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EnableAutoTopic != null) + hashCode = hashCode * 59 + this.EnableAutoTopic.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/UpdateInstanceAutoCreateTopicRequest.cs b/Services/Kafka/V2/Model/UpdateInstanceAutoCreateTopicRequest.cs new file mode 100644 index 000000000..1237c4e69 --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateInstanceAutoCreateTopicRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class UpdateInstanceAutoCreateTopicRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public UpdateInstanceAutoCreateTopicReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateInstanceAutoCreateTopicRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdateInstanceAutoCreateTopicRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdateInstanceAutoCreateTopicRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/UpdateInstanceAutoCreateTopicResponse.cs b/Services/Kafka/V2/Model/UpdateInstanceAutoCreateTopicResponse.cs new file mode 100644 index 000000000..49e12c775 --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateInstanceAutoCreateTopicResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class UpdateInstanceAutoCreateTopicResponse : SdkResponse + { + + + } +} diff --git a/Services/Kafka/V2/Model/UpdateInstanceCrossVPCIPReq.cs b/Services/Kafka/V2/Model/UpdateInstanceCrossVPCIPReq.cs new file mode 100644 index 000000000..2e9f0ef4e --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateInstanceCrossVPCIPReq.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class UpdateInstanceCrossVPCIPReq + { + + /// + /// 用户自定义的advertised_ip_contents键值对。 键是listeners IP。 值是advertised.listeners IP,或者域名。 > IP修改未修改项也需填上。 + /// + [JsonProperty("advertised_ip_contents", NullValueHandling = NullValueHandling.Ignore)] + public Dictionary AdvertisedIpContents { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateInstanceCrossVPCIPReq {\n"); + sb.Append(" advertisedIpContents: ").Append(AdvertisedIpContents).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdateInstanceCrossVPCIPReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdateInstanceCrossVPCIPReq input) + { + if (input == null) + return false; + + return + ( + this.AdvertisedIpContents == input.AdvertisedIpContents || + this.AdvertisedIpContents != null && + input.AdvertisedIpContents != null && + this.AdvertisedIpContents.SequenceEqual(input.AdvertisedIpContents) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.AdvertisedIpContents != null) + hashCode = hashCode * 59 + this.AdvertisedIpContents.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/UpdateInstanceCrossVPCIPRequest.cs b/Services/Kafka/V2/Model/UpdateInstanceCrossVPCIPRequest.cs new file mode 100644 index 000000000..990fea10e --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateInstanceCrossVPCIPRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class UpdateInstanceCrossVPCIPRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public UpdateInstanceCrossVPCIPReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateInstanceCrossVPCIPRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdateInstanceCrossVPCIPRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdateInstanceCrossVPCIPRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/UpdateInstanceCrossVPCIPRespResults.cs b/Services/Kafka/V2/Model/UpdateInstanceCrossVPCIPRespResults.cs new file mode 100644 index 000000000..56b5d4404 --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateInstanceCrossVPCIPRespResults.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// 修改broker跨VPC访问的结果。 + /// + public class UpdateInstanceCrossVPCIPRespResults + { + + /// + /// advertised.listeners IP/域名。 + /// + [JsonProperty("advertised_ip", NullValueHandling = NullValueHandling.Ignore)] + public string AdvertisedIp { get; set; } + + /// + /// 修改broker跨VPC访问的状态。 + /// + [JsonProperty("success", NullValueHandling = NullValueHandling.Ignore)] + public string Success { get; set; } + + /// + /// listeners IP。 + /// + [JsonProperty("ip", NullValueHandling = NullValueHandling.Ignore)] + public string Ip { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateInstanceCrossVPCIPRespResults {\n"); + sb.Append(" advertisedIp: ").Append(AdvertisedIp).Append("\n"); + sb.Append(" success: ").Append(Success).Append("\n"); + sb.Append(" ip: ").Append(Ip).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdateInstanceCrossVPCIPRespResults); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdateInstanceCrossVPCIPRespResults input) + { + if (input == null) + return false; + + return + ( + this.AdvertisedIp == input.AdvertisedIp || + (this.AdvertisedIp != null && + this.AdvertisedIp.Equals(input.AdvertisedIp)) + ) && + ( + this.Success == input.Success || + (this.Success != null && + this.Success.Equals(input.Success)) + ) && + ( + this.Ip == input.Ip || + (this.Ip != null && + this.Ip.Equals(input.Ip)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.AdvertisedIp != null) + hashCode = hashCode * 59 + this.AdvertisedIp.GetHashCode(); + if (this.Success != null) + hashCode = hashCode * 59 + this.Success.GetHashCode(); + if (this.Ip != null) + hashCode = hashCode * 59 + this.Ip.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/UpdateInstanceCrossVPCIPResponse.cs b/Services/Kafka/V2/Model/UpdateInstanceCrossVPCIPResponse.cs new file mode 100644 index 000000000..61325d0a8 --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateInstanceCrossVPCIPResponse.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class UpdateInstanceCrossVPCIPResponse : SdkResponse + { + + /// + /// 修改跨VPC访问结果。 + /// + [JsonProperty("success", NullValueHandling = NullValueHandling.Ignore)] + public string Success { get; set; } + + /// + /// 修改broker跨VPC访问的结果列表。 + /// + [JsonProperty("results", NullValueHandling = NullValueHandling.Ignore)] + public List Results { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateInstanceCrossVPCIPResponse {\n"); + sb.Append(" success: ").Append(Success).Append("\n"); + sb.Append(" results: ").Append(Results).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdateInstanceCrossVPCIPResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdateInstanceCrossVPCIPResponse input) + { + if (input == null) + return false; + + return + ( + this.Success == input.Success || + (this.Success != null && + this.Success.Equals(input.Success)) + ) && + ( + this.Results == input.Results || + this.Results != null && + input.Results != null && + this.Results.SequenceEqual(input.Results) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Success != null) + hashCode = hashCode * 59 + this.Success.GetHashCode(); + if (this.Results != null) + hashCode = hashCode * 59 + this.Results.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/UpdateInstanceReq.cs b/Services/Kafka/V2/Model/UpdateInstanceReq.cs new file mode 100644 index 000000000..17be9183a --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateInstanceReq.cs @@ -0,0 +1,263 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class UpdateInstanceReq + { + /// + /// 容量阈值策略。 支持两种策略模式: - produce_reject: 生产受限 - time_base: 自动删除 + /// + /// 容量阈值策略。 支持两种策略模式: - produce_reject: 生产受限 - time_base: 自动删除 + [JsonConverter(typeof(EnumClassConverter))] + public class RetentionPolicyEnum + { + /// + /// Enum PRODUCE_REJECT for value: produce_reject + /// + public static readonly RetentionPolicyEnum PRODUCE_REJECT = new RetentionPolicyEnum("produce_reject"); + + /// + /// Enum TIME_BASE for value: time_base + /// + public static readonly RetentionPolicyEnum TIME_BASE = new RetentionPolicyEnum("time_base"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"produce_reject", PRODUCE_REJECT}, + {"time_base", TIME_BASE}, + }; + + private string Value; + + public RetentionPolicyEnum(string Value) + { + this.Value = Value; + } + + public static RetentionPolicyEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as RetentionPolicyEnum)) + { + return true; + } + + return false; + } + + public bool Equals(RetentionPolicyEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(RetentionPolicyEnum a, RetentionPolicyEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(RetentionPolicyEnum a, RetentionPolicyEnum b) + { + return !(a == b); + } + } + + + /// + /// 实例名称。 由英文字符开头,只能由英文字母、数字、中划线组成,长度为4~64的字符。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 实例的描述信息。 长度不超过1024的字符串。 > \\与\"在json报文中属于特殊字符,如果参数值中需要显示\\或者\"字符,请在字符前增加转义字符\\,比如\\\\或者\\\"。 + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// 维护时间窗开始时间,格式为HH:mm:ss。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考查[询维护时间窗时间段](https://support.huaweicloud.com/api-kafka/ShowMaintainWindows.html)。 - 开始时间必须为22:00:00、02:00:00、06:00:00、10:00:00、14:00:00和18:00:00。 - 该参数不能单独为空,若该值为空,则结束时间也为空。系统分配一个默认开始时间02:00:00。 + /// + [JsonProperty("maintain_begin", NullValueHandling = NullValueHandling.Ignore)] + public string MaintainBegin { get; set; } + + /// + /// 维护时间窗结束时间,格式为HH:mm:ss。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考查[询维护时间窗时间段](https://support.huaweicloud.com/api-kafka/ShowMaintainWindows.html)。 - 结束时间在开始时间基础上加四个小时,即当开始时间为22:00:00时,结束时间为02:00:00。 - 该参数不能单独为空,若该值为空,则开始时间也为空。系统分配一个默认结束时间06:00:00。 + /// + [JsonProperty("maintain_end", NullValueHandling = NullValueHandling.Ignore)] + public string MaintainEnd { get; set; } + + /// + /// 安全组ID。 + /// + [JsonProperty("security_group_id", NullValueHandling = NullValueHandling.Ignore)] + public string SecurityGroupId { get; set; } + + /// + /// 容量阈值策略。 支持两种策略模式: - produce_reject: 生产受限 - time_base: 自动删除 + /// + [JsonProperty("retention_policy", NullValueHandling = NullValueHandling.Ignore)] + public RetentionPolicyEnum RetentionPolicy { get; set; } + /// + /// 企业项目。 + /// + [JsonProperty("enterprise_project_id", NullValueHandling = NullValueHandling.Ignore)] + public string EnterpriseProjectId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateInstanceReq {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" description: ").Append(Description).Append("\n"); + sb.Append(" maintainBegin: ").Append(MaintainBegin).Append("\n"); + sb.Append(" maintainEnd: ").Append(MaintainEnd).Append("\n"); + sb.Append(" securityGroupId: ").Append(SecurityGroupId).Append("\n"); + sb.Append(" retentionPolicy: ").Append(RetentionPolicy).Append("\n"); + sb.Append(" enterpriseProjectId: ").Append(EnterpriseProjectId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdateInstanceReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdateInstanceReq input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.MaintainBegin == input.MaintainBegin || + (this.MaintainBegin != null && + this.MaintainBegin.Equals(input.MaintainBegin)) + ) && + ( + this.MaintainEnd == input.MaintainEnd || + (this.MaintainEnd != null && + this.MaintainEnd.Equals(input.MaintainEnd)) + ) && + ( + this.SecurityGroupId == input.SecurityGroupId || + (this.SecurityGroupId != null && + this.SecurityGroupId.Equals(input.SecurityGroupId)) + ) && + ( + this.RetentionPolicy == input.RetentionPolicy || + (this.RetentionPolicy != null && + this.RetentionPolicy.Equals(input.RetentionPolicy)) + ) && + ( + this.EnterpriseProjectId == input.EnterpriseProjectId || + (this.EnterpriseProjectId != null && + this.EnterpriseProjectId.Equals(input.EnterpriseProjectId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.MaintainBegin != null) + hashCode = hashCode * 59 + this.MaintainBegin.GetHashCode(); + if (this.MaintainEnd != null) + hashCode = hashCode * 59 + this.MaintainEnd.GetHashCode(); + if (this.SecurityGroupId != null) + hashCode = hashCode * 59 + this.SecurityGroupId.GetHashCode(); + if (this.RetentionPolicy != null) + hashCode = hashCode * 59 + this.RetentionPolicy.GetHashCode(); + if (this.EnterpriseProjectId != null) + hashCode = hashCode * 59 + this.EnterpriseProjectId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/UpdateInstanceRequest.cs b/Services/Kafka/V2/Model/UpdateInstanceRequest.cs new file mode 100644 index 000000000..25c05bf11 --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateInstanceRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class UpdateInstanceRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public UpdateInstanceReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateInstanceRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdateInstanceRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdateInstanceRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/UpdateInstanceResponse.cs b/Services/Kafka/V2/Model/UpdateInstanceResponse.cs new file mode 100644 index 000000000..c09fc95d3 --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateInstanceResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class UpdateInstanceResponse : SdkResponse + { + + + } +} diff --git a/Services/Kafka/V2/Model/UpdateInstanceTopicReq.cs b/Services/Kafka/V2/Model/UpdateInstanceTopicReq.cs new file mode 100644 index 000000000..2a3aa74a9 --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateInstanceTopicReq.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// 修改的topic列表。 + /// + public class UpdateInstanceTopicReq + { + + /// + /// 修改的topic列表。 + /// + [JsonProperty("topics", NullValueHandling = NullValueHandling.Ignore)] + public List Topics { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateInstanceTopicReq {\n"); + sb.Append(" topics: ").Append(Topics).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdateInstanceTopicReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdateInstanceTopicReq input) + { + if (input == null) + return false; + + return + ( + this.Topics == input.Topics || + this.Topics != null && + input.Topics != null && + this.Topics.SequenceEqual(input.Topics) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Topics != null) + hashCode = hashCode * 59 + this.Topics.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/UpdateInstanceTopicReqTopics.cs b/Services/Kafka/V2/Model/UpdateInstanceTopicReqTopics.cs new file mode 100644 index 000000000..a07809753 --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateInstanceTopicReqTopics.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// 修改的topic。 + /// + public class UpdateInstanceTopicReqTopics + { + + /// + /// topic名称 + /// + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// 老化时间,单位小时。 + /// + [JsonProperty("retention_time", NullValueHandling = NullValueHandling.Ignore)] + public string RetentionTime { get; set; } + + /// + /// 是否同步复制。 + /// + [JsonProperty("sync_replication", NullValueHandling = NullValueHandling.Ignore)] + public bool? SyncReplication { get; set; } + + /// + /// 是否同步落盘。 + /// + [JsonProperty("sync_message_flush", NullValueHandling = NullValueHandling.Ignore)] + public bool? SyncMessageFlush { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateInstanceTopicReqTopics {\n"); + sb.Append(" id: ").Append(Id).Append("\n"); + sb.Append(" retentionTime: ").Append(RetentionTime).Append("\n"); + sb.Append(" syncReplication: ").Append(SyncReplication).Append("\n"); + sb.Append(" syncMessageFlush: ").Append(SyncMessageFlush).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdateInstanceTopicReqTopics); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdateInstanceTopicReqTopics input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.RetentionTime == input.RetentionTime || + (this.RetentionTime != null && + this.RetentionTime.Equals(input.RetentionTime)) + ) && + ( + this.SyncReplication == input.SyncReplication || + (this.SyncReplication != null && + this.SyncReplication.Equals(input.SyncReplication)) + ) && + ( + this.SyncMessageFlush == input.SyncMessageFlush || + (this.SyncMessageFlush != null && + this.SyncMessageFlush.Equals(input.SyncMessageFlush)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.RetentionTime != null) + hashCode = hashCode * 59 + this.RetentionTime.GetHashCode(); + if (this.SyncReplication != null) + hashCode = hashCode * 59 + this.SyncReplication.GetHashCode(); + if (this.SyncMessageFlush != null) + hashCode = hashCode * 59 + this.SyncMessageFlush.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/UpdateInstanceTopicRequest.cs b/Services/Kafka/V2/Model/UpdateInstanceTopicRequest.cs new file mode 100644 index 000000000..cd0da2d3b --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateInstanceTopicRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class UpdateInstanceTopicRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public UpdateInstanceTopicReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateInstanceTopicRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdateInstanceTopicRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdateInstanceTopicRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/UpdateInstanceTopicResponse.cs b/Services/Kafka/V2/Model/UpdateInstanceTopicResponse.cs new file mode 100644 index 000000000..9f7355d8f --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateInstanceTopicResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class UpdateInstanceTopicResponse : SdkResponse + { + + + } +} diff --git a/Services/Kafka/V2/Model/UpdateSinkTaskQuotaReq.cs b/Services/Kafka/V2/Model/UpdateSinkTaskQuotaReq.cs new file mode 100644 index 000000000..32867acbc --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateSinkTaskQuotaReq.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// + /// + public class UpdateSinkTaskQuotaReq + { + + /// + /// 转储任务的总个数。 + /// + [JsonProperty("sink_max_tasks", NullValueHandling = NullValueHandling.Ignore)] + public string SinkMaxTasks { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateSinkTaskQuotaReq {\n"); + sb.Append(" sinkMaxTasks: ").Append(SinkMaxTasks).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdateSinkTaskQuotaReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdateSinkTaskQuotaReq input) + { + if (input == null) + return false; + + return + ( + this.SinkMaxTasks == input.SinkMaxTasks || + (this.SinkMaxTasks != null && + this.SinkMaxTasks.Equals(input.SinkMaxTasks)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.SinkMaxTasks != null) + hashCode = hashCode * 59 + this.SinkMaxTasks.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/UpdateSinkTaskQuotaRequest.cs b/Services/Kafka/V2/Model/UpdateSinkTaskQuotaRequest.cs new file mode 100644 index 000000000..356746778 --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateSinkTaskQuotaRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class UpdateSinkTaskQuotaRequest + { + + /// + /// + /// + [SDKProperty("connector_id", IsPath = true)] + [JsonProperty("connector_id", NullValueHandling = NullValueHandling.Ignore)] + public string ConnectorId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public UpdateSinkTaskQuotaReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateSinkTaskQuotaRequest {\n"); + sb.Append(" connectorId: ").Append(ConnectorId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdateSinkTaskQuotaRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdateSinkTaskQuotaRequest input) + { + if (input == null) + return false; + + return + ( + this.ConnectorId == input.ConnectorId || + (this.ConnectorId != null && + this.ConnectorId.Equals(input.ConnectorId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ConnectorId != null) + hashCode = hashCode * 59 + this.ConnectorId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/UpdateSinkTaskQuotaResponse.cs b/Services/Kafka/V2/Model/UpdateSinkTaskQuotaResponse.cs new file mode 100644 index 000000000..a8028939d --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateSinkTaskQuotaResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class UpdateSinkTaskQuotaResponse : SdkResponse + { + + + } +} diff --git a/Services/Kafka/V2/Model/UpdateTopicReplicaRequest.cs b/Services/Kafka/V2/Model/UpdateTopicReplicaRequest.cs new file mode 100644 index 000000000..7e91a157c --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateTopicReplicaRequest.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Request Object + /// + public class UpdateTopicReplicaRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("topic", IsPath = true)] + [JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] + public string Topic { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public ResetReplicaReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateTopicReplicaRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" topic: ").Append(Topic).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdateTopicReplicaRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdateTopicReplicaRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Topic == input.Topic || + (this.Topic != null && + this.Topic.Equals(input.Topic)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Topic != null) + hashCode = hashCode * 59 + this.Topic.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Kafka/V2/Model/UpdateTopicReplicaResponse.cs b/Services/Kafka/V2/Model/UpdateTopicReplicaResponse.cs new file mode 100644 index 000000000..37f4ffa68 --- /dev/null +++ b/Services/Kafka/V2/Model/UpdateTopicReplicaResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Kafka.V2.Model +{ + /// + /// Response Object + /// + public class UpdateTopicReplicaResponse : SdkResponse + { + + + } +} diff --git a/Services/Kms/Kms.csproj b/Services/Kms/Kms.csproj index 76702de6a..c94fe5d24 100644 --- a/Services/Kms/Kms.csproj +++ b/Services/Kms/Kms.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.Kms - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/ProjectMan/ProjectMan.csproj b/Services/ProjectMan/ProjectMan.csproj index 54dab4ad0..2c60831c3 100644 --- a/Services/ProjectMan/ProjectMan.csproj +++ b/Services/ProjectMan/ProjectMan.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.ProjectMan - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/Rabbitmq/Rabbitmq.csproj b/Services/Rabbitmq/Rabbitmq.csproj new file mode 100644 index 000000000..ebd6f9422 --- /dev/null +++ b/Services/Rabbitmq/Rabbitmq.csproj @@ -0,0 +1,34 @@ + + + + + HuaweiCloud.SDK.Rabbitmq + HuaweiCloud.SDK.Rabbitmq + netstandard2.0 + false + false + false + false + false + false + false + false + false + HuaweiCloud.SDK.Rabbitmq + 3.0.11-beta + HuaweiCloud + Copyright 2020 Huawei Technologies Co., Ltd. + Huawei Technologies Co., Ltd. + HuaweiCloud .net SDK + LICENSE + + + + + + + + + + + diff --git a/Services/Rabbitmq/Rabbitmq.sln b/Services/Rabbitmq/Rabbitmq.sln new file mode 100644 index 000000000..45633d876 --- /dev/null +++ b/Services/Rabbitmq/Rabbitmq.sln @@ -0,0 +1,18 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rabbitmq", "Rabbitmq.csproj", "{defe4a95-5592-47cc-8dee-9810e0da0ba0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {defe4a95-5592-47cc-8dee-9810e0da0ba0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {defe4a95-5592-47cc-8dee-9810e0da0ba0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {defe4a95-5592-47cc-8dee-9810e0da0ba0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {defe4a95-5592-47cc-8dee-9810e0da0ba0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal \ No newline at end of file diff --git a/Services/Rabbitmq/V2/Model/BatchCreateOrDeleteInstanceTagRequest.cs b/Services/Rabbitmq/V2/Model/BatchCreateOrDeleteInstanceTagRequest.cs new file mode 100644 index 000000000..b348f4d7a --- /dev/null +++ b/Services/Rabbitmq/V2/Model/BatchCreateOrDeleteInstanceTagRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class BatchCreateOrDeleteInstanceTagRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public BatchCreateOrDeleteTagReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchCreateOrDeleteInstanceTagRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchCreateOrDeleteInstanceTagRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchCreateOrDeleteInstanceTagRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/BatchCreateOrDeleteInstanceTagResponse.cs b/Services/Rabbitmq/V2/Model/BatchCreateOrDeleteInstanceTagResponse.cs new file mode 100644 index 000000000..6952c0cd8 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/BatchCreateOrDeleteInstanceTagResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class BatchCreateOrDeleteInstanceTagResponse : SdkResponse + { + + + } +} diff --git a/Services/Rabbitmq/V2/Model/BatchCreateOrDeleteTagReq.cs b/Services/Rabbitmq/V2/Model/BatchCreateOrDeleteTagReq.cs new file mode 100644 index 000000000..585572ddd --- /dev/null +++ b/Services/Rabbitmq/V2/Model/BatchCreateOrDeleteTagReq.cs @@ -0,0 +1,194 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class BatchCreateOrDeleteTagReq + { + /// + /// 操作标识(仅支持小写): - create(创建) - delete(删除) + /// + /// 操作标识(仅支持小写): - create(创建) - delete(删除) + [JsonConverter(typeof(EnumClassConverter))] + public class ActionEnum + { + /// + /// Enum CREATE for value: create + /// + public static readonly ActionEnum CREATE = new ActionEnum("create"); + + /// + /// Enum DELETE for value: delete + /// + public static readonly ActionEnum DELETE = new ActionEnum("delete"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"create", CREATE}, + {"delete", DELETE}, + }; + + private string Value; + + public ActionEnum(string Value) + { + this.Value = Value; + } + + public static ActionEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as ActionEnum)) + { + return true; + } + + return false; + } + + public bool Equals(ActionEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(ActionEnum a, ActionEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(ActionEnum a, ActionEnum b) + { + return !(a == b); + } + } + + + /// + /// 操作标识(仅支持小写): - create(创建) - delete(删除) + /// + [JsonProperty("action", NullValueHandling = NullValueHandling.Ignore)] + public ActionEnum Action { get; set; } + /// + /// 标签列表。 + /// + [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] + public List Tags { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchCreateOrDeleteTagReq {\n"); + sb.Append(" action: ").Append(Action).Append("\n"); + sb.Append(" tags: ").Append(Tags).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchCreateOrDeleteTagReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchCreateOrDeleteTagReq input) + { + if (input == null) + return false; + + return + ( + this.Action == input.Action || + (this.Action != null && + this.Action.Equals(input.Action)) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Action != null) + hashCode = hashCode * 59 + this.Action.GetHashCode(); + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/BatchRestartOrDeleteInstanceReq.cs b/Services/Rabbitmq/V2/Model/BatchRestartOrDeleteInstanceReq.cs new file mode 100644 index 000000000..acc4f36c3 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/BatchRestartOrDeleteInstanceReq.cs @@ -0,0 +1,312 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class BatchRestartOrDeleteInstanceReq + { + /// + /// 对实例的操作:restart、delete + /// + /// 对实例的操作:restart、delete + [JsonConverter(typeof(EnumClassConverter))] + public class ActionEnum + { + /// + /// Enum RESTART for value: restart + /// + public static readonly ActionEnum RESTART = new ActionEnum("restart"); + + /// + /// Enum DELETE for value: delete + /// + public static readonly ActionEnum DELETE = new ActionEnum("delete"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"restart", RESTART}, + {"delete", DELETE}, + }; + + private string Value; + + public ActionEnum(string Value) + { + this.Value = Value; + } + + public static ActionEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as ActionEnum)) + { + return true; + } + + return false; + } + + public bool Equals(ActionEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(ActionEnum a, ActionEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(ActionEnum a, ActionEnum b) + { + return !(a == b); + } + } + + /// + /// 是否批量删除创建失败的实例。 当参数值为“true”时,删除租户所有创建失败的实例,此时请求参数instances可为空。 + /// + /// 是否批量删除创建失败的实例。 当参数值为“true”时,删除租户所有创建失败的实例,此时请求参数instances可为空。 + [JsonConverter(typeof(EnumClassConverter))] + public class AllFailureEnum + { + /// + /// Enum TRUE for value: true + /// + public static readonly AllFailureEnum TRUE = new AllFailureEnum("true"); + + /// + /// Enum FALSE for value: false + /// + public static readonly AllFailureEnum FALSE = new AllFailureEnum("false"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"true", TRUE}, + {"false", FALSE}, + }; + + private string Value; + + public AllFailureEnum(string Value) + { + this.Value = Value; + } + + public static AllFailureEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as AllFailureEnum)) + { + return true; + } + + return false; + } + + public bool Equals(AllFailureEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(AllFailureEnum a, AllFailureEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(AllFailureEnum a, AllFailureEnum b) + { + return !(a == b); + } + } + + + /// + /// 实例的ID列表。 + /// + [JsonProperty("instances", NullValueHandling = NullValueHandling.Ignore)] + public List Instances { get; set; } + + /// + /// 对实例的操作:restart、delete + /// + [JsonProperty("action", NullValueHandling = NullValueHandling.Ignore)] + public ActionEnum Action { get; set; } + /// + /// 是否批量删除创建失败的实例。 当参数值为“true”时,删除租户所有创建失败的实例,此时请求参数instances可为空。 + /// + [JsonProperty("all_failure", NullValueHandling = NullValueHandling.Ignore)] + public AllFailureEnum AllFailure { get; set; } + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchRestartOrDeleteInstanceReq {\n"); + sb.Append(" instances: ").Append(Instances).Append("\n"); + sb.Append(" action: ").Append(Action).Append("\n"); + sb.Append(" allFailure: ").Append(AllFailure).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchRestartOrDeleteInstanceReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchRestartOrDeleteInstanceReq input) + { + if (input == null) + return false; + + return + ( + this.Instances == input.Instances || + this.Instances != null && + input.Instances != null && + this.Instances.SequenceEqual(input.Instances) + ) && + ( + this.Action == input.Action || + (this.Action != null && + this.Action.Equals(input.Action)) + ) && + ( + this.AllFailure == input.AllFailure || + (this.AllFailure != null && + this.AllFailure.Equals(input.AllFailure)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Instances != null) + hashCode = hashCode * 59 + this.Instances.GetHashCode(); + if (this.Action != null) + hashCode = hashCode * 59 + this.Action.GetHashCode(); + if (this.AllFailure != null) + hashCode = hashCode * 59 + this.AllFailure.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/BatchRestartOrDeleteInstanceRespResults.cs b/Services/Rabbitmq/V2/Model/BatchRestartOrDeleteInstanceRespResults.cs new file mode 100644 index 000000000..21bddac41 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/BatchRestartOrDeleteInstanceRespResults.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class BatchRestartOrDeleteInstanceRespResults + { + + /// + /// 操作结果: - success: 操作成功 - failed: 操作失败 + /// + [JsonProperty("result", NullValueHandling = NullValueHandling.Ignore)] + public string Result { get; set; } + + /// + /// 实例ID。 + /// + [JsonProperty("instance", NullValueHandling = NullValueHandling.Ignore)] + public string Instance { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchRestartOrDeleteInstanceRespResults {\n"); + sb.Append(" result: ").Append(Result).Append("\n"); + sb.Append(" instance: ").Append(Instance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchRestartOrDeleteInstanceRespResults); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchRestartOrDeleteInstanceRespResults input) + { + if (input == null) + return false; + + return + ( + this.Result == input.Result || + (this.Result != null && + this.Result.Equals(input.Result)) + ) && + ( + this.Instance == input.Instance || + (this.Instance != null && + this.Instance.Equals(input.Instance)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Result != null) + hashCode = hashCode * 59 + this.Result.GetHashCode(); + if (this.Instance != null) + hashCode = hashCode * 59 + this.Instance.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/BatchRestartOrDeleteInstancesRequest.cs b/Services/Rabbitmq/V2/Model/BatchRestartOrDeleteInstancesRequest.cs new file mode 100644 index 000000000..3c52b4a00 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/BatchRestartOrDeleteInstancesRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class BatchRestartOrDeleteInstancesRequest + { + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public BatchRestartOrDeleteInstanceReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchRestartOrDeleteInstancesRequest {\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchRestartOrDeleteInstancesRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchRestartOrDeleteInstancesRequest input) + { + if (input == null) + return false; + + return + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/BatchRestartOrDeleteInstancesResponse.cs b/Services/Rabbitmq/V2/Model/BatchRestartOrDeleteInstancesResponse.cs new file mode 100644 index 000000000..e24b4b6f2 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/BatchRestartOrDeleteInstancesResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class BatchRestartOrDeleteInstancesResponse : SdkResponse + { + + /// + /// 修改实例的结果。 + /// + [JsonProperty("results", NullValueHandling = NullValueHandling.Ignore)] + public List Results { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BatchRestartOrDeleteInstancesResponse {\n"); + sb.Append(" results: ").Append(Results).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as BatchRestartOrDeleteInstancesResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(BatchRestartOrDeleteInstancesResponse input) + { + if (input == null) + return false; + + return + ( + this.Results == input.Results || + this.Results != null && + input.Results != null && + this.Results.SequenceEqual(input.Results) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Results != null) + hashCode = hashCode * 59 + this.Results.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/CreateInstanceReq.cs b/Services/Rabbitmq/V2/Model/CreateInstanceReq.cs new file mode 100644 index 000000000..9ea6885bc --- /dev/null +++ b/Services/Rabbitmq/V2/Model/CreateInstanceReq.cs @@ -0,0 +1,649 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// 创建实例请求体。 + /// + public class CreateInstanceReq + { + /// + /// 消息引擎:rabbitmq。 + /// + /// 消息引擎:rabbitmq。 + [JsonConverter(typeof(EnumClassConverter))] + public class EngineEnum + { + /// + /// Enum RABBITMQ for value: rabbitmq + /// + public static readonly EngineEnum RABBITMQ = new EngineEnum("rabbitmq"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"rabbitmq", RABBITMQ}, + }; + + private string Value; + + public EngineEnum(string Value) + { + this.Value = Value; + } + + public static EngineEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as EngineEnum)) + { + return true; + } + + return false; + } + + public bool Equals(EngineEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(EngineEnum a, EngineEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(EngineEnum a, EngineEnum b) + { + return !(a == b); + } + } + + /// + /// 消息引擎的版本。 - RabbitMQ版本有:3.7.17 + /// + /// 消息引擎的版本。 - RabbitMQ版本有:3.7.17 + [JsonConverter(typeof(EnumClassConverter))] + public class EngineVersionEnum + { + /// + /// Enum _3_7_17 for value: 3.7.17 + /// + public static readonly EngineVersionEnum _3_7_17 = new EngineVersionEnum("3.7.17"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"3.7.17", _3_7_17}, + }; + + private string Value; + + public EngineVersionEnum(string Value) + { + this.Value = Value; + } + + public static EngineVersionEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as EngineVersionEnum)) + { + return true; + } + + return false; + } + + public bool Equals(EngineVersionEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(EngineVersionEnum a, EngineVersionEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(EngineVersionEnum a, EngineVersionEnum b) + { + return !(a == b); + } + } + + /// + /// 存储IO规格。如何选择磁盘类型请参考[磁盘类型及性能介绍](https://support.huaweicloud.com/productdesc-evs/zh-cn_topic_0044524691.html)。 取值范围: - dms.physical.storage.normal: - dms.physical.storage.high - dms.physical.storage.ultra + /// + /// 存储IO规格。如何选择磁盘类型请参考[磁盘类型及性能介绍](https://support.huaweicloud.com/productdesc-evs/zh-cn_topic_0044524691.html)。 取值范围: - dms.physical.storage.normal: - dms.physical.storage.high - dms.physical.storage.ultra + [JsonConverter(typeof(EnumClassConverter))] + public class StorageSpecCodeEnum + { + /// + /// Enum DMS_PHYSICAL_STORAGE_NORMAL for value: dms.physical.storage.normal + /// + public static readonly StorageSpecCodeEnum DMS_PHYSICAL_STORAGE_NORMAL = new StorageSpecCodeEnum("dms.physical.storage.normal"); + + /// + /// Enum DMS_PHYSICAL_STORAGE_HIGH for value: dms.physical.storage.high + /// + public static readonly StorageSpecCodeEnum DMS_PHYSICAL_STORAGE_HIGH = new StorageSpecCodeEnum("dms.physical.storage.high"); + + /// + /// Enum DMS_PHYSICAL_STORAGE_ULTRA for value: dms.physical.storage.ultra + /// + public static readonly StorageSpecCodeEnum DMS_PHYSICAL_STORAGE_ULTRA = new StorageSpecCodeEnum("dms.physical.storage.ultra"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"dms.physical.storage.normal", DMS_PHYSICAL_STORAGE_NORMAL}, + {"dms.physical.storage.high", DMS_PHYSICAL_STORAGE_HIGH}, + {"dms.physical.storage.ultra", DMS_PHYSICAL_STORAGE_ULTRA}, + }; + + private string Value; + + public StorageSpecCodeEnum(string Value) + { + this.Value = Value; + } + + public static StorageSpecCodeEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as StorageSpecCodeEnum)) + { + return true; + } + + return false; + } + + public bool Equals(StorageSpecCodeEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(StorageSpecCodeEnum a, StorageSpecCodeEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(StorageSpecCodeEnum a, StorageSpecCodeEnum b) + { + return !(a == b); + } + } + + + /// + /// 实例名称。 由英文字符开头,只能由英文字母、数字、中划线、下划线组成,长度为4~64的字符。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 实例的描述信息。 长度不超过1024的字符串。 > \\与\"在json报文中属于特殊字符,如果参数值中需要显示\\或者\"字符,请在字符前增加转义字符\\,比如\\\\或者\\\"。 + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// 消息引擎:rabbitmq。 + /// + [JsonProperty("engine", NullValueHandling = NullValueHandling.Ignore)] + public EngineEnum Engine { get; set; } + /// + /// 消息引擎的版本。 - RabbitMQ版本有:3.7.17 + /// + [JsonProperty("engine_version", NullValueHandling = NullValueHandling.Ignore)] + public EngineVersionEnum EngineVersion { get; set; } + /// + /// 消息存储空间,单位GB。 - 单机RabbitMQ实例的存储空间的取值范围100GB~90000GB。 - 集群RabbitMQ实例的存储空间的取值范围为100GB*节点数~90000GB、200GB*节点数~90000GB、300GB*节点数~90000GB。 + /// + [JsonProperty("storage_space", NullValueHandling = NullValueHandling.Ignore)] + public int? StorageSpace { get; set; } + + /// + /// 认证用户名,只能由英文字母、数字、中划线组成,长度为4~64的字符。 + /// + [JsonProperty("access_user", NullValueHandling = NullValueHandling.Ignore)] + public string AccessUser { get; set; } + + /// + /// 实例的认证密码。 复杂度要求: - 输入长度为8到32位的字符串。 - 必须包含如下四种字符中的两种组合: - 小写字母 - 大写字母 - 数字 - 特殊字符包括(`~!@#$%^&*()-_=+\\|[{}]:'\",<.>/?) + /// + [JsonProperty("password", NullValueHandling = NullValueHandling.Ignore)] + public string Password { get; set; } + + /// + /// 租户VPC ID。 + /// + [JsonProperty("vpc_id", NullValueHandling = NullValueHandling.Ignore)] + public string VpcId { get; set; } + + /// + /// 租户安全组ID。 + /// + [JsonProperty("security_group_id", NullValueHandling = NullValueHandling.Ignore)] + public string SecurityGroupId { get; set; } + + /// + /// 子网ID。 + /// + [JsonProperty("subnet_id", NullValueHandling = NullValueHandling.Ignore)] + public string SubnetId { get; set; } + + /// + /// 创建节点到指定且有资源的可用区ID。该参数不能为空数组或者数组的值为空,详情请参考[查询可用区信息](https://support.huaweicloud.com/api-rabbitmq/ListAvailableZones.html)查询得到。 + /// + [JsonProperty("available_zones", NullValueHandling = NullValueHandling.Ignore)] + public List AvailableZones { get; set; } + + /// + /// 产品标识。 获取方法,请参考[查询产品规格列表](https://support.huaweicloud.com/api-rabbitmq/ListProducts.html)。 + /// + [JsonProperty("product_id", NullValueHandling = NullValueHandling.Ignore)] + public string ProductId { get; set; } + + /// + /// 维护时间窗开始时间,格式为HH:mm。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-rabbitmq/ShowMaintainWindows.html)获取。 - 开始时间必须为22:00、02:00、06:00、10:00、14:00和18:00。 - 该参数不能单独为空,若该值为空,则结束时间也为空。系统分配一个默认开始时间02:00。 + /// + [JsonProperty("maintain_begin", NullValueHandling = NullValueHandling.Ignore)] + public string MaintainBegin { get; set; } + + /// + /// 维护时间窗结束时间,格式为HH:mm。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-rabbitmq/ShowMaintainWindows.html)获取。 - 结束时间在开始时间基础上加四个小时,即当开始时间为22:00时,结束时间为02:00。 - 该参数不能单独为空,若该值为空,则开始时间也为空,系统分配一个默认结束时间06:00。 + /// + [JsonProperty("maintain_end", NullValueHandling = NullValueHandling.Ignore)] + public string MaintainEnd { get; set; } + + /// + /// RabbitMQ实例是否开启公网访问功能。 - true:开启 - false:不开启 + /// + [JsonProperty("enable_publicip", NullValueHandling = NullValueHandling.Ignore)] + public bool? EnablePublicip { get; set; } + + /// + /// RabbitMQ实例绑定的弹性IP地址的ID。 如果开启了公网访问功能(即enable_publicip为true),该字段为必选。 + /// + [JsonProperty("publicip_id", NullValueHandling = NullValueHandling.Ignore)] + public string PublicipId { get; set; } + + /// + /// 是否打开SSL加密访问。 - true:打开SSL加密访问。 - false:不打开SSL加密访问。 + /// + [JsonProperty("ssl_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? SslEnable { get; set; } + + /// + /// 存储IO规格。如何选择磁盘类型请参考[磁盘类型及性能介绍](https://support.huaweicloud.com/productdesc-evs/zh-cn_topic_0044524691.html)。 取值范围: - dms.physical.storage.normal: - dms.physical.storage.high - dms.physical.storage.ultra + /// + [JsonProperty("storage_spec_code", NullValueHandling = NullValueHandling.Ignore)] + public StorageSpecCodeEnum StorageSpecCode { get; set; } + /// + /// 企业项目ID。若为企业项目账号,该参数必填。 + /// + [JsonProperty("enterprise_project_id", NullValueHandling = NullValueHandling.Ignore)] + public string EnterpriseProjectId { get; set; } + + /// + /// 标签列表。 + /// + [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] + public List Tags { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateInstanceReq {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" description: ").Append(Description).Append("\n"); + sb.Append(" engine: ").Append(Engine).Append("\n"); + sb.Append(" engineVersion: ").Append(EngineVersion).Append("\n"); + sb.Append(" storageSpace: ").Append(StorageSpace).Append("\n"); + sb.Append(" accessUser: ").Append(AccessUser).Append("\n"); + sb.Append(" password: ").Append(Password).Append("\n"); + sb.Append(" vpcId: ").Append(VpcId).Append("\n"); + sb.Append(" securityGroupId: ").Append(SecurityGroupId).Append("\n"); + sb.Append(" subnetId: ").Append(SubnetId).Append("\n"); + sb.Append(" availableZones: ").Append(AvailableZones).Append("\n"); + sb.Append(" productId: ").Append(ProductId).Append("\n"); + sb.Append(" maintainBegin: ").Append(MaintainBegin).Append("\n"); + sb.Append(" maintainEnd: ").Append(MaintainEnd).Append("\n"); + sb.Append(" enablePublicip: ").Append(EnablePublicip).Append("\n"); + sb.Append(" publicipId: ").Append(PublicipId).Append("\n"); + sb.Append(" sslEnable: ").Append(SslEnable).Append("\n"); + sb.Append(" storageSpecCode: ").Append(StorageSpecCode).Append("\n"); + sb.Append(" enterpriseProjectId: ").Append(EnterpriseProjectId).Append("\n"); + sb.Append(" tags: ").Append(Tags).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateInstanceReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateInstanceReq input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.Engine == input.Engine || + (this.Engine != null && + this.Engine.Equals(input.Engine)) + ) && + ( + this.EngineVersion == input.EngineVersion || + (this.EngineVersion != null && + this.EngineVersion.Equals(input.EngineVersion)) + ) && + ( + this.StorageSpace == input.StorageSpace || + (this.StorageSpace != null && + this.StorageSpace.Equals(input.StorageSpace)) + ) && + ( + this.AccessUser == input.AccessUser || + (this.AccessUser != null && + this.AccessUser.Equals(input.AccessUser)) + ) && + ( + this.Password == input.Password || + (this.Password != null && + this.Password.Equals(input.Password)) + ) && + ( + this.VpcId == input.VpcId || + (this.VpcId != null && + this.VpcId.Equals(input.VpcId)) + ) && + ( + this.SecurityGroupId == input.SecurityGroupId || + (this.SecurityGroupId != null && + this.SecurityGroupId.Equals(input.SecurityGroupId)) + ) && + ( + this.SubnetId == input.SubnetId || + (this.SubnetId != null && + this.SubnetId.Equals(input.SubnetId)) + ) && + ( + this.AvailableZones == input.AvailableZones || + this.AvailableZones != null && + input.AvailableZones != null && + this.AvailableZones.SequenceEqual(input.AvailableZones) + ) && + ( + this.ProductId == input.ProductId || + (this.ProductId != null && + this.ProductId.Equals(input.ProductId)) + ) && + ( + this.MaintainBegin == input.MaintainBegin || + (this.MaintainBegin != null && + this.MaintainBegin.Equals(input.MaintainBegin)) + ) && + ( + this.MaintainEnd == input.MaintainEnd || + (this.MaintainEnd != null && + this.MaintainEnd.Equals(input.MaintainEnd)) + ) && + ( + this.EnablePublicip == input.EnablePublicip || + (this.EnablePublicip != null && + this.EnablePublicip.Equals(input.EnablePublicip)) + ) && + ( + this.PublicipId == input.PublicipId || + (this.PublicipId != null && + this.PublicipId.Equals(input.PublicipId)) + ) && + ( + this.SslEnable == input.SslEnable || + (this.SslEnable != null && + this.SslEnable.Equals(input.SslEnable)) + ) && + ( + this.StorageSpecCode == input.StorageSpecCode || + (this.StorageSpecCode != null && + this.StorageSpecCode.Equals(input.StorageSpecCode)) + ) && + ( + this.EnterpriseProjectId == input.EnterpriseProjectId || + (this.EnterpriseProjectId != null && + this.EnterpriseProjectId.Equals(input.EnterpriseProjectId)) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Engine != null) + hashCode = hashCode * 59 + this.Engine.GetHashCode(); + if (this.EngineVersion != null) + hashCode = hashCode * 59 + this.EngineVersion.GetHashCode(); + if (this.StorageSpace != null) + hashCode = hashCode * 59 + this.StorageSpace.GetHashCode(); + if (this.AccessUser != null) + hashCode = hashCode * 59 + this.AccessUser.GetHashCode(); + if (this.Password != null) + hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.VpcId != null) + hashCode = hashCode * 59 + this.VpcId.GetHashCode(); + if (this.SecurityGroupId != null) + hashCode = hashCode * 59 + this.SecurityGroupId.GetHashCode(); + if (this.SubnetId != null) + hashCode = hashCode * 59 + this.SubnetId.GetHashCode(); + if (this.AvailableZones != null) + hashCode = hashCode * 59 + this.AvailableZones.GetHashCode(); + if (this.ProductId != null) + hashCode = hashCode * 59 + this.ProductId.GetHashCode(); + if (this.MaintainBegin != null) + hashCode = hashCode * 59 + this.MaintainBegin.GetHashCode(); + if (this.MaintainEnd != null) + hashCode = hashCode * 59 + this.MaintainEnd.GetHashCode(); + if (this.EnablePublicip != null) + hashCode = hashCode * 59 + this.EnablePublicip.GetHashCode(); + if (this.PublicipId != null) + hashCode = hashCode * 59 + this.PublicipId.GetHashCode(); + if (this.SslEnable != null) + hashCode = hashCode * 59 + this.SslEnable.GetHashCode(); + if (this.StorageSpecCode != null) + hashCode = hashCode * 59 + this.StorageSpecCode.GetHashCode(); + if (this.EnterpriseProjectId != null) + hashCode = hashCode * 59 + this.EnterpriseProjectId.GetHashCode(); + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/CreateInstanceReqTags.cs b/Services/Rabbitmq/V2/Model/CreateInstanceReqTags.cs new file mode 100644 index 000000000..9ef0b611a --- /dev/null +++ b/Services/Rabbitmq/V2/Model/CreateInstanceReqTags.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class CreateInstanceReqTags + { + + /// + /// 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + /// + [JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)] + public string Key { get; set; } + + /// + /// 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + /// + [JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)] + public string Value { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateInstanceReqTags {\n"); + sb.Append(" key: ").Append(Key).Append("\n"); + sb.Append(" value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreateInstanceReqTags); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreateInstanceReqTags input) + { + if (input == null) + return false; + + return + ( + this.Key == input.Key || + (this.Key != null && + this.Key.Equals(input.Key)) + ) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Key != null) + hashCode = hashCode * 59 + this.Key.GetHashCode(); + if (this.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/CreatePostPaidInstanceRequest.cs b/Services/Rabbitmq/V2/Model/CreatePostPaidInstanceRequest.cs new file mode 100644 index 000000000..7bdd7b50e --- /dev/null +++ b/Services/Rabbitmq/V2/Model/CreatePostPaidInstanceRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class CreatePostPaidInstanceRequest + { + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public CreateInstanceReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreatePostPaidInstanceRequest {\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreatePostPaidInstanceRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreatePostPaidInstanceRequest input) + { + if (input == null) + return false; + + return + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/CreatePostPaidInstanceResponse.cs b/Services/Rabbitmq/V2/Model/CreatePostPaidInstanceResponse.cs new file mode 100644 index 000000000..3a069bd1b --- /dev/null +++ b/Services/Rabbitmq/V2/Model/CreatePostPaidInstanceResponse.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class CreatePostPaidInstanceResponse : SdkResponse + { + + /// + /// 实例ID。 + /// + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreatePostPaidInstanceResponse {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as CreatePostPaidInstanceResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(CreatePostPaidInstanceResponse input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/DeleteBackgroundTaskRequest.cs b/Services/Rabbitmq/V2/Model/DeleteBackgroundTaskRequest.cs new file mode 100644 index 000000000..ca4d022fd --- /dev/null +++ b/Services/Rabbitmq/V2/Model/DeleteBackgroundTaskRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class DeleteBackgroundTaskRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("task_id", IsPath = true)] + [JsonProperty("task_id", NullValueHandling = NullValueHandling.Ignore)] + public string TaskId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DeleteBackgroundTaskRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" taskId: ").Append(TaskId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as DeleteBackgroundTaskRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(DeleteBackgroundTaskRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.TaskId == input.TaskId || + (this.TaskId != null && + this.TaskId.Equals(input.TaskId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.TaskId != null) + hashCode = hashCode * 59 + this.TaskId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/DeleteBackgroundTaskResponse.cs b/Services/Rabbitmq/V2/Model/DeleteBackgroundTaskResponse.cs new file mode 100644 index 000000000..04bada26e --- /dev/null +++ b/Services/Rabbitmq/V2/Model/DeleteBackgroundTaskResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class DeleteBackgroundTaskResponse : SdkResponse + { + + + } +} diff --git a/Services/Rabbitmq/V2/Model/DeleteInstanceRequest.cs b/Services/Rabbitmq/V2/Model/DeleteInstanceRequest.cs new file mode 100644 index 000000000..59442234d --- /dev/null +++ b/Services/Rabbitmq/V2/Model/DeleteInstanceRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class DeleteInstanceRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DeleteInstanceRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as DeleteInstanceRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(DeleteInstanceRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/DeleteInstanceResponse.cs b/Services/Rabbitmq/V2/Model/DeleteInstanceResponse.cs new file mode 100644 index 000000000..3ad84ffc7 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/DeleteInstanceResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class DeleteInstanceResponse : SdkResponse + { + + + } +} diff --git a/Services/Rabbitmq/V2/Model/ListAvailableZonesRequest.cs b/Services/Rabbitmq/V2/Model/ListAvailableZonesRequest.cs new file mode 100644 index 000000000..606fec441 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListAvailableZonesRequest.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class ListAvailableZonesRequest + { + + + } +} diff --git a/Services/Rabbitmq/V2/Model/ListAvailableZonesRespAvailableZones.cs b/Services/Rabbitmq/V2/Model/ListAvailableZonesRespAvailableZones.cs new file mode 100644 index 000000000..186c202a2 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListAvailableZonesRespAvailableZones.cs @@ -0,0 +1,173 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class ListAvailableZonesRespAvailableZones + { + + /// + /// 是否售罄。 + /// + [JsonProperty("soldOut", NullValueHandling = NullValueHandling.Ignore)] + public bool? SoldOut { get; set; } + + /// + /// 可用区ID。 + /// + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// 可用区编码。 + /// + [JsonProperty("code", NullValueHandling = NullValueHandling.Ignore)] + public string Code { get; set; } + + /// + /// 可用区名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 可用区端口号。 + /// + [JsonProperty("port", NullValueHandling = NullValueHandling.Ignore)] + public string Port { get; set; } + + /// + /// 分区上是否还有可用资源。 + /// + [JsonProperty("resource_availability", NullValueHandling = NullValueHandling.Ignore)] + public string ResourceAvailability { get; set; } + + /// + /// 是否为默认可用区。 + /// + [JsonProperty("default_az", NullValueHandling = NullValueHandling.Ignore)] + public bool? DefaultAz { get; set; } + + /// + /// 是否支持IPv6。 + /// + [JsonProperty("ipv6_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? Ipv6Enable { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListAvailableZonesRespAvailableZones {\n"); + sb.Append(" soldOut: ").Append(SoldOut).Append("\n"); + sb.Append(" id: ").Append(Id).Append("\n"); + sb.Append(" code: ").Append(Code).Append("\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" port: ").Append(Port).Append("\n"); + sb.Append(" resourceAvailability: ").Append(ResourceAvailability).Append("\n"); + sb.Append(" defaultAz: ").Append(DefaultAz).Append("\n"); + sb.Append(" ipv6Enable: ").Append(Ipv6Enable).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListAvailableZonesRespAvailableZones); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListAvailableZonesRespAvailableZones input) + { + if (input == null) + return false; + + return + ( + this.SoldOut == input.SoldOut || + (this.SoldOut != null && + this.SoldOut.Equals(input.SoldOut)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Code == input.Code || + (this.Code != null && + this.Code.Equals(input.Code)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Port == input.Port || + (this.Port != null && + this.Port.Equals(input.Port)) + ) && + ( + this.ResourceAvailability == input.ResourceAvailability || + (this.ResourceAvailability != null && + this.ResourceAvailability.Equals(input.ResourceAvailability)) + ) && + ( + this.DefaultAz == input.DefaultAz || + (this.DefaultAz != null && + this.DefaultAz.Equals(input.DefaultAz)) + ) && + ( + this.Ipv6Enable == input.Ipv6Enable || + (this.Ipv6Enable != null && + this.Ipv6Enable.Equals(input.Ipv6Enable)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.SoldOut != null) + hashCode = hashCode * 59 + this.SoldOut.GetHashCode(); + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Code != null) + hashCode = hashCode * 59 + this.Code.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Port != null) + hashCode = hashCode * 59 + this.Port.GetHashCode(); + if (this.ResourceAvailability != null) + hashCode = hashCode * 59 + this.ResourceAvailability.GetHashCode(); + if (this.DefaultAz != null) + hashCode = hashCode * 59 + this.DefaultAz.GetHashCode(); + if (this.Ipv6Enable != null) + hashCode = hashCode * 59 + this.Ipv6Enable.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ListAvailableZonesResponse.cs b/Services/Rabbitmq/V2/Model/ListAvailableZonesResponse.cs new file mode 100644 index 000000000..56736fa89 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListAvailableZonesResponse.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class ListAvailableZonesResponse : SdkResponse + { + + /// + /// 区域ID。 + /// + [JsonProperty("region_id", NullValueHandling = NullValueHandling.Ignore)] + public string RegionId { get; set; } + + /// + /// 可用区数组。 + /// + [JsonProperty("available_zones", NullValueHandling = NullValueHandling.Ignore)] + public List AvailableZones { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListAvailableZonesResponse {\n"); + sb.Append(" regionId: ").Append(RegionId).Append("\n"); + sb.Append(" availableZones: ").Append(AvailableZones).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListAvailableZonesResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListAvailableZonesResponse input) + { + if (input == null) + return false; + + return + ( + this.RegionId == input.RegionId || + (this.RegionId != null && + this.RegionId.Equals(input.RegionId)) + ) && + ( + this.AvailableZones == input.AvailableZones || + this.AvailableZones != null && + input.AvailableZones != null && + this.AvailableZones.SequenceEqual(input.AvailableZones) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.RegionId != null) + hashCode = hashCode * 59 + this.RegionId.GetHashCode(); + if (this.AvailableZones != null) + hashCode = hashCode * 59 + this.AvailableZones.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ListBackgroundTasksRequest.cs b/Services/Rabbitmq/V2/Model/ListBackgroundTasksRequest.cs new file mode 100644 index 000000000..1082b8d14 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListBackgroundTasksRequest.cs @@ -0,0 +1,136 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class ListBackgroundTasksRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("start", IsQuery = true)] + [JsonProperty("start", NullValueHandling = NullValueHandling.Ignore)] + public int? Start { get; set; } + + /// + /// + /// + [SDKProperty("limit", IsQuery = true)] + [JsonProperty("limit", NullValueHandling = NullValueHandling.Ignore)] + public int? Limit { get; set; } + + /// + /// + /// + [SDKProperty("begin_time", IsQuery = true)] + [JsonProperty("begin_time", NullValueHandling = NullValueHandling.Ignore)] + public string BeginTime { get; set; } + + /// + /// + /// + [SDKProperty("end_time", IsQuery = true)] + [JsonProperty("end_time", NullValueHandling = NullValueHandling.Ignore)] + public string EndTime { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListBackgroundTasksRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" start: ").Append(Start).Append("\n"); + sb.Append(" limit: ").Append(Limit).Append("\n"); + sb.Append(" beginTime: ").Append(BeginTime).Append("\n"); + sb.Append(" endTime: ").Append(EndTime).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListBackgroundTasksRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListBackgroundTasksRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Start == input.Start || + (this.Start != null && + this.Start.Equals(input.Start)) + ) && + ( + this.Limit == input.Limit || + (this.Limit != null && + this.Limit.Equals(input.Limit)) + ) && + ( + this.BeginTime == input.BeginTime || + (this.BeginTime != null && + this.BeginTime.Equals(input.BeginTime)) + ) && + ( + this.EndTime == input.EndTime || + (this.EndTime != null && + this.EndTime.Equals(input.EndTime)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Start != null) + hashCode = hashCode * 59 + this.Start.GetHashCode(); + if (this.Limit != null) + hashCode = hashCode * 59 + this.Limit.GetHashCode(); + if (this.BeginTime != null) + hashCode = hashCode * 59 + this.BeginTime.GetHashCode(); + if (this.EndTime != null) + hashCode = hashCode * 59 + this.EndTime.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ListBackgroundTasksRespTasks.cs b/Services/Rabbitmq/V2/Model/ListBackgroundTasksRespTasks.cs new file mode 100644 index 000000000..918c248bf --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListBackgroundTasksRespTasks.cs @@ -0,0 +1,173 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class ListBackgroundTasksRespTasks + { + + /// + /// 任务ID。 + /// + [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// 任务名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 用户名。 + /// + [JsonProperty("user_name", NullValueHandling = NullValueHandling.Ignore)] + public string UserName { get; set; } + + /// + /// 用户ID。 + /// + [JsonProperty("user_id", NullValueHandling = NullValueHandling.Ignore)] + public string UserId { get; set; } + + /// + /// 任务参数。 + /// + [JsonProperty("params", NullValueHandling = NullValueHandling.Ignore)] + public string Params { get; set; } + + /// + /// 任务状态。 + /// + [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] + public string Status { get; set; } + + /// + /// 启动时间。 + /// + [JsonProperty("created_at", NullValueHandling = NullValueHandling.Ignore)] + public string CreatedAt { get; set; } + + /// + /// 结束时间。 + /// + [JsonProperty("updated_at", NullValueHandling = NullValueHandling.Ignore)] + public string UpdatedAt { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListBackgroundTasksRespTasks {\n"); + sb.Append(" id: ").Append(Id).Append("\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" userName: ").Append(UserName).Append("\n"); + sb.Append(" userId: ").Append(UserId).Append("\n"); + sb.Append(" Params: ").Append(Params).Append("\n"); + sb.Append(" status: ").Append(Status).Append("\n"); + sb.Append(" createdAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" updatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListBackgroundTasksRespTasks); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListBackgroundTasksRespTasks input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.UserName == input.UserName || + (this.UserName != null && + this.UserName.Equals(input.UserName)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.Params == input.Params || + (this.Params != null && + this.Params.Equals(input.Params)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.UserName != null) + hashCode = hashCode * 59 + this.UserName.GetHashCode(); + if (this.UserId != null) + hashCode = hashCode * 59 + this.UserId.GetHashCode(); + if (this.Params != null) + hashCode = hashCode * 59 + this.Params.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.UpdatedAt != null) + hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ListBackgroundTasksResponse.cs b/Services/Rabbitmq/V2/Model/ListBackgroundTasksResponse.cs new file mode 100644 index 000000000..f0b60a7ac --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListBackgroundTasksResponse.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class ListBackgroundTasksResponse : SdkResponse + { + + /// + /// 任务数量。 + /// + [JsonProperty("task_count", NullValueHandling = NullValueHandling.Ignore)] + public string TaskCount { get; set; } + + /// + /// 任务列表。 + /// + [JsonProperty("tasks", NullValueHandling = NullValueHandling.Ignore)] + public List Tasks { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListBackgroundTasksResponse {\n"); + sb.Append(" taskCount: ").Append(TaskCount).Append("\n"); + sb.Append(" tasks: ").Append(Tasks).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListBackgroundTasksResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListBackgroundTasksResponse input) + { + if (input == null) + return false; + + return + ( + this.TaskCount == input.TaskCount || + (this.TaskCount != null && + this.TaskCount.Equals(input.TaskCount)) + ) && + ( + this.Tasks == input.Tasks || + this.Tasks != null && + input.Tasks != null && + this.Tasks.SequenceEqual(input.Tasks) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.TaskCount != null) + hashCode = hashCode * 59 + this.TaskCount.GetHashCode(); + if (this.Tasks != null) + hashCode = hashCode * 59 + this.Tasks.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ListInstancesDetailsRequest.cs b/Services/Rabbitmq/V2/Model/ListInstancesDetailsRequest.cs new file mode 100644 index 000000000..286b9c899 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListInstancesDetailsRequest.cs @@ -0,0 +1,608 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class ListInstancesDetailsRequest + { + /// + /// Defines engine + /// + [JsonConverter(typeof(EnumClassConverter))] + public class EngineEnum + { + /// + /// Enum RABBITMQ for value: rabbitmq + /// + public static readonly EngineEnum RABBITMQ = new EngineEnum("rabbitmq"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"rabbitmq", RABBITMQ}, + }; + + private string Value; + + public EngineEnum(string Value) + { + this.Value = Value; + } + + public static EngineEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as EngineEnum)) + { + return true; + } + + return false; + } + + public bool Equals(EngineEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(EngineEnum a, EngineEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(EngineEnum a, EngineEnum b) + { + return !(a == b); + } + } + + /// + /// Defines status + /// + [JsonConverter(typeof(EnumClassConverter))] + public class StatusEnum + { + /// + /// Enum CREATING for value: CREATING + /// + public static readonly StatusEnum CREATING = new StatusEnum("CREATING"); + + /// + /// Enum CREATEFAILED for value: CREATEFAILED + /// + public static readonly StatusEnum CREATEFAILED = new StatusEnum("CREATEFAILED"); + + /// + /// Enum RUNNING for value: RUNNING + /// + public static readonly StatusEnum RUNNING = new StatusEnum("RUNNING"); + + /// + /// Enum ERROR for value: ERROR + /// + public static readonly StatusEnum ERROR = new StatusEnum("ERROR"); + + /// + /// Enum STARTING for value: STARTING + /// + public static readonly StatusEnum STARTING = new StatusEnum("STARTING"); + + /// + /// Enum RESTARTING for value: RESTARTING + /// + public static readonly StatusEnum RESTARTING = new StatusEnum("RESTARTING"); + + /// + /// Enum CLOSING for value: CLOSING + /// + public static readonly StatusEnum CLOSING = new StatusEnum("CLOSING"); + + /// + /// Enum FROZEN for value: FROZEN + /// + public static readonly StatusEnum FROZEN = new StatusEnum("FROZEN"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"CREATING", CREATING}, + {"CREATEFAILED", CREATEFAILED}, + {"RUNNING", RUNNING}, + {"ERROR", ERROR}, + {"STARTING", STARTING}, + {"RESTARTING", RESTARTING}, + {"CLOSING", CLOSING}, + {"FROZEN", FROZEN}, + }; + + private string Value; + + public StatusEnum(string Value) + { + this.Value = Value; + } + + public static StatusEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as StatusEnum)) + { + return true; + } + + return false; + } + + public bool Equals(StatusEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(StatusEnum a, StatusEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(StatusEnum a, StatusEnum b) + { + return !(a == b); + } + } + + /// + /// Defines includeFailure + /// + [JsonConverter(typeof(EnumClassConverter))] + public class IncludeFailureEnum + { + /// + /// Enum TRUE for value: true + /// + public static readonly IncludeFailureEnum TRUE = new IncludeFailureEnum("true"); + + /// + /// Enum FALSE for value: false + /// + public static readonly IncludeFailureEnum FALSE = new IncludeFailureEnum("false"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"true", TRUE}, + {"false", FALSE}, + }; + + private string Value; + + public IncludeFailureEnum(string Value) + { + this.Value = Value; + } + + public static IncludeFailureEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as IncludeFailureEnum)) + { + return true; + } + + return false; + } + + public bool Equals(IncludeFailureEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(IncludeFailureEnum a, IncludeFailureEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(IncludeFailureEnum a, IncludeFailureEnum b) + { + return !(a == b); + } + } + + /// + /// Defines exactMatchName + /// + [JsonConverter(typeof(EnumClassConverter))] + public class ExactMatchNameEnum + { + /// + /// Enum TRUE for value: true + /// + public static readonly ExactMatchNameEnum TRUE = new ExactMatchNameEnum("true"); + + /// + /// Enum FALSE for value: false + /// + public static readonly ExactMatchNameEnum FALSE = new ExactMatchNameEnum("false"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"true", TRUE}, + {"false", FALSE}, + }; + + private string Value; + + public ExactMatchNameEnum(string Value) + { + this.Value = Value; + } + + public static ExactMatchNameEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as ExactMatchNameEnum)) + { + return true; + } + + return false; + } + + public bool Equals(ExactMatchNameEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(ExactMatchNameEnum a, ExactMatchNameEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(ExactMatchNameEnum a, ExactMatchNameEnum b) + { + return !(a == b); + } + } + + + /// + /// + /// + [SDKProperty("engine", IsQuery = true)] + [JsonProperty("engine", NullValueHandling = NullValueHandling.Ignore)] + public EngineEnum Engine { get; set; } + /// + /// + /// + [SDKProperty("name", IsQuery = true)] + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// + /// + [SDKProperty("instance_id", IsQuery = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("status", IsQuery = true)] + [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] + public StatusEnum Status { get; set; } + /// + /// + /// + [SDKProperty("include_failure", IsQuery = true)] + [JsonProperty("include_failure", NullValueHandling = NullValueHandling.Ignore)] + public IncludeFailureEnum IncludeFailure { get; set; } + /// + /// + /// + [SDKProperty("exact_match_name", IsQuery = true)] + [JsonProperty("exact_match_name", NullValueHandling = NullValueHandling.Ignore)] + public ExactMatchNameEnum ExactMatchName { get; set; } + /// + /// + /// + [SDKProperty("enterprise_project_id", IsQuery = true)] + [JsonProperty("enterprise_project_id", NullValueHandling = NullValueHandling.Ignore)] + public string EnterpriseProjectId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListInstancesDetailsRequest {\n"); + sb.Append(" engine: ").Append(Engine).Append("\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" status: ").Append(Status).Append("\n"); + sb.Append(" includeFailure: ").Append(IncludeFailure).Append("\n"); + sb.Append(" exactMatchName: ").Append(ExactMatchName).Append("\n"); + sb.Append(" enterpriseProjectId: ").Append(EnterpriseProjectId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListInstancesDetailsRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListInstancesDetailsRequest input) + { + if (input == null) + return false; + + return + ( + this.Engine == input.Engine || + (this.Engine != null && + this.Engine.Equals(input.Engine)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.IncludeFailure == input.IncludeFailure || + (this.IncludeFailure != null && + this.IncludeFailure.Equals(input.IncludeFailure)) + ) && + ( + this.ExactMatchName == input.ExactMatchName || + (this.ExactMatchName != null && + this.ExactMatchName.Equals(input.ExactMatchName)) + ) && + ( + this.EnterpriseProjectId == input.EnterpriseProjectId || + (this.EnterpriseProjectId != null && + this.EnterpriseProjectId.Equals(input.EnterpriseProjectId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Engine != null) + hashCode = hashCode * 59 + this.Engine.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.IncludeFailure != null) + hashCode = hashCode * 59 + this.IncludeFailure.GetHashCode(); + if (this.ExactMatchName != null) + hashCode = hashCode * 59 + this.ExactMatchName.GetHashCode(); + if (this.EnterpriseProjectId != null) + hashCode = hashCode * 59 + this.EnterpriseProjectId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ListInstancesDetailsResponse.cs b/Services/Rabbitmq/V2/Model/ListInstancesDetailsResponse.cs new file mode 100644 index 000000000..263a7c302 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListInstancesDetailsResponse.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class ListInstancesDetailsResponse : SdkResponse + { + + /// + /// 实例列表。 + /// + [JsonProperty("instances", NullValueHandling = NullValueHandling.Ignore)] + public List Instances { get; set; } + + /// + /// 实例个数。 + /// + [JsonProperty("instance_num", NullValueHandling = NullValueHandling.Ignore)] + public int? InstanceNum { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListInstancesDetailsResponse {\n"); + sb.Append(" instances: ").Append(Instances).Append("\n"); + sb.Append(" instanceNum: ").Append(InstanceNum).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListInstancesDetailsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListInstancesDetailsResponse input) + { + if (input == null) + return false; + + return + ( + this.Instances == input.Instances || + this.Instances != null && + input.Instances != null && + this.Instances.SequenceEqual(input.Instances) + ) && + ( + this.InstanceNum == input.InstanceNum || + (this.InstanceNum != null && + this.InstanceNum.Equals(input.InstanceNum)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Instances != null) + hashCode = hashCode * 59 + this.Instances.GetHashCode(); + if (this.InstanceNum != null) + hashCode = hashCode * 59 + this.InstanceNum.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ListInstancesRespInstances.cs b/Services/Rabbitmq/V2/Model/ListInstancesRespInstances.cs new file mode 100644 index 000000000..0052c6322 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListInstancesRespInstances.cs @@ -0,0 +1,755 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class ListInstancesRespInstances + { + /// + /// 实例类型:集群,cluster。 + /// + /// 实例类型:集群,cluster。 + [JsonConverter(typeof(EnumClassConverter))] + public class TypeEnum + { + /// + /// Enum SINGLE for value: single + /// + public static readonly TypeEnum SINGLE = new TypeEnum("single"); + + /// + /// Enum CLUSTER for value: cluster + /// + public static readonly TypeEnum CLUSTER = new TypeEnum("cluster"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"single", SINGLE}, + {"cluster", CLUSTER}, + }; + + private string Value; + + public TypeEnum(string Value) + { + this.Value = Value; + } + + public static TypeEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as TypeEnum)) + { + return true; + } + + return false; + } + + public bool Equals(TypeEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(TypeEnum a, TypeEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(TypeEnum a, TypeEnum b) + { + return !(a == b); + } + } + + + /// + /// 实例名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 引擎。 + /// + [JsonProperty("engine", NullValueHandling = NullValueHandling.Ignore)] + public string Engine { get; set; } + + /// + /// 版本。 + /// + [JsonProperty("engine_version", NullValueHandling = NullValueHandling.Ignore)] + public string EngineVersion { get; set; } + + /// + /// 实例规格。 - RabbitMQ实例单机返回vm规格。 - RabbitMQ实例集群返回vm规格和节点数。 + /// + [JsonProperty("specification", NullValueHandling = NullValueHandling.Ignore)] + public string Specification { get; set; } + + /// + /// 消息存储空间,单位:GB。 + /// + [JsonProperty("storage_space", NullValueHandling = NullValueHandling.Ignore)] + public int? StorageSpace { get; set; } + + /// + /// 已使用的消息存储空间,单位:GB。 + /// + [JsonProperty("used_storage_space", NullValueHandling = NullValueHandling.Ignore)] + public int? UsedStorageSpace { get; set; } + + /// + /// 实例连接IP地址。 + /// + [JsonProperty("connect_address", NullValueHandling = NullValueHandling.Ignore)] + public string ConnectAddress { get; set; } + + /// + /// 实例连接端口。 + /// + [JsonProperty("port", NullValueHandling = NullValueHandling.Ignore)] + public int? Port { get; set; } + + /// + /// 实例的状态。详细状态说明见[实例状态说明](https://support.huaweicloud.com/api-rabbitmq/rabbitmq-api-180514012.html)。 + /// + [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] + public string Status { get; set; } + + /// + /// 实例描述。 + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// 实例ID。 + /// + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// 资源规格标识。 - dms.instance.rabbitmq.single.c3.2u4g:RabbitMQ单机,vm规格2u4g - dms.instance.rabbitmq.single.c3.4u8g:RabbitMQ单机,vm规格4u8g - dms.instance.rabbitmq.single.c3.8u16g:RabbitMQ单机,vm规格8u16g - dms.instance.rabbitmq.single.c3.16u32g:RabbitMQ单机,vm规格16u32g - dms.instance.rabbitmq.cluster.c3.4u8g.3:RabbitMQ集群,vm规格4u8g,3个节点 - dms.instance.rabbitmq.cluster.c3.4u8g.5:RabbitMQ集群,vm规格4u8g,5个节点 - dms.instance.rabbitmq.cluster.c3.4u8g.7:RabbitMQ集群,vm规格4u8g,7个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.3:RabbitMQ集群,vm规格8u16g,3个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.5:RabbitMQ集群,vm规格8u16g,5个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.7:RabbitMQ集群,vm规格8u16g,7个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.3:RabbitMQ集群,vm规格16u32g,3个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.5:RabbitMQ集群,vm规格16u32g,5个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.7:RabbitMQ集群,vm规格16u32g,7个节点 + /// + [JsonProperty("resource_spec_code", NullValueHandling = NullValueHandling.Ignore)] + public string ResourceSpecCode { get; set; } + + /// + /// 付费模式,1表示按需计费,0表示包年/包月计费。 + /// + [JsonProperty("charging_mode", NullValueHandling = NullValueHandling.Ignore)] + public int? ChargingMode { get; set; } + + /// + /// VPC ID。 + /// + [JsonProperty("vpc_id", NullValueHandling = NullValueHandling.Ignore)] + public string VpcId { get; set; } + + /// + /// VPC的名称。 + /// + [JsonProperty("vpc_name", NullValueHandling = NullValueHandling.Ignore)] + public string VpcName { get; set; } + + /// + /// 完成创建时间。 格式为时间戳,指从格林威治时间 1970年01月01日00时00分00秒起至指定时间的偏差总毫秒数。 + /// + [JsonProperty("created_at", NullValueHandling = NullValueHandling.Ignore)] + public string CreatedAt { get; set; } + + /// + /// 用户ID。 + /// + [JsonProperty("user_id", NullValueHandling = NullValueHandling.Ignore)] + public string UserId { get; set; } + + /// + /// 用户名。 + /// + [JsonProperty("user_name", NullValueHandling = NullValueHandling.Ignore)] + public string UserName { get; set; } + + /// + /// 订单ID,只有在包周期计费时才会有order_id值,其他计费方式order_id值为空。 + /// + [JsonProperty("order_id", NullValueHandling = NullValueHandling.Ignore)] + public string OrderId { get; set; } + + /// + /// 维护时间窗开始时间,格式为HH:mm:ss。 + /// + [JsonProperty("maintain_begin", NullValueHandling = NullValueHandling.Ignore)] + public string MaintainBegin { get; set; } + + /// + /// 维护时间窗结束时间,格式为HH:mm:ss。 + /// + [JsonProperty("maintain_end", NullValueHandling = NullValueHandling.Ignore)] + public string MaintainEnd { get; set; } + + /// + /// RabbitMQ实例是否开启公网访问功能。 - true:开启 - false:未开启 + /// + [JsonProperty("enable_publicip", NullValueHandling = NullValueHandling.Ignore)] + public bool? EnablePublicip { get; set; } + + /// + /// RabbitMQ实例绑定的弹性IP地址。 如果未开启公网访问功能,该字段值为null。 + /// + [JsonProperty("publicip_address", NullValueHandling = NullValueHandling.Ignore)] + public string PublicipAddress { get; set; } + + /// + /// RabbitMQ实例绑定的弹性IP地址的ID。 如果未开启公网访问功能,该字段值为null。 + /// + [JsonProperty("publicip_id", NullValueHandling = NullValueHandling.Ignore)] + public string PublicipId { get; set; } + + /// + /// RabbitMQ实例的管理地址。 + /// + [JsonProperty("management_connect_address", NullValueHandling = NullValueHandling.Ignore)] + public string ManagementConnectAddress { get; set; } + + /// + /// 是否开启安全认证。 - true:开启 - false:未开启 + /// + [JsonProperty("ssl_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? SslEnable { get; set; } + + /// + /// 企业项目ID。 + /// + [JsonProperty("enterprise_project_id", NullValueHandling = NullValueHandling.Ignore)] + public string EnterpriseProjectId { get; set; } + + /// + /// 实例扩容时用于区分老实例与新实例。 - true:新创建的实例,允许磁盘动态扩容不需要重启。 - false:老实例 + /// + [JsonProperty("is_logical_volume", NullValueHandling = NullValueHandling.Ignore)] + public bool? IsLogicalVolume { get; set; } + + /// + /// 实例扩容磁盘次数,如果超过20次则无法扩容磁盘。 + /// + [JsonProperty("extend_times", NullValueHandling = NullValueHandling.Ignore)] + public int? ExtendTimes { get; set; } + + /// + /// 实例类型:集群,cluster。 + /// + [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] + public TypeEnum Type { get; set; } + /// + /// 产品标识。 + /// + [JsonProperty("product_id", NullValueHandling = NullValueHandling.Ignore)] + public string ProductId { get; set; } + + /// + /// 安全组ID。 + /// + [JsonProperty("security_group_id", NullValueHandling = NullValueHandling.Ignore)] + public string SecurityGroupId { get; set; } + + /// + /// 租户安全组名称。 + /// + [JsonProperty("security_group_name", NullValueHandling = NullValueHandling.Ignore)] + public string SecurityGroupName { get; set; } + + /// + /// 子网ID。 + /// + [JsonProperty("subnet_id", NullValueHandling = NullValueHandling.Ignore)] + public string SubnetId { get; set; } + + /// + /// 实例节点所在的可用区,返回“可用区ID”。 + /// + [JsonProperty("available_zones", NullValueHandling = NullValueHandling.Ignore)] + public List AvailableZones { get; set; } + + /// + /// 总共消息存储空间,单位:GB。 + /// + [JsonProperty("total_storage_space", NullValueHandling = NullValueHandling.Ignore)] + public int? TotalStorageSpace { get; set; } + + /// + /// 存储资源ID。 + /// + [JsonProperty("storage_resource_id", NullValueHandling = NullValueHandling.Ignore)] + public string StorageResourceId { get; set; } + + /// + /// IO规格。 + /// + [JsonProperty("storage_spec_code", NullValueHandling = NullValueHandling.Ignore)] + public string StorageSpecCode { get; set; } + + /// + /// 服务类型。 + /// + [JsonProperty("service_type", NullValueHandling = NullValueHandling.Ignore)] + public string ServiceType { get; set; } + + /// + /// 存储类型。 + /// + [JsonProperty("storage_type", NullValueHandling = NullValueHandling.Ignore)] + public string StorageType { get; set; } + + /// + /// 是否开启ipv6。 + /// + [JsonProperty("ipv6_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? Ipv6Enable { get; set; } + + /// + /// IPv6的连接地址。 + /// + [JsonProperty("ipv6_connect_addresses", NullValueHandling = NullValueHandling.Ignore)] + public List Ipv6ConnectAddresses { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListInstancesRespInstances {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" engine: ").Append(Engine).Append("\n"); + sb.Append(" engineVersion: ").Append(EngineVersion).Append("\n"); + sb.Append(" specification: ").Append(Specification).Append("\n"); + sb.Append(" storageSpace: ").Append(StorageSpace).Append("\n"); + sb.Append(" usedStorageSpace: ").Append(UsedStorageSpace).Append("\n"); + sb.Append(" connectAddress: ").Append(ConnectAddress).Append("\n"); + sb.Append(" port: ").Append(Port).Append("\n"); + sb.Append(" status: ").Append(Status).Append("\n"); + sb.Append(" description: ").Append(Description).Append("\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" resourceSpecCode: ").Append(ResourceSpecCode).Append("\n"); + sb.Append(" chargingMode: ").Append(ChargingMode).Append("\n"); + sb.Append(" vpcId: ").Append(VpcId).Append("\n"); + sb.Append(" vpcName: ").Append(VpcName).Append("\n"); + sb.Append(" createdAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" userId: ").Append(UserId).Append("\n"); + sb.Append(" userName: ").Append(UserName).Append("\n"); + sb.Append(" orderId: ").Append(OrderId).Append("\n"); + sb.Append(" maintainBegin: ").Append(MaintainBegin).Append("\n"); + sb.Append(" maintainEnd: ").Append(MaintainEnd).Append("\n"); + sb.Append(" enablePublicip: ").Append(EnablePublicip).Append("\n"); + sb.Append(" publicipAddress: ").Append(PublicipAddress).Append("\n"); + sb.Append(" publicipId: ").Append(PublicipId).Append("\n"); + sb.Append(" managementConnectAddress: ").Append(ManagementConnectAddress).Append("\n"); + sb.Append(" sslEnable: ").Append(SslEnable).Append("\n"); + sb.Append(" enterpriseProjectId: ").Append(EnterpriseProjectId).Append("\n"); + sb.Append(" isLogicalVolume: ").Append(IsLogicalVolume).Append("\n"); + sb.Append(" extendTimes: ").Append(ExtendTimes).Append("\n"); + sb.Append(" type: ").Append(Type).Append("\n"); + sb.Append(" productId: ").Append(ProductId).Append("\n"); + sb.Append(" securityGroupId: ").Append(SecurityGroupId).Append("\n"); + sb.Append(" securityGroupName: ").Append(SecurityGroupName).Append("\n"); + sb.Append(" subnetId: ").Append(SubnetId).Append("\n"); + sb.Append(" availableZones: ").Append(AvailableZones).Append("\n"); + sb.Append(" totalStorageSpace: ").Append(TotalStorageSpace).Append("\n"); + sb.Append(" storageResourceId: ").Append(StorageResourceId).Append("\n"); + sb.Append(" storageSpecCode: ").Append(StorageSpecCode).Append("\n"); + sb.Append(" serviceType: ").Append(ServiceType).Append("\n"); + sb.Append(" storageType: ").Append(StorageType).Append("\n"); + sb.Append(" ipv6Enable: ").Append(Ipv6Enable).Append("\n"); + sb.Append(" ipv6ConnectAddresses: ").Append(Ipv6ConnectAddresses).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListInstancesRespInstances); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListInstancesRespInstances input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Engine == input.Engine || + (this.Engine != null && + this.Engine.Equals(input.Engine)) + ) && + ( + this.EngineVersion == input.EngineVersion || + (this.EngineVersion != null && + this.EngineVersion.Equals(input.EngineVersion)) + ) && + ( + this.Specification == input.Specification || + (this.Specification != null && + this.Specification.Equals(input.Specification)) + ) && + ( + this.StorageSpace == input.StorageSpace || + (this.StorageSpace != null && + this.StorageSpace.Equals(input.StorageSpace)) + ) && + ( + this.UsedStorageSpace == input.UsedStorageSpace || + (this.UsedStorageSpace != null && + this.UsedStorageSpace.Equals(input.UsedStorageSpace)) + ) && + ( + this.ConnectAddress == input.ConnectAddress || + (this.ConnectAddress != null && + this.ConnectAddress.Equals(input.ConnectAddress)) + ) && + ( + this.Port == input.Port || + (this.Port != null && + this.Port.Equals(input.Port)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.ResourceSpecCode == input.ResourceSpecCode || + (this.ResourceSpecCode != null && + this.ResourceSpecCode.Equals(input.ResourceSpecCode)) + ) && + ( + this.ChargingMode == input.ChargingMode || + (this.ChargingMode != null && + this.ChargingMode.Equals(input.ChargingMode)) + ) && + ( + this.VpcId == input.VpcId || + (this.VpcId != null && + this.VpcId.Equals(input.VpcId)) + ) && + ( + this.VpcName == input.VpcName || + (this.VpcName != null && + this.VpcName.Equals(input.VpcName)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.UserName == input.UserName || + (this.UserName != null && + this.UserName.Equals(input.UserName)) + ) && + ( + this.OrderId == input.OrderId || + (this.OrderId != null && + this.OrderId.Equals(input.OrderId)) + ) && + ( + this.MaintainBegin == input.MaintainBegin || + (this.MaintainBegin != null && + this.MaintainBegin.Equals(input.MaintainBegin)) + ) && + ( + this.MaintainEnd == input.MaintainEnd || + (this.MaintainEnd != null && + this.MaintainEnd.Equals(input.MaintainEnd)) + ) && + ( + this.EnablePublicip == input.EnablePublicip || + (this.EnablePublicip != null && + this.EnablePublicip.Equals(input.EnablePublicip)) + ) && + ( + this.PublicipAddress == input.PublicipAddress || + (this.PublicipAddress != null && + this.PublicipAddress.Equals(input.PublicipAddress)) + ) && + ( + this.PublicipId == input.PublicipId || + (this.PublicipId != null && + this.PublicipId.Equals(input.PublicipId)) + ) && + ( + this.ManagementConnectAddress == input.ManagementConnectAddress || + (this.ManagementConnectAddress != null && + this.ManagementConnectAddress.Equals(input.ManagementConnectAddress)) + ) && + ( + this.SslEnable == input.SslEnable || + (this.SslEnable != null && + this.SslEnable.Equals(input.SslEnable)) + ) && + ( + this.EnterpriseProjectId == input.EnterpriseProjectId || + (this.EnterpriseProjectId != null && + this.EnterpriseProjectId.Equals(input.EnterpriseProjectId)) + ) && + ( + this.IsLogicalVolume == input.IsLogicalVolume || + (this.IsLogicalVolume != null && + this.IsLogicalVolume.Equals(input.IsLogicalVolume)) + ) && + ( + this.ExtendTimes == input.ExtendTimes || + (this.ExtendTimes != null && + this.ExtendTimes.Equals(input.ExtendTimes)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.ProductId == input.ProductId || + (this.ProductId != null && + this.ProductId.Equals(input.ProductId)) + ) && + ( + this.SecurityGroupId == input.SecurityGroupId || + (this.SecurityGroupId != null && + this.SecurityGroupId.Equals(input.SecurityGroupId)) + ) && + ( + this.SecurityGroupName == input.SecurityGroupName || + (this.SecurityGroupName != null && + this.SecurityGroupName.Equals(input.SecurityGroupName)) + ) && + ( + this.SubnetId == input.SubnetId || + (this.SubnetId != null && + this.SubnetId.Equals(input.SubnetId)) + ) && + ( + this.AvailableZones == input.AvailableZones || + this.AvailableZones != null && + input.AvailableZones != null && + this.AvailableZones.SequenceEqual(input.AvailableZones) + ) && + ( + this.TotalStorageSpace == input.TotalStorageSpace || + (this.TotalStorageSpace != null && + this.TotalStorageSpace.Equals(input.TotalStorageSpace)) + ) && + ( + this.StorageResourceId == input.StorageResourceId || + (this.StorageResourceId != null && + this.StorageResourceId.Equals(input.StorageResourceId)) + ) && + ( + this.StorageSpecCode == input.StorageSpecCode || + (this.StorageSpecCode != null && + this.StorageSpecCode.Equals(input.StorageSpecCode)) + ) && + ( + this.ServiceType == input.ServiceType || + (this.ServiceType != null && + this.ServiceType.Equals(input.ServiceType)) + ) && + ( + this.StorageType == input.StorageType || + (this.StorageType != null && + this.StorageType.Equals(input.StorageType)) + ) && + ( + this.Ipv6Enable == input.Ipv6Enable || + (this.Ipv6Enable != null && + this.Ipv6Enable.Equals(input.Ipv6Enable)) + ) && + ( + this.Ipv6ConnectAddresses == input.Ipv6ConnectAddresses || + this.Ipv6ConnectAddresses != null && + input.Ipv6ConnectAddresses != null && + this.Ipv6ConnectAddresses.SequenceEqual(input.Ipv6ConnectAddresses) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Engine != null) + hashCode = hashCode * 59 + this.Engine.GetHashCode(); + if (this.EngineVersion != null) + hashCode = hashCode * 59 + this.EngineVersion.GetHashCode(); + if (this.Specification != null) + hashCode = hashCode * 59 + this.Specification.GetHashCode(); + if (this.StorageSpace != null) + hashCode = hashCode * 59 + this.StorageSpace.GetHashCode(); + if (this.UsedStorageSpace != null) + hashCode = hashCode * 59 + this.UsedStorageSpace.GetHashCode(); + if (this.ConnectAddress != null) + hashCode = hashCode * 59 + this.ConnectAddress.GetHashCode(); + if (this.Port != null) + hashCode = hashCode * 59 + this.Port.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.ResourceSpecCode != null) + hashCode = hashCode * 59 + this.ResourceSpecCode.GetHashCode(); + if (this.ChargingMode != null) + hashCode = hashCode * 59 + this.ChargingMode.GetHashCode(); + if (this.VpcId != null) + hashCode = hashCode * 59 + this.VpcId.GetHashCode(); + if (this.VpcName != null) + hashCode = hashCode * 59 + this.VpcName.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.UserId != null) + hashCode = hashCode * 59 + this.UserId.GetHashCode(); + if (this.UserName != null) + hashCode = hashCode * 59 + this.UserName.GetHashCode(); + if (this.OrderId != null) + hashCode = hashCode * 59 + this.OrderId.GetHashCode(); + if (this.MaintainBegin != null) + hashCode = hashCode * 59 + this.MaintainBegin.GetHashCode(); + if (this.MaintainEnd != null) + hashCode = hashCode * 59 + this.MaintainEnd.GetHashCode(); + if (this.EnablePublicip != null) + hashCode = hashCode * 59 + this.EnablePublicip.GetHashCode(); + if (this.PublicipAddress != null) + hashCode = hashCode * 59 + this.PublicipAddress.GetHashCode(); + if (this.PublicipId != null) + hashCode = hashCode * 59 + this.PublicipId.GetHashCode(); + if (this.ManagementConnectAddress != null) + hashCode = hashCode * 59 + this.ManagementConnectAddress.GetHashCode(); + if (this.SslEnable != null) + hashCode = hashCode * 59 + this.SslEnable.GetHashCode(); + if (this.EnterpriseProjectId != null) + hashCode = hashCode * 59 + this.EnterpriseProjectId.GetHashCode(); + if (this.IsLogicalVolume != null) + hashCode = hashCode * 59 + this.IsLogicalVolume.GetHashCode(); + if (this.ExtendTimes != null) + hashCode = hashCode * 59 + this.ExtendTimes.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.ProductId != null) + hashCode = hashCode * 59 + this.ProductId.GetHashCode(); + if (this.SecurityGroupId != null) + hashCode = hashCode * 59 + this.SecurityGroupId.GetHashCode(); + if (this.SecurityGroupName != null) + hashCode = hashCode * 59 + this.SecurityGroupName.GetHashCode(); + if (this.SubnetId != null) + hashCode = hashCode * 59 + this.SubnetId.GetHashCode(); + if (this.AvailableZones != null) + hashCode = hashCode * 59 + this.AvailableZones.GetHashCode(); + if (this.TotalStorageSpace != null) + hashCode = hashCode * 59 + this.TotalStorageSpace.GetHashCode(); + if (this.StorageResourceId != null) + hashCode = hashCode * 59 + this.StorageResourceId.GetHashCode(); + if (this.StorageSpecCode != null) + hashCode = hashCode * 59 + this.StorageSpecCode.GetHashCode(); + if (this.ServiceType != null) + hashCode = hashCode * 59 + this.ServiceType.GetHashCode(); + if (this.StorageType != null) + hashCode = hashCode * 59 + this.StorageType.GetHashCode(); + if (this.Ipv6Enable != null) + hashCode = hashCode * 59 + this.Ipv6Enable.GetHashCode(); + if (this.Ipv6ConnectAddresses != null) + hashCode = hashCode * 59 + this.Ipv6ConnectAddresses.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ListPluginsRequest.cs b/Services/Rabbitmq/V2/Model/ListPluginsRequest.cs new file mode 100644 index 000000000..634381d47 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListPluginsRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class ListPluginsRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListPluginsRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListPluginsRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListPluginsRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ListPluginsRespPlugins.cs b/Services/Rabbitmq/V2/Model/ListPluginsRespPlugins.cs new file mode 100644 index 000000000..096035540 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListPluginsRespPlugins.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// 插件信息。 + /// + public class ListPluginsRespPlugins + { + + /// + /// 是否运行。 + /// + [JsonProperty("running", NullValueHandling = NullValueHandling.Ignore)] + public bool? Running { get; set; } + + /// + /// 是否启用。 + /// + [JsonProperty("enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? Enable { get; set; } + + /// + /// 插件名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 插件版本。 + /// + [JsonProperty("version", NullValueHandling = NullValueHandling.Ignore)] + public string Version { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListPluginsRespPlugins {\n"); + sb.Append(" running: ").Append(Running).Append("\n"); + sb.Append(" enable: ").Append(Enable).Append("\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" version: ").Append(Version).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListPluginsRespPlugins); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListPluginsRespPlugins input) + { + if (input == null) + return false; + + return + ( + this.Running == input.Running || + (this.Running != null && + this.Running.Equals(input.Running)) + ) && + ( + this.Enable == input.Enable || + (this.Enable != null && + this.Enable.Equals(input.Enable)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Version == input.Version || + (this.Version != null && + this.Version.Equals(input.Version)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Running != null) + hashCode = hashCode * 59 + this.Running.GetHashCode(); + if (this.Enable != null) + hashCode = hashCode * 59 + this.Enable.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Version != null) + hashCode = hashCode * 59 + this.Version.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ListPluginsResponse.cs b/Services/Rabbitmq/V2/Model/ListPluginsResponse.cs new file mode 100644 index 000000000..b499ffb32 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListPluginsResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class ListPluginsResponse : SdkResponse + { + + /// + /// 插件信息列表。 + /// + [JsonProperty("plugins", NullValueHandling = NullValueHandling.Ignore)] + public List Plugins { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListPluginsResponse {\n"); + sb.Append(" plugins: ").Append(Plugins).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListPluginsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListPluginsResponse input) + { + if (input == null) + return false; + + return + ( + this.Plugins == input.Plugins || + this.Plugins != null && + input.Plugins != null && + this.Plugins.SequenceEqual(input.Plugins) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Plugins != null) + hashCode = hashCode * 59 + this.Plugins.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ListProductsRequest.cs b/Services/Rabbitmq/V2/Model/ListProductsRequest.cs new file mode 100644 index 000000000..c67847d5e --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListProductsRequest.cs @@ -0,0 +1,173 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class ListProductsRequest + { + /// + /// Defines engine + /// + [JsonConverter(typeof(EnumClassConverter))] + public class EngineEnum + { + /// + /// Enum RABBITMQ for value: rabbitmq + /// + public static readonly EngineEnum RABBITMQ = new EngineEnum("rabbitmq"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"rabbitmq", RABBITMQ}, + }; + + private string Value; + + public EngineEnum(string Value) + { + this.Value = Value; + } + + public static EngineEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as EngineEnum)) + { + return true; + } + + return false; + } + + public bool Equals(EngineEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(EngineEnum a, EngineEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(EngineEnum a, EngineEnum b) + { + return !(a == b); + } + } + + + /// + /// + /// + [SDKProperty("engine", IsQuery = true)] + [JsonProperty("engine", NullValueHandling = NullValueHandling.Ignore)] + public EngineEnum Engine { get; set; } + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListProductsRequest {\n"); + sb.Append(" engine: ").Append(Engine).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListProductsRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListProductsRequest input) + { + if (input == null) + return false; + + return + ( + this.Engine == input.Engine || + (this.Engine != null && + this.Engine.Equals(input.Engine)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Engine != null) + hashCode = hashCode * 59 + this.Engine.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ListProductsRespDetail.cs b/Services/Rabbitmq/V2/Model/ListProductsRespDetail.cs new file mode 100644 index 000000000..769c1cb19 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListProductsRespDetail.cs @@ -0,0 +1,176 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class ListProductsRespDetail + { + + /// + /// 消息存储空间。 + /// + [JsonProperty("storage", NullValueHandling = NullValueHandling.Ignore)] + public string Storage { get; set; } + + /// + /// 产品ID。 + /// + [JsonProperty("product_id", NullValueHandling = NullValueHandling.Ignore)] + public string ProductId { get; set; } + + /// + /// 规格ID。 + /// + [JsonProperty("spec_code", NullValueHandling = NullValueHandling.Ignore)] + public string SpecCode { get; set; } + + /// + /// IO信息。 + /// + [JsonProperty("io", NullValueHandling = NullValueHandling.Ignore)] + public List Io { get; set; } + + /// + /// 资源售罄的可用区列表。 + /// + [JsonProperty("unavailable_zones", NullValueHandling = NullValueHandling.Ignore)] + public List UnavailableZones { get; set; } + + /// + /// 有可用资源的可用区列表。 + /// + [JsonProperty("available_zones", NullValueHandling = NullValueHandling.Ignore)] + public List AvailableZones { get; set; } + + /// + /// 该产品规格对应的虚拟机规格。 + /// + [JsonProperty("ecs_flavor_id", NullValueHandling = NullValueHandling.Ignore)] + public string EcsFlavorId { get; set; } + + /// + /// 实例规格架构类型。当前仅支持X86。 + /// + [JsonProperty("arch_type", NullValueHandling = NullValueHandling.Ignore)] + public string ArchType { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListProductsRespDetail {\n"); + sb.Append(" storage: ").Append(Storage).Append("\n"); + sb.Append(" productId: ").Append(ProductId).Append("\n"); + sb.Append(" specCode: ").Append(SpecCode).Append("\n"); + sb.Append(" io: ").Append(Io).Append("\n"); + sb.Append(" unavailableZones: ").Append(UnavailableZones).Append("\n"); + sb.Append(" availableZones: ").Append(AvailableZones).Append("\n"); + sb.Append(" ecsFlavorId: ").Append(EcsFlavorId).Append("\n"); + sb.Append(" archType: ").Append(ArchType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListProductsRespDetail); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListProductsRespDetail input) + { + if (input == null) + return false; + + return + ( + this.Storage == input.Storage || + (this.Storage != null && + this.Storage.Equals(input.Storage)) + ) && + ( + this.ProductId == input.ProductId || + (this.ProductId != null && + this.ProductId.Equals(input.ProductId)) + ) && + ( + this.SpecCode == input.SpecCode || + (this.SpecCode != null && + this.SpecCode.Equals(input.SpecCode)) + ) && + ( + this.Io == input.Io || + this.Io != null && + input.Io != null && + this.Io.SequenceEqual(input.Io) + ) && + ( + this.UnavailableZones == input.UnavailableZones || + this.UnavailableZones != null && + input.UnavailableZones != null && + this.UnavailableZones.SequenceEqual(input.UnavailableZones) + ) && + ( + this.AvailableZones == input.AvailableZones || + this.AvailableZones != null && + input.AvailableZones != null && + this.AvailableZones.SequenceEqual(input.AvailableZones) + ) && + ( + this.EcsFlavorId == input.EcsFlavorId || + (this.EcsFlavorId != null && + this.EcsFlavorId.Equals(input.EcsFlavorId)) + ) && + ( + this.ArchType == input.ArchType || + (this.ArchType != null && + this.ArchType.Equals(input.ArchType)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Storage != null) + hashCode = hashCode * 59 + this.Storage.GetHashCode(); + if (this.ProductId != null) + hashCode = hashCode * 59 + this.ProductId.GetHashCode(); + if (this.SpecCode != null) + hashCode = hashCode * 59 + this.SpecCode.GetHashCode(); + if (this.Io != null) + hashCode = hashCode * 59 + this.Io.GetHashCode(); + if (this.UnavailableZones != null) + hashCode = hashCode * 59 + this.UnavailableZones.GetHashCode(); + if (this.AvailableZones != null) + hashCode = hashCode * 59 + this.AvailableZones.GetHashCode(); + if (this.EcsFlavorId != null) + hashCode = hashCode * 59 + this.EcsFlavorId.GetHashCode(); + if (this.ArchType != null) + hashCode = hashCode * 59 + this.ArchType.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ListProductsRespHourly.cs b/Services/Rabbitmq/V2/Model/ListProductsRespHourly.cs new file mode 100644 index 000000000..a5f816d1f --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListProductsRespHourly.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class ListProductsRespHourly + { + + /// + /// 消息引擎的名称,该字段显示为rabbitmq。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 消息引擎的版本,当前仅支持3.7.17。 + /// + [JsonProperty("version", NullValueHandling = NullValueHandling.Ignore)] + public string Version { get; set; } + + /// + /// 产品规格列表。 + /// + [JsonProperty("values", NullValueHandling = NullValueHandling.Ignore)] + public List Values { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListProductsRespHourly {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" version: ").Append(Version).Append("\n"); + sb.Append(" values: ").Append(Values).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListProductsRespHourly); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListProductsRespHourly input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Version == input.Version || + (this.Version != null && + this.Version.Equals(input.Version)) + ) && + ( + this.Values == input.Values || + this.Values != null && + input.Values != null && + this.Values.SequenceEqual(input.Values) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Version != null) + hashCode = hashCode * 59 + this.Version.GetHashCode(); + if (this.Values != null) + hashCode = hashCode * 59 + this.Values.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ListProductsRespIo.cs b/Services/Rabbitmq/V2/Model/ListProductsRespIo.cs new file mode 100644 index 000000000..cbf5f7568 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListProductsRespIo.cs @@ -0,0 +1,133 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class ListProductsRespIo + { + + /// + /// IO类型。 + /// + [JsonProperty("io_type", NullValueHandling = NullValueHandling.Ignore)] + public string IoType { get; set; } + + /// + /// IO规格。 + /// + [JsonProperty("storage_spec_code", NullValueHandling = NullValueHandling.Ignore)] + public string StorageSpecCode { get; set; } + + /// + /// IO未售罄的可用区列表。 + /// + [JsonProperty("available_zones", NullValueHandling = NullValueHandling.Ignore)] + public List AvailableZones { get; set; } + + /// + /// IO已售罄的不可用区列表。 + /// + [JsonProperty("unavailable_zones", NullValueHandling = NullValueHandling.Ignore)] + public List UnavailableZones { get; set; } + + /// + /// 磁盘类型。 + /// + [JsonProperty("volume_type", NullValueHandling = NullValueHandling.Ignore)] + public string VolumeType { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListProductsRespIo {\n"); + sb.Append(" ioType: ").Append(IoType).Append("\n"); + sb.Append(" storageSpecCode: ").Append(StorageSpecCode).Append("\n"); + sb.Append(" availableZones: ").Append(AvailableZones).Append("\n"); + sb.Append(" unavailableZones: ").Append(UnavailableZones).Append("\n"); + sb.Append(" volumeType: ").Append(VolumeType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListProductsRespIo); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListProductsRespIo input) + { + if (input == null) + return false; + + return + ( + this.IoType == input.IoType || + (this.IoType != null && + this.IoType.Equals(input.IoType)) + ) && + ( + this.StorageSpecCode == input.StorageSpecCode || + (this.StorageSpecCode != null && + this.StorageSpecCode.Equals(input.StorageSpecCode)) + ) && + ( + this.AvailableZones == input.AvailableZones || + this.AvailableZones != null && + input.AvailableZones != null && + this.AvailableZones.SequenceEqual(input.AvailableZones) + ) && + ( + this.UnavailableZones == input.UnavailableZones || + this.UnavailableZones != null && + input.UnavailableZones != null && + this.UnavailableZones.SequenceEqual(input.UnavailableZones) + ) && + ( + this.VolumeType == input.VolumeType || + (this.VolumeType != null && + this.VolumeType.Equals(input.VolumeType)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.IoType != null) + hashCode = hashCode * 59 + this.IoType.GetHashCode(); + if (this.StorageSpecCode != null) + hashCode = hashCode * 59 + this.StorageSpecCode.GetHashCode(); + if (this.AvailableZones != null) + hashCode = hashCode * 59 + this.AvailableZones.GetHashCode(); + if (this.UnavailableZones != null) + hashCode = hashCode * 59 + this.UnavailableZones.GetHashCode(); + if (this.VolumeType != null) + hashCode = hashCode * 59 + this.VolumeType.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ListProductsRespValues.cs b/Services/Rabbitmq/V2/Model/ListProductsRespValues.cs new file mode 100644 index 000000000..037856bb4 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListProductsRespValues.cs @@ -0,0 +1,120 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class ListProductsRespValues + { + + /// + /// 规格详情。 + /// + [JsonProperty("detail", NullValueHandling = NullValueHandling.Ignore)] + public List Detail { get; set; } + + /// + /// 实例类型。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 资源售罄的可用区列表。 + /// + [JsonProperty("unavailable_zones", NullValueHandling = NullValueHandling.Ignore)] + public List UnavailableZones { get; set; } + + /// + /// 有可用资源的可用区列表。 + /// + [JsonProperty("available_zones", NullValueHandling = NullValueHandling.Ignore)] + public List AvailableZones { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListProductsRespValues {\n"); + sb.Append(" detail: ").Append(Detail).Append("\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" unavailableZones: ").Append(UnavailableZones).Append("\n"); + sb.Append(" availableZones: ").Append(AvailableZones).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListProductsRespValues); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListProductsRespValues input) + { + if (input == null) + return false; + + return + ( + this.Detail == input.Detail || + this.Detail != null && + input.Detail != null && + this.Detail.SequenceEqual(input.Detail) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.UnavailableZones == input.UnavailableZones || + this.UnavailableZones != null && + input.UnavailableZones != null && + this.UnavailableZones.SequenceEqual(input.UnavailableZones) + ) && + ( + this.AvailableZones == input.AvailableZones || + this.AvailableZones != null && + input.AvailableZones != null && + this.AvailableZones.SequenceEqual(input.AvailableZones) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Detail != null) + hashCode = hashCode * 59 + this.Detail.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.UnavailableZones != null) + hashCode = hashCode * 59 + this.UnavailableZones.GetHashCode(); + if (this.AvailableZones != null) + hashCode = hashCode * 59 + this.AvailableZones.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ListProductsResponse.cs b/Services/Rabbitmq/V2/Model/ListProductsResponse.cs new file mode 100644 index 000000000..9f99317d6 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ListProductsResponse.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class ListProductsResponse : SdkResponse + { + + /// + /// 表示按需付费的产品列表。 + /// + [JsonProperty("Hourly", NullValueHandling = NullValueHandling.Ignore)] + public List Hourly { get; set; } + + /// + /// 表示包年包月的产品列表。当前暂不支持通过API创建包年包月的rabbitmq实例。 + /// + [JsonProperty("Monthly", NullValueHandling = NullValueHandling.Ignore)] + public List Monthly { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ListProductsResponse {\n"); + sb.Append(" hourly: ").Append(Hourly).Append("\n"); + sb.Append(" monthly: ").Append(Monthly).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ListProductsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ListProductsResponse input) + { + if (input == null) + return false; + + return + ( + this.Hourly == input.Hourly || + this.Hourly != null && + input.Hourly != null && + this.Hourly.SequenceEqual(input.Hourly) + ) && + ( + this.Monthly == input.Monthly || + this.Monthly != null && + input.Monthly != null && + this.Monthly.SequenceEqual(input.Monthly) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Hourly != null) + hashCode = hashCode * 59 + this.Hourly.GetHashCode(); + if (this.Monthly != null) + hashCode = hashCode * 59 + this.Monthly.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ResetPasswordReq.cs b/Services/Rabbitmq/V2/Model/ResetPasswordReq.cs new file mode 100644 index 000000000..a5f457cd0 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ResetPasswordReq.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class ResetPasswordReq + { + + /// + /// 8-32个字符。 至少包含以下字符中的3种: - 大写字母 - 小写字母 - 数字 - 特殊字符`~!@#$%^&*()-_=+\\\\|[{}];:\\'\\\",<.>/? 和空格,并且不能以-开头。 + /// + [JsonProperty("new_password", NullValueHandling = NullValueHandling.Ignore)] + public string NewPassword { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResetPasswordReq {\n"); + sb.Append(" newPassword: ").Append(NewPassword).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ResetPasswordReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ResetPasswordReq input) + { + if (input == null) + return false; + + return + ( + this.NewPassword == input.NewPassword || + (this.NewPassword != null && + this.NewPassword.Equals(input.NewPassword)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.NewPassword != null) + hashCode = hashCode * 59 + this.NewPassword.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ResetPasswordRequest.cs b/Services/Rabbitmq/V2/Model/ResetPasswordRequest.cs new file mode 100644 index 000000000..2858427b4 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ResetPasswordRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class ResetPasswordRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public ResetPasswordReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResetPasswordRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ResetPasswordRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ResetPasswordRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ResetPasswordResponse.cs b/Services/Rabbitmq/V2/Model/ResetPasswordResponse.cs new file mode 100644 index 000000000..ebc470b73 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ResetPasswordResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class ResetPasswordResponse : SdkResponse + { + + + } +} diff --git a/Services/Rabbitmq/V2/Model/ResizeInstanceReq.cs b/Services/Rabbitmq/V2/Model/ResizeInstanceReq.cs new file mode 100644 index 000000000..77c09eaf4 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ResizeInstanceReq.cs @@ -0,0 +1,309 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class ResizeInstanceReq + { + /// + /// 规格变更后的规格ID。 请参考[查询可扩容规格列表](https://support.huaweicloud.com/api-rabbitmq/ResizeInstance.html)接口返回的数据。 + /// + /// 规格变更后的规格ID。 请参考[查询可扩容规格列表](https://support.huaweicloud.com/api-rabbitmq/ResizeInstance.html)接口返回的数据。 + [JsonConverter(typeof(EnumClassConverter))] + public class NewSpecCodeEnum + { + /// + /// Enum DMS_INSTANCE_RABBITMQ_CLUSTER_C3_4U8G_3 for value: dms.instance.rabbitmq.cluster.c3.4u8g.3 + /// + public static readonly NewSpecCodeEnum DMS_INSTANCE_RABBITMQ_CLUSTER_C3_4U8G_3 = new NewSpecCodeEnum("dms.instance.rabbitmq.cluster.c3.4u8g.3"); + + /// + /// Enum DMS_INSTANCE_RABBITMQ_CLUSTER_C3_4U8G_5 for value: dms.instance.rabbitmq.cluster.c3.4u8g.5 + /// + public static readonly NewSpecCodeEnum DMS_INSTANCE_RABBITMQ_CLUSTER_C3_4U8G_5 = new NewSpecCodeEnum("dms.instance.rabbitmq.cluster.c3.4u8g.5"); + + /// + /// Enum DMS_INSTANCE_RABBITMQ_CLUSTER_C3_4U8G_7 for value: dms.instance.rabbitmq.cluster.c3.4u8g.7 + /// + public static readonly NewSpecCodeEnum DMS_INSTANCE_RABBITMQ_CLUSTER_C3_4U8G_7 = new NewSpecCodeEnum("dms.instance.rabbitmq.cluster.c3.4u8g.7"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"dms.instance.rabbitmq.cluster.c3.4u8g.3", DMS_INSTANCE_RABBITMQ_CLUSTER_C3_4U8G_3}, + {"dms.instance.rabbitmq.cluster.c3.4u8g.5", DMS_INSTANCE_RABBITMQ_CLUSTER_C3_4U8G_5}, + {"dms.instance.rabbitmq.cluster.c3.4u8g.7", DMS_INSTANCE_RABBITMQ_CLUSTER_C3_4U8G_7}, + }; + + private string Value; + + public NewSpecCodeEnum(string Value) + { + this.Value = Value; + } + + public static NewSpecCodeEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as NewSpecCodeEnum)) + { + return true; + } + + return false; + } + + public bool Equals(NewSpecCodeEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(NewSpecCodeEnum a, NewSpecCodeEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(NewSpecCodeEnum a, NewSpecCodeEnum b) + { + return !(a == b); + } + } + + /// + /// 规格变更后的消息存储空间,单位:GB。 请参考[查询可扩容规格列表](https://support.huaweicloud.com/api-rabbitmq/ResizeInstance.html)接口返回的数据。 + /// + /// 规格变更后的消息存储空间,单位:GB。 请参考[查询可扩容规格列表](https://support.huaweicloud.com/api-rabbitmq/ResizeInstance.html)接口返回的数据。 + [JsonConverter(typeof(EnumClassConverter))] + public class NewStorageSpaceEnum + { + /// + /// Enum NUMBER_300 for value: 300 + /// + public static readonly NewStorageSpaceEnum NUMBER_300 = new NewStorageSpaceEnum("300"); + + /// + /// Enum NUMBER_500 for value: 500 + /// + public static readonly NewStorageSpaceEnum NUMBER_500 = new NewStorageSpaceEnum("500"); + + /// + /// Enum NUMBER_700 for value: 700 + /// + public static readonly NewStorageSpaceEnum NUMBER_700 = new NewStorageSpaceEnum("700"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"300", NUMBER_300}, + {"500", NUMBER_500}, + {"700", NUMBER_700}, + }; + + private string Value; + + public NewStorageSpaceEnum(string Value) + { + this.Value = Value; + } + + public static NewStorageSpaceEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as NewStorageSpaceEnum)) + { + return true; + } + + return false; + } + + public bool Equals(NewStorageSpaceEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(NewStorageSpaceEnum a, NewStorageSpaceEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(NewStorageSpaceEnum a, NewStorageSpaceEnum b) + { + return !(a == b); + } + } + + + /// + /// 规格变更后的规格ID。 请参考[查询可扩容规格列表](https://support.huaweicloud.com/api-rabbitmq/ResizeInstance.html)接口返回的数据。 + /// + [JsonProperty("new_spec_code", NullValueHandling = NullValueHandling.Ignore)] + public NewSpecCodeEnum NewSpecCode { get; set; } + /// + /// 规格变更后的消息存储空间,单位:GB。 请参考[查询可扩容规格列表](https://support.huaweicloud.com/api-rabbitmq/ResizeInstance.html)接口返回的数据。 + /// + [JsonProperty("new_storage_space", NullValueHandling = NullValueHandling.Ignore)] + public NewStorageSpaceEnum NewStorageSpace { get; set; } + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResizeInstanceReq {\n"); + sb.Append(" newSpecCode: ").Append(NewSpecCode).Append("\n"); + sb.Append(" newStorageSpace: ").Append(NewStorageSpace).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ResizeInstanceReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ResizeInstanceReq input) + { + if (input == null) + return false; + + return + ( + this.NewSpecCode == input.NewSpecCode || + (this.NewSpecCode != null && + this.NewSpecCode.Equals(input.NewSpecCode)) + ) && + ( + this.NewStorageSpace == input.NewStorageSpace || + (this.NewStorageSpace != null && + this.NewStorageSpace.Equals(input.NewStorageSpace)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.NewSpecCode != null) + hashCode = hashCode * 59 + this.NewSpecCode.GetHashCode(); + if (this.NewStorageSpace != null) + hashCode = hashCode * 59 + this.NewStorageSpace.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ResizeInstanceRequest.cs b/Services/Rabbitmq/V2/Model/ResizeInstanceRequest.cs new file mode 100644 index 000000000..178b373ac --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ResizeInstanceRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class ResizeInstanceRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public ResizeInstanceReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResizeInstanceRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ResizeInstanceRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ResizeInstanceRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ResizeInstanceResponse.cs b/Services/Rabbitmq/V2/Model/ResizeInstanceResponse.cs new file mode 100644 index 000000000..edcf25e89 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ResizeInstanceResponse.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class ResizeInstanceResponse : SdkResponse + { + + /// + /// 规格变更任务ID。 + /// + [JsonProperty("job_id", NullValueHandling = NullValueHandling.Ignore)] + public string JobId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ResizeInstanceResponse {\n"); + sb.Append(" jobId: ").Append(JobId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ResizeInstanceResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ResizeInstanceResponse input) + { + if (input == null) + return false; + + return + ( + this.JobId == input.JobId || + (this.JobId != null && + this.JobId.Equals(input.JobId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.JobId != null) + hashCode = hashCode * 59 + this.JobId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ShowBackgroundTaskRequest.cs b/Services/Rabbitmq/V2/Model/ShowBackgroundTaskRequest.cs new file mode 100644 index 000000000..d7a1c92d6 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ShowBackgroundTaskRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class ShowBackgroundTaskRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("task_id", IsPath = true)] + [JsonProperty("task_id", NullValueHandling = NullValueHandling.Ignore)] + public string TaskId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowBackgroundTaskRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" taskId: ").Append(TaskId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowBackgroundTaskRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowBackgroundTaskRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.TaskId == input.TaskId || + (this.TaskId != null && + this.TaskId.Equals(input.TaskId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.TaskId != null) + hashCode = hashCode * 59 + this.TaskId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ShowBackgroundTaskResponse.cs b/Services/Rabbitmq/V2/Model/ShowBackgroundTaskResponse.cs new file mode 100644 index 000000000..280d9cb3f --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ShowBackgroundTaskResponse.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class ShowBackgroundTaskResponse : SdkResponse + { + + /// + /// 任务数量。 + /// + [JsonProperty("task_count", NullValueHandling = NullValueHandling.Ignore)] + public string TaskCount { get; set; } + + /// + /// 任务列表。 + /// + [JsonProperty("tasks", NullValueHandling = NullValueHandling.Ignore)] + public List Tasks { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowBackgroundTaskResponse {\n"); + sb.Append(" taskCount: ").Append(TaskCount).Append("\n"); + sb.Append(" tasks: ").Append(Tasks).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowBackgroundTaskResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowBackgroundTaskResponse input) + { + if (input == null) + return false; + + return + ( + this.TaskCount == input.TaskCount || + (this.TaskCount != null && + this.TaskCount.Equals(input.TaskCount)) + ) && + ( + this.Tasks == input.Tasks || + this.Tasks != null && + input.Tasks != null && + this.Tasks.SequenceEqual(input.Tasks) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.TaskCount != null) + hashCode = hashCode * 59 + this.TaskCount.GetHashCode(); + if (this.Tasks != null) + hashCode = hashCode * 59 + this.Tasks.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ShowInstanceExtendProductInfoRequest.cs b/Services/Rabbitmq/V2/Model/ShowInstanceExtendProductInfoRequest.cs new file mode 100644 index 000000000..695f866c3 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ShowInstanceExtendProductInfoRequest.cs @@ -0,0 +1,318 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class ShowInstanceExtendProductInfoRequest + { + /// + /// Defines type + /// + [JsonConverter(typeof(EnumClassConverter))] + public class TypeEnum + { + /// + /// Enum ADVANCED for value: advanced + /// + public static readonly TypeEnum ADVANCED = new TypeEnum("advanced"); + + /// + /// Enum PLATINUM for value: platinum + /// + public static readonly TypeEnum PLATINUM = new TypeEnum("platinum"); + + /// + /// Enum DEC for value: dec + /// + public static readonly TypeEnum DEC = new TypeEnum("dec"); + + /// + /// Enum EXP for value: exp + /// + public static readonly TypeEnum EXP = new TypeEnum("exp"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"advanced", ADVANCED}, + {"platinum", PLATINUM}, + {"dec", DEC}, + {"exp", EXP}, + }; + + private string Value; + + public TypeEnum(string Value) + { + this.Value = Value; + } + + public static TypeEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as TypeEnum)) + { + return true; + } + + return false; + } + + public bool Equals(TypeEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(TypeEnum a, TypeEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(TypeEnum a, TypeEnum b) + { + return !(a == b); + } + } + + /// + /// Defines engine + /// + [JsonConverter(typeof(EnumClassConverter))] + public class EngineEnum + { + /// + /// Enum RABBITMQ for value: rabbitmq + /// + public static readonly EngineEnum RABBITMQ = new EngineEnum("rabbitmq"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"rabbitmq", RABBITMQ}, + }; + + private string Value; + + public EngineEnum(string Value) + { + this.Value = Value; + } + + public static EngineEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as EngineEnum)) + { + return true; + } + + return false; + } + + public bool Equals(EngineEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(EngineEnum a, EngineEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(EngineEnum a, EngineEnum b) + { + return !(a == b); + } + } + + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("type", IsQuery = true)] + [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] + public TypeEnum Type { get; set; } + /// + /// + /// + [SDKProperty("engine", IsQuery = true)] + [JsonProperty("engine", NullValueHandling = NullValueHandling.Ignore)] + public EngineEnum Engine { get; set; } + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowInstanceExtendProductInfoRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" type: ").Append(Type).Append("\n"); + sb.Append(" engine: ").Append(Engine).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowInstanceExtendProductInfoRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowInstanceExtendProductInfoRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.Engine == input.Engine || + (this.Engine != null && + this.Engine.Equals(input.Engine)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Engine != null) + hashCode = hashCode * 59 + this.Engine.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ShowInstanceExtendProductInfoResponse.cs b/Services/Rabbitmq/V2/Model/ShowInstanceExtendProductInfoResponse.cs new file mode 100644 index 000000000..40f42efa0 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ShowInstanceExtendProductInfoResponse.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class ShowInstanceExtendProductInfoResponse : SdkResponse + { + + /// + /// 表示按需付费的产品列表。 + /// + [JsonProperty("hourly", NullValueHandling = NullValueHandling.Ignore)] + public List Hourly { get; set; } + + /// + /// 表示包年包月的产品列表。当前暂不支持通过API创建包年包月的Rabbitmq实例。 + /// + [JsonProperty("monthly", NullValueHandling = NullValueHandling.Ignore)] + public List Monthly { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowInstanceExtendProductInfoResponse {\n"); + sb.Append(" hourly: ").Append(Hourly).Append("\n"); + sb.Append(" monthly: ").Append(Monthly).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowInstanceExtendProductInfoResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowInstanceExtendProductInfoResponse input) + { + if (input == null) + return false; + + return + ( + this.Hourly == input.Hourly || + this.Hourly != null && + input.Hourly != null && + this.Hourly.SequenceEqual(input.Hourly) + ) && + ( + this.Monthly == input.Monthly || + this.Monthly != null && + input.Monthly != null && + this.Monthly.SequenceEqual(input.Monthly) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Hourly != null) + hashCode = hashCode * 59 + this.Hourly.GetHashCode(); + if (this.Monthly != null) + hashCode = hashCode * 59 + this.Monthly.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ShowInstanceRequest.cs b/Services/Rabbitmq/V2/Model/ShowInstanceRequest.cs new file mode 100644 index 000000000..c9a9ad6d9 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ShowInstanceRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class ShowInstanceRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowInstanceRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowInstanceRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowInstanceRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ShowInstanceResponse.cs b/Services/Rabbitmq/V2/Model/ShowInstanceResponse.cs new file mode 100644 index 000000000..26d45cae5 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ShowInstanceResponse.cs @@ -0,0 +1,727 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class ShowInstanceResponse : SdkResponse + { + /// + /// 实例类型:集群,cluster。 + /// + /// 实例类型:集群,cluster。 + [JsonConverter(typeof(EnumClassConverter))] + public class TypeEnum + { + /// + /// Enum SINGLE for value: single + /// + public static readonly TypeEnum SINGLE = new TypeEnum("single"); + + /// + /// Enum CLUSTER for value: cluster + /// + public static readonly TypeEnum CLUSTER = new TypeEnum("cluster"); + + public static readonly Dictionary StaticFields = + new Dictionary() + { + {"single", SINGLE}, + {"cluster", CLUSTER}, + }; + + private string Value; + + public TypeEnum(string Value) + { + this.Value = Value; + } + + public static TypeEnum FromValue(string Value) + { + if(Value == null){ + return null; + } + + if (StaticFields.ContainsKey(Value)) + { + return StaticFields[Value]; + } + + return null; + } + + public override string ToString() + { + return this.Value; + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (this.Equals(obj as TypeEnum)) + { + return true; + } + + return false; + } + + public bool Equals(TypeEnum obj) + { + if ((object)obj == null) + { + return false; + } + return StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value); + } + + public static bool operator ==(TypeEnum a, TypeEnum b) + { + if (System.Object.ReferenceEquals(a, b)) + { + return true; + } + + if ((object)a == null) + { + return false; + } + + return a.Equals(b); + } + + public static bool operator !=(TypeEnum a, TypeEnum b) + { + return !(a == b); + } + } + + + /// + /// 实例名称。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 消息引擎。 + /// + [JsonProperty("engine", NullValueHandling = NullValueHandling.Ignore)] + public string Engine { get; set; } + + /// + /// 消息引擎版本。 + /// + [JsonProperty("engine_version", NullValueHandling = NullValueHandling.Ignore)] + public string EngineVersion { get; set; } + + /// + /// 实例规格。 - RabbitMQ实例单机返回vm规格。 - RabbitMQ实例集群返回vm规格和节点数。 + /// + [JsonProperty("specification", NullValueHandling = NullValueHandling.Ignore)] + public string Specification { get; set; } + + /// + /// 消息存储空间,单位:GB。 + /// + [JsonProperty("storage_space", NullValueHandling = NullValueHandling.Ignore)] + public int? StorageSpace { get; set; } + + /// + /// 已使用的消息存储空间,单位:GB。 + /// + [JsonProperty("used_storage_space", NullValueHandling = NullValueHandling.Ignore)] + public int? UsedStorageSpace { get; set; } + + /// + /// 实例连接IP地址。 + /// + [JsonProperty("connect_address", NullValueHandling = NullValueHandling.Ignore)] + public string ConnectAddress { get; set; } + + /// + /// 实例连接端口。 + /// + [JsonProperty("port", NullValueHandling = NullValueHandling.Ignore)] + public int? Port { get; set; } + + /// + /// 实例的状态。详细状态说明见[实例状态说明](https://support.huaweicloud.com/api-rabbitmq/rabbitmq-api-180514012.html)。 + /// + [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] + public string Status { get; set; } + + /// + /// 实例描述。 + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// 实例ID。 + /// + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// 资源规格标识。 - dms.instance.rabbitmq.single.c3.2u4g:RabbitMQ单机,vm规格2u4g - dms.instance.rabbitmq.single.c3.4u8g:RabbitMQ单机,vm规格4u8g - dms.instance.rabbitmq.single.c3.8u16g:RabbitMQ单机,vm规格8u16g - dms.instance.rabbitmq.single.c3.16u32g:RabbitMQ单机,vm规格16u32g - dms.instance.rabbitmq.cluster.c3.4u8g.3:RabbitMQ集群,vm规格4u8g,3个节点 - dms.instance.rabbitmq.cluster.c3.4u8g.5:RabbitMQ集群,vm规格4u8g,5个节点 - dms.instance.rabbitmq.cluster.c3.4u8g.7:RabbitMQ集群,vm规格4u8g,7个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.3:RabbitMQ集群,vm规格8u16g,3个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.5:RabbitMQ集群,vm规格8u16g,5个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.7:RabbitMQ集群,vm规格8u16g,7个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.3:RabbitMQ集群,vm规格16u32g,3个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.5:RabbitMQ集群,vm规格16u32g,5个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.7:RabbitMQ集群,vm规格16u32g,7个节点 + /// + [JsonProperty("resource_spec_code", NullValueHandling = NullValueHandling.Ignore)] + public string ResourceSpecCode { get; set; } + + /// + /// 付费模式,1表示按需计费,0表示包年/包月计费。 + /// + [JsonProperty("charging_mode", NullValueHandling = NullValueHandling.Ignore)] + public int? ChargingMode { get; set; } + + /// + /// VPC ID。 + /// + [JsonProperty("vpc_id", NullValueHandling = NullValueHandling.Ignore)] + public string VpcId { get; set; } + + /// + /// VPC的名称。 + /// + [JsonProperty("vpc_name", NullValueHandling = NullValueHandling.Ignore)] + public string VpcName { get; set; } + + /// + /// 完成创建时间。格式为时间戳,指从格林威治时间 1970年01月01日00时00分00秒起至指定时间的偏差总毫秒数。 + /// + [JsonProperty("created_at", NullValueHandling = NullValueHandling.Ignore)] + public string CreatedAt { get; set; } + + /// + /// 用户ID。 + /// + [JsonProperty("user_id", NullValueHandling = NullValueHandling.Ignore)] + public string UserId { get; set; } + + /// + /// 用户名。 + /// + [JsonProperty("user_name", NullValueHandling = NullValueHandling.Ignore)] + public string UserName { get; set; } + + /// + /// 订单ID,只有在包周期计费时才会有order_id值,其他计费方式order_id值为空。 + /// + [JsonProperty("order_id", NullValueHandling = NullValueHandling.Ignore)] + public string OrderId { get; set; } + + /// + /// 维护时间窗开始时间,格式为HH:mm:ss。 + /// + [JsonProperty("maintain_begin", NullValueHandling = NullValueHandling.Ignore)] + public string MaintainBegin { get; set; } + + /// + /// 维护时间窗结束时间,格式为HH:mm:ss。 + /// + [JsonProperty("maintain_end", NullValueHandling = NullValueHandling.Ignore)] + public string MaintainEnd { get; set; } + + /// + /// RabbitMQ实例是否开启公网访问功能。 - true:开启 - false:未开启 + /// + [JsonProperty("enable_publicip", NullValueHandling = NullValueHandling.Ignore)] + public bool? EnablePublicip { get; set; } + + /// + /// RabbitMQ实例绑定的弹性IP地址。 如果未开启公网访问功能,该字段值为null。 + /// + [JsonProperty("publicip_address", NullValueHandling = NullValueHandling.Ignore)] + public string PublicipAddress { get; set; } + + /// + /// RabbitMQ实例绑定的弹性IP地址的ID。 如果未开启公网访问功能,该字段值为null。 + /// + [JsonProperty("publicip_id", NullValueHandling = NullValueHandling.Ignore)] + public string PublicipId { get; set; } + + /// + /// RabbitMQ实例的管理地址。 + /// + [JsonProperty("management_connect_address", NullValueHandling = NullValueHandling.Ignore)] + public string ManagementConnectAddress { get; set; } + + /// + /// 是否开启安全认证。 - true:开启 - false:未开启 + /// + [JsonProperty("ssl_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? SslEnable { get; set; } + + /// + /// 企业项目ID。 + /// + [JsonProperty("enterprise_project_id", NullValueHandling = NullValueHandling.Ignore)] + public string EnterpriseProjectId { get; set; } + + /// + /// 实例扩容时用于区分老实例与新实例。 - true:新创建的实例,允许磁盘动态扩容不需要重启。 - false:老实例 + /// + [JsonProperty("is_logical_volume", NullValueHandling = NullValueHandling.Ignore)] + public bool? IsLogicalVolume { get; set; } + + /// + /// 实例扩容磁盘次数,如果超过20次则无法扩容磁盘。 + /// + [JsonProperty("extend_times", NullValueHandling = NullValueHandling.Ignore)] + public int? ExtendTimes { get; set; } + + /// + /// 实例类型:集群,cluster。 + /// + [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] + public TypeEnum Type { get; set; } + /// + /// 产品标识。 + /// + [JsonProperty("product_id", NullValueHandling = NullValueHandling.Ignore)] + public string ProductId { get; set; } + + /// + /// 安全组ID。 + /// + [JsonProperty("security_group_id", NullValueHandling = NullValueHandling.Ignore)] + public string SecurityGroupId { get; set; } + + /// + /// 租户安全组名称。 + /// + [JsonProperty("security_group_name", NullValueHandling = NullValueHandling.Ignore)] + public string SecurityGroupName { get; set; } + + /// + /// 子网ID。 + /// + [JsonProperty("subnet_id", NullValueHandling = NullValueHandling.Ignore)] + public string SubnetId { get; set; } + + /// + /// 实例节点所在的可用区,返回“可用区ID”。 + /// + [JsonProperty("available_zones", NullValueHandling = NullValueHandling.Ignore)] + public List AvailableZones { get; set; } + + /// + /// 总共消息存储空间,单位:GB。 + /// + [JsonProperty("total_storage_space", NullValueHandling = NullValueHandling.Ignore)] + public int? TotalStorageSpace { get; set; } + + /// + /// 存储资源ID。 + /// + [JsonProperty("storage_resource_id", NullValueHandling = NullValueHandling.Ignore)] + public string StorageResourceId { get; set; } + + /// + /// IO规格。 + /// + [JsonProperty("storage_spec_code", NullValueHandling = NullValueHandling.Ignore)] + public string StorageSpecCode { get; set; } + + /// + /// 是否开启ipv6。 + /// + [JsonProperty("ipv6_enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? Ipv6Enable { get; set; } + + /// + /// IPv6的连接地址。 + /// + [JsonProperty("ipv6_connect_addresses", NullValueHandling = NullValueHandling.Ignore)] + public List Ipv6ConnectAddresses { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowInstanceResponse {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" engine: ").Append(Engine).Append("\n"); + sb.Append(" engineVersion: ").Append(EngineVersion).Append("\n"); + sb.Append(" specification: ").Append(Specification).Append("\n"); + sb.Append(" storageSpace: ").Append(StorageSpace).Append("\n"); + sb.Append(" usedStorageSpace: ").Append(UsedStorageSpace).Append("\n"); + sb.Append(" connectAddress: ").Append(ConnectAddress).Append("\n"); + sb.Append(" port: ").Append(Port).Append("\n"); + sb.Append(" status: ").Append(Status).Append("\n"); + sb.Append(" description: ").Append(Description).Append("\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" resourceSpecCode: ").Append(ResourceSpecCode).Append("\n"); + sb.Append(" chargingMode: ").Append(ChargingMode).Append("\n"); + sb.Append(" vpcId: ").Append(VpcId).Append("\n"); + sb.Append(" vpcName: ").Append(VpcName).Append("\n"); + sb.Append(" createdAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" userId: ").Append(UserId).Append("\n"); + sb.Append(" userName: ").Append(UserName).Append("\n"); + sb.Append(" orderId: ").Append(OrderId).Append("\n"); + sb.Append(" maintainBegin: ").Append(MaintainBegin).Append("\n"); + sb.Append(" maintainEnd: ").Append(MaintainEnd).Append("\n"); + sb.Append(" enablePublicip: ").Append(EnablePublicip).Append("\n"); + sb.Append(" publicipAddress: ").Append(PublicipAddress).Append("\n"); + sb.Append(" publicipId: ").Append(PublicipId).Append("\n"); + sb.Append(" managementConnectAddress: ").Append(ManagementConnectAddress).Append("\n"); + sb.Append(" sslEnable: ").Append(SslEnable).Append("\n"); + sb.Append(" enterpriseProjectId: ").Append(EnterpriseProjectId).Append("\n"); + sb.Append(" isLogicalVolume: ").Append(IsLogicalVolume).Append("\n"); + sb.Append(" extendTimes: ").Append(ExtendTimes).Append("\n"); + sb.Append(" type: ").Append(Type).Append("\n"); + sb.Append(" productId: ").Append(ProductId).Append("\n"); + sb.Append(" securityGroupId: ").Append(SecurityGroupId).Append("\n"); + sb.Append(" securityGroupName: ").Append(SecurityGroupName).Append("\n"); + sb.Append(" subnetId: ").Append(SubnetId).Append("\n"); + sb.Append(" availableZones: ").Append(AvailableZones).Append("\n"); + sb.Append(" totalStorageSpace: ").Append(TotalStorageSpace).Append("\n"); + sb.Append(" storageResourceId: ").Append(StorageResourceId).Append("\n"); + sb.Append(" storageSpecCode: ").Append(StorageSpecCode).Append("\n"); + sb.Append(" ipv6Enable: ").Append(Ipv6Enable).Append("\n"); + sb.Append(" ipv6ConnectAddresses: ").Append(Ipv6ConnectAddresses).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowInstanceResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowInstanceResponse input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Engine == input.Engine || + (this.Engine != null && + this.Engine.Equals(input.Engine)) + ) && + ( + this.EngineVersion == input.EngineVersion || + (this.EngineVersion != null && + this.EngineVersion.Equals(input.EngineVersion)) + ) && + ( + this.Specification == input.Specification || + (this.Specification != null && + this.Specification.Equals(input.Specification)) + ) && + ( + this.StorageSpace == input.StorageSpace || + (this.StorageSpace != null && + this.StorageSpace.Equals(input.StorageSpace)) + ) && + ( + this.UsedStorageSpace == input.UsedStorageSpace || + (this.UsedStorageSpace != null && + this.UsedStorageSpace.Equals(input.UsedStorageSpace)) + ) && + ( + this.ConnectAddress == input.ConnectAddress || + (this.ConnectAddress != null && + this.ConnectAddress.Equals(input.ConnectAddress)) + ) && + ( + this.Port == input.Port || + (this.Port != null && + this.Port.Equals(input.Port)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.ResourceSpecCode == input.ResourceSpecCode || + (this.ResourceSpecCode != null && + this.ResourceSpecCode.Equals(input.ResourceSpecCode)) + ) && + ( + this.ChargingMode == input.ChargingMode || + (this.ChargingMode != null && + this.ChargingMode.Equals(input.ChargingMode)) + ) && + ( + this.VpcId == input.VpcId || + (this.VpcId != null && + this.VpcId.Equals(input.VpcId)) + ) && + ( + this.VpcName == input.VpcName || + (this.VpcName != null && + this.VpcName.Equals(input.VpcName)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.UserName == input.UserName || + (this.UserName != null && + this.UserName.Equals(input.UserName)) + ) && + ( + this.OrderId == input.OrderId || + (this.OrderId != null && + this.OrderId.Equals(input.OrderId)) + ) && + ( + this.MaintainBegin == input.MaintainBegin || + (this.MaintainBegin != null && + this.MaintainBegin.Equals(input.MaintainBegin)) + ) && + ( + this.MaintainEnd == input.MaintainEnd || + (this.MaintainEnd != null && + this.MaintainEnd.Equals(input.MaintainEnd)) + ) && + ( + this.EnablePublicip == input.EnablePublicip || + (this.EnablePublicip != null && + this.EnablePublicip.Equals(input.EnablePublicip)) + ) && + ( + this.PublicipAddress == input.PublicipAddress || + (this.PublicipAddress != null && + this.PublicipAddress.Equals(input.PublicipAddress)) + ) && + ( + this.PublicipId == input.PublicipId || + (this.PublicipId != null && + this.PublicipId.Equals(input.PublicipId)) + ) && + ( + this.ManagementConnectAddress == input.ManagementConnectAddress || + (this.ManagementConnectAddress != null && + this.ManagementConnectAddress.Equals(input.ManagementConnectAddress)) + ) && + ( + this.SslEnable == input.SslEnable || + (this.SslEnable != null && + this.SslEnable.Equals(input.SslEnable)) + ) && + ( + this.EnterpriseProjectId == input.EnterpriseProjectId || + (this.EnterpriseProjectId != null && + this.EnterpriseProjectId.Equals(input.EnterpriseProjectId)) + ) && + ( + this.IsLogicalVolume == input.IsLogicalVolume || + (this.IsLogicalVolume != null && + this.IsLogicalVolume.Equals(input.IsLogicalVolume)) + ) && + ( + this.ExtendTimes == input.ExtendTimes || + (this.ExtendTimes != null && + this.ExtendTimes.Equals(input.ExtendTimes)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.ProductId == input.ProductId || + (this.ProductId != null && + this.ProductId.Equals(input.ProductId)) + ) && + ( + this.SecurityGroupId == input.SecurityGroupId || + (this.SecurityGroupId != null && + this.SecurityGroupId.Equals(input.SecurityGroupId)) + ) && + ( + this.SecurityGroupName == input.SecurityGroupName || + (this.SecurityGroupName != null && + this.SecurityGroupName.Equals(input.SecurityGroupName)) + ) && + ( + this.SubnetId == input.SubnetId || + (this.SubnetId != null && + this.SubnetId.Equals(input.SubnetId)) + ) && + ( + this.AvailableZones == input.AvailableZones || + this.AvailableZones != null && + input.AvailableZones != null && + this.AvailableZones.SequenceEqual(input.AvailableZones) + ) && + ( + this.TotalStorageSpace == input.TotalStorageSpace || + (this.TotalStorageSpace != null && + this.TotalStorageSpace.Equals(input.TotalStorageSpace)) + ) && + ( + this.StorageResourceId == input.StorageResourceId || + (this.StorageResourceId != null && + this.StorageResourceId.Equals(input.StorageResourceId)) + ) && + ( + this.StorageSpecCode == input.StorageSpecCode || + (this.StorageSpecCode != null && + this.StorageSpecCode.Equals(input.StorageSpecCode)) + ) && + ( + this.Ipv6Enable == input.Ipv6Enable || + (this.Ipv6Enable != null && + this.Ipv6Enable.Equals(input.Ipv6Enable)) + ) && + ( + this.Ipv6ConnectAddresses == input.Ipv6ConnectAddresses || + this.Ipv6ConnectAddresses != null && + input.Ipv6ConnectAddresses != null && + this.Ipv6ConnectAddresses.SequenceEqual(input.Ipv6ConnectAddresses) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Engine != null) + hashCode = hashCode * 59 + this.Engine.GetHashCode(); + if (this.EngineVersion != null) + hashCode = hashCode * 59 + this.EngineVersion.GetHashCode(); + if (this.Specification != null) + hashCode = hashCode * 59 + this.Specification.GetHashCode(); + if (this.StorageSpace != null) + hashCode = hashCode * 59 + this.StorageSpace.GetHashCode(); + if (this.UsedStorageSpace != null) + hashCode = hashCode * 59 + this.UsedStorageSpace.GetHashCode(); + if (this.ConnectAddress != null) + hashCode = hashCode * 59 + this.ConnectAddress.GetHashCode(); + if (this.Port != null) + hashCode = hashCode * 59 + this.Port.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.ResourceSpecCode != null) + hashCode = hashCode * 59 + this.ResourceSpecCode.GetHashCode(); + if (this.ChargingMode != null) + hashCode = hashCode * 59 + this.ChargingMode.GetHashCode(); + if (this.VpcId != null) + hashCode = hashCode * 59 + this.VpcId.GetHashCode(); + if (this.VpcName != null) + hashCode = hashCode * 59 + this.VpcName.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.UserId != null) + hashCode = hashCode * 59 + this.UserId.GetHashCode(); + if (this.UserName != null) + hashCode = hashCode * 59 + this.UserName.GetHashCode(); + if (this.OrderId != null) + hashCode = hashCode * 59 + this.OrderId.GetHashCode(); + if (this.MaintainBegin != null) + hashCode = hashCode * 59 + this.MaintainBegin.GetHashCode(); + if (this.MaintainEnd != null) + hashCode = hashCode * 59 + this.MaintainEnd.GetHashCode(); + if (this.EnablePublicip != null) + hashCode = hashCode * 59 + this.EnablePublicip.GetHashCode(); + if (this.PublicipAddress != null) + hashCode = hashCode * 59 + this.PublicipAddress.GetHashCode(); + if (this.PublicipId != null) + hashCode = hashCode * 59 + this.PublicipId.GetHashCode(); + if (this.ManagementConnectAddress != null) + hashCode = hashCode * 59 + this.ManagementConnectAddress.GetHashCode(); + if (this.SslEnable != null) + hashCode = hashCode * 59 + this.SslEnable.GetHashCode(); + if (this.EnterpriseProjectId != null) + hashCode = hashCode * 59 + this.EnterpriseProjectId.GetHashCode(); + if (this.IsLogicalVolume != null) + hashCode = hashCode * 59 + this.IsLogicalVolume.GetHashCode(); + if (this.ExtendTimes != null) + hashCode = hashCode * 59 + this.ExtendTimes.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.ProductId != null) + hashCode = hashCode * 59 + this.ProductId.GetHashCode(); + if (this.SecurityGroupId != null) + hashCode = hashCode * 59 + this.SecurityGroupId.GetHashCode(); + if (this.SecurityGroupName != null) + hashCode = hashCode * 59 + this.SecurityGroupName.GetHashCode(); + if (this.SubnetId != null) + hashCode = hashCode * 59 + this.SubnetId.GetHashCode(); + if (this.AvailableZones != null) + hashCode = hashCode * 59 + this.AvailableZones.GetHashCode(); + if (this.TotalStorageSpace != null) + hashCode = hashCode * 59 + this.TotalStorageSpace.GetHashCode(); + if (this.StorageResourceId != null) + hashCode = hashCode * 59 + this.StorageResourceId.GetHashCode(); + if (this.StorageSpecCode != null) + hashCode = hashCode * 59 + this.StorageSpecCode.GetHashCode(); + if (this.Ipv6Enable != null) + hashCode = hashCode * 59 + this.Ipv6Enable.GetHashCode(); + if (this.Ipv6ConnectAddresses != null) + hashCode = hashCode * 59 + this.Ipv6ConnectAddresses.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ShowInstanceTagsRequest.cs b/Services/Rabbitmq/V2/Model/ShowInstanceTagsRequest.cs new file mode 100644 index 000000000..2bde1ecc3 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ShowInstanceTagsRequest.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class ShowInstanceTagsRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowInstanceTagsRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowInstanceTagsRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowInstanceTagsRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ShowInstanceTagsResponse.cs b/Services/Rabbitmq/V2/Model/ShowInstanceTagsResponse.cs new file mode 100644 index 000000000..e94f93718 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ShowInstanceTagsResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class ShowInstanceTagsResponse : SdkResponse + { + + /// + /// 标签列表 + /// + [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] + public List Tags { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowInstanceTagsResponse {\n"); + sb.Append(" tags: ").Append(Tags).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowInstanceTagsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowInstanceTagsResponse input) + { + if (input == null) + return false; + + return + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ShowMaintainWindowsRequest.cs b/Services/Rabbitmq/V2/Model/ShowMaintainWindowsRequest.cs new file mode 100644 index 000000000..87cc5598e --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ShowMaintainWindowsRequest.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class ShowMaintainWindowsRequest + { + + + } +} diff --git a/Services/Rabbitmq/V2/Model/ShowMaintainWindowsRespMaintainWindows.cs b/Services/Rabbitmq/V2/Model/ShowMaintainWindowsRespMaintainWindows.cs new file mode 100644 index 000000000..424e86f95 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ShowMaintainWindowsRespMaintainWindows.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class ShowMaintainWindowsRespMaintainWindows + { + + /// + /// 是否为默认时间段。 + /// + [JsonProperty("default", NullValueHandling = NullValueHandling.Ignore)] + public bool? Default { get; set; } + + /// + /// 维护时间窗结束时间。 + /// + [JsonProperty("end", NullValueHandling = NullValueHandling.Ignore)] + public string End { get; set; } + + /// + /// 维护时间窗开始时间。 + /// + [JsonProperty("begin", NullValueHandling = NullValueHandling.Ignore)] + public string Begin { get; set; } + + /// + /// 序号。 + /// + [JsonProperty("seq", NullValueHandling = NullValueHandling.Ignore)] + public int? Seq { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowMaintainWindowsRespMaintainWindows {\n"); + sb.Append(" Default: ").Append(Default).Append("\n"); + sb.Append(" end: ").Append(End).Append("\n"); + sb.Append(" begin: ").Append(Begin).Append("\n"); + sb.Append(" seq: ").Append(Seq).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowMaintainWindowsRespMaintainWindows); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowMaintainWindowsRespMaintainWindows input) + { + if (input == null) + return false; + + return + ( + this.Default == input.Default || + (this.Default != null && + this.Default.Equals(input.Default)) + ) && + ( + this.End == input.End || + (this.End != null && + this.End.Equals(input.End)) + ) && + ( + this.Begin == input.Begin || + (this.Begin != null && + this.Begin.Equals(input.Begin)) + ) && + ( + this.Seq == input.Seq || + (this.Seq != null && + this.Seq.Equals(input.Seq)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Default != null) + hashCode = hashCode * 59 + this.Default.GetHashCode(); + if (this.End != null) + hashCode = hashCode * 59 + this.End.GetHashCode(); + if (this.Begin != null) + hashCode = hashCode * 59 + this.Begin.GetHashCode(); + if (this.Seq != null) + hashCode = hashCode * 59 + this.Seq.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ShowMaintainWindowsResponse.cs b/Services/Rabbitmq/V2/Model/ShowMaintainWindowsResponse.cs new file mode 100644 index 000000000..0cd942305 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ShowMaintainWindowsResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class ShowMaintainWindowsResponse : SdkResponse + { + + /// + /// 支持的维护时间窗列表。 + /// + [JsonProperty("maintain_windows", NullValueHandling = NullValueHandling.Ignore)] + public List MaintainWindows { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowMaintainWindowsResponse {\n"); + sb.Append(" maintainWindows: ").Append(MaintainWindows).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowMaintainWindowsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowMaintainWindowsResponse input) + { + if (input == null) + return false; + + return + ( + this.MaintainWindows == input.MaintainWindows || + this.MaintainWindows != null && + input.MaintainWindows != null && + this.MaintainWindows.SequenceEqual(input.MaintainWindows) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MaintainWindows != null) + hashCode = hashCode * 59 + this.MaintainWindows.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ShowProjectTagsRequest.cs b/Services/Rabbitmq/V2/Model/ShowProjectTagsRequest.cs new file mode 100644 index 000000000..b81cd9736 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ShowProjectTagsRequest.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class ShowProjectTagsRequest + { + + + } +} diff --git a/Services/Rabbitmq/V2/Model/ShowProjectTagsRespTags.cs b/Services/Rabbitmq/V2/Model/ShowProjectTagsRespTags.cs new file mode 100644 index 000000000..4d6c24983 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ShowProjectTagsRespTags.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class ShowProjectTagsRespTags + { + + /// + /// 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + /// + [JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)] + public string Key { get; set; } + + /// + /// 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + /// + [JsonProperty("values", NullValueHandling = NullValueHandling.Ignore)] + public List Values { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowProjectTagsRespTags {\n"); + sb.Append(" key: ").Append(Key).Append("\n"); + sb.Append(" values: ").Append(Values).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowProjectTagsRespTags); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowProjectTagsRespTags input) + { + if (input == null) + return false; + + return + ( + this.Key == input.Key || + (this.Key != null && + this.Key.Equals(input.Key)) + ) && + ( + this.Values == input.Values || + this.Values != null && + input.Values != null && + this.Values.SequenceEqual(input.Values) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Key != null) + hashCode = hashCode * 59 + this.Key.GetHashCode(); + if (this.Values != null) + hashCode = hashCode * 59 + this.Values.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/ShowProjectTagsResponse.cs b/Services/Rabbitmq/V2/Model/ShowProjectTagsResponse.cs new file mode 100644 index 000000000..cb708a3ef --- /dev/null +++ b/Services/Rabbitmq/V2/Model/ShowProjectTagsResponse.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class ShowProjectTagsResponse : SdkResponse + { + + /// + /// 标签列表 + /// + [JsonProperty("tags", NullValueHandling = NullValueHandling.Ignore)] + public List Tags { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShowProjectTagsResponse {\n"); + sb.Append(" tags: ").Append(Tags).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as ShowProjectTagsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(ShowProjectTagsResponse input) + { + if (input == null) + return false; + + return + ( + this.Tags == input.Tags || + this.Tags != null && + input.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/UpdateInstanceReq.cs b/Services/Rabbitmq/V2/Model/UpdateInstanceReq.cs new file mode 100644 index 000000000..fb59929a4 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/UpdateInstanceReq.cs @@ -0,0 +1,173 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class UpdateInstanceReq + { + + /// + /// 实例名称。 由英文字符开头,只能由英文字母、数字、中划线组成,长度为4~64的字符。 + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// 实例的描述信息。 长度不超过1024的字符串。 > \\与\"在json报文中属于特殊字符,如果参数值中需要显示\\或者\"字符,请在字符前增加转义字符\\,比如\\\\或者\\\"。 + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// 维护时间窗开始时间,格式为HH:mm:ss。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-rabbitmq/ShowMaintainWindows.html)。 - 开始时间必须为22:00:00、02:00:00、06:00:00、10:00:00、14:00:00和18:00:00。 - 该参数不能单独为空,若该值为空,则结束时间也为空。系统分配一个默认开始时间02:00:00。 + /// + [JsonProperty("maintain_begin", NullValueHandling = NullValueHandling.Ignore)] + public string MaintainBegin { get; set; } + + /// + /// 维护时间窗结束时间,格式为HH:mm:ss。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-rabbitmq/ShowMaintainWindows.html)。 - 结束时间在开始时间基础上加四个小时,即当开始时间为22:00:00时,结束时间为02:00:00。 - 该参数不能单独为空,若该值为空,则开始时间也为空。系统分配一个默认结束时间06:00:00。 + /// + [JsonProperty("maintain_end", NullValueHandling = NullValueHandling.Ignore)] + public string MaintainEnd { get; set; } + + /// + /// 安全组ID。 + /// + [JsonProperty("security_group_id", NullValueHandling = NullValueHandling.Ignore)] + public string SecurityGroupId { get; set; } + + /// + /// RabbitMQ实例是否开启公网访问功能。 - true:开启 - false:不开启 + /// + [JsonProperty("enable_publicip", NullValueHandling = NullValueHandling.Ignore)] + public bool? EnablePublicip { get; set; } + + /// + /// RabbitMQ实例绑定的弹性IP地址的id。 如果开启了公网访问功能(即enable_publicip为true),该字段为必选。 获取方法: - 方法1:登录弹性公网IP和带宽的控制台界面,在弹性公网IP的详情页面查的基本信息栏找ID。 - 方法2:通过弹性公网IP的API接口查询,具体操作可参考[查询公网IP ID](https://support.huaweicloud.com/api-eip/eip_api_0003.html)。 + /// + [JsonProperty("publicip_id", NullValueHandling = NullValueHandling.Ignore)] + public string PublicipId { get; set; } + + /// + /// 企业项目。 + /// + [JsonProperty("enterprise_project_id", NullValueHandling = NullValueHandling.Ignore)] + public string EnterpriseProjectId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateInstanceReq {\n"); + sb.Append(" name: ").Append(Name).Append("\n"); + sb.Append(" description: ").Append(Description).Append("\n"); + sb.Append(" maintainBegin: ").Append(MaintainBegin).Append("\n"); + sb.Append(" maintainEnd: ").Append(MaintainEnd).Append("\n"); + sb.Append(" securityGroupId: ").Append(SecurityGroupId).Append("\n"); + sb.Append(" enablePublicip: ").Append(EnablePublicip).Append("\n"); + sb.Append(" publicipId: ").Append(PublicipId).Append("\n"); + sb.Append(" enterpriseProjectId: ").Append(EnterpriseProjectId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdateInstanceReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdateInstanceReq input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.MaintainBegin == input.MaintainBegin || + (this.MaintainBegin != null && + this.MaintainBegin.Equals(input.MaintainBegin)) + ) && + ( + this.MaintainEnd == input.MaintainEnd || + (this.MaintainEnd != null && + this.MaintainEnd.Equals(input.MaintainEnd)) + ) && + ( + this.SecurityGroupId == input.SecurityGroupId || + (this.SecurityGroupId != null && + this.SecurityGroupId.Equals(input.SecurityGroupId)) + ) && + ( + this.EnablePublicip == input.EnablePublicip || + (this.EnablePublicip != null && + this.EnablePublicip.Equals(input.EnablePublicip)) + ) && + ( + this.PublicipId == input.PublicipId || + (this.PublicipId != null && + this.PublicipId.Equals(input.PublicipId)) + ) && + ( + this.EnterpriseProjectId == input.EnterpriseProjectId || + (this.EnterpriseProjectId != null && + this.EnterpriseProjectId.Equals(input.EnterpriseProjectId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.MaintainBegin != null) + hashCode = hashCode * 59 + this.MaintainBegin.GetHashCode(); + if (this.MaintainEnd != null) + hashCode = hashCode * 59 + this.MaintainEnd.GetHashCode(); + if (this.SecurityGroupId != null) + hashCode = hashCode * 59 + this.SecurityGroupId.GetHashCode(); + if (this.EnablePublicip != null) + hashCode = hashCode * 59 + this.EnablePublicip.GetHashCode(); + if (this.PublicipId != null) + hashCode = hashCode * 59 + this.PublicipId.GetHashCode(); + if (this.EnterpriseProjectId != null) + hashCode = hashCode * 59 + this.EnterpriseProjectId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/UpdateInstanceRequest.cs b/Services/Rabbitmq/V2/Model/UpdateInstanceRequest.cs new file mode 100644 index 000000000..1fe13511f --- /dev/null +++ b/Services/Rabbitmq/V2/Model/UpdateInstanceRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class UpdateInstanceRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public UpdateInstanceReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateInstanceRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdateInstanceRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdateInstanceRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/UpdateInstanceResponse.cs b/Services/Rabbitmq/V2/Model/UpdateInstanceResponse.cs new file mode 100644 index 000000000..3565f100c --- /dev/null +++ b/Services/Rabbitmq/V2/Model/UpdateInstanceResponse.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class UpdateInstanceResponse : SdkResponse + { + + + } +} diff --git a/Services/Rabbitmq/V2/Model/UpdatePluginsReq.cs b/Services/Rabbitmq/V2/Model/UpdatePluginsReq.cs new file mode 100644 index 000000000..1eb986628 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/UpdatePluginsReq.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// + /// + public class UpdatePluginsReq + { + + /// + /// 是否开启改插件。 + /// + [JsonProperty("enable", NullValueHandling = NullValueHandling.Ignore)] + public bool? Enable { get; set; } + + /// + /// 插件列表,多个插件中间用“,”隔开。 + /// + [JsonProperty("plugins", NullValueHandling = NullValueHandling.Ignore)] + public string Plugins { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdatePluginsReq {\n"); + sb.Append(" enable: ").Append(Enable).Append("\n"); + sb.Append(" plugins: ").Append(Plugins).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdatePluginsReq); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdatePluginsReq input) + { + if (input == null) + return false; + + return + ( + this.Enable == input.Enable || + (this.Enable != null && + this.Enable.Equals(input.Enable)) + ) && + ( + this.Plugins == input.Plugins || + (this.Plugins != null && + this.Plugins.Equals(input.Plugins)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Enable != null) + hashCode = hashCode * 59 + this.Enable.GetHashCode(); + if (this.Plugins != null) + hashCode = hashCode * 59 + this.Plugins.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/UpdatePluginsRequest.cs b/Services/Rabbitmq/V2/Model/UpdatePluginsRequest.cs new file mode 100644 index 000000000..f22e1566b --- /dev/null +++ b/Services/Rabbitmq/V2/Model/UpdatePluginsRequest.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Request Object + /// + public class UpdatePluginsRequest + { + + /// + /// + /// + [SDKProperty("instance_id", IsPath = true)] + [JsonProperty("instance_id", NullValueHandling = NullValueHandling.Ignore)] + public string InstanceId { get; set; } + + /// + /// + /// + [SDKProperty("body", IsBody = true)] + [JsonProperty("body", NullValueHandling = NullValueHandling.Ignore)] + public UpdatePluginsReq Body { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdatePluginsRequest {\n"); + sb.Append(" instanceId: ").Append(InstanceId).Append("\n"); + sb.Append(" body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdatePluginsRequest); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdatePluginsRequest input) + { + if (input == null) + return false; + + return + ( + this.InstanceId == input.InstanceId || + (this.InstanceId != null && + this.InstanceId.Equals(input.InstanceId)) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstanceId != null) + hashCode = hashCode * 59 + this.InstanceId.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/Model/UpdatePluginsResponse.cs b/Services/Rabbitmq/V2/Model/UpdatePluginsResponse.cs new file mode 100644 index 000000000..a6d464316 --- /dev/null +++ b/Services/Rabbitmq/V2/Model/UpdatePluginsResponse.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using HuaweiCloud.SDK.Core; + +namespace HuaweiCloud.SDK.Rabbitmq.V2.Model +{ + /// + /// Response Object + /// + public class UpdatePluginsResponse : SdkResponse + { + + /// + /// 后台任务ID。 + /// + [JsonProperty("job_id", NullValueHandling = NullValueHandling.Ignore)] + public string JobId { get; set; } + + + /// + /// Get the string + /// + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdatePluginsResponse {\n"); + sb.Append(" jobId: ").Append(JobId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + public override bool Equals(object input) + { + return this.Equals(input as UpdatePluginsResponse); + } + + /// + /// Returns true if objects are equal + /// + public bool Equals(UpdatePluginsResponse input) + { + if (input == null) + return false; + + return + ( + this.JobId == input.JobId || + (this.JobId != null && + this.JobId.Equals(input.JobId)) + ); + } + + /// + /// Get hash code + /// + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.JobId != null) + hashCode = hashCode * 59 + this.JobId.GetHashCode(); + return hashCode; + } + } + } +} diff --git a/Services/Rabbitmq/V2/RabbitMQAsyncClient.cs b/Services/Rabbitmq/V2/RabbitMQAsyncClient.cs new file mode 100644 index 000000000..0f560aa7f --- /dev/null +++ b/Services/Rabbitmq/V2/RabbitMQAsyncClient.cs @@ -0,0 +1,273 @@ +using System.Net.Http; +using System.Collections.Generic; +using System.Threading.Tasks; +using HuaweiCloud.SDK.Core; +using HuaweiCloud.SDK.Rabbitmq.V2.Model; + +namespace HuaweiCloud.SDK.Rabbitmq.V2 +{ + public partial class RabbitmqAsyncClient : Client + { + public static ClientBuilder NewBuilder() + { + return new ClientBuilder(); + } + + + /// + /// 批量添加或删除实例标签 + /// + public async Task BatchCreateOrDeleteInstanceTagAsync(BatchCreateOrDeleteInstanceTagRequest batchCreateOrDeleteInstanceTagRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , batchCreateOrDeleteInstanceTagRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/rabbitmq/{instance_id}/tags/action",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", batchCreateOrDeleteInstanceTagRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 批量重启或删除实例 + /// + public async Task BatchRestartOrDeleteInstancesAsync(BatchRestartOrDeleteInstancesRequest batchRestartOrDeleteInstancesRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/action",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", batchRestartOrDeleteInstancesRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 创建实例(按需) + /// + public async Task CreatePostPaidInstanceAsync(CreatePostPaidInstanceRequest createPostPaidInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", createPostPaidInstanceRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 删除后台任务管理中的指定记录 + /// + public async Task DeleteBackgroundTaskAsync(DeleteBackgroundTaskRequest deleteBackgroundTaskRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , deleteBackgroundTaskRequest.InstanceId.ToString()); + urlParam.Add("task_id" , deleteBackgroundTaskRequest.TaskId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/tasks/{task_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, deleteBackgroundTaskRequest); + HttpResponseMessage response = await DoHttpRequestAsync("DELETE",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 删除指定的实例 + /// + public async Task DeleteInstanceAsync(DeleteInstanceRequest deleteInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , deleteInstanceRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, deleteInstanceRequest); + HttpResponseMessage response = await DoHttpRequestAsync("DELETE",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 查询可用区信息 + /// + public async Task ListAvailableZonesAsync(ListAvailableZonesRequest listAvailableZonesRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/available-zones",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listAvailableZonesRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询实例的后台任务列表 + /// + public async Task ListBackgroundTasksAsync(ListBackgroundTasksRequest listBackgroundTasksRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , listBackgroundTasksRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/tasks",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listBackgroundTasksRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询所有实例列表 + /// + public async Task ListInstancesDetailsAsync(ListInstancesDetailsRequest listInstancesDetailsRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listInstancesDetailsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询插件列表 + /// + public async Task ListPluginsAsync(ListPluginsRequest listPluginsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , listPluginsRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/rabbitmq/plugins",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listPluginsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询产品规格列表 + /// + public async Task ListProductsAsync(ListProductsRequest listProductsRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/products",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listProductsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 重置密码 + /// + public async Task ResetPasswordAsync(ResetPasswordRequest resetPasswordRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , resetPasswordRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/password",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", resetPasswordRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 实例规格变更 + /// + public async Task ResizeInstanceAsync(ResizeInstanceRequest resizeInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , resizeInstanceRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/extend",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", resizeInstanceRequest); + HttpResponseMessage response = await DoHttpRequestAsync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询后台任务管理中的指定记录 + /// + public async Task ShowBackgroundTaskAsync(ShowBackgroundTaskRequest showBackgroundTaskRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showBackgroundTaskRequest.InstanceId.ToString()); + urlParam.Add("task_id" , showBackgroundTaskRequest.TaskId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/tasks/{task_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showBackgroundTaskRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询指定实例成功 + /// + public async Task ShowInstanceAsync(ShowInstanceRequest showInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showInstanceRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showInstanceRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询可扩容规格列表 + /// + public async Task ShowInstanceExtendProductInfoAsync(ShowInstanceExtendProductInfoRequest showInstanceExtendProductInfoRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showInstanceExtendProductInfoRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/extend",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showInstanceExtendProductInfoRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询实例标签 + /// + public async Task ShowInstanceTagsAsync(ShowInstanceTagsRequest showInstanceTagsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showInstanceTagsRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/rabbitmq/{instance_id}/tags",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showInstanceTagsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询维护时间窗时间段 + /// + public async Task ShowMaintainWindowsAsync(ShowMaintainWindowsRequest showMaintainWindowsRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/instances/maintain-windows",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showMaintainWindowsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询项目标签 + /// + public async Task ShowProjectTagsAsync(ShowProjectTagsRequest showProjectTagsRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/rabbitmq/tags",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showProjectTagsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 修改实例信息 + /// + public async Task UpdateInstanceAsync(UpdateInstanceRequest updateInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , updateInstanceRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", updateInstanceRequest); + HttpResponseMessage response = await DoHttpRequestAsync("PUT",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 开启或关闭插件 + /// + public async Task UpdatePluginsAsync(UpdatePluginsRequest updatePluginsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , updatePluginsRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/rabbitmq/plugins",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", updatePluginsRequest); + HttpResponseMessage response = await DoHttpRequestAsync("PUT",request); + return JsonUtils.DeSerialize(response); + } + + } +} \ No newline at end of file diff --git a/Services/Rabbitmq/V2/RabbitMQClient.cs b/Services/Rabbitmq/V2/RabbitMQClient.cs new file mode 100644 index 000000000..471ada9ef --- /dev/null +++ b/Services/Rabbitmq/V2/RabbitMQClient.cs @@ -0,0 +1,272 @@ +using System.Net.Http; +using System.Collections.Generic; +using HuaweiCloud.SDK.Core; +using HuaweiCloud.SDK.Rabbitmq.V2.Model; + +namespace HuaweiCloud.SDK.Rabbitmq.V2 +{ + public partial class RabbitmqClient : Client + { + public static ClientBuilder NewBuilder() + { + return new ClientBuilder(); + } + + + /// + /// 批量添加或删除实例标签 + /// + public BatchCreateOrDeleteInstanceTagResponse BatchCreateOrDeleteInstanceTag(BatchCreateOrDeleteInstanceTagRequest batchCreateOrDeleteInstanceTagRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , batchCreateOrDeleteInstanceTagRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/rabbitmq/{instance_id}/tags/action",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", batchCreateOrDeleteInstanceTagRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 批量重启或删除实例 + /// + public BatchRestartOrDeleteInstancesResponse BatchRestartOrDeleteInstances(BatchRestartOrDeleteInstancesRequest batchRestartOrDeleteInstancesRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/action",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", batchRestartOrDeleteInstancesRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 创建实例(按需) + /// + public CreatePostPaidInstanceResponse CreatePostPaidInstance(CreatePostPaidInstanceRequest createPostPaidInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", createPostPaidInstanceRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 删除后台任务管理中的指定记录 + /// + public DeleteBackgroundTaskResponse DeleteBackgroundTask(DeleteBackgroundTaskRequest deleteBackgroundTaskRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , deleteBackgroundTaskRequest.InstanceId.ToString()); + urlParam.Add("task_id" , deleteBackgroundTaskRequest.TaskId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/tasks/{task_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, deleteBackgroundTaskRequest); + HttpResponseMessage response = DoHttpRequestSync("DELETE",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 删除指定的实例 + /// + public DeleteInstanceResponse DeleteInstance(DeleteInstanceRequest deleteInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , deleteInstanceRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, deleteInstanceRequest); + HttpResponseMessage response = DoHttpRequestSync("DELETE",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 查询可用区信息 + /// + public ListAvailableZonesResponse ListAvailableZones(ListAvailableZonesRequest listAvailableZonesRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/available-zones",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listAvailableZonesRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询实例的后台任务列表 + /// + public ListBackgroundTasksResponse ListBackgroundTasks(ListBackgroundTasksRequest listBackgroundTasksRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , listBackgroundTasksRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/tasks",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listBackgroundTasksRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询所有实例列表 + /// + public ListInstancesDetailsResponse ListInstancesDetails(ListInstancesDetailsRequest listInstancesDetailsRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listInstancesDetailsRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询插件列表 + /// + public ListPluginsResponse ListPlugins(ListPluginsRequest listPluginsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , listPluginsRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/rabbitmq/plugins",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listPluginsRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询产品规格列表 + /// + public ListProductsResponse ListProducts(ListProductsRequest listProductsRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/products",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, listProductsRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 重置密码 + /// + public ResetPasswordResponse ResetPassword(ResetPasswordRequest resetPasswordRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , resetPasswordRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/password",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", resetPasswordRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 实例规格变更 + /// + public ResizeInstanceResponse ResizeInstance(ResizeInstanceRequest resizeInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , resizeInstanceRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/extend",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", resizeInstanceRequest); + HttpResponseMessage response = DoHttpRequestSync("POST",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询后台任务管理中的指定记录 + /// + public ShowBackgroundTaskResponse ShowBackgroundTask(ShowBackgroundTaskRequest showBackgroundTaskRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showBackgroundTaskRequest.InstanceId.ToString()); + urlParam.Add("task_id" , showBackgroundTaskRequest.TaskId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/tasks/{task_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showBackgroundTaskRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询指定实例成功 + /// + public ShowInstanceResponse ShowInstance(ShowInstanceRequest showInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showInstanceRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showInstanceRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询可扩容规格列表 + /// + public ShowInstanceExtendProductInfoResponse ShowInstanceExtendProductInfo(ShowInstanceExtendProductInfoRequest showInstanceExtendProductInfoRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showInstanceExtendProductInfoRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/extend",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showInstanceExtendProductInfoRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询实例标签 + /// + public ShowInstanceTagsResponse ShowInstanceTags(ShowInstanceTagsRequest showInstanceTagsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , showInstanceTagsRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/rabbitmq/{instance_id}/tags",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showInstanceTagsRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询维护时间窗时间段 + /// + public ShowMaintainWindowsResponse ShowMaintainWindows(ShowMaintainWindowsRequest showMaintainWindowsRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/instances/maintain-windows",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showMaintainWindowsRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 查询项目标签 + /// + public ShowProjectTagsResponse ShowProjectTags(ShowProjectTagsRequest showProjectTagsRequest) + { + Dictionary urlParam = new Dictionary(); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/rabbitmq/tags",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, showProjectTagsRequest); + HttpResponseMessage response = DoHttpRequestSync("GET",request); + return JsonUtils.DeSerialize(response); + } + + /// + /// 修改实例信息 + /// + public UpdateInstanceResponse UpdateInstance(UpdateInstanceRequest updateInstanceRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , updateInstanceRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", updateInstanceRequest); + HttpResponseMessage response = DoHttpRequestSync("PUT",request); + return JsonUtils.DeSerializeNull(response); + } + + /// + /// 开启或关闭插件 + /// + public UpdatePluginsResponse UpdatePlugins(UpdatePluginsRequest updatePluginsRequest) + { + Dictionary urlParam = new Dictionary(); + urlParam.Add("instance_id" , updatePluginsRequest.InstanceId.ToString()); + string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/instances/{instance_id}/rabbitmq/plugins",urlParam); + SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", updatePluginsRequest); + HttpResponseMessage response = DoHttpRequestSync("PUT",request); + return JsonUtils.DeSerialize(response); + } + + } +} \ No newline at end of file diff --git a/Services/Tms/Tms.csproj b/Services/Tms/Tms.csproj index 7368109b6..736ca46f0 100644 --- a/Services/Tms/Tms.csproj +++ b/Services/Tms/Tms.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.Tms - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd. diff --git a/Services/Vpc/V3/Model/CreateSecurityGroupRuleOption.cs b/Services/Vpc/V3/Model/CreateSecurityGroupRuleOption.cs index 3bba21f56..2b8cd3977 100644 --- a/Services/Vpc/V3/Model/CreateSecurityGroupRuleOption.cs +++ b/Services/Vpc/V3/Model/CreateSecurityGroupRuleOption.cs @@ -49,7 +49,7 @@ public class CreateSecurityGroupRuleOption /// 功能说明:端口取值范围 取值范围:支持单端口(80),连续端口(1-30)以及不连续端口(22,3389,80) 约束:端口值的范围1~65535 /// [JsonProperty("multiport", NullValueHandling = NullValueHandling.Ignore)] - public int? Multiport { get; set; } + public string Multiport { get; set; } /// /// 功能说明:远端IP地址,当direction是egress时为虚拟机访问端的地址,当direction是ingress时为访问虚拟机的地址 取值范围:IP地址,或者cidr格式 约束:与remote_group_id、remote_address_group_id互斥 diff --git a/Services/Vpc/V3/Model/SecurityGroupInfo.cs b/Services/Vpc/V3/Model/SecurityGroupInfo.cs index d704086f1..2c6c6f4a4 100644 --- a/Services/Vpc/V3/Model/SecurityGroupInfo.cs +++ b/Services/Vpc/V3/Model/SecurityGroupInfo.cs @@ -58,10 +58,10 @@ public class SecurityGroupInfo public string EnterpriseProjectId { get; set; } /// - /// + /// 安全组规则 /// - [JsonProperty("security_group_rule", NullValueHandling = NullValueHandling.Ignore)] - public SecurityGroupRule SecurityGroupRule { get; set; } + [JsonProperty("security_group_rules", NullValueHandling = NullValueHandling.Ignore)] + public List SecurityGroupRules { get; set; } /// @@ -78,7 +78,7 @@ public override string ToString() sb.Append(" createdAt: ").Append(CreatedAt).Append("\n"); sb.Append(" updatedAt: ").Append(UpdatedAt).Append("\n"); sb.Append(" enterpriseProjectId: ").Append(EnterpriseProjectId).Append("\n"); - sb.Append(" securityGroupRule: ").Append(SecurityGroupRule).Append("\n"); + sb.Append(" securityGroupRules: ").Append(SecurityGroupRules).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -136,9 +136,10 @@ public bool Equals(SecurityGroupInfo input) this.EnterpriseProjectId.Equals(input.EnterpriseProjectId)) ) && ( - this.SecurityGroupRule == input.SecurityGroupRule || - (this.SecurityGroupRule != null && - this.SecurityGroupRule.Equals(input.SecurityGroupRule)) + this.SecurityGroupRules == input.SecurityGroupRules || + this.SecurityGroupRules != null && + input.SecurityGroupRules != null && + this.SecurityGroupRules.SequenceEqual(input.SecurityGroupRules) ); } @@ -164,8 +165,8 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); if (this.EnterpriseProjectId != null) hashCode = hashCode * 59 + this.EnterpriseProjectId.GetHashCode(); - if (this.SecurityGroupRule != null) - hashCode = hashCode * 59 + this.SecurityGroupRule.GetHashCode(); + if (this.SecurityGroupRules != null) + hashCode = hashCode * 59 + this.SecurityGroupRules.GetHashCode(); return hashCode; } } diff --git a/Services/Vpc/V3/Model/SecurityGroupRule.cs b/Services/Vpc/V3/Model/SecurityGroupRule.cs index 3c0a515a1..a56b9620a 100644 --- a/Services/Vpc/V3/Model/SecurityGroupRule.cs +++ b/Services/Vpc/V3/Model/SecurityGroupRule.cs @@ -55,7 +55,7 @@ public class SecurityGroupRule /// 功能说明:端口取值范围 取值范围:支持单端口(80),连续端口(1-30)以及不连续端口(22,3389,80) /// [JsonProperty("multiport", NullValueHandling = NullValueHandling.Ignore)] - public int? Multiport { get; set; } + public string Multiport { get; set; } /// /// 功能说明:安全组规则生效策略 取值范围:allow 允许,deny 拒绝 约束:默认值为deny diff --git a/Services/Vpc/Vpc.csproj b/Services/Vpc/Vpc.csproj index 44f47a7b0..125b5c20e 100644 --- a/Services/Vpc/Vpc.csproj +++ b/Services/Vpc/Vpc.csproj @@ -15,7 +15,7 @@ false false HuaweiCloud.SDK.Vpc - 3.0.10-beta + 3.0.11-beta HuaweiCloud Copyright 2020 Huawei Technologies Co., Ltd. Huawei Technologies Co., Ltd.