From 9e38de131f9f7b6b1c50c24d5a68405c0673aaef Mon Sep 17 00:00:00 2001 From: zjuld Date: Mon, 14 Oct 2024 21:44:09 +0800 Subject: [PATCH] add darabonba sdk & demo & sdk docs; support java, go, php, py3, ts, csharp --- .gitignore | 4 + .../converter/CloudEventBatchedConverter.java | 3 + .../converter/CloudEventBinaryConverter.java | 7 + .../CloudEventStructuredConverter.java | 3 + sdk/Darafile | 87 + sdk/Readme.md | 37 + sdk/demo/ApiDestination/Darafile | 66 + sdk/demo/ApiDestination/demo.dara | 117 + .../generated/csharp/core/Demo.cs | 392 + .../csharp/core/Properties/AssemblyInfo.cs | 33 + .../generated/csharp/core/sdkDemo.csproj | 44 + .../generated/go/client/client.go | 239 + sdk/demo/ApiDestination/generated/go/go.mod | 9 + sdk/demo/ApiDestination/generated/go/main.go | 11 + .../ApiDestination/generated/java/pom.xml | 122 + .../rocketmq/eventbridge/demo/Demo.java | 142 + .../ApiDestination/generated/php/.gitignore | 15 + .../ApiDestination/generated/php/.php_cs.dist | 65 + .../ApiDestination/generated/php/autoload.php | 15 + .../generated/php/composer.json | 34 + .../ApiDestination/generated/php/main.php | 8 + .../ApiDestination/generated/php/src/Demo.php | 165 + .../generated/python/.gitignore | 5 + .../rocketmq_eventbridge_demo/__init__.py | 1 + .../python/rocketmq_eventbridge_demo/demo.py | 191 + .../ApiDestination/generated/python/setup.py | 79 + .../ApiDestination/generated/ts/package.json | 31 + .../ApiDestination/generated/ts/src/client.ts | 118 + .../ApiDestination/generated/ts/src/main.ts | 4 + .../ApiDestination/generated/ts/tsconfig.json | 13 + sdk/demo/Connection/Darafile | 66 + sdk/demo/Connection/demo.dara | 146 + .../Connection/generated/csharp/core/Demo.cs | 506 + .../csharp/core/Properties/AssemblyInfo.cs | 33 + .../generated/csharp/core/sdkDemo.csproj | 44 + .../Connection/generated/go/client/client.go | 309 + sdk/demo/Connection/generated/go/go.mod | 9 + sdk/demo/Connection/generated/go/main.go | 11 + sdk/demo/Connection/generated/java/pom.xml | 122 + .../rocketmq/eventbridge/demo/Demo.java | 176 + sdk/demo/Connection/generated/php/.gitignore | 15 + .../Connection/generated/php/.php_cs.dist | 65 + .../Connection/generated/php/autoload.php | 15 + .../Connection/generated/php/composer.json | 34 + sdk/demo/Connection/generated/php/main.php | 8 + .../Connection/generated/php/src/Demo.php | 207 + .../Connection/generated/python/.gitignore | 5 + .../rocketmq_eventbridge_demo/__init__.py | 1 + .../python/rocketmq_eventbridge_demo/demo.py | 235 + sdk/demo/Connection/generated/python/setup.py | 79 + sdk/demo/Connection/generated/ts/package.json | 31 + .../Connection/generated/ts/src/client.ts | 144 + sdk/demo/Connection/generated/ts/src/main.ts | 4 + .../Connection/generated/ts/tsconfig.json | 13 + sdk/demo/EventBus/Darafile | 66 + sdk/demo/EventBus/demo.dara | 91 + .../EventBus/generated/csharp/core/Demo.cs | 300 + .../csharp/core/Properties/AssemblyInfo.cs | 33 + .../generated/csharp/core/sdkDemo.csproj | 44 + .../EventBus/generated/go/client/client.go | 189 + sdk/demo/EventBus/generated/go/go.mod | 9 + sdk/demo/EventBus/generated/go/main.go | 11 + sdk/demo/EventBus/generated/java/pom.xml | 122 + .../rocketmq/eventbridge/demo/Demo.java | 110 + sdk/demo/EventBus/generated/php/.gitignore | 15 + sdk/demo/EventBus/generated/php/.php_cs.dist | 65 + sdk/demo/EventBus/generated/php/autoload.php | 15 + sdk/demo/EventBus/generated/php/composer.json | 34 + sdk/demo/EventBus/generated/php/main.php | 8 + sdk/demo/EventBus/generated/php/src/Demo.php | 127 + sdk/demo/EventBus/generated/python/.gitignore | 5 + .../rocketmq_eventbridge_demo/__init__.py | 1 + .../python/rocketmq_eventbridge_demo/demo.py | 139 + sdk/demo/EventBus/generated/python/setup.py | 79 + sdk/demo/EventBus/generated/ts/package.json | 31 + sdk/demo/EventBus/generated/ts/src/client.ts | 90 + sdk/demo/EventBus/generated/ts/src/main.ts | 4 + sdk/demo/EventBus/generated/ts/tsconfig.json | 13 + sdk/demo/EventData/Darafile | 66 + sdk/demo/EventData/demo.dara | 38 + .../EventData/generated/csharp/core/Demo.cs | 110 + .../csharp/core/Properties/AssemblyInfo.cs | 33 + .../generated/csharp/core/sdkDemo.csproj | 44 + .../EventData/generated/go/client/client.go | 76 + sdk/demo/EventData/generated/go/go.mod | 9 + sdk/demo/EventData/generated/go/main.go | 11 + sdk/demo/EventData/generated/java/pom.xml | 122 + .../rocketmq/eventbridge/demo/Demo.java | 51 + sdk/demo/EventData/generated/php/.gitignore | 15 + sdk/demo/EventData/generated/php/.php_cs.dist | 65 + sdk/demo/EventData/generated/php/autoload.php | 15 + .../EventData/generated/php/composer.json | 34 + sdk/demo/EventData/generated/php/main.php | 8 + sdk/demo/EventData/generated/php/src/Demo.php | 53 + .../EventData/generated/python/.gitignore | 5 + .../rocketmq_eventbridge_demo/__init__.py | 1 + .../python/rocketmq_eventbridge_demo/demo.py | 57 + sdk/demo/EventData/generated/python/setup.py | 79 + sdk/demo/EventData/generated/ts/package.json | 31 + sdk/demo/EventData/generated/ts/src/client.ts | 43 + sdk/demo/EventData/generated/ts/src/main.ts | 4 + sdk/demo/EventData/generated/ts/tsconfig.json | 13 + sdk/demo/EventRule/Darafile | 66 + sdk/demo/EventRule/demo.dara | 157 + .../EventRule/generated/csharp/core/Demo.cs | 516 + .../csharp/core/Properties/AssemblyInfo.cs | 33 + .../generated/csharp/core/sdkDemo.csproj | 44 + .../EventRule/generated/go/client/client.go | 315 + sdk/demo/EventRule/generated/go/go.mod | 9 + sdk/demo/EventRule/generated/go/main.go | 11 + sdk/demo/EventRule/generated/java/pom.xml | 122 + .../rocketmq/eventbridge/demo/Demo.java | 192 + sdk/demo/EventRule/generated/php/.gitignore | 15 + sdk/demo/EventRule/generated/php/.php_cs.dist | 65 + sdk/demo/EventRule/generated/php/autoload.php | 15 + .../EventRule/generated/php/composer.json | 34 + sdk/demo/EventRule/generated/php/main.php | 8 + sdk/demo/EventRule/generated/php/src/Demo.php | 214 + .../EventRule/generated/python/.gitignore | 5 + .../rocketmq_eventbridge_demo/__init__.py | 1 + .../python/rocketmq_eventbridge_demo/demo.py | 247 + sdk/demo/EventRule/generated/python/setup.py | 79 + sdk/demo/EventRule/generated/ts/package.json | 31 + sdk/demo/EventRule/generated/ts/src/client.ts | 150 + sdk/demo/EventRule/generated/ts/src/main.ts | 4 + sdk/demo/EventRule/generated/ts/tsconfig.json | 13 + sdk/demo/EventSource/Darafile | 66 + sdk/demo/EventSource/demo.dara | 118 + .../EventSource/generated/csharp/core/Demo.cs | 382 + .../csharp/core/Properties/AssemblyInfo.cs | 33 + .../generated/csharp/core/sdkDemo.csproj | 44 + .../EventSource/generated/go/client/client.go | 236 + sdk/demo/EventSource/generated/go/go.mod | 9 + sdk/demo/EventSource/generated/go/main.go | 11 + sdk/demo/EventSource/generated/java/pom.xml | 122 + .../rocketmq/eventbridge/demo/Demo.java | 139 + sdk/demo/EventSource/generated/php/.gitignore | 15 + .../EventSource/generated/php/.php_cs.dist | 65 + .../EventSource/generated/php/autoload.php | 15 + .../EventSource/generated/php/composer.json | 34 + sdk/demo/EventSource/generated/php/main.php | 8 + .../EventSource/generated/php/src/Demo.php | 161 + .../EventSource/generated/python/.gitignore | 5 + .../rocketmq_eventbridge_demo/__init__.py | 1 + .../python/rocketmq_eventbridge_demo/demo.py | 185 + .../EventSource/generated/python/setup.py | 79 + .../EventSource/generated/ts/package.json | 31 + .../EventSource/generated/ts/src/client.ts | 115 + sdk/demo/EventSource/generated/ts/src/main.ts | 4 + .../EventSource/generated/ts/tsconfig.json | 13 + sdk/demo/EventTarget/Darafile | 66 + sdk/demo/EventTarget/demo.dara | 162 + .../EventTarget/generated/csharp/core/Demo.cs | 474 + .../csharp/core/Properties/AssemblyInfo.cs | 33 + .../generated/csharp/core/sdkDemo.csproj | 44 + .../EventTarget/generated/go/client/client.go | 250 + sdk/demo/EventTarget/generated/go/go.mod | 9 + sdk/demo/EventTarget/generated/go/main.go | 11 + sdk/demo/EventTarget/generated/java/pom.xml | 122 + .../rocketmq/eventbridge/demo/Demo.java | 186 + sdk/demo/EventTarget/generated/php/.gitignore | 15 + .../EventTarget/generated/php/.php_cs.dist | 65 + .../EventTarget/generated/php/autoload.php | 15 + .../EventTarget/generated/php/composer.json | 34 + sdk/demo/EventTarget/generated/php/main.php | 8 + .../EventTarget/generated/php/src/Demo.php | 201 + .../EventTarget/generated/python/.gitignore | 5 + .../rocketmq_eventbridge_demo/__init__.py | 1 + .../python/rocketmq_eventbridge_demo/demo.py | 279 + .../EventTarget/generated/python/setup.py | 79 + .../EventTarget/generated/ts/package.json | 31 + .../EventTarget/generated/ts/src/client.ts | 160 + sdk/demo/EventTarget/generated/ts/src/main.ts | 4 + .../EventTarget/generated/ts/tsconfig.json | 13 + sdk/demo/EventType/Darafile | 66 + sdk/demo/EventType/demo.dara | 40 + .../EventType/generated/csharp/core/Demo.cs | 114 + .../csharp/core/Properties/AssemblyInfo.cs | 33 + .../generated/csharp/core/sdkDemo.csproj | 44 + .../EventType/generated/go/client/client.go | 78 + sdk/demo/EventType/generated/go/go.mod | 9 + sdk/demo/EventType/generated/go/main.go | 11 + sdk/demo/EventType/generated/java/pom.xml | 122 + .../rocketmq/eventbridge/demo/Demo.java | 53 + sdk/demo/EventType/generated/php/.gitignore | 15 + sdk/demo/EventType/generated/php/.php_cs.dist | 65 + sdk/demo/EventType/generated/php/autoload.php | 15 + .../EventType/generated/php/composer.json | 34 + sdk/demo/EventType/generated/php/main.php | 8 + sdk/demo/EventType/generated/php/src/Demo.php | 55 + .../EventType/generated/python/.gitignore | 5 + .../rocketmq_eventbridge_demo/__init__.py | 1 + .../python/rocketmq_eventbridge_demo/demo.py | 61 + sdk/demo/EventType/generated/python/setup.py | 79 + sdk/demo/EventType/generated/ts/package.json | 31 + sdk/demo/EventType/generated/ts/src/client.ts | 45 + sdk/demo/EventType/generated/ts/src/main.ts | 4 + sdk/demo/EventType/generated/ts/tsconfig.json | 13 + sdk/doc/csharp.md | 222 + sdk/doc/go.md | 84 + sdk/doc/java.md | 132 + sdk/doc/php.md | 142 + sdk/doc/python.md | 81 + sdk/doc/ts.md | 99 + .../Models/CreateApiDestinationRequest.cs | 133 + .../Models/CreateApiDestinationResponse.cs | 26 + .../CreateApiDestinationResponseBody.cs | 54 + .../core/Models/CreateConnectionRequest.cs | 387 + .../core/Models/CreateConnectionResponse.cs | 26 + .../Models/CreateConnectionResponseBody.cs | 54 + .../core/Models/CreateEventBusRequest.cs | 42 + .../core/Models/CreateEventBusResponse.cs | 26 + .../core/Models/CreateEventBusResponseBody.cs | 64 + .../core/Models/CreateEventRuleRequest.cs | 63 + .../core/Models/CreateEventRuleResponse.cs | 26 + .../Models/CreateEventRuleResponseBody.cs | 58 + .../core/Models/CreateEventSourceRequest.cs | 60 + .../core/Models/CreateEventSourceResponse.cs | 26 + .../Models/CreateEventSourceResponseBody.cs | 58 + .../core/Models/CreateEventTargetsRequest.cs | 40 + .../core/Models/CreateEventTargetsResponse.cs | 26 + .../Models/CreateEventTargetsResponseBody.cs | 48 + .../Models/DeleteApiDestinationRequest.cs | 24 + .../Models/DeleteApiDestinationResponse.cs | 26 + .../DeleteApiDestinationResponseBody.cs | 44 + .../core/Models/DeleteConnectionRequest.cs | 24 + .../core/Models/DeleteConnectionResponse.cs | 26 + .../Models/DeleteConnectionResponseBody.cs | 44 + .../core/Models/DeleteEventBusRequest.cs | 24 + .../core/Models/DeleteEventBusResponse.cs | 26 + .../core/Models/DeleteEventBusResponseBody.cs | 44 + .../core/Models/DeleteEventRuleRequest.cs | 36 + .../core/Models/DeleteEventRuleResponse.cs | 26 + .../Models/DeleteEventRuleResponseBody.cs | 48 + .../core/Models/DeleteEventSourceRequest.cs | 29 + .../core/Models/DeleteEventSourceResponse.cs | 26 + .../Models/DeleteEventSourceResponseBody.cs | 44 + .../core/Models/DeleteEventTargetsRequest.cs | 41 + .../core/Models/DeleteEventTargetsResponse.cs | 26 + .../Models/DeleteEventTargetsResponseBody.cs | 48 + .../core/Models/DisableEventRuleRequest.cs | 36 + .../core/Models/DisableEventRuleResponse.cs | 26 + .../Models/DisableEventRuleResponseBody.cs | 48 + .../core/Models/EnableEventRuleRequest.cs | 36 + .../core/Models/EnableEventRuleResponse.cs | 26 + .../Models/EnableEventRuleResponseBody.cs | 48 + .../csharp/core/Models/EventTarget.cs | 76 + .../core/Models/GetApiDestinationRequest.cs | 24 + .../core/Models/GetApiDestinationResponse.cs | 26 + .../Models/GetApiDestinationResponseBody.cs | 166 + .../core/Models/GetConnectionRequest.cs | 24 + .../core/Models/GetConnectionResponse.cs | 26 + .../core/Models/GetConnectionResponseBody.cs | 414 + .../csharp/core/Models/GetEventBusRequest.cs | 24 + .../csharp/core/Models/GetEventBusResponse.cs | 26 + .../core/Models/GetEventBusResponseBody.cs | 74 + .../csharp/core/Models/GetEventRuleRequest.cs | 36 + .../core/Models/GetEventRuleResponse.cs | 26 + .../core/Models/GetEventRuleResponseBody.cs | 164 + .../core/Models/GetEventSourceRequest.cs | 29 + .../core/Models/GetEventSourceResponse.cs | 26 + .../core/Models/GetEventSourceResponseBody.cs | 51 + .../core/Models/ListApiDestinationsRequest.cs | 58 + .../Models/ListApiDestinationsResponse.cs | 26 + .../Models/ListApiDestinationsResponseBody.cs | 205 + .../core/Models/ListConnectionsRequest.cs | 48 + .../core/Models/ListConnectionsResponse.cs | 26 + .../Models/ListConnectionsResponseBody.cs | 444 + .../core/Models/ListEnumsResponseResponse.cs | 26 + .../Models/ListEnumsResponseResponseBody.cs | 61 + .../core/Models/ListEventBusesRequest.cs | 34 + .../core/Models/ListEventBusesResponse.cs | 26 + .../core/Models/ListEventBusesResponseBody.cs | 103 + .../core/Models/ListEventRulesRequest.cs | 38 + .../core/Models/ListEventRulesResponse.cs | 26 + .../core/Models/ListEventRulesResponseBody.cs | 106 + .../core/Models/ListEventSourcesRequest.cs | 49 + .../core/Models/ListEventSourcesResponse.cs | 26 + .../Models/ListEventSourcesResponseBody.cs | 97 + .../core/Models/ListEventTargetsRequest.cs | 36 + .../core/Models/ListEventTargetsResponse.cs | 26 + .../Models/ListEventTargetsResponseBody.cs | 96 + .../core/Models/ListEventTypesRequest.cs | 60 + .../core/Models/ListEventTypesResponse.cs | 26 + .../core/Models/ListEventTypesResponseBody.cs | 126 + .../csharp/core/Models/PutEventsRequest.cs | 40 + .../csharp/core/Models/PutEventsResponse.cs | 26 + .../core/Models/PutEventsResponseBody.cs | 78 + .../Models/UpdateApiDestinationRequest.cs | 124 + .../Models/UpdateApiDestinationResponse.cs | 26 + .../UpdateApiDestinationResponseBody.cs | 44 + .../core/Models/UpdateConnectionRequest.cs | 376 + .../core/Models/UpdateConnectionResponse.cs | 26 + .../Models/UpdateConnectionResponseBody.cs | 44 + .../core/Models/UpdateEventRuleRequest.cs | 53 + .../core/Models/UpdateEventRuleResponse.cs | 26 + .../Models/UpdateEventRuleResponseBody.cs | 48 + .../core/Models/UpdateEventSourceRequest.cs | 55 + .../core/Models/UpdateEventSourceResponse.cs | 26 + .../Models/UpdateEventSourceResponseBody.cs | 48 + .../core/Models/UpdateEventTargetsRequest.cs | 40 + .../core/Models/UpdateEventTargetsResponse.cs | 26 + .../Models/UpdateEventTargetsResponseBody.cs | 48 + .../csharp/core/Properties/AssemblyInfo.cs | 33 + sdk/generated/csharp/core/SDKClient.cs | 5254 +++++++++ sdk/generated/csharp/core/sdk.csproj | 42 + sdk/generated/go/client/client.go | 9915 +++++++++++++++++ sdk/generated/go/go.mod | 6 + sdk/generated/java/pom.xml | 117 + .../rocketmq/eventbridge/sdk/Client.java | 1975 ++++ .../models/CreateApiDestinationRequest.java | 234 + .../models/CreateApiDestinationResponse.java | 45 + .../CreateApiDestinationResponseBody.java | 80 + .../sdk/models/CreateConnectionRequest.java | 683 ++ .../sdk/models/CreateConnectionResponse.java | 45 + .../models/CreateConnectionResponseBody.java | 80 + .../sdk/models/CreateEventBusRequest.java | 54 + .../sdk/models/CreateEventBusResponse.java | 45 + .../models/CreateEventBusResponseBody.java | 97 + .../sdk/models/CreateEventRuleRequest.java | 89 + .../sdk/models/CreateEventRuleResponse.java | 45 + .../models/CreateEventRuleResponseBody.java | 84 + .../sdk/models/CreateEventSourceRequest.java | 93 + .../sdk/models/CreateEventSourceResponse.java | 45 + .../models/CreateEventSourceResponseBody.java | 84 + .../sdk/models/CreateEventTargetsRequest.java | 59 + .../models/CreateEventTargetsResponse.java | 45 + .../CreateEventTargetsResponseBody.java | 67 + .../models/DeleteApiDestinationRequest.java | 29 + .../models/DeleteApiDestinationResponse.java | 45 + .../DeleteApiDestinationResponseBody.java | 63 + .../sdk/models/DeleteConnectionRequest.java | 29 + .../sdk/models/DeleteConnectionResponse.java | 45 + .../models/DeleteConnectionResponseBody.java | 63 + .../sdk/models/DeleteEventBusRequest.java | 29 + .../sdk/models/DeleteEventBusResponse.java | 45 + .../models/DeleteEventBusResponseBody.java | 63 + .../sdk/models/DeleteEventRuleRequest.java | 48 + .../sdk/models/DeleteEventRuleResponse.java | 45 + .../models/DeleteEventRuleResponseBody.java | 67 + .../sdk/models/DeleteEventSourceRequest.java | 41 + .../sdk/models/DeleteEventSourceResponse.java | 45 + .../models/DeleteEventSourceResponseBody.java | 63 + .../sdk/models/DeleteEventTargetsRequest.java | 62 + .../models/DeleteEventTargetsResponse.java | 45 + .../DeleteEventTargetsResponseBody.java | 67 + .../sdk/models/DisableEventRuleRequest.java | 48 + .../sdk/models/DisableEventRuleResponse.java | 45 + .../models/DisableEventRuleResponseBody.java | 67 + .../sdk/models/EnableEventRuleRequest.java | 48 + .../sdk/models/EnableEventRuleResponse.java | 45 + .../models/EnableEventRuleResponseBody.java | 67 + .../eventbridge/sdk/models/EventTarget.java | 176 + .../sdk/models/GetApiDestinationRequest.java | 29 + .../sdk/models/GetApiDestinationResponse.java | 45 + .../models/GetApiDestinationResponseBody.java | 295 + .../sdk/models/GetConnectionRequest.java | 29 + .../sdk/models/GetConnectionResponse.java | 45 + .../sdk/models/GetConnectionResponseBody.java | 758 ++ .../sdk/models/GetEventBusRequest.java | 29 + .../sdk/models/GetEventBusResponse.java | 45 + .../sdk/models/GetEventBusResponseBody.java | 114 + .../sdk/models/GetEventRuleRequest.java | 48 + .../sdk/models/GetEventRuleResponse.java | 45 + .../sdk/models/GetEventRuleResponseBody.java | 347 + .../sdk/models/GetEventSourceRequest.java | 41 + .../sdk/models/GetEventSourceResponse.java | 45 + .../models/GetEventSourceResponseBody.java | 84 + .../models/ListApiDestinationsRequest.java | 84 + .../models/ListApiDestinationsResponse.java | 45 + .../ListApiDestinationsResponseBody.java | 368 + .../sdk/models/ListConnectionsRequest.java | 67 + .../sdk/models/ListConnectionsResponse.java | 45 + .../models/ListConnectionsResponseBody.java | 809 ++ .../sdk/models/ListEnumsResponseResponse.java | 45 + .../models/ListEnumsResponseResponseBody.java | 85 + .../sdk/models/ListEventBusesRequest.java | 46 + .../sdk/models/ListEventBusesResponse.java | 45 + .../models/ListEventBusesResponseBody.java | 170 + .../sdk/models/ListEventRulesRequest.java | 57 + .../sdk/models/ListEventRulesResponse.java | 45 + .../models/ListEventRulesResponseBody.java | 187 + .../sdk/models/ListEventSourcesRequest.java | 75 + .../sdk/models/ListEventSourcesResponse.java | 45 + .../models/ListEventSourcesResponseBody.java | 178 + .../sdk/models/ListEventTargetsRequest.java | 48 + .../sdk/models/ListEventTargetsResponse.java | 45 + .../models/ListEventTargetsResponseBody.java | 223 + .../sdk/models/ListEventTypesRequest.java | 86 + .../sdk/models/ListEventTypesResponse.java | 45 + .../models/ListEventTypesResponseBody.java | 221 + .../sdk/models/PutEventsRequest.java | 52 + .../sdk/models/PutEventsResponse.java | 45 + .../sdk/models/PutEventsResponseBody.java | 138 + .../models/UpdateApiDestinationRequest.java | 225 + .../models/UpdateApiDestinationResponse.java | 45 + .../UpdateApiDestinationResponseBody.java | 63 + .../sdk/models/UpdateConnectionRequest.java | 672 ++ .../sdk/models/UpdateConnectionResponse.java | 45 + .../models/UpdateConnectionResponseBody.java | 63 + .../sdk/models/UpdateEventRuleRequest.java | 79 + .../sdk/models/UpdateEventRuleResponse.java | 45 + .../models/UpdateEventRuleResponseBody.java | 67 + .../sdk/models/UpdateEventSourceRequest.java | 95 + .../sdk/models/UpdateEventSourceResponse.java | 45 + .../models/UpdateEventSourceResponseBody.java | 67 + .../sdk/models/UpdateEventTargetsRequest.java | 59 + .../models/UpdateEventTargetsResponse.java | 45 + .../UpdateEventTargetsResponseBody.java | 67 + sdk/generated/php/.gitignore | 15 + sdk/generated/php/.php_cs.dist | 65 + sdk/generated/php/LICENSE | 201 + sdk/generated/php/autoload.php | 15 + sdk/generated/php/composer.json | 27 + .../Models/CreateApiDestinationRequest.php | 101 + .../httpApiParameters.php | 95 + .../httpApiParameters/apiParameters.php | 85 + .../Models/CreateApiDestinationResponse.php | 62 + .../CreateApiDestinationResponseBody.php | 80 + .../src/Models/CreateConnectionRequest.php | 93 + .../authParameters.php | 99 + .../authParameters/apiKeyAuthParameters.php | 52 + .../authParameters/basicAuthParameters.php | 52 + .../authParameters/oauthParameters.php | 87 + .../oauthParameters/clientParameters.php | 52 + .../oauthParameters/oauthHttpParameters.php | 103 + .../oauthHttpParameters/bodyParameters.php | 66 + .../oauthHttpParameters/headerParameters.php | 66 + .../queryStringParameters.php | 66 + .../networkParameters.php | 86 + .../src/Models/CreateConnectionResponse.php | 62 + .../Models/CreateConnectionResponseBody.php | 80 + .../php/src/Models/CreateEventBusRequest.php | 59 + .../php/src/Models/CreateEventBusResponse.php | 62 + .../src/Models/CreateEventBusResponseBody.php | 94 + .../php/src/Models/CreateEventRuleRequest.php | 92 + .../src/Models/CreateEventRuleResponse.php | 62 + .../Models/CreateEventRuleResponseBody.php | 84 + .../src/Models/CreateEventSourceRequest.php | 99 + .../src/Models/CreateEventSourceResponse.php | 62 + .../Models/CreateEventSourceResponseBody.php | 84 + .../src/Models/CreateEventTargetsRequest.php | 80 + .../src/Models/CreateEventTargetsResponse.php | 62 + .../Models/CreateEventTargetsResponseBody.php | 70 + .../Models/DeleteApiDestinationRequest.php | 38 + .../Models/DeleteApiDestinationResponse.php | 62 + .../DeleteApiDestinationResponseBody.php | 66 + .../src/Models/DeleteConnectionRequest.php | 38 + .../src/Models/DeleteConnectionResponse.php | 62 + .../Models/DeleteConnectionResponseBody.php | 66 + .../php/src/Models/DeleteEventBusRequest.php | 38 + .../php/src/Models/DeleteEventBusResponse.php | 62 + .../src/Models/DeleteEventBusResponseBody.php | 66 + .../php/src/Models/DeleteEventRuleRequest.php | 54 + .../src/Models/DeleteEventRuleResponse.php | 62 + .../Models/DeleteEventRuleResponseBody.php | 70 + .../src/Models/DeleteEventSourceRequest.php | 51 + .../src/Models/DeleteEventSourceResponse.php | 62 + .../Models/DeleteEventSourceResponseBody.php | 66 + .../src/Models/DeleteEventTargetsRequest.php | 70 + .../src/Models/DeleteEventTargetsResponse.php | 62 + .../Models/DeleteEventTargetsResponseBody.php | 70 + .../src/Models/DisableEventRuleRequest.php | 54 + .../src/Models/DisableEventRuleResponse.php | 62 + .../Models/DisableEventRuleResponseBody.php | 70 + .../php/src/Models/EnableEventRuleRequest.php | 54 + .../src/Models/EnableEventRuleResponse.php | 62 + .../Models/EnableEventRuleResponseBody.php | 70 + sdk/generated/php/src/Models/EventTarget.php | 81 + .../php/src/Models/EventTarget/runOptions.php | 63 + .../runOptions/deadLetterQueue.php | 48 + .../EventTarget/runOptions/retryStrategy.php | 60 + .../src/Models/GetApiDestinationRequest.php | 38 + .../src/Models/GetApiDestinationResponse.php | 62 + .../Models/GetApiDestinationResponseBody.php | 150 + .../httpApiParameters.php | 93 + .../httpApiParameters/apiParameters.php | 85 + .../php/src/Models/GetConnectionRequest.php | 38 + .../php/src/Models/GetConnectionResponse.php | 62 + .../src/Models/GetConnectionResponseBody.php | 93 + .../GetConnectionResponseBody/connections.php | 108 + .../connections/authParameters.php | 90 + .../authParameters/apiKeyAuthParameters.php | 52 + .../authParameters/basicAuthParameters.php | 52 + .../authParameters/oauthParameters.php | 87 + .../oauthParameters/clientParameters.php | 52 + .../oauthParameters/oauthHttpParameters.php | 103 + .../oauthHttpParameters/bodyParameters.php | 66 + .../oauthHttpParameters/headerParameters.php | 66 + .../queryStringParameters.php | 66 + .../connections/networkParameters.php | 80 + .../php/src/Models/GetEventBusRequest.php | 38 + .../php/src/Models/GetEventBusResponse.php | 62 + .../src/Models/GetEventBusResponseBody.php | 108 + .../php/src/Models/GetEventRuleRequest.php | 54 + .../php/src/Models/GetEventRuleResponse.php | 62 + .../src/Models/GetEventRuleResponseBody.php | 192 + .../GetEventRuleResponseBody/eventTargets.php | 74 + .../eventTargets/runOptions.php | 63 + .../runOptions/deadLetterQueue.php | 48 + .../eventTargets/runOptions/retryStrategy.php | 60 + .../php/src/Models/GetEventSourceRequest.php | 51 + .../php/src/Models/GetEventSourceResponse.php | 62 + .../src/Models/GetEventSourceResponseBody.php | 91 + .../src/Models/ListApiDestinationsRequest.php | 84 + .../Models/ListApiDestinationsResponse.php | 62 + .../ListApiDestinationsResponseBody.php | 135 + .../apiDestinations.php | 108 + .../apiDestinations/httpApiParameters.php | 93 + .../httpApiParameters/apiParameters.php | 85 + .../php/src/Models/ListConnectionsRequest.php | 70 + .../src/Models/ListConnectionsResponse.php | 62 + .../Models/ListConnectionsResponseBody.php | 135 + .../connections.php | 108 + .../connections/authParameters.php | 90 + .../authParameters/apiKeyAuthParameters.php | 52 + .../authParameters/basicAuthParameters.php | 52 + .../authParameters/oauthParameters.php | 87 + .../oauthParameters/clientParameters.php | 52 + .../oauthParameters/oauthHttpParameters.php | 103 + .../oauthHttpParameters/bodyParameters.php | 66 + .../oauthHttpParameters/headerParameters.php | 66 + .../queryStringParameters.php | 66 + .../connections/networkParameters.php | 80 + .../src/Models/ListEnumsResponseResponse.php | 62 + .../Models/ListEnumsResponseResponseBody.php | 90 + .../php/src/Models/ListEventBusesRequest.php | 52 + .../php/src/Models/ListEventBusesResponse.php | 62 + .../src/Models/ListEventBusesResponseBody.php | 135 + .../ListEventBusesResponseBody/eventBuses.php | 52 + .../php/src/Models/ListEventRulesRequest.php | 64 + .../php/src/Models/ListEventRulesResponse.php | 62 + .../src/Models/ListEventRulesResponseBody.php | 92 + .../ListEventRulesResponseBody/eventRules.php | 120 + .../src/Models/ListEventSourcesRequest.php | 79 + .../src/Models/ListEventSourcesResponse.php | 62 + .../Models/ListEventSourcesResponseBody.php | 92 + .../eventSources.php | 115 + .../src/Models/ListEventTargetsRequest.php | 54 + .../src/Models/ListEventTargetsResponse.php | 62 + .../Models/ListEventTargetsResponseBody.php | 80 + .../eventTargets.php | 74 + .../eventTargets/runOptions.php | 63 + .../runOptions/deadLetterQueue.php | 48 + .../eventTargets/runOptions/retryStrategy.php | 60 + .../php/src/Models/ListEventTypesRequest.php | 85 + .../php/src/Models/ListEventTypesResponse.php | 62 + .../src/Models/ListEventTypesResponseBody.php | 134 + .../ListEventTypesResponseBody/eventTypes.php | 104 + .../php/src/Models/PutEventsRequest.php | 57 + .../php/src/Models/PutEventsResponse.php | 62 + .../php/src/Models/PutEventsResponseBody.php | 104 + .../PutEventsResponseBody/entryList.php | 64 + .../Models/UpdateApiDestinationRequest.php | 93 + .../httpApiParameters.php | 95 + .../httpApiParameters/apiParameters.php | 85 + .../Models/UpdateApiDestinationResponse.php | 62 + .../UpdateApiDestinationResponseBody.php | 66 + .../src/Models/UpdateConnectionRequest.php | 83 + .../authParameters.php | 99 + .../authParameters/apiKeyAuthParameters.php | 52 + .../authParameters/basicAuthParameters.php | 52 + .../authParameters/oauthParameters.php | 87 + .../oauthParameters/clientParameters.php | 52 + .../oauthParameters/oauthHttpParameters.php | 103 + .../oauthHttpParameters/bodyParameters.php | 66 + .../oauthHttpParameters/headerParameters.php | 66 + .../queryStringParameters.php | 66 + .../networkParameters.php | 86 + .../src/Models/UpdateConnectionResponse.php | 62 + .../Models/UpdateConnectionResponseBody.php | 66 + .../php/src/Models/UpdateEventRuleRequest.php | 83 + .../src/Models/UpdateEventRuleResponse.php | 62 + .../Models/UpdateEventRuleResponseBody.php | 70 + .../src/Models/UpdateEventSourceRequest.php | 103 + .../src/Models/UpdateEventSourceResponse.php | 62 + .../Models/UpdateEventSourceResponseBody.php | 70 + .../src/Models/UpdateEventTargetsRequest.php | 80 + .../src/Models/UpdateEventTargetsResponse.php | 62 + .../Models/UpdateEventTargetsResponseBody.php | 70 + sdk/generated/php/src/SDKClient.php | 1828 +++ sdk/generated/python/.gitignore | 5 + .../python/rocketmq_eventbridge/__init__.py | 1 + .../python/rocketmq_eventbridge/client.py | 3799 +++++++ .../python/rocketmq_eventbridge/models.py | 7982 +++++++++++++ sdk/generated/python/setup.py | 77 + sdk/generated/ts/package.json | 30 + sdk/generated/ts/src/client.ts | 9038 +++++++++++++++ sdk/generated/ts/tsconfig.json | 13 + sdk/main.dara | 2930 +++++ 590 files changed, 87382 insertions(+) create mode 100644 sdk/Darafile create mode 100644 sdk/Readme.md create mode 100644 sdk/demo/ApiDestination/Darafile create mode 100644 sdk/demo/ApiDestination/demo.dara create mode 100644 sdk/demo/ApiDestination/generated/csharp/core/Demo.cs create mode 100644 sdk/demo/ApiDestination/generated/csharp/core/Properties/AssemblyInfo.cs create mode 100644 sdk/demo/ApiDestination/generated/csharp/core/sdkDemo.csproj create mode 100644 sdk/demo/ApiDestination/generated/go/client/client.go create mode 100644 sdk/demo/ApiDestination/generated/go/go.mod create mode 100644 sdk/demo/ApiDestination/generated/go/main.go create mode 100644 sdk/demo/ApiDestination/generated/java/pom.xml create mode 100644 sdk/demo/ApiDestination/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java create mode 100644 sdk/demo/ApiDestination/generated/php/.gitignore create mode 100644 sdk/demo/ApiDestination/generated/php/.php_cs.dist create mode 100644 sdk/demo/ApiDestination/generated/php/autoload.php create mode 100644 sdk/demo/ApiDestination/generated/php/composer.json create mode 100644 sdk/demo/ApiDestination/generated/php/main.php create mode 100644 sdk/demo/ApiDestination/generated/php/src/Demo.php create mode 100644 sdk/demo/ApiDestination/generated/python/.gitignore create mode 100644 sdk/demo/ApiDestination/generated/python/rocketmq_eventbridge_demo/__init__.py create mode 100644 sdk/demo/ApiDestination/generated/python/rocketmq_eventbridge_demo/demo.py create mode 100644 sdk/demo/ApiDestination/generated/python/setup.py create mode 100644 sdk/demo/ApiDestination/generated/ts/package.json create mode 100644 sdk/demo/ApiDestination/generated/ts/src/client.ts create mode 100644 sdk/demo/ApiDestination/generated/ts/src/main.ts create mode 100644 sdk/demo/ApiDestination/generated/ts/tsconfig.json create mode 100644 sdk/demo/Connection/Darafile create mode 100644 sdk/demo/Connection/demo.dara create mode 100644 sdk/demo/Connection/generated/csharp/core/Demo.cs create mode 100644 sdk/demo/Connection/generated/csharp/core/Properties/AssemblyInfo.cs create mode 100644 sdk/demo/Connection/generated/csharp/core/sdkDemo.csproj create mode 100644 sdk/demo/Connection/generated/go/client/client.go create mode 100644 sdk/demo/Connection/generated/go/go.mod create mode 100644 sdk/demo/Connection/generated/go/main.go create mode 100644 sdk/demo/Connection/generated/java/pom.xml create mode 100644 sdk/demo/Connection/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java create mode 100644 sdk/demo/Connection/generated/php/.gitignore create mode 100644 sdk/demo/Connection/generated/php/.php_cs.dist create mode 100644 sdk/demo/Connection/generated/php/autoload.php create mode 100644 sdk/demo/Connection/generated/php/composer.json create mode 100644 sdk/demo/Connection/generated/php/main.php create mode 100644 sdk/demo/Connection/generated/php/src/Demo.php create mode 100644 sdk/demo/Connection/generated/python/.gitignore create mode 100644 sdk/demo/Connection/generated/python/rocketmq_eventbridge_demo/__init__.py create mode 100644 sdk/demo/Connection/generated/python/rocketmq_eventbridge_demo/demo.py create mode 100644 sdk/demo/Connection/generated/python/setup.py create mode 100644 sdk/demo/Connection/generated/ts/package.json create mode 100644 sdk/demo/Connection/generated/ts/src/client.ts create mode 100644 sdk/demo/Connection/generated/ts/src/main.ts create mode 100644 sdk/demo/Connection/generated/ts/tsconfig.json create mode 100644 sdk/demo/EventBus/Darafile create mode 100644 sdk/demo/EventBus/demo.dara create mode 100644 sdk/demo/EventBus/generated/csharp/core/Demo.cs create mode 100644 sdk/demo/EventBus/generated/csharp/core/Properties/AssemblyInfo.cs create mode 100644 sdk/demo/EventBus/generated/csharp/core/sdkDemo.csproj create mode 100644 sdk/demo/EventBus/generated/go/client/client.go create mode 100644 sdk/demo/EventBus/generated/go/go.mod create mode 100644 sdk/demo/EventBus/generated/go/main.go create mode 100644 sdk/demo/EventBus/generated/java/pom.xml create mode 100644 sdk/demo/EventBus/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java create mode 100644 sdk/demo/EventBus/generated/php/.gitignore create mode 100644 sdk/demo/EventBus/generated/php/.php_cs.dist create mode 100644 sdk/demo/EventBus/generated/php/autoload.php create mode 100644 sdk/demo/EventBus/generated/php/composer.json create mode 100644 sdk/demo/EventBus/generated/php/main.php create mode 100644 sdk/demo/EventBus/generated/php/src/Demo.php create mode 100644 sdk/demo/EventBus/generated/python/.gitignore create mode 100644 sdk/demo/EventBus/generated/python/rocketmq_eventbridge_demo/__init__.py create mode 100644 sdk/demo/EventBus/generated/python/rocketmq_eventbridge_demo/demo.py create mode 100644 sdk/demo/EventBus/generated/python/setup.py create mode 100644 sdk/demo/EventBus/generated/ts/package.json create mode 100644 sdk/demo/EventBus/generated/ts/src/client.ts create mode 100644 sdk/demo/EventBus/generated/ts/src/main.ts create mode 100644 sdk/demo/EventBus/generated/ts/tsconfig.json create mode 100644 sdk/demo/EventData/Darafile create mode 100644 sdk/demo/EventData/demo.dara create mode 100644 sdk/demo/EventData/generated/csharp/core/Demo.cs create mode 100644 sdk/demo/EventData/generated/csharp/core/Properties/AssemblyInfo.cs create mode 100644 sdk/demo/EventData/generated/csharp/core/sdkDemo.csproj create mode 100644 sdk/demo/EventData/generated/go/client/client.go create mode 100644 sdk/demo/EventData/generated/go/go.mod create mode 100644 sdk/demo/EventData/generated/go/main.go create mode 100644 sdk/demo/EventData/generated/java/pom.xml create mode 100644 sdk/demo/EventData/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java create mode 100644 sdk/demo/EventData/generated/php/.gitignore create mode 100644 sdk/demo/EventData/generated/php/.php_cs.dist create mode 100644 sdk/demo/EventData/generated/php/autoload.php create mode 100644 sdk/demo/EventData/generated/php/composer.json create mode 100644 sdk/demo/EventData/generated/php/main.php create mode 100644 sdk/demo/EventData/generated/php/src/Demo.php create mode 100644 sdk/demo/EventData/generated/python/.gitignore create mode 100644 sdk/demo/EventData/generated/python/rocketmq_eventbridge_demo/__init__.py create mode 100644 sdk/demo/EventData/generated/python/rocketmq_eventbridge_demo/demo.py create mode 100644 sdk/demo/EventData/generated/python/setup.py create mode 100644 sdk/demo/EventData/generated/ts/package.json create mode 100644 sdk/demo/EventData/generated/ts/src/client.ts create mode 100644 sdk/demo/EventData/generated/ts/src/main.ts create mode 100644 sdk/demo/EventData/generated/ts/tsconfig.json create mode 100644 sdk/demo/EventRule/Darafile create mode 100644 sdk/demo/EventRule/demo.dara create mode 100644 sdk/demo/EventRule/generated/csharp/core/Demo.cs create mode 100644 sdk/demo/EventRule/generated/csharp/core/Properties/AssemblyInfo.cs create mode 100644 sdk/demo/EventRule/generated/csharp/core/sdkDemo.csproj create mode 100644 sdk/demo/EventRule/generated/go/client/client.go create mode 100644 sdk/demo/EventRule/generated/go/go.mod create mode 100644 sdk/demo/EventRule/generated/go/main.go create mode 100644 sdk/demo/EventRule/generated/java/pom.xml create mode 100644 sdk/demo/EventRule/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java create mode 100644 sdk/demo/EventRule/generated/php/.gitignore create mode 100644 sdk/demo/EventRule/generated/php/.php_cs.dist create mode 100644 sdk/demo/EventRule/generated/php/autoload.php create mode 100644 sdk/demo/EventRule/generated/php/composer.json create mode 100644 sdk/demo/EventRule/generated/php/main.php create mode 100644 sdk/demo/EventRule/generated/php/src/Demo.php create mode 100644 sdk/demo/EventRule/generated/python/.gitignore create mode 100644 sdk/demo/EventRule/generated/python/rocketmq_eventbridge_demo/__init__.py create mode 100644 sdk/demo/EventRule/generated/python/rocketmq_eventbridge_demo/demo.py create mode 100644 sdk/demo/EventRule/generated/python/setup.py create mode 100644 sdk/demo/EventRule/generated/ts/package.json create mode 100644 sdk/demo/EventRule/generated/ts/src/client.ts create mode 100644 sdk/demo/EventRule/generated/ts/src/main.ts create mode 100644 sdk/demo/EventRule/generated/ts/tsconfig.json create mode 100644 sdk/demo/EventSource/Darafile create mode 100644 sdk/demo/EventSource/demo.dara create mode 100644 sdk/demo/EventSource/generated/csharp/core/Demo.cs create mode 100644 sdk/demo/EventSource/generated/csharp/core/Properties/AssemblyInfo.cs create mode 100644 sdk/demo/EventSource/generated/csharp/core/sdkDemo.csproj create mode 100644 sdk/demo/EventSource/generated/go/client/client.go create mode 100644 sdk/demo/EventSource/generated/go/go.mod create mode 100644 sdk/demo/EventSource/generated/go/main.go create mode 100644 sdk/demo/EventSource/generated/java/pom.xml create mode 100644 sdk/demo/EventSource/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java create mode 100644 sdk/demo/EventSource/generated/php/.gitignore create mode 100644 sdk/demo/EventSource/generated/php/.php_cs.dist create mode 100644 sdk/demo/EventSource/generated/php/autoload.php create mode 100644 sdk/demo/EventSource/generated/php/composer.json create mode 100644 sdk/demo/EventSource/generated/php/main.php create mode 100644 sdk/demo/EventSource/generated/php/src/Demo.php create mode 100644 sdk/demo/EventSource/generated/python/.gitignore create mode 100644 sdk/demo/EventSource/generated/python/rocketmq_eventbridge_demo/__init__.py create mode 100644 sdk/demo/EventSource/generated/python/rocketmq_eventbridge_demo/demo.py create mode 100644 sdk/demo/EventSource/generated/python/setup.py create mode 100644 sdk/demo/EventSource/generated/ts/package.json create mode 100644 sdk/demo/EventSource/generated/ts/src/client.ts create mode 100644 sdk/demo/EventSource/generated/ts/src/main.ts create mode 100644 sdk/demo/EventSource/generated/ts/tsconfig.json create mode 100644 sdk/demo/EventTarget/Darafile create mode 100644 sdk/demo/EventTarget/demo.dara create mode 100644 sdk/demo/EventTarget/generated/csharp/core/Demo.cs create mode 100644 sdk/demo/EventTarget/generated/csharp/core/Properties/AssemblyInfo.cs create mode 100644 sdk/demo/EventTarget/generated/csharp/core/sdkDemo.csproj create mode 100644 sdk/demo/EventTarget/generated/go/client/client.go create mode 100644 sdk/demo/EventTarget/generated/go/go.mod create mode 100644 sdk/demo/EventTarget/generated/go/main.go create mode 100644 sdk/demo/EventTarget/generated/java/pom.xml create mode 100644 sdk/demo/EventTarget/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java create mode 100644 sdk/demo/EventTarget/generated/php/.gitignore create mode 100644 sdk/demo/EventTarget/generated/php/.php_cs.dist create mode 100644 sdk/demo/EventTarget/generated/php/autoload.php create mode 100644 sdk/demo/EventTarget/generated/php/composer.json create mode 100644 sdk/demo/EventTarget/generated/php/main.php create mode 100644 sdk/demo/EventTarget/generated/php/src/Demo.php create mode 100644 sdk/demo/EventTarget/generated/python/.gitignore create mode 100644 sdk/demo/EventTarget/generated/python/rocketmq_eventbridge_demo/__init__.py create mode 100644 sdk/demo/EventTarget/generated/python/rocketmq_eventbridge_demo/demo.py create mode 100644 sdk/demo/EventTarget/generated/python/setup.py create mode 100644 sdk/demo/EventTarget/generated/ts/package.json create mode 100644 sdk/demo/EventTarget/generated/ts/src/client.ts create mode 100644 sdk/demo/EventTarget/generated/ts/src/main.ts create mode 100644 sdk/demo/EventTarget/generated/ts/tsconfig.json create mode 100644 sdk/demo/EventType/Darafile create mode 100644 sdk/demo/EventType/demo.dara create mode 100644 sdk/demo/EventType/generated/csharp/core/Demo.cs create mode 100644 sdk/demo/EventType/generated/csharp/core/Properties/AssemblyInfo.cs create mode 100644 sdk/demo/EventType/generated/csharp/core/sdkDemo.csproj create mode 100644 sdk/demo/EventType/generated/go/client/client.go create mode 100644 sdk/demo/EventType/generated/go/go.mod create mode 100644 sdk/demo/EventType/generated/go/main.go create mode 100644 sdk/demo/EventType/generated/java/pom.xml create mode 100644 sdk/demo/EventType/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java create mode 100644 sdk/demo/EventType/generated/php/.gitignore create mode 100644 sdk/demo/EventType/generated/php/.php_cs.dist create mode 100644 sdk/demo/EventType/generated/php/autoload.php create mode 100644 sdk/demo/EventType/generated/php/composer.json create mode 100644 sdk/demo/EventType/generated/php/main.php create mode 100644 sdk/demo/EventType/generated/php/src/Demo.php create mode 100644 sdk/demo/EventType/generated/python/.gitignore create mode 100644 sdk/demo/EventType/generated/python/rocketmq_eventbridge_demo/__init__.py create mode 100644 sdk/demo/EventType/generated/python/rocketmq_eventbridge_demo/demo.py create mode 100644 sdk/demo/EventType/generated/python/setup.py create mode 100644 sdk/demo/EventType/generated/ts/package.json create mode 100644 sdk/demo/EventType/generated/ts/src/client.ts create mode 100644 sdk/demo/EventType/generated/ts/src/main.ts create mode 100644 sdk/demo/EventType/generated/ts/tsconfig.json create mode 100644 sdk/doc/csharp.md create mode 100644 sdk/doc/go.md create mode 100644 sdk/doc/java.md create mode 100644 sdk/doc/php.md create mode 100644 sdk/doc/python.md create mode 100644 sdk/doc/ts.md create mode 100644 sdk/generated/csharp/core/Models/CreateApiDestinationRequest.cs create mode 100644 sdk/generated/csharp/core/Models/CreateApiDestinationResponse.cs create mode 100644 sdk/generated/csharp/core/Models/CreateApiDestinationResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/CreateConnectionRequest.cs create mode 100644 sdk/generated/csharp/core/Models/CreateConnectionResponse.cs create mode 100644 sdk/generated/csharp/core/Models/CreateConnectionResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/CreateEventBusRequest.cs create mode 100644 sdk/generated/csharp/core/Models/CreateEventBusResponse.cs create mode 100644 sdk/generated/csharp/core/Models/CreateEventBusResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/CreateEventRuleRequest.cs create mode 100644 sdk/generated/csharp/core/Models/CreateEventRuleResponse.cs create mode 100644 sdk/generated/csharp/core/Models/CreateEventRuleResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/CreateEventSourceRequest.cs create mode 100644 sdk/generated/csharp/core/Models/CreateEventSourceResponse.cs create mode 100644 sdk/generated/csharp/core/Models/CreateEventSourceResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/CreateEventTargetsRequest.cs create mode 100644 sdk/generated/csharp/core/Models/CreateEventTargetsResponse.cs create mode 100644 sdk/generated/csharp/core/Models/CreateEventTargetsResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteApiDestinationRequest.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteApiDestinationResponse.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteApiDestinationResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteConnectionRequest.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteConnectionResponse.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteConnectionResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteEventBusRequest.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteEventBusResponse.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteEventBusResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteEventRuleRequest.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteEventRuleResponse.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteEventRuleResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteEventSourceRequest.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteEventSourceResponse.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteEventSourceResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteEventTargetsRequest.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteEventTargetsResponse.cs create mode 100644 sdk/generated/csharp/core/Models/DeleteEventTargetsResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/DisableEventRuleRequest.cs create mode 100644 sdk/generated/csharp/core/Models/DisableEventRuleResponse.cs create mode 100644 sdk/generated/csharp/core/Models/DisableEventRuleResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/EnableEventRuleRequest.cs create mode 100644 sdk/generated/csharp/core/Models/EnableEventRuleResponse.cs create mode 100644 sdk/generated/csharp/core/Models/EnableEventRuleResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/EventTarget.cs create mode 100644 sdk/generated/csharp/core/Models/GetApiDestinationRequest.cs create mode 100644 sdk/generated/csharp/core/Models/GetApiDestinationResponse.cs create mode 100644 sdk/generated/csharp/core/Models/GetApiDestinationResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/GetConnectionRequest.cs create mode 100644 sdk/generated/csharp/core/Models/GetConnectionResponse.cs create mode 100644 sdk/generated/csharp/core/Models/GetConnectionResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/GetEventBusRequest.cs create mode 100644 sdk/generated/csharp/core/Models/GetEventBusResponse.cs create mode 100644 sdk/generated/csharp/core/Models/GetEventBusResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/GetEventRuleRequest.cs create mode 100644 sdk/generated/csharp/core/Models/GetEventRuleResponse.cs create mode 100644 sdk/generated/csharp/core/Models/GetEventRuleResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/GetEventSourceRequest.cs create mode 100644 sdk/generated/csharp/core/Models/GetEventSourceResponse.cs create mode 100644 sdk/generated/csharp/core/Models/GetEventSourceResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/ListApiDestinationsRequest.cs create mode 100644 sdk/generated/csharp/core/Models/ListApiDestinationsResponse.cs create mode 100644 sdk/generated/csharp/core/Models/ListApiDestinationsResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/ListConnectionsRequest.cs create mode 100644 sdk/generated/csharp/core/Models/ListConnectionsResponse.cs create mode 100644 sdk/generated/csharp/core/Models/ListConnectionsResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/ListEnumsResponseResponse.cs create mode 100644 sdk/generated/csharp/core/Models/ListEnumsResponseResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/ListEventBusesRequest.cs create mode 100644 sdk/generated/csharp/core/Models/ListEventBusesResponse.cs create mode 100644 sdk/generated/csharp/core/Models/ListEventBusesResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/ListEventRulesRequest.cs create mode 100644 sdk/generated/csharp/core/Models/ListEventRulesResponse.cs create mode 100644 sdk/generated/csharp/core/Models/ListEventRulesResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/ListEventSourcesRequest.cs create mode 100644 sdk/generated/csharp/core/Models/ListEventSourcesResponse.cs create mode 100644 sdk/generated/csharp/core/Models/ListEventSourcesResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/ListEventTargetsRequest.cs create mode 100644 sdk/generated/csharp/core/Models/ListEventTargetsResponse.cs create mode 100644 sdk/generated/csharp/core/Models/ListEventTargetsResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/ListEventTypesRequest.cs create mode 100644 sdk/generated/csharp/core/Models/ListEventTypesResponse.cs create mode 100644 sdk/generated/csharp/core/Models/ListEventTypesResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/PutEventsRequest.cs create mode 100644 sdk/generated/csharp/core/Models/PutEventsResponse.cs create mode 100644 sdk/generated/csharp/core/Models/PutEventsResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/UpdateApiDestinationRequest.cs create mode 100644 sdk/generated/csharp/core/Models/UpdateApiDestinationResponse.cs create mode 100644 sdk/generated/csharp/core/Models/UpdateApiDestinationResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/UpdateConnectionRequest.cs create mode 100644 sdk/generated/csharp/core/Models/UpdateConnectionResponse.cs create mode 100644 sdk/generated/csharp/core/Models/UpdateConnectionResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/UpdateEventRuleRequest.cs create mode 100644 sdk/generated/csharp/core/Models/UpdateEventRuleResponse.cs create mode 100644 sdk/generated/csharp/core/Models/UpdateEventRuleResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/UpdateEventSourceRequest.cs create mode 100644 sdk/generated/csharp/core/Models/UpdateEventSourceResponse.cs create mode 100644 sdk/generated/csharp/core/Models/UpdateEventSourceResponseBody.cs create mode 100644 sdk/generated/csharp/core/Models/UpdateEventTargetsRequest.cs create mode 100644 sdk/generated/csharp/core/Models/UpdateEventTargetsResponse.cs create mode 100644 sdk/generated/csharp/core/Models/UpdateEventTargetsResponseBody.cs create mode 100644 sdk/generated/csharp/core/Properties/AssemblyInfo.cs create mode 100644 sdk/generated/csharp/core/SDKClient.cs create mode 100644 sdk/generated/csharp/core/sdk.csproj create mode 100644 sdk/generated/go/client/client.go create mode 100644 sdk/generated/go/go.mod create mode 100644 sdk/generated/java/pom.xml create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/Client.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateApiDestinationRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateApiDestinationResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateApiDestinationResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateConnectionRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateConnectionResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateConnectionResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventBusRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventBusResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventBusResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventRuleRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventRuleResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventRuleResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventSourceRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventSourceResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventSourceResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventTargetsRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventTargetsResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventTargetsResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteApiDestinationRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteApiDestinationResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteApiDestinationResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteConnectionRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteConnectionResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteConnectionResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventBusRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventBusResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventBusResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventRuleRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventRuleResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventRuleResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventSourceRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventSourceResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventSourceResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventTargetsRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventTargetsResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventTargetsResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DisableEventRuleRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DisableEventRuleResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DisableEventRuleResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/EnableEventRuleRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/EnableEventRuleResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/EnableEventRuleResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/EventTarget.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetApiDestinationRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetApiDestinationResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetApiDestinationResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetConnectionRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetConnectionResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetConnectionResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventBusRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventBusResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventBusResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventRuleRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventRuleResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventRuleResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventSourceRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventSourceResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventSourceResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListApiDestinationsRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListApiDestinationsResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListApiDestinationsResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListConnectionsRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListConnectionsResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListConnectionsResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEnumsResponseResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEnumsResponseResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventBusesRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventBusesResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventBusesResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventRulesRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventRulesResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventRulesResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventSourcesRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventSourcesResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventSourcesResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTargetsRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTargetsResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTargetsResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTypesRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTypesResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTypesResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/PutEventsRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/PutEventsResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/PutEventsResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateApiDestinationRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateApiDestinationResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateApiDestinationResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateConnectionRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateConnectionResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateConnectionResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventRuleRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventRuleResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventRuleResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventSourceRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventSourceResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventSourceResponseBody.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventTargetsRequest.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventTargetsResponse.java create mode 100644 sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventTargetsResponseBody.java create mode 100644 sdk/generated/php/.gitignore create mode 100644 sdk/generated/php/.php_cs.dist create mode 100644 sdk/generated/php/LICENSE create mode 100644 sdk/generated/php/autoload.php create mode 100644 sdk/generated/php/composer.json create mode 100644 sdk/generated/php/src/Models/CreateApiDestinationRequest.php create mode 100644 sdk/generated/php/src/Models/CreateApiDestinationRequest/httpApiParameters.php create mode 100644 sdk/generated/php/src/Models/CreateApiDestinationRequest/httpApiParameters/apiParameters.php create mode 100644 sdk/generated/php/src/Models/CreateApiDestinationResponse.php create mode 100644 sdk/generated/php/src/Models/CreateApiDestinationResponseBody.php create mode 100644 sdk/generated/php/src/Models/CreateConnectionRequest.php create mode 100644 sdk/generated/php/src/Models/CreateConnectionRequest/authParameters.php create mode 100644 sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/apiKeyAuthParameters.php create mode 100644 sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/basicAuthParameters.php create mode 100644 sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters.php create mode 100644 sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/clientParameters.php create mode 100644 sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters.php create mode 100644 sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/bodyParameters.php create mode 100644 sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/headerParameters.php create mode 100644 sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/queryStringParameters.php create mode 100644 sdk/generated/php/src/Models/CreateConnectionRequest/networkParameters.php create mode 100644 sdk/generated/php/src/Models/CreateConnectionResponse.php create mode 100644 sdk/generated/php/src/Models/CreateConnectionResponseBody.php create mode 100644 sdk/generated/php/src/Models/CreateEventBusRequest.php create mode 100644 sdk/generated/php/src/Models/CreateEventBusResponse.php create mode 100644 sdk/generated/php/src/Models/CreateEventBusResponseBody.php create mode 100644 sdk/generated/php/src/Models/CreateEventRuleRequest.php create mode 100644 sdk/generated/php/src/Models/CreateEventRuleResponse.php create mode 100644 sdk/generated/php/src/Models/CreateEventRuleResponseBody.php create mode 100644 sdk/generated/php/src/Models/CreateEventSourceRequest.php create mode 100644 sdk/generated/php/src/Models/CreateEventSourceResponse.php create mode 100644 sdk/generated/php/src/Models/CreateEventSourceResponseBody.php create mode 100644 sdk/generated/php/src/Models/CreateEventTargetsRequest.php create mode 100644 sdk/generated/php/src/Models/CreateEventTargetsResponse.php create mode 100644 sdk/generated/php/src/Models/CreateEventTargetsResponseBody.php create mode 100644 sdk/generated/php/src/Models/DeleteApiDestinationRequest.php create mode 100644 sdk/generated/php/src/Models/DeleteApiDestinationResponse.php create mode 100644 sdk/generated/php/src/Models/DeleteApiDestinationResponseBody.php create mode 100644 sdk/generated/php/src/Models/DeleteConnectionRequest.php create mode 100644 sdk/generated/php/src/Models/DeleteConnectionResponse.php create mode 100644 sdk/generated/php/src/Models/DeleteConnectionResponseBody.php create mode 100644 sdk/generated/php/src/Models/DeleteEventBusRequest.php create mode 100644 sdk/generated/php/src/Models/DeleteEventBusResponse.php create mode 100644 sdk/generated/php/src/Models/DeleteEventBusResponseBody.php create mode 100644 sdk/generated/php/src/Models/DeleteEventRuleRequest.php create mode 100644 sdk/generated/php/src/Models/DeleteEventRuleResponse.php create mode 100644 sdk/generated/php/src/Models/DeleteEventRuleResponseBody.php create mode 100644 sdk/generated/php/src/Models/DeleteEventSourceRequest.php create mode 100644 sdk/generated/php/src/Models/DeleteEventSourceResponse.php create mode 100644 sdk/generated/php/src/Models/DeleteEventSourceResponseBody.php create mode 100644 sdk/generated/php/src/Models/DeleteEventTargetsRequest.php create mode 100644 sdk/generated/php/src/Models/DeleteEventTargetsResponse.php create mode 100644 sdk/generated/php/src/Models/DeleteEventTargetsResponseBody.php create mode 100644 sdk/generated/php/src/Models/DisableEventRuleRequest.php create mode 100644 sdk/generated/php/src/Models/DisableEventRuleResponse.php create mode 100644 sdk/generated/php/src/Models/DisableEventRuleResponseBody.php create mode 100644 sdk/generated/php/src/Models/EnableEventRuleRequest.php create mode 100644 sdk/generated/php/src/Models/EnableEventRuleResponse.php create mode 100644 sdk/generated/php/src/Models/EnableEventRuleResponseBody.php create mode 100644 sdk/generated/php/src/Models/EventTarget.php create mode 100644 sdk/generated/php/src/Models/EventTarget/runOptions.php create mode 100644 sdk/generated/php/src/Models/EventTarget/runOptions/deadLetterQueue.php create mode 100644 sdk/generated/php/src/Models/EventTarget/runOptions/retryStrategy.php create mode 100644 sdk/generated/php/src/Models/GetApiDestinationRequest.php create mode 100644 sdk/generated/php/src/Models/GetApiDestinationResponse.php create mode 100644 sdk/generated/php/src/Models/GetApiDestinationResponseBody.php create mode 100644 sdk/generated/php/src/Models/GetApiDestinationResponseBody/httpApiParameters.php create mode 100644 sdk/generated/php/src/Models/GetApiDestinationResponseBody/httpApiParameters/apiParameters.php create mode 100644 sdk/generated/php/src/Models/GetConnectionRequest.php create mode 100644 sdk/generated/php/src/Models/GetConnectionResponse.php create mode 100644 sdk/generated/php/src/Models/GetConnectionResponseBody.php create mode 100644 sdk/generated/php/src/Models/GetConnectionResponseBody/connections.php create mode 100644 sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters.php create mode 100644 sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/apiKeyAuthParameters.php create mode 100644 sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/basicAuthParameters.php create mode 100644 sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters.php create mode 100644 sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/clientParameters.php create mode 100644 sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters.php create mode 100644 sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/bodyParameters.php create mode 100644 sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/headerParameters.php create mode 100644 sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/queryStringParameters.php create mode 100644 sdk/generated/php/src/Models/GetConnectionResponseBody/connections/networkParameters.php create mode 100644 sdk/generated/php/src/Models/GetEventBusRequest.php create mode 100644 sdk/generated/php/src/Models/GetEventBusResponse.php create mode 100644 sdk/generated/php/src/Models/GetEventBusResponseBody.php create mode 100644 sdk/generated/php/src/Models/GetEventRuleRequest.php create mode 100644 sdk/generated/php/src/Models/GetEventRuleResponse.php create mode 100644 sdk/generated/php/src/Models/GetEventRuleResponseBody.php create mode 100644 sdk/generated/php/src/Models/GetEventRuleResponseBody/eventTargets.php create mode 100644 sdk/generated/php/src/Models/GetEventRuleResponseBody/eventTargets/runOptions.php create mode 100644 sdk/generated/php/src/Models/GetEventRuleResponseBody/eventTargets/runOptions/deadLetterQueue.php create mode 100644 sdk/generated/php/src/Models/GetEventRuleResponseBody/eventTargets/runOptions/retryStrategy.php create mode 100644 sdk/generated/php/src/Models/GetEventSourceRequest.php create mode 100644 sdk/generated/php/src/Models/GetEventSourceResponse.php create mode 100644 sdk/generated/php/src/Models/GetEventSourceResponseBody.php create mode 100644 sdk/generated/php/src/Models/ListApiDestinationsRequest.php create mode 100644 sdk/generated/php/src/Models/ListApiDestinationsResponse.php create mode 100644 sdk/generated/php/src/Models/ListApiDestinationsResponseBody.php create mode 100644 sdk/generated/php/src/Models/ListApiDestinationsResponseBody/apiDestinations.php create mode 100644 sdk/generated/php/src/Models/ListApiDestinationsResponseBody/apiDestinations/httpApiParameters.php create mode 100644 sdk/generated/php/src/Models/ListApiDestinationsResponseBody/apiDestinations/httpApiParameters/apiParameters.php create mode 100644 sdk/generated/php/src/Models/ListConnectionsRequest.php create mode 100644 sdk/generated/php/src/Models/ListConnectionsResponse.php create mode 100644 sdk/generated/php/src/Models/ListConnectionsResponseBody.php create mode 100644 sdk/generated/php/src/Models/ListConnectionsResponseBody/connections.php create mode 100644 sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters.php create mode 100644 sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/apiKeyAuthParameters.php create mode 100644 sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/basicAuthParameters.php create mode 100644 sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters.php create mode 100644 sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/clientParameters.php create mode 100644 sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters.php create mode 100644 sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/bodyParameters.php create mode 100644 sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/headerParameters.php create mode 100644 sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/queryStringParameters.php create mode 100644 sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/networkParameters.php create mode 100644 sdk/generated/php/src/Models/ListEnumsResponseResponse.php create mode 100644 sdk/generated/php/src/Models/ListEnumsResponseResponseBody.php create mode 100644 sdk/generated/php/src/Models/ListEventBusesRequest.php create mode 100644 sdk/generated/php/src/Models/ListEventBusesResponse.php create mode 100644 sdk/generated/php/src/Models/ListEventBusesResponseBody.php create mode 100644 sdk/generated/php/src/Models/ListEventBusesResponseBody/eventBuses.php create mode 100644 sdk/generated/php/src/Models/ListEventRulesRequest.php create mode 100644 sdk/generated/php/src/Models/ListEventRulesResponse.php create mode 100644 sdk/generated/php/src/Models/ListEventRulesResponseBody.php create mode 100644 sdk/generated/php/src/Models/ListEventRulesResponseBody/eventRules.php create mode 100644 sdk/generated/php/src/Models/ListEventSourcesRequest.php create mode 100644 sdk/generated/php/src/Models/ListEventSourcesResponse.php create mode 100644 sdk/generated/php/src/Models/ListEventSourcesResponseBody.php create mode 100644 sdk/generated/php/src/Models/ListEventSourcesResponseBody/eventSources.php create mode 100644 sdk/generated/php/src/Models/ListEventTargetsRequest.php create mode 100644 sdk/generated/php/src/Models/ListEventTargetsResponse.php create mode 100644 sdk/generated/php/src/Models/ListEventTargetsResponseBody.php create mode 100644 sdk/generated/php/src/Models/ListEventTargetsResponseBody/eventTargets.php create mode 100644 sdk/generated/php/src/Models/ListEventTargetsResponseBody/eventTargets/runOptions.php create mode 100644 sdk/generated/php/src/Models/ListEventTargetsResponseBody/eventTargets/runOptions/deadLetterQueue.php create mode 100644 sdk/generated/php/src/Models/ListEventTargetsResponseBody/eventTargets/runOptions/retryStrategy.php create mode 100644 sdk/generated/php/src/Models/ListEventTypesRequest.php create mode 100644 sdk/generated/php/src/Models/ListEventTypesResponse.php create mode 100644 sdk/generated/php/src/Models/ListEventTypesResponseBody.php create mode 100644 sdk/generated/php/src/Models/ListEventTypesResponseBody/eventTypes.php create mode 100644 sdk/generated/php/src/Models/PutEventsRequest.php create mode 100644 sdk/generated/php/src/Models/PutEventsResponse.php create mode 100644 sdk/generated/php/src/Models/PutEventsResponseBody.php create mode 100644 sdk/generated/php/src/Models/PutEventsResponseBody/entryList.php create mode 100644 sdk/generated/php/src/Models/UpdateApiDestinationRequest.php create mode 100644 sdk/generated/php/src/Models/UpdateApiDestinationRequest/httpApiParameters.php create mode 100644 sdk/generated/php/src/Models/UpdateApiDestinationRequest/httpApiParameters/apiParameters.php create mode 100644 sdk/generated/php/src/Models/UpdateApiDestinationResponse.php create mode 100644 sdk/generated/php/src/Models/UpdateApiDestinationResponseBody.php create mode 100644 sdk/generated/php/src/Models/UpdateConnectionRequest.php create mode 100644 sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters.php create mode 100644 sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/apiKeyAuthParameters.php create mode 100644 sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/basicAuthParameters.php create mode 100644 sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters.php create mode 100644 sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/clientParameters.php create mode 100644 sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters.php create mode 100644 sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/bodyParameters.php create mode 100644 sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/headerParameters.php create mode 100644 sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/queryStringParameters.php create mode 100644 sdk/generated/php/src/Models/UpdateConnectionRequest/networkParameters.php create mode 100644 sdk/generated/php/src/Models/UpdateConnectionResponse.php create mode 100644 sdk/generated/php/src/Models/UpdateConnectionResponseBody.php create mode 100644 sdk/generated/php/src/Models/UpdateEventRuleRequest.php create mode 100644 sdk/generated/php/src/Models/UpdateEventRuleResponse.php create mode 100644 sdk/generated/php/src/Models/UpdateEventRuleResponseBody.php create mode 100644 sdk/generated/php/src/Models/UpdateEventSourceRequest.php create mode 100644 sdk/generated/php/src/Models/UpdateEventSourceResponse.php create mode 100644 sdk/generated/php/src/Models/UpdateEventSourceResponseBody.php create mode 100644 sdk/generated/php/src/Models/UpdateEventTargetsRequest.php create mode 100644 sdk/generated/php/src/Models/UpdateEventTargetsResponse.php create mode 100644 sdk/generated/php/src/Models/UpdateEventTargetsResponseBody.php create mode 100644 sdk/generated/php/src/SDKClient.php create mode 100644 sdk/generated/python/.gitignore create mode 100644 sdk/generated/python/rocketmq_eventbridge/__init__.py create mode 100644 sdk/generated/python/rocketmq_eventbridge/client.py create mode 100644 sdk/generated/python/rocketmq_eventbridge/models.py create mode 100644 sdk/generated/python/setup.py create mode 100644 sdk/generated/ts/package.json create mode 100644 sdk/generated/ts/src/client.ts create mode 100644 sdk/generated/ts/tsconfig.json create mode 100644 sdk/main.dara diff --git a/.gitignore b/.gitignore index 088abd77..423227b2 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,7 @@ domain/target/ start/target/ common/target/ supports/*/target/ +*libraries* +.vscode/ +node_modules/ +*.sln \ No newline at end of file diff --git a/adapter/api/src/main/java/org/apache/rocketmq/eventbridge/adapter/api/converter/CloudEventBatchedConverter.java b/adapter/api/src/main/java/org/apache/rocketmq/eventbridge/adapter/api/converter/CloudEventBatchedConverter.java index 9b4207c3..ec7ba4d2 100644 --- a/adapter/api/src/main/java/org/apache/rocketmq/eventbridge/adapter/api/converter/CloudEventBatchedConverter.java +++ b/adapter/api/src/main/java/org/apache/rocketmq/eventbridge/adapter/api/converter/CloudEventBatchedConverter.java @@ -34,6 +34,9 @@ public class CloudEventBatchedConverter implements EventConverter { @Override public boolean hit(Map headers) { String contentType = headers.get(CONTENT_TYPE); + if(Strings.isNullOrEmpty(contentType)){ + contentType = headers.get(CONTENT_TYPE.toLowerCase()); + } return !Strings.isNullOrEmpty(contentType) && contentType.startsWith(HTTP_BATCHED_PROTOCOL_BINDING); } diff --git a/adapter/api/src/main/java/org/apache/rocketmq/eventbridge/adapter/api/converter/CloudEventBinaryConverter.java b/adapter/api/src/main/java/org/apache/rocketmq/eventbridge/adapter/api/converter/CloudEventBinaryConverter.java index 745cb4d4..36739438 100644 --- a/adapter/api/src/main/java/org/apache/rocketmq/eventbridge/adapter/api/converter/CloudEventBinaryConverter.java +++ b/adapter/api/src/main/java/org/apache/rocketmq/eventbridge/adapter/api/converter/CloudEventBinaryConverter.java @@ -26,6 +26,7 @@ import java.util.Map; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedHashMap; + import org.springframework.stereotype.Service; import static org.apache.http.protocol.HTTP.CONTENT_TYPE; @@ -38,6 +39,9 @@ public class CloudEventBinaryConverter implements EventConverter { @Override public boolean hit(Map headers) { String contentType = headers.get(CONTENT_TYPE); + if(Strings.isNullOrEmpty(contentType)){ + contentType = headers.get(CONTENT_TYPE.toLowerCase()); + } if (Strings.isNullOrEmpty(contentType) || !contentType.startsWith(HTTP_BINARY_PROTOCOL_BINDING)) { return false; } @@ -61,6 +65,9 @@ public List toEventBridgeEvent(Map headers, byte[] b .stream() .forEach(entry -> headerMap.add(entry.getKey(), entry.getValue())); String mediaType = headers.get(CONTENT_TYPE); + if(Strings.isNullOrEmpty(mediaType)){ + mediaType = headers.get(CONTENT_TYPE.toLowerCase()); + } CloudEvent cloudEvent = RestfulWSMessageFactory.create(MediaType.valueOf(mediaType), headerMap, body) .toEvent(); return Lists.newArrayList(cloudEvent); diff --git a/adapter/api/src/main/java/org/apache/rocketmq/eventbridge/adapter/api/converter/CloudEventStructuredConverter.java b/adapter/api/src/main/java/org/apache/rocketmq/eventbridge/adapter/api/converter/CloudEventStructuredConverter.java index 1ebcac49..0ce35b18 100644 --- a/adapter/api/src/main/java/org/apache/rocketmq/eventbridge/adapter/api/converter/CloudEventStructuredConverter.java +++ b/adapter/api/src/main/java/org/apache/rocketmq/eventbridge/adapter/api/converter/CloudEventStructuredConverter.java @@ -36,6 +36,9 @@ public class CloudEventStructuredConverter implements EventConverter { @Override public boolean hit(Map headers) { String contentType = headers.get(CONTENT_TYPE); + if(Strings.isNullOrEmpty(contentType)){ + contentType = headers.get(CONTENT_TYPE.toLowerCase()); + } return !Strings.isNullOrEmpty(contentType) && contentType.startsWith(HTTP_STRUCTURED_PROTOCOL_BINDING); } diff --git a/sdk/Darafile b/sdk/Darafile new file mode 100644 index 00000000..3e6e4c49 --- /dev/null +++ b/sdk/Darafile @@ -0,0 +1,87 @@ +{ + "scope": "SDKClient", + "name": "sdk-client", + "version": "1.0.0", + "main": "./main.dara", + "libraries": { + "Util": "darabonba:Util:*", + "OpenApi": "alibabacloud:OpenApi:*" + }, + "releases": { + "java": "org.apache.rocketmq.eventbridge:sdk:0.0.0", + "go": "github.com/org-apache-rocketmq/eventbridge-sdk/client:v0.0.0", + "csharp": "RocketMQ.Eventbridge.SDK:1.0.0", + "ts": "@org.apache.rocketmq/eventbridge-sdk:0.0.0", + "php": "rocketmq/eventbridge-sdk:0.0.0", + "python": "rocketmq_eventbridge20240701:0.0.0" + }, + "java": { + "className": "Client", + "package": "org.apache.rocketmq.eventbridge.sdk", + "enableMinimizeModelName": false, + "packageInfo": { + "groupId": "org.apache.rocketmq.eventbridge", + "artifactId": "sdk", + "version": "0.0.0", + "description": "Eventbridge (20240701) SDK for Java", + "url": "", + "licenseName": "The Apache License, Version 2.0", + "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.txt", + "developerId": "rocketmq", + "developerName": "rocketmq", + "developerEmail": "zjuludi@gmail.com" + } + }, + "ts":{ + "packageName": "SDKClient" + }, + "csharp": { + "className": "SDKClient", + "namespace": "RocketMQ.Eventbridge.SDK", + "packageInfo": { + "name": "sdk", + "version": "0.0.0", + "title": "eventbridge-sdk", + "description": "open source eventbridge (20240701) SDK Library for .NET" + } + }, + "php": { + "package": "RocketMQ.Eventbridge.SDK", + "clientName": "SDKClient", + "packageInfo": { + "name": "rocketmq/eventbridge-sdk", + "desc": "RocketMQ eventbridge (20240701) SDK Library for PHP", + "github": "unavailable", + "files": { + "LICENSE": "../LICENSE" + } + } + }, + "python": { + "package": "rocketmq_eventbridge", + "clientName": "client", + "packageInfo": { + "name": "rocketmq_eventbridge", + "desc": "Alibaba Cloud eventbridge (20240701) SDK Library for Python", + "github": "https://github.com/aliyun/alibabacloud-python-sdk", + "author": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com" + } + }, + "swift": { + "clientName": "Client", + "packageInfo": { + "name": "AlibabacloudEventbridge20240701", + "desc": "Alibaba Cloud eventbridge (20240701) SDK Library for Swift", + "github": "https://github.com/alibabacloud-sdk-swift/eventbridge-20240701", + "author": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com" + } + }, + "go": { + "interface": true, + "clientName": "Client" + }, + "productId": "eventbridge", + "apiVersions": "2024-07-01" +} \ No newline at end of file diff --git a/sdk/Readme.md b/sdk/Readme.md new file mode 100644 index 00000000..f23ce511 --- /dev/null +++ b/sdk/Readme.md @@ -0,0 +1,37 @@ +# Daranbonba + +通过 darabonba 生成的多语言 SDK 实现对 eventBridge 进行 RPC 管控 + +# 多语言 SDK 生成 + +## dara 安装 + +``` +npm install @darabonba/cli -g +``` + +# 目录结构 + +- demo + - 包含了 sdk demo 的源码和生成样例,按 controller 分类 +- doc + - 各语言的 sdk 生成使用文档 +- generated + - 包含了 sdk client 的各语言生成样例 +- Darafile + - dara 配置文件 +- main.dara + - dara 源码 + +# 支持语言 + +- Java +- golang +- csharp +- php +- python +- ts + +# 使用 +各语言 sdk 使用方法请参考 doc 中的文档 + diff --git a/sdk/demo/ApiDestination/Darafile b/sdk/demo/ApiDestination/Darafile new file mode 100644 index 00000000..b15ddca3 --- /dev/null +++ b/sdk/demo/ApiDestination/Darafile @@ -0,0 +1,66 @@ +{ + "scope": "Demo", + "name": "demo", + "version": "0.0.0", + "main": "./demo.dara", + "libraries": { + "SDKClient" : "../../", + "Util": "darabonba:Util:*", + "OpenApi": "alibabacloud:OpenApi:*", + "OpenApiUtil": "alibabacloud:OpenApiUtil:*", + "Console": "darabonba:Console:*" + }, + "java": { + "package": "org.apache.rocketmq.eventbridge.demo", + "className": "Demo", + "packageInfo": { + "groupId": "org.apache.rocketmq.eventbridge", + "artifactId": "demo", + "version": "0.0.0", + "description": "EventBridge SDK demo for Java", + "url": "", + "licenseName": "The Apache License, Version 2.0", + "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.txt", + "developerId": "ludi", + "developerName": "EventBridge SDK", + "developerEmail": "zjuludi@gmail.com", + "scmConnection": "", + "scmDeveloperConnection": "", + "scmUrl": "" + } + }, + "go": { + "clientName": "DemoClient" + }, + "csharp": { + "className": "Demo", + "namespace": "RocketMQ.Eventbridge.Demo", + "packageInfo": { + "name": "sdkDemo", + "version": "0.0.0", + "title": "eventbridge-sdk-demo", + "description": "open source eventbridge (20240701) SDK Demo Library for .NET" + } + }, + "php": { + "package": "RocketMQ.Eventbridge.SDK.Demo", + "clientName": "Demo", + "packageInfo": { + "name": "rocketmq/eventbridge-sdk-demo", + "desc": "RocketMQ eventbridge (20240701) SDK Demo for PHP", + "github": "unavailable", + "files": { + "LICENSE": "../LICENSE" + } + } + }, + "python": { + "package": "rocketmq_eventbridge_demo", + "clientName": "demo", + "packageInfo": { + "name": "rocketmq_eventbridge_demo", + "desc": "Alibaba Cloud eventbridge (20240701) SDK Library for Python", + "github": "unavailable" + } + } +} \ No newline at end of file diff --git a/sdk/demo/ApiDestination/demo.dara b/sdk/demo/ApiDestination/demo.dara new file mode 100644 index 00000000..f484050e --- /dev/null +++ b/sdk/demo/ApiDestination/demo.dara @@ -0,0 +1,117 @@ +import Util; +import OpenApi; +import SDKClient; +import Console; + +type @sdkClient = SDKClient; +type @endpoint = string; + +init(){ + @endpoint = '127.0.0.1:7001'; + var config = new OpenApi.Config{ + endpoint = @endpoint + }; + @sdkClient = new SDKClient(config); +} + +/** + ApiDestination Controller apis: + * createApiDestination * + * updateApiDestination * + * getApiDestination * + * deleteApiDestination * + * listApiDestinations * +*/ + +async function testCreateApiDestination(): void { + var request = new SDKClient.CreateApiDestinationRequest{ + apiDestinationName = "new-api-destination", + connectionName = "new-connection", + description = "demo api destination for test", + httpApiParameters = new SDKClient.CreateApiDestinationRequest.httpApiParameters{ + endpoint = @endpoint, + method = "POST" + } + }; + + try { + var res = @sdkClient.createApiDestination(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testUpdateApiDestination(): void { + var request = new SDKClient.UpdateApiDestinationRequest{ + apiDestinationName = "new-api-destination", + connectionName = "new-connection", + description = "!updated! demo api destination for test", + httpApiParameters = new SDKClient.UpdateApiDestinationRequest.httpApiParameters{ + endpoint = @endpoint, + method = "GET" + } + }; + + try { + var res = @sdkClient.updateApiDestination(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testGetApiDestination(): void { + var request = new SDKClient.GetApiDestinationRequest{ + apiDestinationName = "new-api-destination" + }; + try { + var res = @sdkClient.getApiDestination(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } +} + +async function testDeleteApiDestination(): void { + var request = new SDKClient.DeleteApiDestinationRequest{ + apiDestinationName = "new-api-destination" + }; + try { + var res = @sdkClient.deleteApiDestination(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } +} + +async function testListApiDestinations(): void { + var request = new SDKClient.ListApiDestinationsRequest{ + maxResults = 2 + }; + + try { + var res = @sdkClient.listApiDestinations(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} diff --git a/sdk/demo/ApiDestination/generated/csharp/core/Demo.cs b/sdk/demo/ApiDestination/generated/csharp/core/Demo.cs new file mode 100644 index 00000000..269e2065 --- /dev/null +++ b/sdk/demo/ApiDestination/generated/csharp/core/Demo.cs @@ -0,0 +1,392 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; + +using Tea; +using Tea.Utils; + + +namespace RocketMQ.Eventbridge.Demo +{ + public class Demo + { + protected RocketMQ.Eventbridge.SDK.SDKClient _sdkClient; + protected string _endpoint; + + public Demo() + { + this._endpoint = "127.0.0.1:7001"; + AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config + { + Endpoint = _endpoint, + }; + this._sdkClient = new RocketMQ.Eventbridge.SDK.SDKClient(config); + } + + static void Main(string[] _args){ + Demo demo = new Demo(); + demo.TestListApiDestinations(); + } + + /// Description: + /// + /// ApiDestination Controller apis: + /// createApiDestination * + /// updateApiDestination * + /// getApiDestination * + /// deleteApiDestination * + /// listApiDestinations * + /// + public void TestCreateApiDestination() + { + RocketMQ.Eventbridge.SDK.Models.CreateApiDestinationRequest request = new RocketMQ.Eventbridge.SDK.Models.CreateApiDestinationRequest + { + ApiDestinationName = "new-api-destination", + ConnectionName = "new-connection", + Description = "demo api destination for test", + HttpApiParameters = new RocketMQ.Eventbridge.SDK.Models.CreateApiDestinationRequest.CreateApiDestinationRequestHttpApiParameters + { + Endpoint = _endpoint, + Method = "POST", + }, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.CreateApiDestinationResponse res = this._sdkClient.CreateApiDestination(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + /// Description: + /// + /// ApiDestination Controller apis: + /// createApiDestination * + /// updateApiDestination * + /// getApiDestination * + /// deleteApiDestination * + /// listApiDestinations * + /// + public async Task TestCreateApiDestinationAsync() + { + RocketMQ.Eventbridge.SDK.Models.CreateApiDestinationRequest request = new RocketMQ.Eventbridge.SDK.Models.CreateApiDestinationRequest + { + ApiDestinationName = "new-api-destination", + ConnectionName = "new-connection", + Description = "demo api destination for test", + HttpApiParameters = new RocketMQ.Eventbridge.SDK.Models.CreateApiDestinationRequest.CreateApiDestinationRequestHttpApiParameters + { + Endpoint = _endpoint, + Method = "POST", + }, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.CreateApiDestinationResponse res = await this._sdkClient.CreateApiDestinationAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestUpdateApiDestination() + { + RocketMQ.Eventbridge.SDK.Models.UpdateApiDestinationRequest request = new RocketMQ.Eventbridge.SDK.Models.UpdateApiDestinationRequest + { + ApiDestinationName = "new-api-destination", + ConnectionName = "new-connection", + Description = "!updated! demo api destination for test", + HttpApiParameters = new RocketMQ.Eventbridge.SDK.Models.UpdateApiDestinationRequest.UpdateApiDestinationRequestHttpApiParameters + { + Endpoint = _endpoint, + Method = "GET", + }, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.UpdateApiDestinationResponse res = this._sdkClient.UpdateApiDestination(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestUpdateApiDestinationAsync() + { + RocketMQ.Eventbridge.SDK.Models.UpdateApiDestinationRequest request = new RocketMQ.Eventbridge.SDK.Models.UpdateApiDestinationRequest + { + ApiDestinationName = "new-api-destination", + ConnectionName = "new-connection", + Description = "!updated! demo api destination for test", + HttpApiParameters = new RocketMQ.Eventbridge.SDK.Models.UpdateApiDestinationRequest.UpdateApiDestinationRequestHttpApiParameters + { + Endpoint = _endpoint, + Method = "GET", + }, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.UpdateApiDestinationResponse res = await this._sdkClient.UpdateApiDestinationAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestGetApiDestination() + { + RocketMQ.Eventbridge.SDK.Models.GetApiDestinationRequest request = new RocketMQ.Eventbridge.SDK.Models.GetApiDestinationRequest + { + ApiDestinationName = "new-api-destination", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.GetApiDestinationResponse res = this._sdkClient.GetApiDestination(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestGetApiDestinationAsync() + { + RocketMQ.Eventbridge.SDK.Models.GetApiDestinationRequest request = new RocketMQ.Eventbridge.SDK.Models.GetApiDestinationRequest + { + ApiDestinationName = "new-api-destination", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.GetApiDestinationResponse res = await this._sdkClient.GetApiDestinationAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestDeleteApiDestination() + { + RocketMQ.Eventbridge.SDK.Models.DeleteApiDestinationRequest request = new RocketMQ.Eventbridge.SDK.Models.DeleteApiDestinationRequest + { + ApiDestinationName = "new-api-destination", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.DeleteApiDestinationResponse res = this._sdkClient.DeleteApiDestination(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestDeleteApiDestinationAsync() + { + RocketMQ.Eventbridge.SDK.Models.DeleteApiDestinationRequest request = new RocketMQ.Eventbridge.SDK.Models.DeleteApiDestinationRequest + { + ApiDestinationName = "new-api-destination", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.DeleteApiDestinationResponse res = await this._sdkClient.DeleteApiDestinationAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestListApiDestinations() + { + RocketMQ.Eventbridge.SDK.Models.ListApiDestinationsRequest request = new RocketMQ.Eventbridge.SDK.Models.ListApiDestinationsRequest + { + MaxResults = 2, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.ListApiDestinationsResponse res = this._sdkClient.ListApiDestinations(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestListApiDestinationsAsync() + { + RocketMQ.Eventbridge.SDK.Models.ListApiDestinationsRequest request = new RocketMQ.Eventbridge.SDK.Models.ListApiDestinationsRequest + { + MaxResults = 2, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.ListApiDestinationsResponse res = await this._sdkClient.ListApiDestinationsAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + } +} diff --git a/sdk/demo/ApiDestination/generated/csharp/core/Properties/AssemblyInfo.cs b/sdk/demo/ApiDestination/generated/csharp/core/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..6e4eeb08 --- /dev/null +++ b/sdk/demo/ApiDestination/generated/csharp/core/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("eventbridge-sdk-demo")] +[assembly: AssemblyDescription("open source eventbridge (20240701) SDK Demo Library for .NET")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6dece9a0-8a59-11ef-8d20-217abdacd26b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("0.0.1.0")] +[assembly: AssemblyFileVersion("0.0.1.0")] diff --git a/sdk/demo/ApiDestination/generated/csharp/core/sdkDemo.csproj b/sdk/demo/ApiDestination/generated/csharp/core/sdkDemo.csproj new file mode 100644 index 00000000..8ea12bc6 --- /dev/null +++ b/sdk/demo/ApiDestination/generated/csharp/core/sdkDemo.csproj @@ -0,0 +1,44 @@ + + + + netstandard2.0;net45;netcoreapp8.0 + RocketMQ.Eventbridge.Demo + Exe + false + false + RocketMQ.Eventbridge.Demo + + 5 + open source eventbridge (20240701) SDK Demo Library for .NET + + + NETSTANDARD2_0 + + + NET45 + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + \ No newline at end of file diff --git a/sdk/demo/ApiDestination/generated/go/client/client.go b/sdk/demo/ApiDestination/generated/go/client/client.go new file mode 100644 index 00000000..bd7a6832 --- /dev/null +++ b/sdk/demo/ApiDestination/generated/go/client/client.go @@ -0,0 +1,239 @@ +// This file is auto-generated, don't edit it. Thanks. +package client + +import ( + openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" + console "github.com/alibabacloud-go/tea-console/client" + util "github.com/alibabacloud-go/tea-utils/v2/service" + "github.com/alibabacloud-go/tea/tea" + sdkclient "github.com/org-apache-rocketmq/eventbridge-sdk/client" +) + +type DemoClient struct { + SdkClient *sdkclient.Client + Endpoint *string +} + +func NewClient() (*DemoClient, error) { + client := new(DemoClient) + err := client.Init() + return client, err +} + +func (client *DemoClient) Init() (_err error) { + client.Endpoint = tea.String("127.0.0.1:7001") + config := &openapi.Config{ + Endpoint: client.Endpoint, + } + client.SdkClient, _err = sdkclient.NewClient(config) + if _err != nil { + return _err + } + + return nil +} + +// Description: +// +// ApiDestination Controller apis: +// +// createApiDestination * +// +// updateApiDestination * +// +// getApiDestination * +// +// deleteApiDestination * +// +// listApiDestinations * +func (client *DemoClient) TestCreateApiDestination() (_err error) { + request := &sdkclient.CreateApiDestinationRequest{ + ApiDestinationName: tea.String("new-api-destination"), + ConnectionName: tea.String("new-connection"), + Description: tea.String("demo api destination for test"), + HttpApiParameters: &sdkclient.CreateApiDestinationRequestHttpApiParameters{ + Endpoint: client.Endpoint, + Method: tea.String("POST"), + }, + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.CreateApiDestination(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestUpdateApiDestination() (_err error) { + request := &sdkclient.UpdateApiDestinationRequest{ + ApiDestinationName: tea.String("new-api-destination"), + ConnectionName: tea.String("new-connection"), + Description: tea.String("!updated! demo api destination for test"), + HttpApiParameters: &sdkclient.UpdateApiDestinationRequestHttpApiParameters{ + Endpoint: client.Endpoint, + Method: tea.String("GET"), + }, + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.UpdateApiDestination(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestGetApiDestination() (_err error) { + request := &sdkclient.GetApiDestinationRequest{ + ApiDestinationName: tea.String("new-api-destination"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.GetApiDestination(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestDeleteApiDestination() (_err error) { + request := &sdkclient.DeleteApiDestinationRequest{ + ApiDestinationName: tea.String("new-api-destination"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.DeleteApiDestination(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestListApiDestinations() (_err error) { + request := &sdkclient.ListApiDestinationsRequest{ + MaxResults: tea.Int32(2), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.ListApiDestinations(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} diff --git a/sdk/demo/ApiDestination/generated/go/go.mod b/sdk/demo/ApiDestination/generated/go/go.mod new file mode 100644 index 00000000..ff358240 --- /dev/null +++ b/sdk/demo/ApiDestination/generated/go/go.mod @@ -0,0 +1,9 @@ +module client + +require ( + github.com/alibabacloud-go/tea-utils/v2 v2.0.6 + github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.10 + github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 + github.com/alibabacloud-go/tea-console v1.0.0 +) +replace github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 => ../../../../generated/go/ diff --git a/sdk/demo/ApiDestination/generated/go/main.go b/sdk/demo/ApiDestination/generated/go/main.go new file mode 100644 index 00000000..22c02f40 --- /dev/null +++ b/sdk/demo/ApiDestination/generated/go/main.go @@ -0,0 +1,11 @@ +package main + +import ( + "client/client" +) + +func main() { + demo := new(client.DemoClient) + demo.Init() + demo.TestListApiDestinations() +} diff --git a/sdk/demo/ApiDestination/generated/java/pom.xml b/sdk/demo/ApiDestination/generated/java/pom.xml new file mode 100644 index 00000000..ef0ec329 --- /dev/null +++ b/sdk/demo/ApiDestination/generated/java/pom.xml @@ -0,0 +1,122 @@ + + + 4.0.0 + org.apache.rocketmq.eventbridge + demo + 0.0.0 + jar + demo + EventBridge SDK demo for Java + + + + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + ludi + EventBridge SDK + zjuludi@gmail.com + + + + + sonatype-nexus-snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + + + + + com.aliyun + tea-util + 0.2.23 + + + com.aliyun + tea-openapi + 0.3.6 + + + org.apache.rocketmq.eventbridge + sdk + 0.0.0 + + + com.aliyun + tea-console + 0.0.1 + + + com.aliyun + tea + 1.1.14 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 8 + 8 + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + true + + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.3 + true + + sonatype-nexus-staging + https://s01.oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + UTF-8 + none + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.1 + + + + \ No newline at end of file diff --git a/sdk/demo/ApiDestination/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java b/sdk/demo/ApiDestination/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java new file mode 100644 index 00000000..69b7b9e2 --- /dev/null +++ b/sdk/demo/ApiDestination/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java @@ -0,0 +1,142 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.demo; + +import com.aliyun.tea.*; + +public class Demo { + + public org.apache.rocketmq.eventbridge.sdk.Client _sdkClient; + public String _endpoint; + public Demo() throws Exception { + this._endpoint = "127.0.0.1:7001"; + com.aliyun.teaopenapi.models.Config config = com.aliyun.teaopenapi.models.Config.build(TeaConverter.buildMap( + new TeaPair("endpoint", _endpoint) + )); + this._sdkClient = new org.apache.rocketmq.eventbridge.sdk.Client(config); + } + + public static void main(String[] args) { + try { + Demo demo = new Demo(); + demo.testListApiDestinations(); + } catch (Exception e) { + // TODO: handle exception + } + } + + /** + * description : + *

ApiDestination Controller apis: + * createApiDestination * + * updateApiDestination * + * getApiDestination * + * deleteApiDestination * + * listApiDestinations *

+ */ + public void testCreateApiDestination() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.CreateApiDestinationRequest request = org.apache.rocketmq.eventbridge.sdk.models.CreateApiDestinationRequest.build(TeaConverter.buildMap( + new TeaPair("apiDestinationName", "new-api-destination"), + new TeaPair("connectionName", "new-connection"), + new TeaPair("description", "demo api destination for test"), + new TeaPair("httpApiParameters", org.apache.rocketmq.eventbridge.sdk.models.CreateApiDestinationRequest.CreateApiDestinationRequestHttpApiParameters.build(TeaConverter.buildMap( + new TeaPair("endpoint", _endpoint), + new TeaPair("method", "POST") + ))) + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.CreateApiDestinationResponse res = _sdkClient.createApiDestination(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testUpdateApiDestination() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.UpdateApiDestinationRequest request = org.apache.rocketmq.eventbridge.sdk.models.UpdateApiDestinationRequest.build(TeaConverter.buildMap( + new TeaPair("apiDestinationName", "new-api-destination"), + new TeaPair("connectionName", "new-connection"), + new TeaPair("description", "!updated! demo api destination for test"), + new TeaPair("httpApiParameters", org.apache.rocketmq.eventbridge.sdk.models.UpdateApiDestinationRequest.UpdateApiDestinationRequestHttpApiParameters.build(TeaConverter.buildMap( + new TeaPair("endpoint", _endpoint), + new TeaPair("method", "GET") + ))) + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.UpdateApiDestinationResponse res = _sdkClient.updateApiDestination(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testGetApiDestination() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.GetApiDestinationRequest request = org.apache.rocketmq.eventbridge.sdk.models.GetApiDestinationRequest.build(TeaConverter.buildMap( + new TeaPair("apiDestinationName", "new-api-destination") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.GetApiDestinationResponse res = _sdkClient.getApiDestination(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testDeleteApiDestination() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.DeleteApiDestinationRequest request = org.apache.rocketmq.eventbridge.sdk.models.DeleteApiDestinationRequest.build(TeaConverter.buildMap( + new TeaPair("apiDestinationName", "new-api-destination") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.DeleteApiDestinationResponse res = _sdkClient.deleteApiDestination(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testListApiDestinations() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.ListApiDestinationsRequest request = org.apache.rocketmq.eventbridge.sdk.models.ListApiDestinationsRequest.build(TeaConverter.buildMap( + new TeaPair("maxResults", 2) + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.ListApiDestinationsResponse res = _sdkClient.listApiDestinations(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } +} diff --git a/sdk/demo/ApiDestination/generated/php/.gitignore b/sdk/demo/ApiDestination/generated/php/.gitignore new file mode 100644 index 00000000..89c7aa58 --- /dev/null +++ b/sdk/demo/ApiDestination/generated/php/.gitignore @@ -0,0 +1,15 @@ +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +composer.lock + +.vscode/ +.idea +.DS_Store + +cache/ +*.cache +runtime/ +.php_cs.cache diff --git a/sdk/demo/ApiDestination/generated/php/.php_cs.dist b/sdk/demo/ApiDestination/generated/php/.php_cs.dist new file mode 100644 index 00000000..8617ec2f --- /dev/null +++ b/sdk/demo/ApiDestination/generated/php/.php_cs.dist @@ -0,0 +1,65 @@ +setRiskyAllowed(true) + ->setIndent(' ') + ->setRules([ + '@PSR2' => true, + '@PhpCsFixer' => true, + '@Symfony:risky' => true, + 'concat_space' => ['spacing' => 'one'], + 'array_syntax' => ['syntax' => 'short'], + 'array_indentation' => true, + 'combine_consecutive_unsets' => true, + 'method_separation' => true, + 'single_quote' => true, + 'declare_equal_normalize' => true, + 'function_typehint_space' => true, + 'hash_to_slash_comment' => true, + 'include' => true, + 'lowercase_cast' => true, + 'no_multiline_whitespace_before_semicolons' => true, + 'no_leading_import_slash' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_spaces_around_offset' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unused_imports' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'object_operator_without_whitespace' => true, + 'single_blank_line_before_namespace' => true, + 'single_class_element_per_statement' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline_array' => true, + 'trim_array_spaces' => true, + 'unary_operator_spaces' => true, + 'whitespace_after_comma_in_array' => true, + 'no_extra_consecutive_blank_lines' => [ + 'curly_brace_block', + 'extra', + 'parenthesis_brace_block', + 'square_brace_block', + 'throw', + 'use', + ], + 'binary_operator_spaces' => [ + 'align_double_arrow' => true, + 'align_equals' => true, + ], + 'braces' => [ + 'allow_single_line_closure' => true, + ], + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('vendor') + ->exclude('tests') + ->in(__DIR__) + ); diff --git a/sdk/demo/ApiDestination/generated/php/autoload.php b/sdk/demo/ApiDestination/generated/php/autoload.php new file mode 100644 index 00000000..5bfe0a1a --- /dev/null +++ b/sdk/demo/ApiDestination/generated/php/autoload.php @@ -0,0 +1,15 @@ +5.5", + "alibabacloud/tea-utils": "^0.2.21", + "alibabacloud/darabonba-openapi": "^0.2.12", + "rocketmq/eventbridge-sdk": "^0.0.0", + "alibabacloud/tea-console": "^0.1.0" + }, + "autoload": { + "psr-4": { + "RocketMQ\\Eventbridge\\SDK\\Demo\\": "src" + } + }, + "scripts": { + "fixer": "php-cs-fixer fix ./" + }, + "config": { + "sort-packages": true, + "preferred-install": "dist", + "optimize-autoloader": true + }, + "prefer-stable": true, + "repositories": { + "rocketmq":{ + "type" : "path", + "url": "../../../../generated/php" + } + } +} diff --git a/sdk/demo/ApiDestination/generated/php/main.php b/sdk/demo/ApiDestination/generated/php/main.php new file mode 100644 index 00000000..da38d996 --- /dev/null +++ b/sdk/demo/ApiDestination/generated/php/main.php @@ -0,0 +1,8 @@ +testListApiDestinations(); diff --git a/sdk/demo/ApiDestination/generated/php/src/Demo.php b/sdk/demo/ApiDestination/generated/php/src/Demo.php new file mode 100644 index 00000000..fad3232d --- /dev/null +++ b/sdk/demo/ApiDestination/generated/php/src/Demo.php @@ -0,0 +1,165 @@ +_endpoint = "127.0.0.1:7001"; + $config = new Config([ + "endpoint" => $this->_endpoint + ]); + $this->_sdkClient = new SDKClient($config); + } + + /** + * ApiDestination Controller apis: + * * createApiDestination * + * * updateApiDestination * + * * getApiDestination * + * * deleteApiDestination * + * * listApiDestinations * + * @return void + */ + public function testCreateApiDestination(){ + $request = new CreateApiDestinationRequest([ + "apiDestinationName" => "new-api-destination", + "connectionName" => "new-connection", + "description" => "demo api destination for test", + "httpApiParameters" => new httpApiParameters([ + "endpoint" => $this->_endpoint, + "method" => "POST" + ]) + ]); + try { + $res = $this->_sdkClient->createApiDestination($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testUpdateApiDestination(){ + $request = new UpdateApiDestinationRequest([ + "apiDestinationName" => "new-api-destination", + "connectionName" => "new-connection", + "description" => "!updated! demo api destination for test", + "httpApiParameters" => new \RocketMQ\Eventbridge\SDK\Models\UpdateApiDestinationRequest\httpApiParameters([ + "endpoint" => $this->_endpoint, + "method" => "GET" + ]) + ]); + try { + $res = $this->_sdkClient->updateApiDestination($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testGetApiDestination(){ + $request = new GetApiDestinationRequest([ + "apiDestinationName" => "new-api-destination" + ]); + try { + $res = $this->_sdkClient->getApiDestination($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testDeleteApiDestination(){ + $request = new DeleteApiDestinationRequest([ + "apiDestinationName" => "new-api-destination" + ]); + try { + $res = $this->_sdkClient->deleteApiDestination($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testListApiDestinations(){ + $request = new ListApiDestinationsRequest([ + "maxResults" => 2 + ]); + try { + $res = $this->_sdkClient->listApiDestinations($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } +} diff --git a/sdk/demo/ApiDestination/generated/python/.gitignore b/sdk/demo/ApiDestination/generated/python/.gitignore new file mode 100644 index 00000000..2bcfffae --- /dev/null +++ b/sdk/demo/ApiDestination/generated/python/.gitignore @@ -0,0 +1,5 @@ +runtime/ +.idea/ +.vscode/ +__pycache__/ +.pytest_cache/ \ No newline at end of file diff --git a/sdk/demo/ApiDestination/generated/python/rocketmq_eventbridge_demo/__init__.py b/sdk/demo/ApiDestination/generated/python/rocketmq_eventbridge_demo/__init__.py new file mode 100644 index 00000000..5becc17c --- /dev/null +++ b/sdk/demo/ApiDestination/generated/python/rocketmq_eventbridge_demo/__init__.py @@ -0,0 +1 @@ +__version__ = "1.0.0" diff --git a/sdk/demo/ApiDestination/generated/python/rocketmq_eventbridge_demo/demo.py b/sdk/demo/ApiDestination/generated/python/rocketmq_eventbridge_demo/demo.py new file mode 100644 index 00000000..cda5f5e6 --- /dev/null +++ b/sdk/demo/ApiDestination/generated/python/rocketmq_eventbridge_demo/demo.py @@ -0,0 +1,191 @@ +# -*- coding: utf-8 -*- +# This file is auto-generated, don't edit it. Thanks. +from rocketmq_eventbridge.client import Client as SDKClientClient +from alibabacloud_tea_openapi import models as open_api_models +from rocketmq_eventbridge import models as sdkclient_models +from alibabacloud_tea_console.client import Client as ConsoleClient +from alibabacloud_tea_util.client import Client as UtilClient + + +class Demo: + _sdk_client: SDKClientClient = None + _endpoint: str = None + + def __init__(self): + self._endpoint = '127.0.0.1:7001' + config = open_api_models.Config( + endpoint=self._endpoint + ) + self._sdk_client = SDKClientClient(config) + + def test_create_api_destination(self) -> None: + """ + ApiDestination Controller apis: + createApiDestination *\ + updateApiDestination *\ + getApiDestination *\ + deleteApiDestination *\ + listApiDestinations *\ + """ + request = sdkclient_models.CreateApiDestinationRequest( + api_destination_name='new-api-destination', + connection_name='new-connection', + description='demo api destination for test', + http_api_parameters=sdkclient_models.CreateApiDestinationRequestHttpApiParameters( + endpoint=self._endpoint, + method='POST' + ) + ) + try: + res = self._sdk_client.create_api_destination(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_create_api_destination_async(self) -> None: + """ + ApiDestination Controller apis: + createApiDestination *\ + updateApiDestination *\ + getApiDestination *\ + deleteApiDestination *\ + listApiDestinations *\ + """ + request = sdkclient_models.CreateApiDestinationRequest( + api_destination_name='new-api-destination', + connection_name='new-connection', + description='demo api destination for test', + http_api_parameters=sdkclient_models.CreateApiDestinationRequestHttpApiParameters( + endpoint=self._endpoint, + method='POST' + ) + ) + try: + res = await self._sdk_client.create_api_destination_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_update_api_destination(self) -> None: + request = sdkclient_models.UpdateApiDestinationRequest( + api_destination_name='new-api-destination', + connection_name='new-connection', + description='!updated! demo api destination for test', + http_api_parameters=sdkclient_models.UpdateApiDestinationRequestHttpApiParameters( + endpoint=self._endpoint, + method='GET' + ) + ) + try: + res = self._sdk_client.update_api_destination(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_update_api_destination_async(self) -> None: + request = sdkclient_models.UpdateApiDestinationRequest( + api_destination_name='new-api-destination', + connection_name='new-connection', + description='!updated! demo api destination for test', + http_api_parameters=sdkclient_models.UpdateApiDestinationRequestHttpApiParameters( + endpoint=self._endpoint, + method='GET' + ) + ) + try: + res = await self._sdk_client.update_api_destination_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_get_api_destination(self) -> None: + request = sdkclient_models.GetApiDestinationRequest( + api_destination_name='new-api-destination' + ) + try: + res = self._sdk_client.get_api_destination(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_get_api_destination_async(self) -> None: + request = sdkclient_models.GetApiDestinationRequest( + api_destination_name='new-api-destination' + ) + try: + res = await self._sdk_client.get_api_destination_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_delete_api_destination(self) -> None: + request = sdkclient_models.DeleteApiDestinationRequest( + api_destination_name='new-api-destination' + ) + try: + res = self._sdk_client.delete_api_destination(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_delete_api_destination_async(self) -> None: + request = sdkclient_models.DeleteApiDestinationRequest( + api_destination_name='new-api-destination' + ) + try: + res = await self._sdk_client.delete_api_destination_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_list_api_destinations(self) -> None: + request = sdkclient_models.ListApiDestinationsRequest( + max_results=2 + ) + try: + res = self._sdk_client.list_api_destinations(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_list_api_destinations_async(self) -> None: + request = sdkclient_models.ListApiDestinationsRequest( + max_results=2 + ) + try: + res = await self._sdk_client.list_api_destinations_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') +demo = Demo() +demo.test_list_api_destinations() diff --git a/sdk/demo/ApiDestination/generated/python/setup.py b/sdk/demo/ApiDestination/generated/python/setup.py new file mode 100644 index 00000000..48e4b4bd --- /dev/null +++ b/sdk/demo/ApiDestination/generated/python/setup.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +""" + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +""" + +import os +from setuptools import setup, find_packages + +""" +setup module for rocketmq_eventbridge_demo. + +Created on 15/10/2024 + +@author: +""" + +PACKAGE = "rocketmq_eventbridge_demo" +NAME = "rocketmq_eventbridge_demo" or "alibabacloud-package" +DESCRIPTION = "Alibaba Cloud eventbridge (20240701) SDK Library for Python" +AUTHOR = "" +AUTHOR_EMAIL = "" +URL = "unavailable" +VERSION = __import__(PACKAGE).__version__ +REQUIRES = [ + "alibabacloud_tea_util>=0.3.13, <1.0.0", + "alibabacloud_tea_openapi>=0.3.12, <1.0.0", + "rocketmq_eventbridge20240701>=0.0.0, <1.0.0", + "alibabacloud_tea_console>=0.0.1, <1.0.0" +] + +LONG_DESCRIPTION = '' +if os.path.exists('./README.md'): + with open("README.md", encoding='utf-8') as fp: + LONG_DESCRIPTION = fp.read() + +setup( + name=NAME, + version=VERSION, + description=DESCRIPTION, + long_description=LONG_DESCRIPTION, + long_description_content_type='text/markdown', + author=AUTHOR, + author_email=AUTHOR_EMAIL, + license="Apache License 2.0", + url=URL, + keywords=["rocketmq","eventbridge","demo"], + packages=find_packages(exclude=["tests*"]), + include_package_data=True, + platforms="any", + install_requires=REQUIRES, + python_requires=">=3.6", + classifiers=( + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + "Topic :: Software Development" + ) +) diff --git a/sdk/demo/ApiDestination/generated/ts/package.json b/sdk/demo/ApiDestination/generated/ts/package.json new file mode 100644 index 00000000..be9669b9 --- /dev/null +++ b/sdk/demo/ApiDestination/generated/ts/package.json @@ -0,0 +1,31 @@ +{ + "name": "", + "version": "1.0.0", + "description": "", + "main": "dist/client.js", + "scripts": { + "test": "mocha --reporter spec --timeout 3000 test/*.test.js", + "test-cov": "nyc -e .ts -r=html -r=text -r=lcov npm run test", + "build": "tsc", + "prepublishOnly": "tsc" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "@types/node": "^12.12.26", + "nyc": "^15.0.0", + "source-map-support": "^0.5.16", + "ts-node": "^8.6.2", + "typescript": "^3.7.5" + }, + "dependencies": { + "@alicloud/tea-typescript": "^1.7.1", + "@alicloud/tea-util": "^1.4.9", + "@alicloud/openapi-client": "^0.4.12", + "@alicloud/tea-console": "^1.0.0" + }, + "files": [ + "dist", + "src" + ] +} \ No newline at end of file diff --git a/sdk/demo/ApiDestination/generated/ts/src/client.ts b/sdk/demo/ApiDestination/generated/ts/src/client.ts new file mode 100644 index 00000000..c38b9d4f --- /dev/null +++ b/sdk/demo/ApiDestination/generated/ts/src/client.ts @@ -0,0 +1,118 @@ +// This file is auto-generated, don't edit it +import Util from '@alicloud/tea-util'; +import OpenApi, * as $OpenApi from '@alicloud/openapi-client'; +import SDKClient, * as $SDKClient from '../../../../../generated/ts/src/client'; +import Console from '@alicloud/tea-console'; +import * as $tea from '@alicloud/tea-typescript'; + + +export default class Client { + _sdkClient: SDKClient; + _endpoint: string; + + constructor() { + this._endpoint = "127.0.0.1:7001"; + let config = new $OpenApi.Config({ + endpoint: this._endpoint, + }); + this._sdkClient = new SDKClient(config); + } + + + /** + * @remarks + * ApiDestination Controller apis: + * createApiDestination * + * updateApiDestination * + * getApiDestination * + * deleteApiDestination * + * listApiDestinations * + */ + async testCreateApiDestination(): Promise { + let request = new $SDKClient.CreateApiDestinationRequest({ + apiDestinationName: "new-api-destination", + connectionName: "new-connection", + description: "demo api destination for test", + httpApiParameters: new $SDKClient.CreateApiDestinationRequestHttpApiParameters({ + endpoint: this._endpoint, + method: "POST", + }), + }); + try { + let res = await this._sdkClient.createApiDestination(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testUpdateApiDestination(): Promise { + let request = new $SDKClient.UpdateApiDestinationRequest({ + apiDestinationName: "new-api-destination", + connectionName: "new-connection", + description: "!updated! demo api destination for test", + httpApiParameters: new $SDKClient.UpdateApiDestinationRequestHttpApiParameters({ + endpoint: this._endpoint, + method: "GET", + }), + }); + try { + let res = await this._sdkClient.updateApiDestination(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testGetApiDestination(): Promise { + let request = new $SDKClient.GetApiDestinationRequest({ + apiDestinationName: "new-api-destination", + }); + try { + let res = await this._sdkClient.getApiDestination(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testDeleteApiDestination(): Promise { + let request = new $SDKClient.DeleteApiDestinationRequest({ + apiDestinationName: "new-api-destination", + }); + try { + let res = await this._sdkClient.deleteApiDestination(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testListApiDestinations(): Promise { + let request = new $SDKClient.ListApiDestinationsRequest({ + maxResults: 2, + }); + try { + let res = await this._sdkClient.listApiDestinations(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + +} diff --git a/sdk/demo/ApiDestination/generated/ts/src/main.ts b/sdk/demo/ApiDestination/generated/ts/src/main.ts new file mode 100644 index 00000000..e7aa5d20 --- /dev/null +++ b/sdk/demo/ApiDestination/generated/ts/src/main.ts @@ -0,0 +1,4 @@ +import Client from './client' + +let c = new Client() +c.testListApiDestinations() \ No newline at end of file diff --git a/sdk/demo/ApiDestination/generated/ts/tsconfig.json b/sdk/demo/ApiDestination/generated/ts/tsconfig.json new file mode 100644 index 00000000..ae66f5b6 --- /dev/null +++ b/sdk/demo/ApiDestination/generated/ts/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es2017", + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "outDir": "./dist", + "esModuleInterop": true + }, + "include": [ + "src/**/*" + ] +} \ No newline at end of file diff --git a/sdk/demo/Connection/Darafile b/sdk/demo/Connection/Darafile new file mode 100644 index 00000000..b15ddca3 --- /dev/null +++ b/sdk/demo/Connection/Darafile @@ -0,0 +1,66 @@ +{ + "scope": "Demo", + "name": "demo", + "version": "0.0.0", + "main": "./demo.dara", + "libraries": { + "SDKClient" : "../../", + "Util": "darabonba:Util:*", + "OpenApi": "alibabacloud:OpenApi:*", + "OpenApiUtil": "alibabacloud:OpenApiUtil:*", + "Console": "darabonba:Console:*" + }, + "java": { + "package": "org.apache.rocketmq.eventbridge.demo", + "className": "Demo", + "packageInfo": { + "groupId": "org.apache.rocketmq.eventbridge", + "artifactId": "demo", + "version": "0.0.0", + "description": "EventBridge SDK demo for Java", + "url": "", + "licenseName": "The Apache License, Version 2.0", + "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.txt", + "developerId": "ludi", + "developerName": "EventBridge SDK", + "developerEmail": "zjuludi@gmail.com", + "scmConnection": "", + "scmDeveloperConnection": "", + "scmUrl": "" + } + }, + "go": { + "clientName": "DemoClient" + }, + "csharp": { + "className": "Demo", + "namespace": "RocketMQ.Eventbridge.Demo", + "packageInfo": { + "name": "sdkDemo", + "version": "0.0.0", + "title": "eventbridge-sdk-demo", + "description": "open source eventbridge (20240701) SDK Demo Library for .NET" + } + }, + "php": { + "package": "RocketMQ.Eventbridge.SDK.Demo", + "clientName": "Demo", + "packageInfo": { + "name": "rocketmq/eventbridge-sdk-demo", + "desc": "RocketMQ eventbridge (20240701) SDK Demo for PHP", + "github": "unavailable", + "files": { + "LICENSE": "../LICENSE" + } + } + }, + "python": { + "package": "rocketmq_eventbridge_demo", + "clientName": "demo", + "packageInfo": { + "name": "rocketmq_eventbridge_demo", + "desc": "Alibaba Cloud eventbridge (20240701) SDK Library for Python", + "github": "unavailable" + } + } +} \ No newline at end of file diff --git a/sdk/demo/Connection/demo.dara b/sdk/demo/Connection/demo.dara new file mode 100644 index 00000000..f3bdecda --- /dev/null +++ b/sdk/demo/Connection/demo.dara @@ -0,0 +1,146 @@ +import Util; +import OpenApi; +import SDKClient; +import Console; + +type @sdkClient = SDKClient; +type @endpoint = string; + +init(){ + @endpoint = '127.0.0.1:7001'; + var config = new OpenApi.Config{ + endpoint = @endpoint + }; + @sdkClient = new SDKClient(config); +} + +/** + test func for Connection Controller apis: + * createConnection * + * deleteConnection * + * updateConnection * + * getConnection * + * selectOneConnection * + * listConnections * + * listEnumsResponse * +*/ + +async function testCreateConnection(): void { + var request = new SDKClient.CreateConnectionRequest{ + connectionName = "new-connection", + networkParameters = new SDKClient.CreateConnectionRequest.networkParameters{ + networkType = "PublicNetwork" + } + }; + + try { + var res = @sdkClient.createConnection(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testDeleteConnection(): void { + var request = new SDKClient.DeleteConnectionRequest{ + connectionName = "new-connection" + }; + try { + var res = @sdkClient.deleteConnection(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } +} + +async function testUpdateConnection(): void { + var request = new SDKClient.UpdateConnectionRequest{ + connectionName = "new-connection", + networkParameters = new SDKClient.UpdateConnectionRequest.networkParameters{ + networkType = "PrivateNetwork", + securityGroupId = "eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb", + vpcId = "eb-test/vpc-bp1symadadwnwgmqud", + vswitcheId = "vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c" + } + }; + + try { + var res = @sdkClient.updateConnection(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testGetConnections(): void { + var request = new SDKClient.GetConnectionRequest{ + connectionName = "new-connection" + }; + try { + var res = @sdkClient.getConnection(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testSelectOneConnection(): void { + var request = new SDKClient.GetConnectionRequest{ + connectionName = "new-connection" + }; + try { + var res = @sdkClient.selectOneConnection(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testListConnections(): void { + var request = new SDKClient.ListConnectionsRequest{ + maxResults = 2 + }; + + try { + var res = @sdkClient.listConnections(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testListEnumsResponse(): void { + try { + var res = @sdkClient.listEnumsResponse(); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} \ No newline at end of file diff --git a/sdk/demo/Connection/generated/csharp/core/Demo.cs b/sdk/demo/Connection/generated/csharp/core/Demo.cs new file mode 100644 index 00000000..dec45ac4 --- /dev/null +++ b/sdk/demo/Connection/generated/csharp/core/Demo.cs @@ -0,0 +1,506 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; + +using Tea; +using Tea.Utils; + + +namespace RocketMQ.Eventbridge.Demo +{ + public class Demo + { + protected RocketMQ.Eventbridge.SDK.SDKClient _sdkClient; + protected string _endpoint; + + public Demo() + { + this._endpoint = "127.0.0.1:7001"; + AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config + { + Endpoint = _endpoint, + }; + this._sdkClient = new RocketMQ.Eventbridge.SDK.SDKClient(config); + } + + static void Main(string[] _args){ + Demo demo = new Demo(); + demo.TestListConnections(); + } + + /// Description: + /// + /// test func for Connection Controller apis: + /// createConnection * + /// deleteConnection * + /// updateConnection * + /// getConnection * + /// selectOneConnection * + /// listConnections * + /// listEnumsResponse * + /// + public void TestCreateConnection() + { + RocketMQ.Eventbridge.SDK.Models.CreateConnectionRequest request = new RocketMQ.Eventbridge.SDK.Models.CreateConnectionRequest + { + ConnectionName = "new-connection", + NetworkParameters = new RocketMQ.Eventbridge.SDK.Models.CreateConnectionRequest.CreateConnectionRequestNetworkParameters + { + NetworkType = "PublicNetwork", + }, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.CreateConnectionResponse res = this._sdkClient.CreateConnection(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + /// Description: + /// + /// test func for Connection Controller apis: + /// createConnection * + /// deleteConnection * + /// updateConnection * + /// getConnection * + /// selectOneConnection * + /// listConnections * + /// listEnumsResponse * + /// + public async Task TestCreateConnectionAsync() + { + RocketMQ.Eventbridge.SDK.Models.CreateConnectionRequest request = new RocketMQ.Eventbridge.SDK.Models.CreateConnectionRequest + { + ConnectionName = "new-connection", + NetworkParameters = new RocketMQ.Eventbridge.SDK.Models.CreateConnectionRequest.CreateConnectionRequestNetworkParameters + { + NetworkType = "PublicNetwork", + }, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.CreateConnectionResponse res = await this._sdkClient.CreateConnectionAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestDeleteConnection() + { + RocketMQ.Eventbridge.SDK.Models.DeleteConnectionRequest request = new RocketMQ.Eventbridge.SDK.Models.DeleteConnectionRequest + { + ConnectionName = "new-connection", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.DeleteConnectionResponse res = this._sdkClient.DeleteConnection(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestDeleteConnectionAsync() + { + RocketMQ.Eventbridge.SDK.Models.DeleteConnectionRequest request = new RocketMQ.Eventbridge.SDK.Models.DeleteConnectionRequest + { + ConnectionName = "new-connection", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.DeleteConnectionResponse res = await this._sdkClient.DeleteConnectionAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestUpdateConnection() + { + RocketMQ.Eventbridge.SDK.Models.UpdateConnectionRequest request = new RocketMQ.Eventbridge.SDK.Models.UpdateConnectionRequest + { + ConnectionName = "new-connection", + NetworkParameters = new RocketMQ.Eventbridge.SDK.Models.UpdateConnectionRequest.UpdateConnectionRequestNetworkParameters + { + NetworkType = "PrivateNetwork", + SecurityGroupId = "eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb", + VpcId = "eb-test/vpc-bp1symadadwnwgmqud", + VswitcheId = "vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c", + }, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.UpdateConnectionResponse res = this._sdkClient.UpdateConnection(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestUpdateConnectionAsync() + { + RocketMQ.Eventbridge.SDK.Models.UpdateConnectionRequest request = new RocketMQ.Eventbridge.SDK.Models.UpdateConnectionRequest + { + ConnectionName = "new-connection", + NetworkParameters = new RocketMQ.Eventbridge.SDK.Models.UpdateConnectionRequest.UpdateConnectionRequestNetworkParameters + { + NetworkType = "PrivateNetwork", + SecurityGroupId = "eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb", + VpcId = "eb-test/vpc-bp1symadadwnwgmqud", + VswitcheId = "vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c", + }, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.UpdateConnectionResponse res = await this._sdkClient.UpdateConnectionAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestGetConnections() + { + RocketMQ.Eventbridge.SDK.Models.GetConnectionRequest request = new RocketMQ.Eventbridge.SDK.Models.GetConnectionRequest + { + ConnectionName = "new-connection", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.GetConnectionResponse res = this._sdkClient.GetConnection(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestGetConnectionsAsync() + { + RocketMQ.Eventbridge.SDK.Models.GetConnectionRequest request = new RocketMQ.Eventbridge.SDK.Models.GetConnectionRequest + { + ConnectionName = "new-connection", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.GetConnectionResponse res = await this._sdkClient.GetConnectionAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestSelectOneConnection() + { + RocketMQ.Eventbridge.SDK.Models.GetConnectionRequest request = new RocketMQ.Eventbridge.SDK.Models.GetConnectionRequest + { + ConnectionName = "new-connection", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.GetConnectionResponse res = this._sdkClient.SelectOneConnection(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestSelectOneConnectionAsync() + { + RocketMQ.Eventbridge.SDK.Models.GetConnectionRequest request = new RocketMQ.Eventbridge.SDK.Models.GetConnectionRequest + { + ConnectionName = "new-connection", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.GetConnectionResponse res = await this._sdkClient.SelectOneConnectionAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestListConnections() + { + RocketMQ.Eventbridge.SDK.Models.ListConnectionsRequest request = new RocketMQ.Eventbridge.SDK.Models.ListConnectionsRequest + { + MaxResults = 2, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.ListConnectionsResponse res = this._sdkClient.ListConnections(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestListConnectionsAsync() + { + RocketMQ.Eventbridge.SDK.Models.ListConnectionsRequest request = new RocketMQ.Eventbridge.SDK.Models.ListConnectionsRequest + { + MaxResults = 2, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.ListConnectionsResponse res = await this._sdkClient.ListConnectionsAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestListEnumsResponse() + { + try + { + RocketMQ.Eventbridge.SDK.Models.ListEnumsResponseResponse res = this._sdkClient.ListEnumsResponse(); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestListEnumsResponseAsync() + { + try + { + RocketMQ.Eventbridge.SDK.Models.ListEnumsResponseResponse res = await this._sdkClient.ListEnumsResponseAsync(); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + } +} diff --git a/sdk/demo/Connection/generated/csharp/core/Properties/AssemblyInfo.cs b/sdk/demo/Connection/generated/csharp/core/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..f8b5e0de --- /dev/null +++ b/sdk/demo/Connection/generated/csharp/core/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("eventbridge-sdk-demo")] +[assembly: AssemblyDescription("open source eventbridge (20240701) SDK Demo Library for .NET")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3a6bbd10-8a2f-11ef-8de3-c5c0a1b1f193")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("0.0.1.0")] +[assembly: AssemblyFileVersion("0.0.1.0")] diff --git a/sdk/demo/Connection/generated/csharp/core/sdkDemo.csproj b/sdk/demo/Connection/generated/csharp/core/sdkDemo.csproj new file mode 100644 index 00000000..8ea12bc6 --- /dev/null +++ b/sdk/demo/Connection/generated/csharp/core/sdkDemo.csproj @@ -0,0 +1,44 @@ + + + + netstandard2.0;net45;netcoreapp8.0 + RocketMQ.Eventbridge.Demo + Exe + false + false + RocketMQ.Eventbridge.Demo + + 5 + open source eventbridge (20240701) SDK Demo Library for .NET + + + NETSTANDARD2_0 + + + NET45 + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + \ No newline at end of file diff --git a/sdk/demo/Connection/generated/go/client/client.go b/sdk/demo/Connection/generated/go/client/client.go new file mode 100644 index 00000000..f170ef70 --- /dev/null +++ b/sdk/demo/Connection/generated/go/client/client.go @@ -0,0 +1,309 @@ +// This file is auto-generated, don't edit it. Thanks. +package client + +import ( + openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" + console "github.com/alibabacloud-go/tea-console/client" + util "github.com/alibabacloud-go/tea-utils/v2/service" + "github.com/alibabacloud-go/tea/tea" + sdkclient "github.com/org-apache-rocketmq/eventbridge-sdk/client" +) + +type DemoClient struct { + SdkClient *sdkclient.Client + Endpoint *string +} + +func NewClient() (*DemoClient, error) { + client := new(DemoClient) + err := client.Init() + return client, err +} + +func (client *DemoClient) Init() (_err error) { + client.Endpoint = tea.String("127.0.0.1:7001") + config := &openapi.Config{ + Endpoint: client.Endpoint, + } + client.SdkClient, _err = sdkclient.NewClient(config) + if _err != nil { + return _err + } + + return nil +} + +// Description: +// +// test func for Connection Controller apis: +// +// createConnection * +// +// deleteConnection * +// +// updateConnection * +// +// getConnection * +// +// selectOneConnection * +// +// listConnections * +// +// listEnumsResponse * +func (client *DemoClient) TestCreateConnection() (_err error) { + request := &sdkclient.CreateConnectionRequest{ + ConnectionName: tea.String("new-connection"), + NetworkParameters: &sdkclient.CreateConnectionRequestNetworkParameters{ + NetworkType: tea.String("PublicNetwork"), + }, + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.CreateConnection(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestDeleteConnection() (_err error) { + request := &sdkclient.DeleteConnectionRequest{ + ConnectionName: tea.String("new-connection"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.DeleteConnection(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestUpdateConnection() (_err error) { + request := &sdkclient.UpdateConnectionRequest{ + ConnectionName: tea.String("new-connection"), + NetworkParameters: &sdkclient.UpdateConnectionRequestNetworkParameters{ + NetworkType: tea.String("PrivateNetwork"), + SecurityGroupId: tea.String("eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb"), + VpcId: tea.String("eb-test/vpc-bp1symadadwnwgmqud"), + VswitcheId: tea.String("vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c"), + }, + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.UpdateConnection(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestGetConnections() (_err error) { + request := &sdkclient.GetConnectionRequest{ + ConnectionName: tea.String("new-connection"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.GetConnection(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestSelectOneConnection() (_err error) { + request := &sdkclient.GetConnectionRequest{ + ConnectionName: tea.String("new-connection"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.SelectOneConnection(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestListConnections() (_err error) { + request := &sdkclient.ListConnectionsRequest{ + MaxResults: tea.Int32(2), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.ListConnections(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestListEnumsResponse() (_err error) { + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.ListEnumsResponse() + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} diff --git a/sdk/demo/Connection/generated/go/go.mod b/sdk/demo/Connection/generated/go/go.mod new file mode 100644 index 00000000..ff358240 --- /dev/null +++ b/sdk/demo/Connection/generated/go/go.mod @@ -0,0 +1,9 @@ +module client + +require ( + github.com/alibabacloud-go/tea-utils/v2 v2.0.6 + github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.10 + github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 + github.com/alibabacloud-go/tea-console v1.0.0 +) +replace github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 => ../../../../generated/go/ diff --git a/sdk/demo/Connection/generated/go/main.go b/sdk/demo/Connection/generated/go/main.go new file mode 100644 index 00000000..69070741 --- /dev/null +++ b/sdk/demo/Connection/generated/go/main.go @@ -0,0 +1,11 @@ +package main + +import ( + "client/client" +) + +func main() { + demo := new(client.DemoClient) + demo.Init() + demo.TestListConnections() +} diff --git a/sdk/demo/Connection/generated/java/pom.xml b/sdk/demo/Connection/generated/java/pom.xml new file mode 100644 index 00000000..ef0ec329 --- /dev/null +++ b/sdk/demo/Connection/generated/java/pom.xml @@ -0,0 +1,122 @@ + + + 4.0.0 + org.apache.rocketmq.eventbridge + demo + 0.0.0 + jar + demo + EventBridge SDK demo for Java + + + + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + ludi + EventBridge SDK + zjuludi@gmail.com + + + + + sonatype-nexus-snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + + + + + com.aliyun + tea-util + 0.2.23 + + + com.aliyun + tea-openapi + 0.3.6 + + + org.apache.rocketmq.eventbridge + sdk + 0.0.0 + + + com.aliyun + tea-console + 0.0.1 + + + com.aliyun + tea + 1.1.14 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 8 + 8 + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + true + + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.3 + true + + sonatype-nexus-staging + https://s01.oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + UTF-8 + none + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.1 + + + + \ No newline at end of file diff --git a/sdk/demo/Connection/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java b/sdk/demo/Connection/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java new file mode 100644 index 00000000..ce40ada2 --- /dev/null +++ b/sdk/demo/Connection/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java @@ -0,0 +1,176 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.demo; + +import com.aliyun.tea.*; + +public class Demo { + + public org.apache.rocketmq.eventbridge.sdk.Client _sdkClient; + public String _endpoint; + public Demo() throws Exception { + this._endpoint = "127.0.0.1:7001"; + com.aliyun.teaopenapi.models.Config config = com.aliyun.teaopenapi.models.Config.build(TeaConverter.buildMap( + new TeaPair("endpoint", _endpoint) + )); + this._sdkClient = new org.apache.rocketmq.eventbridge.sdk.Client(config); + } + + public static void main(String[] args) { + try { + Demo demo = new Demo(); + demo.testListConnections(); + } catch (Exception e) { + // TODO: handle exception + } + } + + /** + * description : + *

test func for Connection Controller apis: + * createConnection * + * deleteConnection * + * updateConnection * + * getConnection * + * selectOneConnection * + * listConnections * + * listEnumsResponse *

+ */ + public void testCreateConnection() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.CreateConnectionRequest request = org.apache.rocketmq.eventbridge.sdk.models.CreateConnectionRequest.build(TeaConverter.buildMap( + new TeaPair("connectionName", "new-connection"), + new TeaPair("networkParameters", org.apache.rocketmq.eventbridge.sdk.models.CreateConnectionRequest.CreateConnectionRequestNetworkParameters.build(TeaConverter.buildMap( + new TeaPair("networkType", "PublicNetwork") + ))) + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.CreateConnectionResponse res = _sdkClient.createConnection(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testDeleteConnection() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.DeleteConnectionRequest request = org.apache.rocketmq.eventbridge.sdk.models.DeleteConnectionRequest.build(TeaConverter.buildMap( + new TeaPair("connectionName", "new-connection") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.DeleteConnectionResponse res = _sdkClient.deleteConnection(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testUpdateConnection() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.UpdateConnectionRequest request = org.apache.rocketmq.eventbridge.sdk.models.UpdateConnectionRequest.build(TeaConverter.buildMap( + new TeaPair("connectionName", "new-connection"), + new TeaPair("networkParameters", org.apache.rocketmq.eventbridge.sdk.models.UpdateConnectionRequest.UpdateConnectionRequestNetworkParameters.build(TeaConverter.buildMap( + new TeaPair("networkType", "PrivateNetwork"), + new TeaPair("securityGroupId", "eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb"), + new TeaPair("vpcId", "eb-test/vpc-bp1symadadwnwgmqud"), + new TeaPair("vswitcheId", "vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c") + ))) + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.UpdateConnectionResponse res = _sdkClient.updateConnection(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testGetConnections() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.GetConnectionRequest request = org.apache.rocketmq.eventbridge.sdk.models.GetConnectionRequest.build(TeaConverter.buildMap( + new TeaPair("connectionName", "new-connection") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.GetConnectionResponse res = _sdkClient.getConnection(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testSelectOneConnection() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.GetConnectionRequest request = org.apache.rocketmq.eventbridge.sdk.models.GetConnectionRequest.build(TeaConverter.buildMap( + new TeaPair("connectionName", "new-connection") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.GetConnectionResponse res = _sdkClient.selectOneConnection(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testListConnections() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.ListConnectionsRequest request = org.apache.rocketmq.eventbridge.sdk.models.ListConnectionsRequest.build(TeaConverter.buildMap( + new TeaPair("maxResults", 2) + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.ListConnectionsResponse res = _sdkClient.listConnections(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testListEnumsResponse() throws Exception { + try { + org.apache.rocketmq.eventbridge.sdk.models.ListEnumsResponseResponse res = _sdkClient.listEnumsResponse(); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } +} diff --git a/sdk/demo/Connection/generated/php/.gitignore b/sdk/demo/Connection/generated/php/.gitignore new file mode 100644 index 00000000..89c7aa58 --- /dev/null +++ b/sdk/demo/Connection/generated/php/.gitignore @@ -0,0 +1,15 @@ +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +composer.lock + +.vscode/ +.idea +.DS_Store + +cache/ +*.cache +runtime/ +.php_cs.cache diff --git a/sdk/demo/Connection/generated/php/.php_cs.dist b/sdk/demo/Connection/generated/php/.php_cs.dist new file mode 100644 index 00000000..8617ec2f --- /dev/null +++ b/sdk/demo/Connection/generated/php/.php_cs.dist @@ -0,0 +1,65 @@ +setRiskyAllowed(true) + ->setIndent(' ') + ->setRules([ + '@PSR2' => true, + '@PhpCsFixer' => true, + '@Symfony:risky' => true, + 'concat_space' => ['spacing' => 'one'], + 'array_syntax' => ['syntax' => 'short'], + 'array_indentation' => true, + 'combine_consecutive_unsets' => true, + 'method_separation' => true, + 'single_quote' => true, + 'declare_equal_normalize' => true, + 'function_typehint_space' => true, + 'hash_to_slash_comment' => true, + 'include' => true, + 'lowercase_cast' => true, + 'no_multiline_whitespace_before_semicolons' => true, + 'no_leading_import_slash' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_spaces_around_offset' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unused_imports' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'object_operator_without_whitespace' => true, + 'single_blank_line_before_namespace' => true, + 'single_class_element_per_statement' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline_array' => true, + 'trim_array_spaces' => true, + 'unary_operator_spaces' => true, + 'whitespace_after_comma_in_array' => true, + 'no_extra_consecutive_blank_lines' => [ + 'curly_brace_block', + 'extra', + 'parenthesis_brace_block', + 'square_brace_block', + 'throw', + 'use', + ], + 'binary_operator_spaces' => [ + 'align_double_arrow' => true, + 'align_equals' => true, + ], + 'braces' => [ + 'allow_single_line_closure' => true, + ], + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('vendor') + ->exclude('tests') + ->in(__DIR__) + ); diff --git a/sdk/demo/Connection/generated/php/autoload.php b/sdk/demo/Connection/generated/php/autoload.php new file mode 100644 index 00000000..5bfe0a1a --- /dev/null +++ b/sdk/demo/Connection/generated/php/autoload.php @@ -0,0 +1,15 @@ +5.5", + "alibabacloud/tea-utils": "^0.2.21", + "alibabacloud/darabonba-openapi": "^0.2.12", + "rocketmq/eventbridge-sdk": "^0.0.0", + "alibabacloud/tea-console": "^0.1.0" + }, + "autoload": { + "psr-4": { + "RocketMQ\\Eventbridge\\SDK\\Demo\\": "src" + } + }, + "scripts": { + "fixer": "php-cs-fixer fix ./" + }, + "config": { + "sort-packages": true, + "preferred-install": "dist", + "optimize-autoloader": true + }, + "prefer-stable": true, + "repositories": { + "rocketmq":{ + "type" : "path", + "url": "../../../../generated/php" + } + } +} diff --git a/sdk/demo/Connection/generated/php/main.php b/sdk/demo/Connection/generated/php/main.php new file mode 100644 index 00000000..858dd3d0 --- /dev/null +++ b/sdk/demo/Connection/generated/php/main.php @@ -0,0 +1,8 @@ +testListConnections(); diff --git a/sdk/demo/Connection/generated/php/src/Demo.php b/sdk/demo/Connection/generated/php/src/Demo.php new file mode 100644 index 00000000..e34d11f2 --- /dev/null +++ b/sdk/demo/Connection/generated/php/src/Demo.php @@ -0,0 +1,207 @@ +_endpoint = "127.0.0.1:7001"; + $config = new Config([ + "endpoint" => $this->_endpoint + ]); + $this->_sdkClient = new SDKClient($config); + } + + /** + * test func for Connection Controller apis: + * * createConnection * + * * deleteConnection * + * * updateConnection * + * * getConnection * + * * selectOneConnection * + * * listConnections * + * * listEnumsResponse * + * @return void + */ + public function testCreateConnection(){ + $request = new CreateConnectionRequest([ + "connectionName" => "new-connection", + "networkParameters" => new networkParameters([ + "networkType" => "PublicNetwork" + ]) + ]); + try { + $res = $this->_sdkClient->createConnection($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testDeleteConnection(){ + $request = new DeleteConnectionRequest([ + "connectionName" => "new-connection" + ]); + try { + $res = $this->_sdkClient->deleteConnection($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testUpdateConnection(){ + $request = new UpdateConnectionRequest([ + "connectionName" => "new-connection", + "networkParameters" => new \RocketMQ\Eventbridge\SDK\Models\UpdateConnectionRequest\networkParameters([ + "networkType" => "PrivateNetwork", + "securityGroupId" => "eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb", + "vpcId" => "eb-test/vpc-bp1symadadwnwgmqud", + "vswitcheId" => "vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c" + ]) + ]); + try { + $res = $this->_sdkClient->updateConnection($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testGetConnections(){ + $request = new GetConnectionRequest([ + "connectionName" => "new-connection" + ]); + try { + $res = $this->_sdkClient->getConnection($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testSelectOneConnection(){ + $request = new GetConnectionRequest([ + "connectionName" => "new-connection" + ]); + try { + $res = $this->_sdkClient->selectOneConnection($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testListConnections(){ + $request = new ListConnectionsRequest([ + "maxResults" => 2 + ]); + try { + $res = $this->_sdkClient->listConnections($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testListEnumsResponse(){ + try { + $res = $this->_sdkClient->listEnumsResponse(); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } +} diff --git a/sdk/demo/Connection/generated/python/.gitignore b/sdk/demo/Connection/generated/python/.gitignore new file mode 100644 index 00000000..2bcfffae --- /dev/null +++ b/sdk/demo/Connection/generated/python/.gitignore @@ -0,0 +1,5 @@ +runtime/ +.idea/ +.vscode/ +__pycache__/ +.pytest_cache/ \ No newline at end of file diff --git a/sdk/demo/Connection/generated/python/rocketmq_eventbridge_demo/__init__.py b/sdk/demo/Connection/generated/python/rocketmq_eventbridge_demo/__init__.py new file mode 100644 index 00000000..5becc17c --- /dev/null +++ b/sdk/demo/Connection/generated/python/rocketmq_eventbridge_demo/__init__.py @@ -0,0 +1 @@ +__version__ = "1.0.0" diff --git a/sdk/demo/Connection/generated/python/rocketmq_eventbridge_demo/demo.py b/sdk/demo/Connection/generated/python/rocketmq_eventbridge_demo/demo.py new file mode 100644 index 00000000..d23431df --- /dev/null +++ b/sdk/demo/Connection/generated/python/rocketmq_eventbridge_demo/demo.py @@ -0,0 +1,235 @@ +# -*- coding: utf-8 -*- +# This file is auto-generated, don't edit it. Thanks. +from rocketmq_eventbridge.client import Client as SDKClientClient +from alibabacloud_tea_openapi import models as open_api_models +from rocketmq_eventbridge import models as sdkclient_models +from alibabacloud_tea_console.client import Client as ConsoleClient +from alibabacloud_tea_util.client import Client as UtilClient + + +class Demo: + _sdk_client: SDKClientClient = None + _endpoint: str = None + + def __init__(self): + self._endpoint = '127.0.0.1:7001' + config = open_api_models.Config( + endpoint=self._endpoint + ) + self._sdk_client = SDKClientClient(config) + + def test_create_connection(self) -> None: + """ + test func for Connection Controller apis: + createConnection *\ + deleteConnection *\ + updateConnection *\ + getConnection *\ + selectOneConnection *\ + listConnections *\ + listEnumsResponse *\ + """ + request = sdkclient_models.CreateConnectionRequest( + connection_name='new-connection', + network_parameters=sdkclient_models.CreateConnectionRequestNetworkParameters( + network_type='PublicNetwork' + ) + ) + try: + res = self._sdk_client.create_connection(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_create_connection_async(self) -> None: + """ + test func for Connection Controller apis: + createConnection *\ + deleteConnection *\ + updateConnection *\ + getConnection *\ + selectOneConnection *\ + listConnections *\ + listEnumsResponse *\ + """ + request = sdkclient_models.CreateConnectionRequest( + connection_name='new-connection', + network_parameters=sdkclient_models.CreateConnectionRequestNetworkParameters( + network_type='PublicNetwork' + ) + ) + try: + res = await self._sdk_client.create_connection_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_delete_connection(self) -> None: + request = sdkclient_models.DeleteConnectionRequest( + connection_name='new-connection' + ) + try: + res = self._sdk_client.delete_connection(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_delete_connection_async(self) -> None: + request = sdkclient_models.DeleteConnectionRequest( + connection_name='new-connection' + ) + try: + res = await self._sdk_client.delete_connection_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_update_connection(self) -> None: + request = sdkclient_models.UpdateConnectionRequest( + connection_name='new-connection', + network_parameters=sdkclient_models.UpdateConnectionRequestNetworkParameters( + network_type='PrivateNetwork', + security_group_id='eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb', + vpc_id='eb-test/vpc-bp1symadadwnwgmqud', + vswitche_id='vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c' + ) + ) + try: + res = self._sdk_client.update_connection(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_update_connection_async(self) -> None: + request = sdkclient_models.UpdateConnectionRequest( + connection_name='new-connection', + network_parameters=sdkclient_models.UpdateConnectionRequestNetworkParameters( + network_type='PrivateNetwork', + security_group_id='eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb', + vpc_id='eb-test/vpc-bp1symadadwnwgmqud', + vswitche_id='vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c' + ) + ) + try: + res = await self._sdk_client.update_connection_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_get_connections(self) -> None: + request = sdkclient_models.GetConnectionRequest( + connection_name='new-connection' + ) + try: + res = self._sdk_client.get_connection(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_get_connections_async(self) -> None: + request = sdkclient_models.GetConnectionRequest( + connection_name='new-connection' + ) + try: + res = await self._sdk_client.get_connection_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_select_one_connection(self) -> None: + request = sdkclient_models.GetConnectionRequest( + connection_name='new-connection' + ) + try: + res = self._sdk_client.select_one_connection(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_select_one_connection_async(self) -> None: + request = sdkclient_models.GetConnectionRequest( + connection_name='new-connection' + ) + try: + res = await self._sdk_client.select_one_connection_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_list_connections(self) -> None: + request = sdkclient_models.ListConnectionsRequest( + max_results=2 + ) + try: + res = self._sdk_client.list_connections(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_list_connections_async(self) -> None: + request = sdkclient_models.ListConnectionsRequest( + max_results=2 + ) + try: + res = await self._sdk_client.list_connections_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_list_enums_response(self) -> None: + try: + res = self._sdk_client.list_enums_response() + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_list_enums_response_async(self) -> None: + try: + res = await self._sdk_client.list_enums_response_async() + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') +demo = Demo() +demo.test_list_connections() diff --git a/sdk/demo/Connection/generated/python/setup.py b/sdk/demo/Connection/generated/python/setup.py new file mode 100644 index 00000000..3824f4cc --- /dev/null +++ b/sdk/demo/Connection/generated/python/setup.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +""" + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +""" + +import os +from setuptools import setup, find_packages + +""" +setup module for rocketmq_eventbridge_demo. + +Created on 14/10/2024 + +@author: +""" + +PACKAGE = "rocketmq_eventbridge_demo" +NAME = "rocketmq_eventbridge_demo" or "alibabacloud-package" +DESCRIPTION = "Alibaba Cloud eventbridge (20240701) SDK Library for Python" +AUTHOR = "" +AUTHOR_EMAIL = "" +URL = "unavailable" +VERSION = __import__(PACKAGE).__version__ +REQUIRES = [ + "alibabacloud_tea_util>=0.3.13, <1.0.0", + "alibabacloud_tea_openapi>=0.3.12, <1.0.0", + "rocketmq_eventbridge20240701>=0.0.0, <1.0.0", + "alibabacloud_tea_console>=0.0.1, <1.0.0" +] + +LONG_DESCRIPTION = '' +if os.path.exists('./README.md'): + with open("README.md", encoding='utf-8') as fp: + LONG_DESCRIPTION = fp.read() + +setup( + name=NAME, + version=VERSION, + description=DESCRIPTION, + long_description=LONG_DESCRIPTION, + long_description_content_type='text/markdown', + author=AUTHOR, + author_email=AUTHOR_EMAIL, + license="Apache License 2.0", + url=URL, + keywords=["rocketmq","eventbridge","demo"], + packages=find_packages(exclude=["tests*"]), + include_package_data=True, + platforms="any", + install_requires=REQUIRES, + python_requires=">=3.6", + classifiers=( + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + "Topic :: Software Development" + ) +) diff --git a/sdk/demo/Connection/generated/ts/package.json b/sdk/demo/Connection/generated/ts/package.json new file mode 100644 index 00000000..be9669b9 --- /dev/null +++ b/sdk/demo/Connection/generated/ts/package.json @@ -0,0 +1,31 @@ +{ + "name": "", + "version": "1.0.0", + "description": "", + "main": "dist/client.js", + "scripts": { + "test": "mocha --reporter spec --timeout 3000 test/*.test.js", + "test-cov": "nyc -e .ts -r=html -r=text -r=lcov npm run test", + "build": "tsc", + "prepublishOnly": "tsc" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "@types/node": "^12.12.26", + "nyc": "^15.0.0", + "source-map-support": "^0.5.16", + "ts-node": "^8.6.2", + "typescript": "^3.7.5" + }, + "dependencies": { + "@alicloud/tea-typescript": "^1.7.1", + "@alicloud/tea-util": "^1.4.9", + "@alicloud/openapi-client": "^0.4.12", + "@alicloud/tea-console": "^1.0.0" + }, + "files": [ + "dist", + "src" + ] +} \ No newline at end of file diff --git a/sdk/demo/Connection/generated/ts/src/client.ts b/sdk/demo/Connection/generated/ts/src/client.ts new file mode 100644 index 00000000..eeb9b514 --- /dev/null +++ b/sdk/demo/Connection/generated/ts/src/client.ts @@ -0,0 +1,144 @@ +// This file is auto-generated, don't edit it +import Util from '@alicloud/tea-util'; +import OpenApi, * as $OpenApi from '@alicloud/openapi-client'; +import SDKClient, * as $SDKClient from '../../../../../generated/ts/src/client'; +import Console from '@alicloud/tea-console'; +import * as $tea from '@alicloud/tea-typescript'; + + +export default class Client { + _sdkClient: SDKClient; + _endpoint: string; + + constructor() { + this._endpoint = "127.0.0.1:7001"; + let config = new $OpenApi.Config({ + endpoint: this._endpoint, + }); + this._sdkClient = new SDKClient(config); + } + + + /** + * @remarks + * test func for Connection Controller apis: + * createConnection * + * deleteConnection * + * updateConnection * + * getConnection * + * selectOneConnection * + * listConnections * + * listEnumsResponse * + */ + async testCreateConnection(): Promise { + let request = new $SDKClient.CreateConnectionRequest({ + connectionName: "new-connection", + networkParameters: new $SDKClient.CreateConnectionRequestNetworkParameters({ + networkType: "PublicNetwork", + }), + }); + try { + let res = await this._sdkClient.createConnection(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testDeleteConnection(): Promise { + let request = new $SDKClient.DeleteConnectionRequest({ + connectionName: "new-connection", + }); + try { + let res = await this._sdkClient.deleteConnection(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testUpdateConnection(): Promise { + let request = new $SDKClient.UpdateConnectionRequest({ + connectionName: "new-connection", + networkParameters: new $SDKClient.UpdateConnectionRequestNetworkParameters({ + networkType: "PrivateNetwork", + securityGroupId: "eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb", + vpcId: "eb-test/vpc-bp1symadadwnwgmqud", + vswitcheId: "vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c", + }), + }); + try { + let res = await this._sdkClient.updateConnection(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testGetConnections(): Promise { + let request = new $SDKClient.GetConnectionRequest({ + connectionName: "new-connection", + }); + try { + let res = await this._sdkClient.getConnection(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testSelectOneConnection(): Promise { + let request = new $SDKClient.GetConnectionRequest({ + connectionName: "new-connection", + }); + try { + let res = await this._sdkClient.selectOneConnection(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testListConnections(): Promise { + let request = new $SDKClient.ListConnectionsRequest({ + maxResults: 2, + }); + try { + let res = await this._sdkClient.listConnections(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testListEnumsResponse(): Promise { + try { + let res = await this._sdkClient.listEnumsResponse(); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + +} diff --git a/sdk/demo/Connection/generated/ts/src/main.ts b/sdk/demo/Connection/generated/ts/src/main.ts new file mode 100644 index 00000000..d24d3d70 --- /dev/null +++ b/sdk/demo/Connection/generated/ts/src/main.ts @@ -0,0 +1,4 @@ +import Client from './client' + +let c = new Client() +c.testListConnections() diff --git a/sdk/demo/Connection/generated/ts/tsconfig.json b/sdk/demo/Connection/generated/ts/tsconfig.json new file mode 100644 index 00000000..ae66f5b6 --- /dev/null +++ b/sdk/demo/Connection/generated/ts/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es2017", + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "outDir": "./dist", + "esModuleInterop": true + }, + "include": [ + "src/**/*" + ] +} \ No newline at end of file diff --git a/sdk/demo/EventBus/Darafile b/sdk/demo/EventBus/Darafile new file mode 100644 index 00000000..b15ddca3 --- /dev/null +++ b/sdk/demo/EventBus/Darafile @@ -0,0 +1,66 @@ +{ + "scope": "Demo", + "name": "demo", + "version": "0.0.0", + "main": "./demo.dara", + "libraries": { + "SDKClient" : "../../", + "Util": "darabonba:Util:*", + "OpenApi": "alibabacloud:OpenApi:*", + "OpenApiUtil": "alibabacloud:OpenApiUtil:*", + "Console": "darabonba:Console:*" + }, + "java": { + "package": "org.apache.rocketmq.eventbridge.demo", + "className": "Demo", + "packageInfo": { + "groupId": "org.apache.rocketmq.eventbridge", + "artifactId": "demo", + "version": "0.0.0", + "description": "EventBridge SDK demo for Java", + "url": "", + "licenseName": "The Apache License, Version 2.0", + "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.txt", + "developerId": "ludi", + "developerName": "EventBridge SDK", + "developerEmail": "zjuludi@gmail.com", + "scmConnection": "", + "scmDeveloperConnection": "", + "scmUrl": "" + } + }, + "go": { + "clientName": "DemoClient" + }, + "csharp": { + "className": "Demo", + "namespace": "RocketMQ.Eventbridge.Demo", + "packageInfo": { + "name": "sdkDemo", + "version": "0.0.0", + "title": "eventbridge-sdk-demo", + "description": "open source eventbridge (20240701) SDK Demo Library for .NET" + } + }, + "php": { + "package": "RocketMQ.Eventbridge.SDK.Demo", + "clientName": "Demo", + "packageInfo": { + "name": "rocketmq/eventbridge-sdk-demo", + "desc": "RocketMQ eventbridge (20240701) SDK Demo for PHP", + "github": "unavailable", + "files": { + "LICENSE": "../LICENSE" + } + } + }, + "python": { + "package": "rocketmq_eventbridge_demo", + "clientName": "demo", + "packageInfo": { + "name": "rocketmq_eventbridge_demo", + "desc": "Alibaba Cloud eventbridge (20240701) SDK Library for Python", + "github": "unavailable" + } + } +} \ No newline at end of file diff --git a/sdk/demo/EventBus/demo.dara b/sdk/demo/EventBus/demo.dara new file mode 100644 index 00000000..15f96a2e --- /dev/null +++ b/sdk/demo/EventBus/demo.dara @@ -0,0 +1,91 @@ +import Util; +import OpenApi; +import SDKClient; +import Console; + +type @sdkClient = SDKClient; +type @endpoint = string; + +init(){ + @endpoint = '127.0.0.1:7001'; + var config = new OpenApi.Config{ + endpoint = @endpoint + }; + @sdkClient = new SDKClient(config); +} + +/** + test func for EventBus Controller apis: + * createEventBus * + * getEventBus * + * deleteEventBus * + * listEventBuses * +*/ + +async function testCreateEventBus(): void { + var request = new SDKClient.CreateEventBusRequest{ + eventBusName = 'newBus' + }; + + try { + var res = @sdkClient.createEventBus(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testDeleteEventBus(): void { + var request = new SDKClient.DeleteEventBusRequest{ + eventBusName = 'newBus' + }; + + try { + var res = @sdkClient.deleteEventBus(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testGetEventBus(): void { + var request = new SDKClient.GetEventBusRequest{ + eventBusName = 'newBus' + }; + + try { + var res = @sdkClient.getEventBus(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testListEventBuses(): void { + var request = new SDKClient.ListEventBusesRequest{ + maxResults = 2 + }; + + try { + var res = @sdkClient.listEventBuses(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} diff --git a/sdk/demo/EventBus/generated/csharp/core/Demo.cs b/sdk/demo/EventBus/generated/csharp/core/Demo.cs new file mode 100644 index 00000000..0da97ae8 --- /dev/null +++ b/sdk/demo/EventBus/generated/csharp/core/Demo.cs @@ -0,0 +1,300 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; + +using Tea; +using Tea.Utils; + + +namespace RocketMQ.Eventbridge.Demo +{ + public class Demo + { + protected RocketMQ.Eventbridge.SDK.SDKClient _sdkClient; + protected string _endpoint; + + public Demo() + { + this._endpoint = "127.0.0.1:7001"; + AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config + { + Endpoint = _endpoint, + }; + this._sdkClient = new RocketMQ.Eventbridge.SDK.SDKClient(config); + } + + static void Main(string[] _args){ + Demo demo = new Demo(); + demo.TestListEventBuses(); + } + + /// Description: + /// + /// test func for EventBus Controller apis: + /// createEventBus * + /// getEventBus * + /// deleteEventBus * + /// listEventBuses * + /// + public void TestCreateEventBus() + { + RocketMQ.Eventbridge.SDK.Models.CreateEventBusRequest request = new RocketMQ.Eventbridge.SDK.Models.CreateEventBusRequest + { + EventBusName = "newBus", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.CreateEventBusResponse res = this._sdkClient.CreateEventBus(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + /// Description: + /// + /// test func for EventBus Controller apis: + /// createEventBus * + /// getEventBus * + /// deleteEventBus * + /// listEventBuses * + /// + public async Task TestCreateEventBusAsync() + { + RocketMQ.Eventbridge.SDK.Models.CreateEventBusRequest request = new RocketMQ.Eventbridge.SDK.Models.CreateEventBusRequest + { + EventBusName = "newBus", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.CreateEventBusResponse res = await this._sdkClient.CreateEventBusAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestDeleteEventBus() + { + RocketMQ.Eventbridge.SDK.Models.DeleteEventBusRequest request = new RocketMQ.Eventbridge.SDK.Models.DeleteEventBusRequest + { + EventBusName = "newBus", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.DeleteEventBusResponse res = this._sdkClient.DeleteEventBus(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestDeleteEventBusAsync() + { + RocketMQ.Eventbridge.SDK.Models.DeleteEventBusRequest request = new RocketMQ.Eventbridge.SDK.Models.DeleteEventBusRequest + { + EventBusName = "newBus", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.DeleteEventBusResponse res = await this._sdkClient.DeleteEventBusAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestGetEventBus() + { + RocketMQ.Eventbridge.SDK.Models.GetEventBusRequest request = new RocketMQ.Eventbridge.SDK.Models.GetEventBusRequest + { + EventBusName = "newBus", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.GetEventBusResponse res = this._sdkClient.GetEventBus(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestGetEventBusAsync() + { + RocketMQ.Eventbridge.SDK.Models.GetEventBusRequest request = new RocketMQ.Eventbridge.SDK.Models.GetEventBusRequest + { + EventBusName = "newBus", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.GetEventBusResponse res = await this._sdkClient.GetEventBusAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestListEventBuses() + { + RocketMQ.Eventbridge.SDK.Models.ListEventBusesRequest request = new RocketMQ.Eventbridge.SDK.Models.ListEventBusesRequest + { + MaxResults = 2, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.ListEventBusesResponse res = this._sdkClient.ListEventBuses(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestListEventBusesAsync() + { + RocketMQ.Eventbridge.SDK.Models.ListEventBusesRequest request = new RocketMQ.Eventbridge.SDK.Models.ListEventBusesRequest + { + MaxResults = 2, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.ListEventBusesResponse res = await this._sdkClient.ListEventBusesAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + } +} diff --git a/sdk/demo/EventBus/generated/csharp/core/Properties/AssemblyInfo.cs b/sdk/demo/EventBus/generated/csharp/core/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..8aecd4a9 --- /dev/null +++ b/sdk/demo/EventBus/generated/csharp/core/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("eventbridge-sdk-demo")] +[assembly: AssemblyDescription("open source eventbridge (20240701) SDK Demo Library for .NET")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3dffb940-8a2f-11ef-8b25-0f1bdddbcdce")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("0.0.1.0")] +[assembly: AssemblyFileVersion("0.0.1.0")] diff --git a/sdk/demo/EventBus/generated/csharp/core/sdkDemo.csproj b/sdk/demo/EventBus/generated/csharp/core/sdkDemo.csproj new file mode 100644 index 00000000..8ea12bc6 --- /dev/null +++ b/sdk/demo/EventBus/generated/csharp/core/sdkDemo.csproj @@ -0,0 +1,44 @@ + + + + netstandard2.0;net45;netcoreapp8.0 + RocketMQ.Eventbridge.Demo + Exe + false + false + RocketMQ.Eventbridge.Demo + + 5 + open source eventbridge (20240701) SDK Demo Library for .NET + + + NETSTANDARD2_0 + + + NET45 + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + \ No newline at end of file diff --git a/sdk/demo/EventBus/generated/go/client/client.go b/sdk/demo/EventBus/generated/go/client/client.go new file mode 100644 index 00000000..68f92558 --- /dev/null +++ b/sdk/demo/EventBus/generated/go/client/client.go @@ -0,0 +1,189 @@ +// This file is auto-generated, don't edit it. Thanks. +package client + +import ( + openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" + console "github.com/alibabacloud-go/tea-console/client" + util "github.com/alibabacloud-go/tea-utils/v2/service" + "github.com/alibabacloud-go/tea/tea" + sdkclient "github.com/org-apache-rocketmq/eventbridge-sdk/client" +) + +type DemoClient struct { + SdkClient *sdkclient.Client + Endpoint *string +} + +func NewClient() (*DemoClient, error) { + client := new(DemoClient) + err := client.Init() + return client, err +} + +func (client *DemoClient) Init() (_err error) { + client.Endpoint = tea.String("127.0.0.1:7001") + config := &openapi.Config{ + Endpoint: client.Endpoint, + } + client.SdkClient, _err = sdkclient.NewClient(config) + if _err != nil { + return _err + } + + return nil +} + +// Description: +// +// test func for EventBus Controller apis: +// +// createEventBus * +// +// getEventBus * +// +// deleteEventBus * +// +// listEventBuses * +func (client *DemoClient) TestCreateEventBus() (_err error) { + request := &sdkclient.CreateEventBusRequest{ + EventBusName: tea.String("newBus"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.CreateEventBus(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestDeleteEventBus() (_err error) { + request := &sdkclient.DeleteEventBusRequest{ + EventBusName: tea.String("newBus"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.DeleteEventBus(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestGetEventBus() (_err error) { + request := &sdkclient.GetEventBusRequest{ + EventBusName: tea.String("newBus"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.GetEventBus(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestListEventBuses() (_err error) { + request := &sdkclient.ListEventBusesRequest{ + MaxResults: tea.Int32(2), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.ListEventBuses(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} diff --git a/sdk/demo/EventBus/generated/go/go.mod b/sdk/demo/EventBus/generated/go/go.mod new file mode 100644 index 00000000..ff358240 --- /dev/null +++ b/sdk/demo/EventBus/generated/go/go.mod @@ -0,0 +1,9 @@ +module client + +require ( + github.com/alibabacloud-go/tea-utils/v2 v2.0.6 + github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.10 + github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 + github.com/alibabacloud-go/tea-console v1.0.0 +) +replace github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 => ../../../../generated/go/ diff --git a/sdk/demo/EventBus/generated/go/main.go b/sdk/demo/EventBus/generated/go/main.go new file mode 100644 index 00000000..4e311a20 --- /dev/null +++ b/sdk/demo/EventBus/generated/go/main.go @@ -0,0 +1,11 @@ +package main + +import ( + "client/client" +) + +func main() { + demo := new(client.DemoClient) + demo.Init() + demo.TestCreateEventBus() +} diff --git a/sdk/demo/EventBus/generated/java/pom.xml b/sdk/demo/EventBus/generated/java/pom.xml new file mode 100644 index 00000000..ef0ec329 --- /dev/null +++ b/sdk/demo/EventBus/generated/java/pom.xml @@ -0,0 +1,122 @@ + + + 4.0.0 + org.apache.rocketmq.eventbridge + demo + 0.0.0 + jar + demo + EventBridge SDK demo for Java + + + + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + ludi + EventBridge SDK + zjuludi@gmail.com + + + + + sonatype-nexus-snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + + + + + com.aliyun + tea-util + 0.2.23 + + + com.aliyun + tea-openapi + 0.3.6 + + + org.apache.rocketmq.eventbridge + sdk + 0.0.0 + + + com.aliyun + tea-console + 0.0.1 + + + com.aliyun + tea + 1.1.14 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 8 + 8 + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + true + + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.3 + true + + sonatype-nexus-staging + https://s01.oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + UTF-8 + none + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.1 + + + + \ No newline at end of file diff --git a/sdk/demo/EventBus/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java b/sdk/demo/EventBus/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java new file mode 100644 index 00000000..075a3315 --- /dev/null +++ b/sdk/demo/EventBus/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java @@ -0,0 +1,110 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.demo; + +import com.aliyun.tea.*; + +public class Demo { + + public org.apache.rocketmq.eventbridge.sdk.Client _sdkClient; + public String _endpoint; + public Demo() throws Exception { + this._endpoint = "127.0.0.1:7001"; + com.aliyun.teaopenapi.models.Config config = com.aliyun.teaopenapi.models.Config.build(TeaConverter.buildMap( + new TeaPair("endpoint", _endpoint) + )); + this._sdkClient = new org.apache.rocketmq.eventbridge.sdk.Client(config); + } + + public static void main(String[] args) { + try { + Demo demo = new Demo(); + demo.testListEventBuses(); + } catch (Exception e) { + // TODO: handle exception + } + } + + /** + * description : + *

test func for EventBus Controller apis: + * createEventBus * + * getEventBus * + * deleteEventBus * + * listEventBuses *

+ */ + public void testCreateEventBus() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.CreateEventBusRequest request = org.apache.rocketmq.eventbridge.sdk.models.CreateEventBusRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.CreateEventBusResponse res = _sdkClient.createEventBus(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testDeleteEventBus() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.DeleteEventBusRequest request = org.apache.rocketmq.eventbridge.sdk.models.DeleteEventBusRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.DeleteEventBusResponse res = _sdkClient.deleteEventBus(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testGetEventBus() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.GetEventBusRequest request = org.apache.rocketmq.eventbridge.sdk.models.GetEventBusRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.GetEventBusResponse res = _sdkClient.getEventBus(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testListEventBuses() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.ListEventBusesRequest request = org.apache.rocketmq.eventbridge.sdk.models.ListEventBusesRequest.build(TeaConverter.buildMap( + new TeaPair("maxResults", 2) + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.ListEventBusesResponse res = _sdkClient.listEventBuses(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } +} diff --git a/sdk/demo/EventBus/generated/php/.gitignore b/sdk/demo/EventBus/generated/php/.gitignore new file mode 100644 index 00000000..89c7aa58 --- /dev/null +++ b/sdk/demo/EventBus/generated/php/.gitignore @@ -0,0 +1,15 @@ +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +composer.lock + +.vscode/ +.idea +.DS_Store + +cache/ +*.cache +runtime/ +.php_cs.cache diff --git a/sdk/demo/EventBus/generated/php/.php_cs.dist b/sdk/demo/EventBus/generated/php/.php_cs.dist new file mode 100644 index 00000000..8617ec2f --- /dev/null +++ b/sdk/demo/EventBus/generated/php/.php_cs.dist @@ -0,0 +1,65 @@ +setRiskyAllowed(true) + ->setIndent(' ') + ->setRules([ + '@PSR2' => true, + '@PhpCsFixer' => true, + '@Symfony:risky' => true, + 'concat_space' => ['spacing' => 'one'], + 'array_syntax' => ['syntax' => 'short'], + 'array_indentation' => true, + 'combine_consecutive_unsets' => true, + 'method_separation' => true, + 'single_quote' => true, + 'declare_equal_normalize' => true, + 'function_typehint_space' => true, + 'hash_to_slash_comment' => true, + 'include' => true, + 'lowercase_cast' => true, + 'no_multiline_whitespace_before_semicolons' => true, + 'no_leading_import_slash' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_spaces_around_offset' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unused_imports' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'object_operator_without_whitespace' => true, + 'single_blank_line_before_namespace' => true, + 'single_class_element_per_statement' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline_array' => true, + 'trim_array_spaces' => true, + 'unary_operator_spaces' => true, + 'whitespace_after_comma_in_array' => true, + 'no_extra_consecutive_blank_lines' => [ + 'curly_brace_block', + 'extra', + 'parenthesis_brace_block', + 'square_brace_block', + 'throw', + 'use', + ], + 'binary_operator_spaces' => [ + 'align_double_arrow' => true, + 'align_equals' => true, + ], + 'braces' => [ + 'allow_single_line_closure' => true, + ], + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('vendor') + ->exclude('tests') + ->in(__DIR__) + ); diff --git a/sdk/demo/EventBus/generated/php/autoload.php b/sdk/demo/EventBus/generated/php/autoload.php new file mode 100644 index 00000000..5bfe0a1a --- /dev/null +++ b/sdk/demo/EventBus/generated/php/autoload.php @@ -0,0 +1,15 @@ +5.5", + "alibabacloud/tea-utils": "^0.2.21", + "alibabacloud/darabonba-openapi": "^0.2.12", + "rocketmq/eventbridge-sdk": "^0.0.0", + "alibabacloud/tea-console": "^0.1.0" + }, + "autoload": { + "psr-4": { + "RocketMQ\\Eventbridge\\SDK\\Demo\\": "src" + } + }, + "scripts": { + "fixer": "php-cs-fixer fix ./" + }, + "config": { + "sort-packages": true, + "preferred-install": "dist", + "optimize-autoloader": true + }, + "prefer-stable": true, + "repositories": { + "rocketmq":{ + "type" : "path", + "url": "../../../../generated/php" + } + } +} diff --git a/sdk/demo/EventBus/generated/php/main.php b/sdk/demo/EventBus/generated/php/main.php new file mode 100644 index 00000000..626ca3ef --- /dev/null +++ b/sdk/demo/EventBus/generated/php/main.php @@ -0,0 +1,8 @@ +testListEventBuses(); diff --git a/sdk/demo/EventBus/generated/php/src/Demo.php b/sdk/demo/EventBus/generated/php/src/Demo.php new file mode 100644 index 00000000..38c66b1d --- /dev/null +++ b/sdk/demo/EventBus/generated/php/src/Demo.php @@ -0,0 +1,127 @@ +_endpoint = "127.0.0.1:7001"; + $config = new Config([ + "endpoint" => $this->_endpoint + ]); + $this->_sdkClient = new SDKClient($config); + } + + /** + * test func for EventBus Controller apis: + * * createEventBus * + * * getEventBus * + * * deleteEventBus * + * * listEventBuses * + * @return void + */ + public function testCreateEventBus(){ + $request = new CreateEventBusRequest([ + "eventBusName" => "newBus" + ]); + try { + $res = $this->_sdkClient->createEventBus($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testDeleteEventBus(){ + $request = new DeleteEventBusRequest([ + "eventBusName" => "newBus" + ]); + try { + $res = $this->_sdkClient->deleteEventBus($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testGetEventBus(){ + $request = new GetEventBusRequest([ + "eventBusName" => "newBus" + ]); + try { + $res = $this->_sdkClient->getEventBus($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testListEventBuses(){ + $request = new ListEventBusesRequest([ + "maxResults" => 2 + ]); + try { + $res = $this->_sdkClient->listEventBuses($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } +} diff --git a/sdk/demo/EventBus/generated/python/.gitignore b/sdk/demo/EventBus/generated/python/.gitignore new file mode 100644 index 00000000..2bcfffae --- /dev/null +++ b/sdk/demo/EventBus/generated/python/.gitignore @@ -0,0 +1,5 @@ +runtime/ +.idea/ +.vscode/ +__pycache__/ +.pytest_cache/ \ No newline at end of file diff --git a/sdk/demo/EventBus/generated/python/rocketmq_eventbridge_demo/__init__.py b/sdk/demo/EventBus/generated/python/rocketmq_eventbridge_demo/__init__.py new file mode 100644 index 00000000..5becc17c --- /dev/null +++ b/sdk/demo/EventBus/generated/python/rocketmq_eventbridge_demo/__init__.py @@ -0,0 +1 @@ +__version__ = "1.0.0" diff --git a/sdk/demo/EventBus/generated/python/rocketmq_eventbridge_demo/demo.py b/sdk/demo/EventBus/generated/python/rocketmq_eventbridge_demo/demo.py new file mode 100644 index 00000000..41015920 --- /dev/null +++ b/sdk/demo/EventBus/generated/python/rocketmq_eventbridge_demo/demo.py @@ -0,0 +1,139 @@ +# -*- coding: utf-8 -*- +# This file is auto-generated, don't edit it. Thanks. +from rocketmq_eventbridge.client import Client as SDKClientClient +from alibabacloud_tea_openapi import models as open_api_models +from rocketmq_eventbridge import models as sdkclient_models +from alibabacloud_tea_console.client import Client as ConsoleClient +from alibabacloud_tea_util.client import Client as UtilClient + + +class Demo: + _sdk_client: SDKClientClient = None + _endpoint: str = None + + def __init__(self): + self._endpoint = '127.0.0.1:7001' + config = open_api_models.Config( + endpoint=self._endpoint + ) + self._sdk_client = SDKClientClient(config) + + def test_create_event_bus(self) -> None: + """ + test func for EventBus Controller apis: + createEventBus *\ + getEventBus *\ + deleteEventBus *\ + listEventBuses *\ + """ + request = sdkclient_models.CreateEventBusRequest( + event_bus_name='newBus' + ) + try: + res = self._sdk_client.create_event_bus(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_create_event_bus_async(self) -> None: + """ + test func for EventBus Controller apis: + createEventBus *\ + getEventBus *\ + deleteEventBus *\ + listEventBuses *\ + """ + request = sdkclient_models.CreateEventBusRequest( + event_bus_name='newBus' + ) + try: + res = await self._sdk_client.create_event_bus_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_delete_event_bus(self) -> None: + request = sdkclient_models.DeleteEventBusRequest( + event_bus_name='newBus' + ) + try: + res = self._sdk_client.delete_event_bus(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_delete_event_bus_async(self) -> None: + request = sdkclient_models.DeleteEventBusRequest( + event_bus_name='newBus' + ) + try: + res = await self._sdk_client.delete_event_bus_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_get_event_bus(self) -> None: + request = sdkclient_models.GetEventBusRequest( + event_bus_name='newBus' + ) + try: + res = self._sdk_client.get_event_bus(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_get_event_bus_async(self) -> None: + request = sdkclient_models.GetEventBusRequest( + event_bus_name='newBus' + ) + try: + res = await self._sdk_client.get_event_bus_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_list_event_buses(self) -> None: + request = sdkclient_models.ListEventBusesRequest( + max_results=2 + ) + try: + res = self._sdk_client.list_event_buses(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_list_event_buses_async(self) -> None: + request = sdkclient_models.ListEventBusesRequest( + max_results=2 + ) + try: + res = await self._sdk_client.list_event_buses_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') +demo = Demo() +demo.test_list_event_buses() diff --git a/sdk/demo/EventBus/generated/python/setup.py b/sdk/demo/EventBus/generated/python/setup.py new file mode 100644 index 00000000..3824f4cc --- /dev/null +++ b/sdk/demo/EventBus/generated/python/setup.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +""" + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +""" + +import os +from setuptools import setup, find_packages + +""" +setup module for rocketmq_eventbridge_demo. + +Created on 14/10/2024 + +@author: +""" + +PACKAGE = "rocketmq_eventbridge_demo" +NAME = "rocketmq_eventbridge_demo" or "alibabacloud-package" +DESCRIPTION = "Alibaba Cloud eventbridge (20240701) SDK Library for Python" +AUTHOR = "" +AUTHOR_EMAIL = "" +URL = "unavailable" +VERSION = __import__(PACKAGE).__version__ +REQUIRES = [ + "alibabacloud_tea_util>=0.3.13, <1.0.0", + "alibabacloud_tea_openapi>=0.3.12, <1.0.0", + "rocketmq_eventbridge20240701>=0.0.0, <1.0.0", + "alibabacloud_tea_console>=0.0.1, <1.0.0" +] + +LONG_DESCRIPTION = '' +if os.path.exists('./README.md'): + with open("README.md", encoding='utf-8') as fp: + LONG_DESCRIPTION = fp.read() + +setup( + name=NAME, + version=VERSION, + description=DESCRIPTION, + long_description=LONG_DESCRIPTION, + long_description_content_type='text/markdown', + author=AUTHOR, + author_email=AUTHOR_EMAIL, + license="Apache License 2.0", + url=URL, + keywords=["rocketmq","eventbridge","demo"], + packages=find_packages(exclude=["tests*"]), + include_package_data=True, + platforms="any", + install_requires=REQUIRES, + python_requires=">=3.6", + classifiers=( + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + "Topic :: Software Development" + ) +) diff --git a/sdk/demo/EventBus/generated/ts/package.json b/sdk/demo/EventBus/generated/ts/package.json new file mode 100644 index 00000000..be9669b9 --- /dev/null +++ b/sdk/demo/EventBus/generated/ts/package.json @@ -0,0 +1,31 @@ +{ + "name": "", + "version": "1.0.0", + "description": "", + "main": "dist/client.js", + "scripts": { + "test": "mocha --reporter spec --timeout 3000 test/*.test.js", + "test-cov": "nyc -e .ts -r=html -r=text -r=lcov npm run test", + "build": "tsc", + "prepublishOnly": "tsc" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "@types/node": "^12.12.26", + "nyc": "^15.0.0", + "source-map-support": "^0.5.16", + "ts-node": "^8.6.2", + "typescript": "^3.7.5" + }, + "dependencies": { + "@alicloud/tea-typescript": "^1.7.1", + "@alicloud/tea-util": "^1.4.9", + "@alicloud/openapi-client": "^0.4.12", + "@alicloud/tea-console": "^1.0.0" + }, + "files": [ + "dist", + "src" + ] +} \ No newline at end of file diff --git a/sdk/demo/EventBus/generated/ts/src/client.ts b/sdk/demo/EventBus/generated/ts/src/client.ts new file mode 100644 index 00000000..1696e9ca --- /dev/null +++ b/sdk/demo/EventBus/generated/ts/src/client.ts @@ -0,0 +1,90 @@ +// This file is auto-generated, don't edit it +import Util from '@alicloud/tea-util'; +import OpenApi, * as $OpenApi from '@alicloud/openapi-client'; +import SDKClient, * as $SDKClient from '../../../../../generated/ts/src/client'; +import Console from '@alicloud/tea-console'; +import * as $tea from '@alicloud/tea-typescript'; + + +export default class Client { + _sdkClient: SDKClient; + _endpoint: string; + + constructor() { + this._endpoint = "127.0.0.1:7001"; + let config = new $OpenApi.Config({ + endpoint: this._endpoint, + }); + this._sdkClient = new SDKClient(config); + } + + + /** + * @remarks + * test func for EventBus Controller apis: + * createEventBus * + * getEventBus * + * deleteEventBus * + * listEventBuses * + */ + async testCreateEventBus(): Promise { + let request = new $SDKClient.CreateEventBusRequest({ + eventBusName: "newBus", + }); + try { + let res = await this._sdkClient.createEventBus(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testDeleteEventBus(): Promise { + let request = new $SDKClient.DeleteEventBusRequest({ + eventBusName: "newBus", + }); + try { + let res = await this._sdkClient.deleteEventBus(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testGetEventBus(): Promise { + let request = new $SDKClient.GetEventBusRequest({ + eventBusName: "newBus", + }); + try { + let res = await this._sdkClient.getEventBus(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testListEventBuses(): Promise { + let request = new $SDKClient.ListEventBusesRequest({ + maxResults: 2, + }); + try { + let res = await this._sdkClient.listEventBuses(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + +} diff --git a/sdk/demo/EventBus/generated/ts/src/main.ts b/sdk/demo/EventBus/generated/ts/src/main.ts new file mode 100644 index 00000000..9d3e5c1d --- /dev/null +++ b/sdk/demo/EventBus/generated/ts/src/main.ts @@ -0,0 +1,4 @@ +import Client from './client' + +let c = new Client() +c.testListEventBuses() \ No newline at end of file diff --git a/sdk/demo/EventBus/generated/ts/tsconfig.json b/sdk/demo/EventBus/generated/ts/tsconfig.json new file mode 100644 index 00000000..ae66f5b6 --- /dev/null +++ b/sdk/demo/EventBus/generated/ts/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es2017", + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "outDir": "./dist", + "esModuleInterop": true + }, + "include": [ + "src/**/*" + ] +} \ No newline at end of file diff --git a/sdk/demo/EventData/Darafile b/sdk/demo/EventData/Darafile new file mode 100644 index 00000000..b15ddca3 --- /dev/null +++ b/sdk/demo/EventData/Darafile @@ -0,0 +1,66 @@ +{ + "scope": "Demo", + "name": "demo", + "version": "0.0.0", + "main": "./demo.dara", + "libraries": { + "SDKClient" : "../../", + "Util": "darabonba:Util:*", + "OpenApi": "alibabacloud:OpenApi:*", + "OpenApiUtil": "alibabacloud:OpenApiUtil:*", + "Console": "darabonba:Console:*" + }, + "java": { + "package": "org.apache.rocketmq.eventbridge.demo", + "className": "Demo", + "packageInfo": { + "groupId": "org.apache.rocketmq.eventbridge", + "artifactId": "demo", + "version": "0.0.0", + "description": "EventBridge SDK demo for Java", + "url": "", + "licenseName": "The Apache License, Version 2.0", + "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.txt", + "developerId": "ludi", + "developerName": "EventBridge SDK", + "developerEmail": "zjuludi@gmail.com", + "scmConnection": "", + "scmDeveloperConnection": "", + "scmUrl": "" + } + }, + "go": { + "clientName": "DemoClient" + }, + "csharp": { + "className": "Demo", + "namespace": "RocketMQ.Eventbridge.Demo", + "packageInfo": { + "name": "sdkDemo", + "version": "0.0.0", + "title": "eventbridge-sdk-demo", + "description": "open source eventbridge (20240701) SDK Demo Library for .NET" + } + }, + "php": { + "package": "RocketMQ.Eventbridge.SDK.Demo", + "clientName": "Demo", + "packageInfo": { + "name": "rocketmq/eventbridge-sdk-demo", + "desc": "RocketMQ eventbridge (20240701) SDK Demo for PHP", + "github": "unavailable", + "files": { + "LICENSE": "../LICENSE" + } + } + }, + "python": { + "package": "rocketmq_eventbridge_demo", + "clientName": "demo", + "packageInfo": { + "name": "rocketmq_eventbridge_demo", + "desc": "Alibaba Cloud eventbridge (20240701) SDK Library for Python", + "github": "unavailable" + } + } +} \ No newline at end of file diff --git a/sdk/demo/EventData/demo.dara b/sdk/demo/EventData/demo.dara new file mode 100644 index 00000000..5e88f45c --- /dev/null +++ b/sdk/demo/EventData/demo.dara @@ -0,0 +1,38 @@ +import Util; +import OpenApi; +import SDKClient; +import Console; + +type @sdkClient = SDKClient; +type @endpoint = string; + +init(){ + @endpoint = '127.0.0.1:7001'; + var config = new OpenApi.Config{ + endpoint = @endpoint + }; + @sdkClient = new SDKClient(config); +} + +/** + EventData Controller apis: + * putEvents * +*/ + +async function testPutEvents(): void { + var request = new SDKClient.PutEventsRequest{ + eventBusName = 'demo-bus', + event = 'an event for API test' + }; + + try { + var res = @sdkClient.putEvents(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} diff --git a/sdk/demo/EventData/generated/csharp/core/Demo.cs b/sdk/demo/EventData/generated/csharp/core/Demo.cs new file mode 100644 index 00000000..db4eb234 --- /dev/null +++ b/sdk/demo/EventData/generated/csharp/core/Demo.cs @@ -0,0 +1,110 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; + +using Tea; +using Tea.Utils; + + +namespace RocketMQ.Eventbridge.Demo +{ + public class Demo + { + protected RocketMQ.Eventbridge.SDK.SDKClient _sdkClient; + protected string _endpoint; + + public Demo() + { + this._endpoint = "127.0.0.1:7001"; + AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config + { + Endpoint = _endpoint, + }; + this._sdkClient = new RocketMQ.Eventbridge.SDK.SDKClient(config); + } + + static void Main(string[] _args){ + Demo demo = new Demo(); + demo.TestPutEvents(); + } + + /// Description: + /// + /// EventData Controller apis: + /// putEvents * + /// + public void TestPutEvents() + { + RocketMQ.Eventbridge.SDK.Models.PutEventsRequest request = new RocketMQ.Eventbridge.SDK.Models.PutEventsRequest + { + EventBusName = "demo-bus", + Event = "an event for API test", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.PutEventsResponse res = this._sdkClient.PutEvents(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + /// Description: + /// + /// EventData Controller apis: + /// putEvents * + /// + public async Task TestPutEventsAsync() + { + RocketMQ.Eventbridge.SDK.Models.PutEventsRequest request = new RocketMQ.Eventbridge.SDK.Models.PutEventsRequest + { + EventBusName = "demo-bus", + Event = "an event for API test", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.PutEventsResponse res = await this._sdkClient.PutEventsAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + } +} diff --git a/sdk/demo/EventData/generated/csharp/core/Properties/AssemblyInfo.cs b/sdk/demo/EventData/generated/csharp/core/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..9650de4a --- /dev/null +++ b/sdk/demo/EventData/generated/csharp/core/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("eventbridge-sdk-demo")] +[assembly: AssemblyDescription("open source eventbridge (20240701) SDK Demo Library for .NET")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("45b48850-8a2f-11ef-9161-cba700e38850")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("0.0.1.0")] +[assembly: AssemblyFileVersion("0.0.1.0")] diff --git a/sdk/demo/EventData/generated/csharp/core/sdkDemo.csproj b/sdk/demo/EventData/generated/csharp/core/sdkDemo.csproj new file mode 100644 index 00000000..8ea12bc6 --- /dev/null +++ b/sdk/demo/EventData/generated/csharp/core/sdkDemo.csproj @@ -0,0 +1,44 @@ + + + + netstandard2.0;net45;netcoreapp8.0 + RocketMQ.Eventbridge.Demo + Exe + false + false + RocketMQ.Eventbridge.Demo + + 5 + open source eventbridge (20240701) SDK Demo Library for .NET + + + NETSTANDARD2_0 + + + NET45 + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + \ No newline at end of file diff --git a/sdk/demo/EventData/generated/go/client/client.go b/sdk/demo/EventData/generated/go/client/client.go new file mode 100644 index 00000000..3ba1e83b --- /dev/null +++ b/sdk/demo/EventData/generated/go/client/client.go @@ -0,0 +1,76 @@ +// This file is auto-generated, don't edit it. Thanks. +package client + +import ( + openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" + console "github.com/alibabacloud-go/tea-console/client" + util "github.com/alibabacloud-go/tea-utils/v2/service" + "github.com/alibabacloud-go/tea/tea" + sdkclient "github.com/org-apache-rocketmq/eventbridge-sdk/client" +) + +type DemoClient struct { + SdkClient *sdkclient.Client + Endpoint *string +} + +func NewClient() (*DemoClient, error) { + client := new(DemoClient) + err := client.Init() + return client, err +} + +func (client *DemoClient) Init() (_err error) { + client.Endpoint = tea.String("127.0.0.1:7001") + config := &openapi.Config{ + Endpoint: client.Endpoint, + } + client.SdkClient, _err = sdkclient.NewClient(config) + if _err != nil { + return _err + } + + return nil +} + +// Description: +// +// EventData Controller apis: +// +// putEvents * +func (client *DemoClient) TestPutEvents() (_err error) { + request := &sdkclient.PutEventsRequest{ + EventBusName: tea.String("demo-bus"), + Event: tea.String("an event for API test"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.PutEvents(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} diff --git a/sdk/demo/EventData/generated/go/go.mod b/sdk/demo/EventData/generated/go/go.mod new file mode 100644 index 00000000..ff358240 --- /dev/null +++ b/sdk/demo/EventData/generated/go/go.mod @@ -0,0 +1,9 @@ +module client + +require ( + github.com/alibabacloud-go/tea-utils/v2 v2.0.6 + github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.10 + github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 + github.com/alibabacloud-go/tea-console v1.0.0 +) +replace github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 => ../../../../generated/go/ diff --git a/sdk/demo/EventData/generated/go/main.go b/sdk/demo/EventData/generated/go/main.go new file mode 100644 index 00000000..d22e104a --- /dev/null +++ b/sdk/demo/EventData/generated/go/main.go @@ -0,0 +1,11 @@ +package main + +import ( + "client/client" +) + +func main() { + demo := new(client.DemoClient) + demo.Init() + demo.TestPutEvents() +} diff --git a/sdk/demo/EventData/generated/java/pom.xml b/sdk/demo/EventData/generated/java/pom.xml new file mode 100644 index 00000000..ef0ec329 --- /dev/null +++ b/sdk/demo/EventData/generated/java/pom.xml @@ -0,0 +1,122 @@ + + + 4.0.0 + org.apache.rocketmq.eventbridge + demo + 0.0.0 + jar + demo + EventBridge SDK demo for Java + + + + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + ludi + EventBridge SDK + zjuludi@gmail.com + + + + + sonatype-nexus-snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + + + + + com.aliyun + tea-util + 0.2.23 + + + com.aliyun + tea-openapi + 0.3.6 + + + org.apache.rocketmq.eventbridge + sdk + 0.0.0 + + + com.aliyun + tea-console + 0.0.1 + + + com.aliyun + tea + 1.1.14 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 8 + 8 + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + true + + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.3 + true + + sonatype-nexus-staging + https://s01.oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + UTF-8 + none + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.1 + + + + \ No newline at end of file diff --git a/sdk/demo/EventData/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java b/sdk/demo/EventData/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java new file mode 100644 index 00000000..5aa8d73b --- /dev/null +++ b/sdk/demo/EventData/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java @@ -0,0 +1,51 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.demo; + +import com.aliyun.tea.*; + +public class Demo { + + public org.apache.rocketmq.eventbridge.sdk.Client _sdkClient; + public String _endpoint; + public Demo() throws Exception { + this._endpoint = "127.0.0.1:7001"; + com.aliyun.teaopenapi.models.Config config = com.aliyun.teaopenapi.models.Config.build(TeaConverter.buildMap( + new TeaPair("endpoint", _endpoint) + )); + this._sdkClient = new org.apache.rocketmq.eventbridge.sdk.Client(config); + } + + public static void main(String[] args) { + try { + Demo demo = new Demo(); + demo.testPutEvents(); + } catch (Exception e) { + // TODO: handle exception + } + } + + /** + * description : + *

EventData Controller apis: + * putEvents *

+ */ + public void testPutEvents() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.PutEventsRequest request = org.apache.rocketmq.eventbridge.sdk.models.PutEventsRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "demo-bus"), + new TeaPair("event", "an event for API test") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.PutEventsResponse res = _sdkClient.putEvents(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } +} diff --git a/sdk/demo/EventData/generated/php/.gitignore b/sdk/demo/EventData/generated/php/.gitignore new file mode 100644 index 00000000..89c7aa58 --- /dev/null +++ b/sdk/demo/EventData/generated/php/.gitignore @@ -0,0 +1,15 @@ +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +composer.lock + +.vscode/ +.idea +.DS_Store + +cache/ +*.cache +runtime/ +.php_cs.cache diff --git a/sdk/demo/EventData/generated/php/.php_cs.dist b/sdk/demo/EventData/generated/php/.php_cs.dist new file mode 100644 index 00000000..8617ec2f --- /dev/null +++ b/sdk/demo/EventData/generated/php/.php_cs.dist @@ -0,0 +1,65 @@ +setRiskyAllowed(true) + ->setIndent(' ') + ->setRules([ + '@PSR2' => true, + '@PhpCsFixer' => true, + '@Symfony:risky' => true, + 'concat_space' => ['spacing' => 'one'], + 'array_syntax' => ['syntax' => 'short'], + 'array_indentation' => true, + 'combine_consecutive_unsets' => true, + 'method_separation' => true, + 'single_quote' => true, + 'declare_equal_normalize' => true, + 'function_typehint_space' => true, + 'hash_to_slash_comment' => true, + 'include' => true, + 'lowercase_cast' => true, + 'no_multiline_whitespace_before_semicolons' => true, + 'no_leading_import_slash' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_spaces_around_offset' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unused_imports' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'object_operator_without_whitespace' => true, + 'single_blank_line_before_namespace' => true, + 'single_class_element_per_statement' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline_array' => true, + 'trim_array_spaces' => true, + 'unary_operator_spaces' => true, + 'whitespace_after_comma_in_array' => true, + 'no_extra_consecutive_blank_lines' => [ + 'curly_brace_block', + 'extra', + 'parenthesis_brace_block', + 'square_brace_block', + 'throw', + 'use', + ], + 'binary_operator_spaces' => [ + 'align_double_arrow' => true, + 'align_equals' => true, + ], + 'braces' => [ + 'allow_single_line_closure' => true, + ], + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('vendor') + ->exclude('tests') + ->in(__DIR__) + ); diff --git a/sdk/demo/EventData/generated/php/autoload.php b/sdk/demo/EventData/generated/php/autoload.php new file mode 100644 index 00000000..5bfe0a1a --- /dev/null +++ b/sdk/demo/EventData/generated/php/autoload.php @@ -0,0 +1,15 @@ +5.5", + "alibabacloud/tea-utils": "^0.2.21", + "alibabacloud/darabonba-openapi": "^0.2.12", + "rocketmq/eventbridge-sdk": "^0.0.0", + "alibabacloud/tea-console": "^0.1.0" + }, + "autoload": { + "psr-4": { + "RocketMQ\\Eventbridge\\SDK\\Demo\\": "src" + } + }, + "scripts": { + "fixer": "php-cs-fixer fix ./" + }, + "config": { + "sort-packages": true, + "preferred-install": "dist", + "optimize-autoloader": true + }, + "prefer-stable": true, + "repositories": { + "rocketmq":{ + "type" : "path", + "url": "../../../../generated/php" + } + } +} diff --git a/sdk/demo/EventData/generated/php/main.php b/sdk/demo/EventData/generated/php/main.php new file mode 100644 index 00000000..528edaa8 --- /dev/null +++ b/sdk/demo/EventData/generated/php/main.php @@ -0,0 +1,8 @@ +testPutEvents(); diff --git a/sdk/demo/EventData/generated/php/src/Demo.php b/sdk/demo/EventData/generated/php/src/Demo.php new file mode 100644 index 00000000..c738d7f3 --- /dev/null +++ b/sdk/demo/EventData/generated/php/src/Demo.php @@ -0,0 +1,53 @@ +_endpoint = "127.0.0.1:7001"; + $config = new Config([ + "endpoint" => $this->_endpoint + ]); + $this->_sdkClient = new SDKClient($config); + } + + /** + * EventData Controller apis: + * * putEvents * + * @return void + */ + public function testPutEvents(){ + $request = new PutEventsRequest([ + "eventBusName" => "demo-bus", + "event" => "an event for API test" + ]); + try { + $res = $this->_sdkClient->putEvents($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } +} diff --git a/sdk/demo/EventData/generated/python/.gitignore b/sdk/demo/EventData/generated/python/.gitignore new file mode 100644 index 00000000..2bcfffae --- /dev/null +++ b/sdk/demo/EventData/generated/python/.gitignore @@ -0,0 +1,5 @@ +runtime/ +.idea/ +.vscode/ +__pycache__/ +.pytest_cache/ \ No newline at end of file diff --git a/sdk/demo/EventData/generated/python/rocketmq_eventbridge_demo/__init__.py b/sdk/demo/EventData/generated/python/rocketmq_eventbridge_demo/__init__.py new file mode 100644 index 00000000..5becc17c --- /dev/null +++ b/sdk/demo/EventData/generated/python/rocketmq_eventbridge_demo/__init__.py @@ -0,0 +1 @@ +__version__ = "1.0.0" diff --git a/sdk/demo/EventData/generated/python/rocketmq_eventbridge_demo/demo.py b/sdk/demo/EventData/generated/python/rocketmq_eventbridge_demo/demo.py new file mode 100644 index 00000000..76277c53 --- /dev/null +++ b/sdk/demo/EventData/generated/python/rocketmq_eventbridge_demo/demo.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# This file is auto-generated, don't edit it. Thanks. +from rocketmq_eventbridge.client import Client as SDKClientClient +from alibabacloud_tea_openapi import models as open_api_models +from rocketmq_eventbridge import models as sdkclient_models +from alibabacloud_tea_console.client import Client as ConsoleClient +from alibabacloud_tea_util.client import Client as UtilClient + + +class Demo: + _sdk_client: SDKClientClient = None + _endpoint: str = None + + def __init__(self): + self._endpoint = '127.0.0.1:7001' + config = open_api_models.Config( + endpoint=self._endpoint + ) + self._sdk_client = SDKClientClient(config) + + def test_put_events(self) -> None: + """ + EventData Controller apis: + putEvents *\ + """ + request = sdkclient_models.PutEventsRequest( + event_bus_name='demo-bus', + event='an event for API test' + ) + try: + res = self._sdk_client.put_events(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_put_events_async(self) -> None: + """ + EventData Controller apis: + putEvents *\ + """ + request = sdkclient_models.PutEventsRequest( + event_bus_name='demo-bus', + event='an event for API test' + ) + try: + res = await self._sdk_client.put_events_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') +demo = Demo() +demo.test_put_events() diff --git a/sdk/demo/EventData/generated/python/setup.py b/sdk/demo/EventData/generated/python/setup.py new file mode 100644 index 00000000..3824f4cc --- /dev/null +++ b/sdk/demo/EventData/generated/python/setup.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +""" + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +""" + +import os +from setuptools import setup, find_packages + +""" +setup module for rocketmq_eventbridge_demo. + +Created on 14/10/2024 + +@author: +""" + +PACKAGE = "rocketmq_eventbridge_demo" +NAME = "rocketmq_eventbridge_demo" or "alibabacloud-package" +DESCRIPTION = "Alibaba Cloud eventbridge (20240701) SDK Library for Python" +AUTHOR = "" +AUTHOR_EMAIL = "" +URL = "unavailable" +VERSION = __import__(PACKAGE).__version__ +REQUIRES = [ + "alibabacloud_tea_util>=0.3.13, <1.0.0", + "alibabacloud_tea_openapi>=0.3.12, <1.0.0", + "rocketmq_eventbridge20240701>=0.0.0, <1.0.0", + "alibabacloud_tea_console>=0.0.1, <1.0.0" +] + +LONG_DESCRIPTION = '' +if os.path.exists('./README.md'): + with open("README.md", encoding='utf-8') as fp: + LONG_DESCRIPTION = fp.read() + +setup( + name=NAME, + version=VERSION, + description=DESCRIPTION, + long_description=LONG_DESCRIPTION, + long_description_content_type='text/markdown', + author=AUTHOR, + author_email=AUTHOR_EMAIL, + license="Apache License 2.0", + url=URL, + keywords=["rocketmq","eventbridge","demo"], + packages=find_packages(exclude=["tests*"]), + include_package_data=True, + platforms="any", + install_requires=REQUIRES, + python_requires=">=3.6", + classifiers=( + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + "Topic :: Software Development" + ) +) diff --git a/sdk/demo/EventData/generated/ts/package.json b/sdk/demo/EventData/generated/ts/package.json new file mode 100644 index 00000000..be9669b9 --- /dev/null +++ b/sdk/demo/EventData/generated/ts/package.json @@ -0,0 +1,31 @@ +{ + "name": "", + "version": "1.0.0", + "description": "", + "main": "dist/client.js", + "scripts": { + "test": "mocha --reporter spec --timeout 3000 test/*.test.js", + "test-cov": "nyc -e .ts -r=html -r=text -r=lcov npm run test", + "build": "tsc", + "prepublishOnly": "tsc" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "@types/node": "^12.12.26", + "nyc": "^15.0.0", + "source-map-support": "^0.5.16", + "ts-node": "^8.6.2", + "typescript": "^3.7.5" + }, + "dependencies": { + "@alicloud/tea-typescript": "^1.7.1", + "@alicloud/tea-util": "^1.4.9", + "@alicloud/openapi-client": "^0.4.12", + "@alicloud/tea-console": "^1.0.0" + }, + "files": [ + "dist", + "src" + ] +} \ No newline at end of file diff --git a/sdk/demo/EventData/generated/ts/src/client.ts b/sdk/demo/EventData/generated/ts/src/client.ts new file mode 100644 index 00000000..76539d16 --- /dev/null +++ b/sdk/demo/EventData/generated/ts/src/client.ts @@ -0,0 +1,43 @@ +// This file is auto-generated, don't edit it +import Util from '@alicloud/tea-util'; +import OpenApi, * as $OpenApi from '@alicloud/openapi-client'; +import SDKClient, * as $SDKClient from '../../../../../generated/ts/src/client'; +import Console from '@alicloud/tea-console'; +import * as $tea from '@alicloud/tea-typescript'; + + +export default class Client { + _sdkClient: SDKClient; + _endpoint: string; + + constructor() { + this._endpoint = "127.0.0.1:7001"; + let config = new $OpenApi.Config({ + endpoint: this._endpoint, + }); + this._sdkClient = new SDKClient(config); + } + + + /** + * @remarks + * EventData Controller apis: + * putEvents * + */ + async testPutEvents(): Promise { + let request = new $SDKClient.PutEventsRequest({ + eventBusName: "demo-bus", + event: "an event for API test", + }); + try { + let res = await this._sdkClient.putEvents(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + +} diff --git a/sdk/demo/EventData/generated/ts/src/main.ts b/sdk/demo/EventData/generated/ts/src/main.ts new file mode 100644 index 00000000..9ed23060 --- /dev/null +++ b/sdk/demo/EventData/generated/ts/src/main.ts @@ -0,0 +1,4 @@ +import Client from './client' + +let c = new Client() +c.testPutEvents() diff --git a/sdk/demo/EventData/generated/ts/tsconfig.json b/sdk/demo/EventData/generated/ts/tsconfig.json new file mode 100644 index 00000000..ae66f5b6 --- /dev/null +++ b/sdk/demo/EventData/generated/ts/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es2017", + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "outDir": "./dist", + "esModuleInterop": true + }, + "include": [ + "src/**/*" + ] +} \ No newline at end of file diff --git a/sdk/demo/EventRule/Darafile b/sdk/demo/EventRule/Darafile new file mode 100644 index 00000000..b15ddca3 --- /dev/null +++ b/sdk/demo/EventRule/Darafile @@ -0,0 +1,66 @@ +{ + "scope": "Demo", + "name": "demo", + "version": "0.0.0", + "main": "./demo.dara", + "libraries": { + "SDKClient" : "../../", + "Util": "darabonba:Util:*", + "OpenApi": "alibabacloud:OpenApi:*", + "OpenApiUtil": "alibabacloud:OpenApiUtil:*", + "Console": "darabonba:Console:*" + }, + "java": { + "package": "org.apache.rocketmq.eventbridge.demo", + "className": "Demo", + "packageInfo": { + "groupId": "org.apache.rocketmq.eventbridge", + "artifactId": "demo", + "version": "0.0.0", + "description": "EventBridge SDK demo for Java", + "url": "", + "licenseName": "The Apache License, Version 2.0", + "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.txt", + "developerId": "ludi", + "developerName": "EventBridge SDK", + "developerEmail": "zjuludi@gmail.com", + "scmConnection": "", + "scmDeveloperConnection": "", + "scmUrl": "" + } + }, + "go": { + "clientName": "DemoClient" + }, + "csharp": { + "className": "Demo", + "namespace": "RocketMQ.Eventbridge.Demo", + "packageInfo": { + "name": "sdkDemo", + "version": "0.0.0", + "title": "eventbridge-sdk-demo", + "description": "open source eventbridge (20240701) SDK Demo Library for .NET" + } + }, + "php": { + "package": "RocketMQ.Eventbridge.SDK.Demo", + "clientName": "Demo", + "packageInfo": { + "name": "rocketmq/eventbridge-sdk-demo", + "desc": "RocketMQ eventbridge (20240701) SDK Demo for PHP", + "github": "unavailable", + "files": { + "LICENSE": "../LICENSE" + } + } + }, + "python": { + "package": "rocketmq_eventbridge_demo", + "clientName": "demo", + "packageInfo": { + "name": "rocketmq_eventbridge_demo", + "desc": "Alibaba Cloud eventbridge (20240701) SDK Library for Python", + "github": "unavailable" + } + } +} \ No newline at end of file diff --git a/sdk/demo/EventRule/demo.dara b/sdk/demo/EventRule/demo.dara new file mode 100644 index 00000000..2aa157be --- /dev/null +++ b/sdk/demo/EventRule/demo.dara @@ -0,0 +1,157 @@ +import Util; +import OpenApi; +import SDKClient; +import Console; + +type @sdkClient = SDKClient; +type @endpoint = string; + +init(){ + @endpoint = '127.0.0.1:7001'; + var config = new OpenApi.Config{ + endpoint = @endpoint + }; + @sdkClient = new SDKClient(config); +} + +/** + EventRule Controller apis: + * createEventRule * + * getEventRule * + * deleteEventRule * + * updateEventRule * + * listEventRules * + * enableEventRule * + * disableEventRule * +*/ + +async function testCreateEventRule(): void { + var request = new SDKClient.CreateEventRuleRequest{ + eventBusName = 'newBus', + eventRuleName = 'newRule', + description = 'an event rule for test', + filterPattern = "{}" + }; + + try { + var res = @sdkClient.createEventRule(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testGetEventRule(): void { + var request = new SDKClient.GetEventRuleRequest{ + eventBusName = 'newBus', + eventRuleName = 'newRule', + }; + + try { + var res = @sdkClient.getEventRule(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testDeleteEventRule(): void { + var request = new SDKClient.DeleteEventRuleRequest{ + eventBusName = 'newBus', + eventRuleName = 'newRule', + }; + + try { + var res = @sdkClient.deleteEventRule(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testUpdateEventRule(): void { + var request = new SDKClient.UpdateEventRuleRequest{ + eventBusName = 'newBus', + eventRuleName = 'newRule', + description = 'new description for testing update API', + filterPattern = '{}' + }; + + try { + var res = @sdkClient.updateEventRule(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testListEventRules(): void { + var request = new SDKClient.ListEventRulesRequest{ + eventBusName = 'newBus', + maxResults = 2, + nextToken = "0" + }; + + try { + var res = @sdkClient.listEventRules(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testEnableEventRule(): void { + var request = new SDKClient.EnableEventRuleRequest{ + eventBusName = 'newBus', + eventRuleName = 'newRule', + }; + + try { + var res = @sdkClient.enableEventRule(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testDisableEventRule(): void { + var request = new SDKClient.DisableEventRuleRequest{ + eventBusName = 'newBus', + eventRuleName = 'newRule', + }; + + try { + var res = @sdkClient.disableEventRule(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} \ No newline at end of file diff --git a/sdk/demo/EventRule/generated/csharp/core/Demo.cs b/sdk/demo/EventRule/generated/csharp/core/Demo.cs new file mode 100644 index 00000000..c040929d --- /dev/null +++ b/sdk/demo/EventRule/generated/csharp/core/Demo.cs @@ -0,0 +1,516 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; + +using Tea; +using Tea.Utils; + + +namespace RocketMQ.Eventbridge.Demo +{ + public class Demo + { + protected RocketMQ.Eventbridge.SDK.SDKClient _sdkClient; + protected string _endpoint; + + public Demo() + { + this._endpoint = "127.0.0.1:7001"; + AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config + { + Endpoint = _endpoint, + }; + this._sdkClient = new RocketMQ.Eventbridge.SDK.SDKClient(config); + } + + static void Main(string[] _args){ + Demo demo = new Demo(); + demo.TestListEventRules(); + } + + /// Description: + /// + /// EventRule Controller apis: + /// createEventRule * + /// getEventRule * + /// deleteEventRule * + /// updateEventRule * + /// listEventRules * + /// enableEventRule * + /// disableEventRule * + /// + public void TestCreateEventRule() + { + RocketMQ.Eventbridge.SDK.Models.CreateEventRuleRequest request = new RocketMQ.Eventbridge.SDK.Models.CreateEventRuleRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + Description = "an event rule for test", + FilterPattern = "{}", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.CreateEventRuleResponse res = this._sdkClient.CreateEventRule(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + /// Description: + /// + /// EventRule Controller apis: + /// createEventRule * + /// getEventRule * + /// deleteEventRule * + /// updateEventRule * + /// listEventRules * + /// enableEventRule * + /// disableEventRule * + /// + public async Task TestCreateEventRuleAsync() + { + RocketMQ.Eventbridge.SDK.Models.CreateEventRuleRequest request = new RocketMQ.Eventbridge.SDK.Models.CreateEventRuleRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + Description = "an event rule for test", + FilterPattern = "{}", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.CreateEventRuleResponse res = await this._sdkClient.CreateEventRuleAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestGetEventRule() + { + RocketMQ.Eventbridge.SDK.Models.GetEventRuleRequest request = new RocketMQ.Eventbridge.SDK.Models.GetEventRuleRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.GetEventRuleResponse res = this._sdkClient.GetEventRule(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestGetEventRuleAsync() + { + RocketMQ.Eventbridge.SDK.Models.GetEventRuleRequest request = new RocketMQ.Eventbridge.SDK.Models.GetEventRuleRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.GetEventRuleResponse res = await this._sdkClient.GetEventRuleAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestDeleteEventRule() + { + RocketMQ.Eventbridge.SDK.Models.DeleteEventRuleRequest request = new RocketMQ.Eventbridge.SDK.Models.DeleteEventRuleRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.DeleteEventRuleResponse res = this._sdkClient.DeleteEventRule(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestDeleteEventRuleAsync() + { + RocketMQ.Eventbridge.SDK.Models.DeleteEventRuleRequest request = new RocketMQ.Eventbridge.SDK.Models.DeleteEventRuleRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.DeleteEventRuleResponse res = await this._sdkClient.DeleteEventRuleAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestUpdateEventRule() + { + RocketMQ.Eventbridge.SDK.Models.UpdateEventRuleRequest request = new RocketMQ.Eventbridge.SDK.Models.UpdateEventRuleRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + Description = "new description for testing update API", + FilterPattern = "{}", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.UpdateEventRuleResponse res = this._sdkClient.UpdateEventRule(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestUpdateEventRuleAsync() + { + RocketMQ.Eventbridge.SDK.Models.UpdateEventRuleRequest request = new RocketMQ.Eventbridge.SDK.Models.UpdateEventRuleRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + Description = "new description for testing update API", + FilterPattern = "{}", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.UpdateEventRuleResponse res = await this._sdkClient.UpdateEventRuleAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestListEventRules() + { + RocketMQ.Eventbridge.SDK.Models.ListEventRulesRequest request = new RocketMQ.Eventbridge.SDK.Models.ListEventRulesRequest + { + EventBusName = "newBus", + MaxResults = 2, + NextToken = "0", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.ListEventRulesResponse res = this._sdkClient.ListEventRules(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestListEventRulesAsync() + { + RocketMQ.Eventbridge.SDK.Models.ListEventRulesRequest request = new RocketMQ.Eventbridge.SDK.Models.ListEventRulesRequest + { + EventBusName = "newBus", + MaxResults = 2, + NextToken = "0", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.ListEventRulesResponse res = await this._sdkClient.ListEventRulesAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestEnableEventRule() + { + RocketMQ.Eventbridge.SDK.Models.EnableEventRuleRequest request = new RocketMQ.Eventbridge.SDK.Models.EnableEventRuleRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.EnableEventRuleResponse res = this._sdkClient.EnableEventRule(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestEnableEventRuleAsync() + { + RocketMQ.Eventbridge.SDK.Models.EnableEventRuleRequest request = new RocketMQ.Eventbridge.SDK.Models.EnableEventRuleRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.EnableEventRuleResponse res = await this._sdkClient.EnableEventRuleAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestDisableEventRule() + { + RocketMQ.Eventbridge.SDK.Models.DisableEventRuleRequest request = new RocketMQ.Eventbridge.SDK.Models.DisableEventRuleRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.DisableEventRuleResponse res = this._sdkClient.DisableEventRule(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestDisableEventRuleAsync() + { + RocketMQ.Eventbridge.SDK.Models.DisableEventRuleRequest request = new RocketMQ.Eventbridge.SDK.Models.DisableEventRuleRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.DisableEventRuleResponse res = await this._sdkClient.DisableEventRuleAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + } +} diff --git a/sdk/demo/EventRule/generated/csharp/core/Properties/AssemblyInfo.cs b/sdk/demo/EventRule/generated/csharp/core/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..e45f1c7a --- /dev/null +++ b/sdk/demo/EventRule/generated/csharp/core/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("eventbridge-sdk-demo")] +[assembly: AssemblyDescription("open source eventbridge (20240701) SDK Demo Library for .NET")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("48d131a0-8a2f-11ef-b432-13443a168538")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("0.0.1.0")] +[assembly: AssemblyFileVersion("0.0.1.0")] diff --git a/sdk/demo/EventRule/generated/csharp/core/sdkDemo.csproj b/sdk/demo/EventRule/generated/csharp/core/sdkDemo.csproj new file mode 100644 index 00000000..8ea12bc6 --- /dev/null +++ b/sdk/demo/EventRule/generated/csharp/core/sdkDemo.csproj @@ -0,0 +1,44 @@ + + + + netstandard2.0;net45;netcoreapp8.0 + RocketMQ.Eventbridge.Demo + Exe + false + false + RocketMQ.Eventbridge.Demo + + 5 + open source eventbridge (20240701) SDK Demo Library for .NET + + + NETSTANDARD2_0 + + + NET45 + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + \ No newline at end of file diff --git a/sdk/demo/EventRule/generated/go/client/client.go b/sdk/demo/EventRule/generated/go/client/client.go new file mode 100644 index 00000000..a666a614 --- /dev/null +++ b/sdk/demo/EventRule/generated/go/client/client.go @@ -0,0 +1,315 @@ +// This file is auto-generated, don't edit it. Thanks. +package client + +import ( + openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" + console "github.com/alibabacloud-go/tea-console/client" + util "github.com/alibabacloud-go/tea-utils/v2/service" + "github.com/alibabacloud-go/tea/tea" + sdkclient "github.com/org-apache-rocketmq/eventbridge-sdk/client" +) + +type DemoClient struct { + SdkClient *sdkclient.Client + Endpoint *string +} + +func NewClient() (*DemoClient, error) { + client := new(DemoClient) + err := client.Init() + return client, err +} + +func (client *DemoClient) Init() (_err error) { + client.Endpoint = tea.String("127.0.0.1:7001") + config := &openapi.Config{ + Endpoint: client.Endpoint, + } + client.SdkClient, _err = sdkclient.NewClient(config) + if _err != nil { + return _err + } + + return nil +} + +// Description: +// +// EventRule Controller apis: +// +// createEventRule * +// +// getEventRule * +// +// deleteEventRule * +// +// updateEventRule * +// +// listEventRules * +// +// enableEventRule * +// +// disableEventRule * +func (client *DemoClient) TestCreateEventRule() (_err error) { + request := &sdkclient.CreateEventRuleRequest{ + EventBusName: tea.String("newBus"), + EventRuleName: tea.String("newRule"), + Description: tea.String("an event rule for test"), + FilterPattern: tea.String("{}"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.CreateEventRule(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestGetEventRule() (_err error) { + request := &sdkclient.GetEventRuleRequest{ + EventBusName: tea.String("newBus"), + EventRuleName: tea.String("newRule"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.GetEventRule(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestDeleteEventRule() (_err error) { + request := &sdkclient.DeleteEventRuleRequest{ + EventBusName: tea.String("newBus"), + EventRuleName: tea.String("newRule"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.DeleteEventRule(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestUpdateEventRule() (_err error) { + request := &sdkclient.UpdateEventRuleRequest{ + EventBusName: tea.String("newBus"), + EventRuleName: tea.String("newRule"), + Description: tea.String("new description for testing update API"), + FilterPattern: tea.String("{}"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.UpdateEventRule(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestListEventRules() (_err error) { + request := &sdkclient.ListEventRulesRequest{ + EventBusName: tea.String("newBus"), + MaxResults: tea.Int32(2), + NextToken: tea.String("0"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.ListEventRules(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestEnableEventRule() (_err error) { + request := &sdkclient.EnableEventRuleRequest{ + EventBusName: tea.String("newBus"), + EventRuleName: tea.String("newRule"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.EnableEventRule(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestDisableEventRule() (_err error) { + request := &sdkclient.DisableEventRuleRequest{ + EventBusName: tea.String("newBus"), + EventRuleName: tea.String("newRule"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.DisableEventRule(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} diff --git a/sdk/demo/EventRule/generated/go/go.mod b/sdk/demo/EventRule/generated/go/go.mod new file mode 100644 index 00000000..ff358240 --- /dev/null +++ b/sdk/demo/EventRule/generated/go/go.mod @@ -0,0 +1,9 @@ +module client + +require ( + github.com/alibabacloud-go/tea-utils/v2 v2.0.6 + github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.10 + github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 + github.com/alibabacloud-go/tea-console v1.0.0 +) +replace github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 => ../../../../generated/go/ diff --git a/sdk/demo/EventRule/generated/go/main.go b/sdk/demo/EventRule/generated/go/main.go new file mode 100644 index 00000000..445d8fce --- /dev/null +++ b/sdk/demo/EventRule/generated/go/main.go @@ -0,0 +1,11 @@ +package main + +import ( + "client/client" +) + +func main() { + demo := new(client.DemoClient) + demo.Init() + demo.TestListEventRules() +} diff --git a/sdk/demo/EventRule/generated/java/pom.xml b/sdk/demo/EventRule/generated/java/pom.xml new file mode 100644 index 00000000..ef0ec329 --- /dev/null +++ b/sdk/demo/EventRule/generated/java/pom.xml @@ -0,0 +1,122 @@ + + + 4.0.0 + org.apache.rocketmq.eventbridge + demo + 0.0.0 + jar + demo + EventBridge SDK demo for Java + + + + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + ludi + EventBridge SDK + zjuludi@gmail.com + + + + + sonatype-nexus-snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + + + + + com.aliyun + tea-util + 0.2.23 + + + com.aliyun + tea-openapi + 0.3.6 + + + org.apache.rocketmq.eventbridge + sdk + 0.0.0 + + + com.aliyun + tea-console + 0.0.1 + + + com.aliyun + tea + 1.1.14 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 8 + 8 + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + true + + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.3 + true + + sonatype-nexus-staging + https://s01.oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + UTF-8 + none + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.1 + + + + \ No newline at end of file diff --git a/sdk/demo/EventRule/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java b/sdk/demo/EventRule/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java new file mode 100644 index 00000000..075fb446 --- /dev/null +++ b/sdk/demo/EventRule/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java @@ -0,0 +1,192 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.demo; + +import com.aliyun.tea.*; + +public class Demo { + + public org.apache.rocketmq.eventbridge.sdk.Client _sdkClient; + public String _endpoint; + public Demo() throws Exception { + this._endpoint = "127.0.0.1:7001"; + com.aliyun.teaopenapi.models.Config config = com.aliyun.teaopenapi.models.Config.build(TeaConverter.buildMap( + new TeaPair("endpoint", _endpoint) + )); + this._sdkClient = new org.apache.rocketmq.eventbridge.sdk.Client(config); + } + + public static void main(String[] args) { + try { + Demo demo = new Demo(); + demo.testListEventRules(); + // demo.testCreateEventRule(); + // demo.testGetEventRule(); + // demo.testUpdateEventRule(); + // demo.testGetEventRule(); + // demo.testDisableEventRule(); + // demo.testGetEventRule(); + // demo.testEnableEventRule(); + // demo.testGetEventRule(); + // demo.testDeleteEventRule(); + // demo.testListEventRules(); + } catch (Exception e) { + // TODO: handle exception + } + } + + /** + * description : + *

EventRule Controller apis: + * createEventRule * + * getEventRule * + * deleteEventRule * + * updateEventRule * + * listEventRules * + * enableEventRule * + * disableEventRule *

+ */ + public void testCreateEventRule() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.CreateEventRuleRequest request = org.apache.rocketmq.eventbridge.sdk.models.CreateEventRuleRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("eventRuleName", "newRule"), + new TeaPair("description", "an event rule for test"), + new TeaPair("filterPattern", "{}") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.CreateEventRuleResponse res = _sdkClient.createEventRule(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testGetEventRule() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.GetEventRuleRequest request = org.apache.rocketmq.eventbridge.sdk.models.GetEventRuleRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("eventRuleName", "newRule") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.GetEventRuleResponse res = _sdkClient.getEventRule(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testDeleteEventRule() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.DeleteEventRuleRequest request = org.apache.rocketmq.eventbridge.sdk.models.DeleteEventRuleRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("eventRuleName", "newRule") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.DeleteEventRuleResponse res = _sdkClient.deleteEventRule(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testUpdateEventRule() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.UpdateEventRuleRequest request = org.apache.rocketmq.eventbridge.sdk.models.UpdateEventRuleRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("eventRuleName", "newRule"), + new TeaPair("description", "new description for testing update API"), + new TeaPair("filterPattern", "{}") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.UpdateEventRuleResponse res = _sdkClient.updateEventRule(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testListEventRules() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.ListEventRulesRequest request = org.apache.rocketmq.eventbridge.sdk.models.ListEventRulesRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("maxResults", 2), + new TeaPair("nextToken", "0") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.ListEventRulesResponse res = _sdkClient.listEventRules(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testEnableEventRule() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.EnableEventRuleRequest request = org.apache.rocketmq.eventbridge.sdk.models.EnableEventRuleRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("eventRuleName", "newRule") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.EnableEventRuleResponse res = _sdkClient.enableEventRule(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testDisableEventRule() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.DisableEventRuleRequest request = org.apache.rocketmq.eventbridge.sdk.models.DisableEventRuleRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("eventRuleName", "newRule") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.DisableEventRuleResponse res = _sdkClient.disableEventRule(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } +} diff --git a/sdk/demo/EventRule/generated/php/.gitignore b/sdk/demo/EventRule/generated/php/.gitignore new file mode 100644 index 00000000..89c7aa58 --- /dev/null +++ b/sdk/demo/EventRule/generated/php/.gitignore @@ -0,0 +1,15 @@ +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +composer.lock + +.vscode/ +.idea +.DS_Store + +cache/ +*.cache +runtime/ +.php_cs.cache diff --git a/sdk/demo/EventRule/generated/php/.php_cs.dist b/sdk/demo/EventRule/generated/php/.php_cs.dist new file mode 100644 index 00000000..8617ec2f --- /dev/null +++ b/sdk/demo/EventRule/generated/php/.php_cs.dist @@ -0,0 +1,65 @@ +setRiskyAllowed(true) + ->setIndent(' ') + ->setRules([ + '@PSR2' => true, + '@PhpCsFixer' => true, + '@Symfony:risky' => true, + 'concat_space' => ['spacing' => 'one'], + 'array_syntax' => ['syntax' => 'short'], + 'array_indentation' => true, + 'combine_consecutive_unsets' => true, + 'method_separation' => true, + 'single_quote' => true, + 'declare_equal_normalize' => true, + 'function_typehint_space' => true, + 'hash_to_slash_comment' => true, + 'include' => true, + 'lowercase_cast' => true, + 'no_multiline_whitespace_before_semicolons' => true, + 'no_leading_import_slash' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_spaces_around_offset' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unused_imports' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'object_operator_without_whitespace' => true, + 'single_blank_line_before_namespace' => true, + 'single_class_element_per_statement' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline_array' => true, + 'trim_array_spaces' => true, + 'unary_operator_spaces' => true, + 'whitespace_after_comma_in_array' => true, + 'no_extra_consecutive_blank_lines' => [ + 'curly_brace_block', + 'extra', + 'parenthesis_brace_block', + 'square_brace_block', + 'throw', + 'use', + ], + 'binary_operator_spaces' => [ + 'align_double_arrow' => true, + 'align_equals' => true, + ], + 'braces' => [ + 'allow_single_line_closure' => true, + ], + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('vendor') + ->exclude('tests') + ->in(__DIR__) + ); diff --git a/sdk/demo/EventRule/generated/php/autoload.php b/sdk/demo/EventRule/generated/php/autoload.php new file mode 100644 index 00000000..5bfe0a1a --- /dev/null +++ b/sdk/demo/EventRule/generated/php/autoload.php @@ -0,0 +1,15 @@ +5.5", + "alibabacloud/tea-utils": "^0.2.21", + "alibabacloud/darabonba-openapi": "^0.2.12", + "rocketmq/eventbridge-sdk": "^0.0.0", + "alibabacloud/tea-console": "^0.1.0" + }, + "autoload": { + "psr-4": { + "RocketMQ\\Eventbridge\\SDK\\Demo\\": "src" + } + }, + "scripts": { + "fixer": "php-cs-fixer fix ./" + }, + "config": { + "sort-packages": true, + "preferred-install": "dist", + "optimize-autoloader": true + }, + "prefer-stable": true, + "repositories": { + "rocketmq":{ + "type" : "path", + "url": "../../../../generated/php" + } + } +} diff --git a/sdk/demo/EventRule/generated/php/main.php b/sdk/demo/EventRule/generated/php/main.php new file mode 100644 index 00000000..894cdf90 --- /dev/null +++ b/sdk/demo/EventRule/generated/php/main.php @@ -0,0 +1,8 @@ +testListEventRules(); diff --git a/sdk/demo/EventRule/generated/php/src/Demo.php b/sdk/demo/EventRule/generated/php/src/Demo.php new file mode 100644 index 00000000..072127ee --- /dev/null +++ b/sdk/demo/EventRule/generated/php/src/Demo.php @@ -0,0 +1,214 @@ +_endpoint = "127.0.0.1:7001"; + $config = new Config([ + "endpoint" => $this->_endpoint + ]); + $this->_sdkClient = new SDKClient($config); + } + + /** + * EventRule Controller apis: + * * createEventRule * + * * getEventRule * + * * deleteEventRule * + * * updateEventRule * + * * listEventRules * + * * enableEventRule * + * * disableEventRule * + * @return void + */ + public function testCreateEventRule(){ + $request = new CreateEventRuleRequest([ + "eventBusName" => "newBus", + "eventRuleName" => "newRule", + "description" => "an event rule for test", + "filterPattern" => "{}" + ]); + try { + $res = $this->_sdkClient->createEventRule($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testGetEventRule(){ + $request = new GetEventRuleRequest([ + "eventBusName" => "newBus", + "eventRuleName" => "newRule" + ]); + try { + $res = $this->_sdkClient->getEventRule($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testDeleteEventRule(){ + $request = new DeleteEventRuleRequest([ + "eventBusName" => "newBus", + "eventRuleName" => "newRule" + ]); + try { + $res = $this->_sdkClient->deleteEventRule($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testUpdateEventRule(){ + $request = new UpdateEventRuleRequest([ + "eventBusName" => "newBus", + "eventRuleName" => "newRule", + "description" => "new description for testing update API", + "filterPattern" => "{}" + ]); + try { + $res = $this->_sdkClient->updateEventRule($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testListEventRules(){ + $request = new ListEventRulesRequest([ + "eventBusName" => "newBus", + "maxResults" => 2, + "nextToken" => "0" + ]); + try { + $res = $this->_sdkClient->listEventRules($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testEnableEventRule(){ + $request = new EnableEventRuleRequest([ + "eventBusName" => "newBus", + "eventRuleName" => "newRule" + ]); + try { + $res = $this->_sdkClient->enableEventRule($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testDisableEventRule(){ + $request = new DisableEventRuleRequest([ + "eventBusName" => "newBus", + "eventRuleName" => "newRule" + ]); + try { + $res = $this->_sdkClient->disableEventRule($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } +} diff --git a/sdk/demo/EventRule/generated/python/.gitignore b/sdk/demo/EventRule/generated/python/.gitignore new file mode 100644 index 00000000..2bcfffae --- /dev/null +++ b/sdk/demo/EventRule/generated/python/.gitignore @@ -0,0 +1,5 @@ +runtime/ +.idea/ +.vscode/ +__pycache__/ +.pytest_cache/ \ No newline at end of file diff --git a/sdk/demo/EventRule/generated/python/rocketmq_eventbridge_demo/__init__.py b/sdk/demo/EventRule/generated/python/rocketmq_eventbridge_demo/__init__.py new file mode 100644 index 00000000..5becc17c --- /dev/null +++ b/sdk/demo/EventRule/generated/python/rocketmq_eventbridge_demo/__init__.py @@ -0,0 +1 @@ +__version__ = "1.0.0" diff --git a/sdk/demo/EventRule/generated/python/rocketmq_eventbridge_demo/demo.py b/sdk/demo/EventRule/generated/python/rocketmq_eventbridge_demo/demo.py new file mode 100644 index 00000000..a8142e75 --- /dev/null +++ b/sdk/demo/EventRule/generated/python/rocketmq_eventbridge_demo/demo.py @@ -0,0 +1,247 @@ +# -*- coding: utf-8 -*- +# This file is auto-generated, don't edit it. Thanks. +from rocketmq_eventbridge.client import Client as SDKClientClient +from alibabacloud_tea_openapi import models as open_api_models +from rocketmq_eventbridge import models as sdkclient_models +from alibabacloud_tea_console.client import Client as ConsoleClient +from alibabacloud_tea_util.client import Client as UtilClient + + +class Demo: + _sdk_client: SDKClientClient = None + _endpoint: str = None + + def __init__(self): + self._endpoint = '127.0.0.1:7001' + config = open_api_models.Config( + endpoint=self._endpoint + ) + self._sdk_client = SDKClientClient(config) + + def test_create_event_rule(self) -> None: + """ + EventRule Controller apis: + createEventRule *\ + getEventRule *\ + deleteEventRule *\ + updateEventRule *\ + listEventRules *\ + enableEventRule *\ + disableEventRule *\ + """ + request = sdkclient_models.CreateEventRuleRequest( + event_bus_name='newBus', + event_rule_name='newRule', + description='an event rule for test', + filter_pattern='{}' + ) + try: + res = self._sdk_client.create_event_rule(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_create_event_rule_async(self) -> None: + """ + EventRule Controller apis: + createEventRule *\ + getEventRule *\ + deleteEventRule *\ + updateEventRule *\ + listEventRules *\ + enableEventRule *\ + disableEventRule *\ + """ + request = sdkclient_models.CreateEventRuleRequest( + event_bus_name='newBus', + event_rule_name='newRule', + description='an event rule for test', + filter_pattern='{}' + ) + try: + res = await self._sdk_client.create_event_rule_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_get_event_rule(self) -> None: + request = sdkclient_models.GetEventRuleRequest( + event_bus_name='newBus', + event_rule_name='newRule' + ) + try: + res = self._sdk_client.get_event_rule(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_get_event_rule_async(self) -> None: + request = sdkclient_models.GetEventRuleRequest( + event_bus_name='newBus', + event_rule_name='newRule' + ) + try: + res = await self._sdk_client.get_event_rule_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_delete_event_rule(self) -> None: + request = sdkclient_models.DeleteEventRuleRequest( + event_bus_name='newBus', + event_rule_name='newRule' + ) + try: + res = self._sdk_client.delete_event_rule(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_delete_event_rule_async(self) -> None: + request = sdkclient_models.DeleteEventRuleRequest( + event_bus_name='newBus', + event_rule_name='newRule' + ) + try: + res = await self._sdk_client.delete_event_rule_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_update_event_rule(self) -> None: + request = sdkclient_models.UpdateEventRuleRequest( + event_bus_name='newBus', + event_rule_name='newRule', + description='new description for testing update API', + filter_pattern='{}' + ) + try: + res = self._sdk_client.update_event_rule(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_update_event_rule_async(self) -> None: + request = sdkclient_models.UpdateEventRuleRequest( + event_bus_name='newBus', + event_rule_name='newRule', + description='new description for testing update API', + filter_pattern='{}' + ) + try: + res = await self._sdk_client.update_event_rule_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_list_event_rules(self) -> None: + request = sdkclient_models.ListEventRulesRequest( + event_bus_name='newBus', + max_results=2, + next_token='0' + ) + try: + res = self._sdk_client.list_event_rules(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_list_event_rules_async(self) -> None: + request = sdkclient_models.ListEventRulesRequest( + event_bus_name='newBus', + max_results=2, + next_token='0' + ) + try: + res = await self._sdk_client.list_event_rules_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_enable_event_rule(self) -> None: + request = sdkclient_models.EnableEventRuleRequest( + event_bus_name='newBus', + event_rule_name='newRule' + ) + try: + res = self._sdk_client.enable_event_rule(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_enable_event_rule_async(self) -> None: + request = sdkclient_models.EnableEventRuleRequest( + event_bus_name='newBus', + event_rule_name='newRule' + ) + try: + res = await self._sdk_client.enable_event_rule_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_disable_event_rule(self) -> None: + request = sdkclient_models.DisableEventRuleRequest( + event_bus_name='newBus', + event_rule_name='newRule' + ) + try: + res = self._sdk_client.disable_event_rule(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_disable_event_rule_async(self) -> None: + request = sdkclient_models.DisableEventRuleRequest( + event_bus_name='newBus', + event_rule_name='newRule' + ) + try: + res = await self._sdk_client.disable_event_rule_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') +demo = Demo() +demo.test_list_event_rules() diff --git a/sdk/demo/EventRule/generated/python/setup.py b/sdk/demo/EventRule/generated/python/setup.py new file mode 100644 index 00000000..3824f4cc --- /dev/null +++ b/sdk/demo/EventRule/generated/python/setup.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +""" + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +""" + +import os +from setuptools import setup, find_packages + +""" +setup module for rocketmq_eventbridge_demo. + +Created on 14/10/2024 + +@author: +""" + +PACKAGE = "rocketmq_eventbridge_demo" +NAME = "rocketmq_eventbridge_demo" or "alibabacloud-package" +DESCRIPTION = "Alibaba Cloud eventbridge (20240701) SDK Library for Python" +AUTHOR = "" +AUTHOR_EMAIL = "" +URL = "unavailable" +VERSION = __import__(PACKAGE).__version__ +REQUIRES = [ + "alibabacloud_tea_util>=0.3.13, <1.0.0", + "alibabacloud_tea_openapi>=0.3.12, <1.0.0", + "rocketmq_eventbridge20240701>=0.0.0, <1.0.0", + "alibabacloud_tea_console>=0.0.1, <1.0.0" +] + +LONG_DESCRIPTION = '' +if os.path.exists('./README.md'): + with open("README.md", encoding='utf-8') as fp: + LONG_DESCRIPTION = fp.read() + +setup( + name=NAME, + version=VERSION, + description=DESCRIPTION, + long_description=LONG_DESCRIPTION, + long_description_content_type='text/markdown', + author=AUTHOR, + author_email=AUTHOR_EMAIL, + license="Apache License 2.0", + url=URL, + keywords=["rocketmq","eventbridge","demo"], + packages=find_packages(exclude=["tests*"]), + include_package_data=True, + platforms="any", + install_requires=REQUIRES, + python_requires=">=3.6", + classifiers=( + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + "Topic :: Software Development" + ) +) diff --git a/sdk/demo/EventRule/generated/ts/package.json b/sdk/demo/EventRule/generated/ts/package.json new file mode 100644 index 00000000..be9669b9 --- /dev/null +++ b/sdk/demo/EventRule/generated/ts/package.json @@ -0,0 +1,31 @@ +{ + "name": "", + "version": "1.0.0", + "description": "", + "main": "dist/client.js", + "scripts": { + "test": "mocha --reporter spec --timeout 3000 test/*.test.js", + "test-cov": "nyc -e .ts -r=html -r=text -r=lcov npm run test", + "build": "tsc", + "prepublishOnly": "tsc" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "@types/node": "^12.12.26", + "nyc": "^15.0.0", + "source-map-support": "^0.5.16", + "ts-node": "^8.6.2", + "typescript": "^3.7.5" + }, + "dependencies": { + "@alicloud/tea-typescript": "^1.7.1", + "@alicloud/tea-util": "^1.4.9", + "@alicloud/openapi-client": "^0.4.12", + "@alicloud/tea-console": "^1.0.0" + }, + "files": [ + "dist", + "src" + ] +} \ No newline at end of file diff --git a/sdk/demo/EventRule/generated/ts/src/client.ts b/sdk/demo/EventRule/generated/ts/src/client.ts new file mode 100644 index 00000000..f0ac25dc --- /dev/null +++ b/sdk/demo/EventRule/generated/ts/src/client.ts @@ -0,0 +1,150 @@ +// This file is auto-generated, don't edit it +import Util from '@alicloud/tea-util'; +import OpenApi, * as $OpenApi from '@alicloud/openapi-client'; +import SDKClient, * as $SDKClient from '../../../../../generated/ts/src/client'; +import Console from '@alicloud/tea-console'; +import * as $tea from '@alicloud/tea-typescript'; + + +export default class Client { + _sdkClient: SDKClient; + _endpoint: string; + + constructor() { + this._endpoint = "127.0.0.1:7001"; + let config = new $OpenApi.Config({ + endpoint: this._endpoint, + }); + this._sdkClient = new SDKClient(config); + } + + + /** + * @remarks + * EventRule Controller apis: + * createEventRule * + * getEventRule * + * deleteEventRule * + * updateEventRule * + * listEventRules * + * enableEventRule * + * disableEventRule * + */ + async testCreateEventRule(): Promise { + let request = new $SDKClient.CreateEventRuleRequest({ + eventBusName: "newBus", + eventRuleName: "newRule", + description: "an event rule for test", + filterPattern: "{}", + }); + try { + let res = await this._sdkClient.createEventRule(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testGetEventRule(): Promise { + let request = new $SDKClient.GetEventRuleRequest({ + eventBusName: "newBus", + eventRuleName: "newRule", + }); + try { + let res = await this._sdkClient.getEventRule(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testDeleteEventRule(): Promise { + let request = new $SDKClient.DeleteEventRuleRequest({ + eventBusName: "newBus", + eventRuleName: "newRule", + }); + try { + let res = await this._sdkClient.deleteEventRule(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testUpdateEventRule(): Promise { + let request = new $SDKClient.UpdateEventRuleRequest({ + eventBusName: "newBus", + eventRuleName: "newRule", + description: "new description for testing update API", + filterPattern: "{}", + }); + try { + let res = await this._sdkClient.updateEventRule(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testListEventRules(): Promise { + let request = new $SDKClient.ListEventRulesRequest({ + eventBusName: "newBus", + maxResults: 2, + nextToken: "0", + }); + try { + let res = await this._sdkClient.listEventRules(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testEnableEventRule(): Promise { + let request = new $SDKClient.EnableEventRuleRequest({ + eventBusName: "newBus", + eventRuleName: "newRule", + }); + try { + let res = await this._sdkClient.enableEventRule(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testDisableEventRule(): Promise { + let request = new $SDKClient.DisableEventRuleRequest({ + eventBusName: "newBus", + eventRuleName: "newRule", + }); + try { + let res = await this._sdkClient.disableEventRule(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + +} diff --git a/sdk/demo/EventRule/generated/ts/src/main.ts b/sdk/demo/EventRule/generated/ts/src/main.ts new file mode 100644 index 00000000..0d262dba --- /dev/null +++ b/sdk/demo/EventRule/generated/ts/src/main.ts @@ -0,0 +1,4 @@ +import Client from './client' + +let c = new Client() +c.testListEventRules() diff --git a/sdk/demo/EventRule/generated/ts/tsconfig.json b/sdk/demo/EventRule/generated/ts/tsconfig.json new file mode 100644 index 00000000..ae66f5b6 --- /dev/null +++ b/sdk/demo/EventRule/generated/ts/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es2017", + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "outDir": "./dist", + "esModuleInterop": true + }, + "include": [ + "src/**/*" + ] +} \ No newline at end of file diff --git a/sdk/demo/EventSource/Darafile b/sdk/demo/EventSource/Darafile new file mode 100644 index 00000000..b15ddca3 --- /dev/null +++ b/sdk/demo/EventSource/Darafile @@ -0,0 +1,66 @@ +{ + "scope": "Demo", + "name": "demo", + "version": "0.0.0", + "main": "./demo.dara", + "libraries": { + "SDKClient" : "../../", + "Util": "darabonba:Util:*", + "OpenApi": "alibabacloud:OpenApi:*", + "OpenApiUtil": "alibabacloud:OpenApiUtil:*", + "Console": "darabonba:Console:*" + }, + "java": { + "package": "org.apache.rocketmq.eventbridge.demo", + "className": "Demo", + "packageInfo": { + "groupId": "org.apache.rocketmq.eventbridge", + "artifactId": "demo", + "version": "0.0.0", + "description": "EventBridge SDK demo for Java", + "url": "", + "licenseName": "The Apache License, Version 2.0", + "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.txt", + "developerId": "ludi", + "developerName": "EventBridge SDK", + "developerEmail": "zjuludi@gmail.com", + "scmConnection": "", + "scmDeveloperConnection": "", + "scmUrl": "" + } + }, + "go": { + "clientName": "DemoClient" + }, + "csharp": { + "className": "Demo", + "namespace": "RocketMQ.Eventbridge.Demo", + "packageInfo": { + "name": "sdkDemo", + "version": "0.0.0", + "title": "eventbridge-sdk-demo", + "description": "open source eventbridge (20240701) SDK Demo Library for .NET" + } + }, + "php": { + "package": "RocketMQ.Eventbridge.SDK.Demo", + "clientName": "Demo", + "packageInfo": { + "name": "rocketmq/eventbridge-sdk-demo", + "desc": "RocketMQ eventbridge (20240701) SDK Demo for PHP", + "github": "unavailable", + "files": { + "LICENSE": "../LICENSE" + } + } + }, + "python": { + "package": "rocketmq_eventbridge_demo", + "clientName": "demo", + "packageInfo": { + "name": "rocketmq_eventbridge_demo", + "desc": "Alibaba Cloud eventbridge (20240701) SDK Library for Python", + "github": "unavailable" + } + } +} \ No newline at end of file diff --git a/sdk/demo/EventSource/demo.dara b/sdk/demo/EventSource/demo.dara new file mode 100644 index 00000000..86ea869f --- /dev/null +++ b/sdk/demo/EventSource/demo.dara @@ -0,0 +1,118 @@ +import Util; +import OpenApi; +import SDKClient; +import Console; + +type @sdkClient = SDKClient; +type @endpoint = string; + +init(){ + @endpoint = '127.0.0.1:7001'; + var config = new OpenApi.Config{ + endpoint = @endpoint + }; + @sdkClient = new SDKClient(config); +} + +/** + EventSource Controller apis: + * createEventSource * + * updateEventSource * + * deleteEventSource * + * getEventSource * + * listEventSources * +*/ + +async function testCreateEventSource(): void { + var request = new SDKClient.CreateEventSourceRequest{ + eventBusName = 'newBus', + eventSourceName = 'newSource', + description = 'a source for test' + }; + + try { + var res = @sdkClient.createEventSource(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testUpdateEventSource(): void { + var request = new SDKClient.UpdateEventSourceRequest{ + eventBusName = 'newBus', + eventSourceName = 'newSource', + description = 'new description for testing Update API' + }; + + try { + var res = @sdkClient.updateEventSource(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testDeleteEventSource(): void { + var request = new SDKClient.DeleteEventSourceRequest{ + eventBusName = 'newBus', + eventSourceName = 'newSource' + }; + + try { + var res = @sdkClient.deleteEventSource(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testGetEventSource(): void { + var request = new SDKClient.GetEventSourceRequest{ + eventBusName = 'newBus', + eventSourceName = 'newSource' + }; + + try { + var res = @sdkClient.getEventSource(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testListEventSources(): void { + var request = new SDKClient.ListEventSourcesRequest{ + eventBusName = 'newBus', + eventSourceType = 'USER_DEFINED', + maxResults = 10, + nextToken = "0" + }; + + try { + var res = @sdkClient.listEventSources(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} diff --git a/sdk/demo/EventSource/generated/csharp/core/Demo.cs b/sdk/demo/EventSource/generated/csharp/core/Demo.cs new file mode 100644 index 00000000..56d5b8e7 --- /dev/null +++ b/sdk/demo/EventSource/generated/csharp/core/Demo.cs @@ -0,0 +1,382 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; + +using Tea; +using Tea.Utils; + + +namespace RocketMQ.Eventbridge.Demo +{ + public class Demo + { + protected RocketMQ.Eventbridge.SDK.SDKClient _sdkClient; + protected string _endpoint; + + public Demo() + { + this._endpoint = "127.0.0.1:7001"; + AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config + { + Endpoint = _endpoint, + }; + this._sdkClient = new RocketMQ.Eventbridge.SDK.SDKClient(config); + } + + static void Main(string[] _args){ + Demo demo = new Demo(); + demo.TestListEventSources(); + } + + /// Description: + /// + /// EventSource Controller apis: + /// createEventSource * + /// updateEventSource * + /// deleteEventSource * + /// getEventSource * + /// listEventSources * + /// + public void TestCreateEventSource() + { + RocketMQ.Eventbridge.SDK.Models.CreateEventSourceRequest request = new RocketMQ.Eventbridge.SDK.Models.CreateEventSourceRequest + { + EventBusName = "newBus", + EventSourceName = "newSource", + Description = "a source for test", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.CreateEventSourceResponse res = this._sdkClient.CreateEventSource(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + /// Description: + /// + /// EventSource Controller apis: + /// createEventSource * + /// updateEventSource * + /// deleteEventSource * + /// getEventSource * + /// listEventSources * + /// + public async Task TestCreateEventSourceAsync() + { + RocketMQ.Eventbridge.SDK.Models.CreateEventSourceRequest request = new RocketMQ.Eventbridge.SDK.Models.CreateEventSourceRequest + { + EventBusName = "newBus", + EventSourceName = "newSource", + Description = "a source for test", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.CreateEventSourceResponse res = await this._sdkClient.CreateEventSourceAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestUpdateEventSource() + { + RocketMQ.Eventbridge.SDK.Models.UpdateEventSourceRequest request = new RocketMQ.Eventbridge.SDK.Models.UpdateEventSourceRequest + { + EventBusName = "newBus", + EventSourceName = "newSource", + Description = "new description for testing Update API", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.UpdateEventSourceResponse res = this._sdkClient.UpdateEventSource(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestUpdateEventSourceAsync() + { + RocketMQ.Eventbridge.SDK.Models.UpdateEventSourceRequest request = new RocketMQ.Eventbridge.SDK.Models.UpdateEventSourceRequest + { + EventBusName = "newBus", + EventSourceName = "newSource", + Description = "new description for testing Update API", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.UpdateEventSourceResponse res = await this._sdkClient.UpdateEventSourceAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestDeleteEventSource() + { + RocketMQ.Eventbridge.SDK.Models.DeleteEventSourceRequest request = new RocketMQ.Eventbridge.SDK.Models.DeleteEventSourceRequest + { + EventBusName = "newBus", + EventSourceName = "newSource", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.DeleteEventSourceResponse res = this._sdkClient.DeleteEventSource(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestDeleteEventSourceAsync() + { + RocketMQ.Eventbridge.SDK.Models.DeleteEventSourceRequest request = new RocketMQ.Eventbridge.SDK.Models.DeleteEventSourceRequest + { + EventBusName = "newBus", + EventSourceName = "newSource", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.DeleteEventSourceResponse res = await this._sdkClient.DeleteEventSourceAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestGetEventSource() + { + RocketMQ.Eventbridge.SDK.Models.GetEventSourceRequest request = new RocketMQ.Eventbridge.SDK.Models.GetEventSourceRequest + { + EventBusName = "newBus", + EventSourceName = "newSource", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.GetEventSourceResponse res = this._sdkClient.GetEventSource(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestGetEventSourceAsync() + { + RocketMQ.Eventbridge.SDK.Models.GetEventSourceRequest request = new RocketMQ.Eventbridge.SDK.Models.GetEventSourceRequest + { + EventBusName = "newBus", + EventSourceName = "newSource", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.GetEventSourceResponse res = await this._sdkClient.GetEventSourceAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestListEventSources() + { + RocketMQ.Eventbridge.SDK.Models.ListEventSourcesRequest request = new RocketMQ.Eventbridge.SDK.Models.ListEventSourcesRequest + { + EventBusName = "newBus", + EventSourceType = "USER_DEFINED", + MaxResults = 10, + NextToken = "0", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.ListEventSourcesResponse res = this._sdkClient.ListEventSources(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestListEventSourcesAsync() + { + RocketMQ.Eventbridge.SDK.Models.ListEventSourcesRequest request = new RocketMQ.Eventbridge.SDK.Models.ListEventSourcesRequest + { + EventBusName = "newBus", + EventSourceType = "USER_DEFINED", + MaxResults = 10, + NextToken = "0", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.ListEventSourcesResponse res = await this._sdkClient.ListEventSourcesAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + } +} diff --git a/sdk/demo/EventSource/generated/csharp/core/Properties/AssemblyInfo.cs b/sdk/demo/EventSource/generated/csharp/core/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..d3ad26b1 --- /dev/null +++ b/sdk/demo/EventSource/generated/csharp/core/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("eventbridge-sdk-demo")] +[assembly: AssemblyDescription("open source eventbridge (20240701) SDK Demo Library for .NET")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("4d52c220-8a2f-11ef-86de-b912b93e8d64")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("0.0.1.0")] +[assembly: AssemblyFileVersion("0.0.1.0")] diff --git a/sdk/demo/EventSource/generated/csharp/core/sdkDemo.csproj b/sdk/demo/EventSource/generated/csharp/core/sdkDemo.csproj new file mode 100644 index 00000000..8ea12bc6 --- /dev/null +++ b/sdk/demo/EventSource/generated/csharp/core/sdkDemo.csproj @@ -0,0 +1,44 @@ + + + + netstandard2.0;net45;netcoreapp8.0 + RocketMQ.Eventbridge.Demo + Exe + false + false + RocketMQ.Eventbridge.Demo + + 5 + open source eventbridge (20240701) SDK Demo Library for .NET + + + NETSTANDARD2_0 + + + NET45 + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + \ No newline at end of file diff --git a/sdk/demo/EventSource/generated/go/client/client.go b/sdk/demo/EventSource/generated/go/client/client.go new file mode 100644 index 00000000..bf48f70e --- /dev/null +++ b/sdk/demo/EventSource/generated/go/client/client.go @@ -0,0 +1,236 @@ +// This file is auto-generated, don't edit it. Thanks. +package client + +import ( + openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" + console "github.com/alibabacloud-go/tea-console/client" + util "github.com/alibabacloud-go/tea-utils/v2/service" + "github.com/alibabacloud-go/tea/tea" + sdkclient "github.com/org-apache-rocketmq/eventbridge-sdk/client" +) + +type DemoClient struct { + SdkClient *sdkclient.Client + Endpoint *string +} + +func NewClient() (*DemoClient, error) { + client := new(DemoClient) + err := client.Init() + return client, err +} + +func (client *DemoClient) Init() (_err error) { + client.Endpoint = tea.String("127.0.0.1:7001") + config := &openapi.Config{ + Endpoint: client.Endpoint, + } + client.SdkClient, _err = sdkclient.NewClient(config) + if _err != nil { + return _err + } + + return nil +} + +// Description: +// +// EventSource Controller apis: +// +// createEventSource * +// +// updateEventSource * +// +// deleteEventSource * +// +// getEventSource * +// +// listEventSources * +func (client *DemoClient) TestCreateEventSource() (_err error) { + request := &sdkclient.CreateEventSourceRequest{ + EventBusName: tea.String("newBus"), + EventSourceName: tea.String("newSource"), + Description: tea.String("a source for test"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.CreateEventSource(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestUpdateEventSource() (_err error) { + request := &sdkclient.UpdateEventSourceRequest{ + EventBusName: tea.String("newBus"), + EventSourceName: tea.String("newSource"), + Description: tea.String("new description for testing Update API"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.UpdateEventSource(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestDeleteEventSource() (_err error) { + request := &sdkclient.DeleteEventSourceRequest{ + EventBusName: tea.String("newBus"), + EventSourceName: tea.String("newSource"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.DeleteEventSource(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestGetEventSource() (_err error) { + request := &sdkclient.GetEventSourceRequest{ + EventBusName: tea.String("newBus"), + EventSourceName: tea.String("newSource"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.GetEventSource(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestListEventSources() (_err error) { + request := &sdkclient.ListEventSourcesRequest{ + EventBusName: tea.String("newBus"), + EventSourceType: tea.String("USER_DEFINED"), + MaxResults: tea.Int32(10), + NextToken: tea.String("0"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.ListEventSources(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} diff --git a/sdk/demo/EventSource/generated/go/go.mod b/sdk/demo/EventSource/generated/go/go.mod new file mode 100644 index 00000000..ff358240 --- /dev/null +++ b/sdk/demo/EventSource/generated/go/go.mod @@ -0,0 +1,9 @@ +module client + +require ( + github.com/alibabacloud-go/tea-utils/v2 v2.0.6 + github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.10 + github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 + github.com/alibabacloud-go/tea-console v1.0.0 +) +replace github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 => ../../../../generated/go/ diff --git a/sdk/demo/EventSource/generated/go/main.go b/sdk/demo/EventSource/generated/go/main.go new file mode 100644 index 00000000..99f5dcfe --- /dev/null +++ b/sdk/demo/EventSource/generated/go/main.go @@ -0,0 +1,11 @@ +package main + +import ( + "client/client" +) + +func main() { + demo := new(client.DemoClient) + demo.Init() + demo.TestCreateEventSource() +} diff --git a/sdk/demo/EventSource/generated/java/pom.xml b/sdk/demo/EventSource/generated/java/pom.xml new file mode 100644 index 00000000..ef0ec329 --- /dev/null +++ b/sdk/demo/EventSource/generated/java/pom.xml @@ -0,0 +1,122 @@ + + + 4.0.0 + org.apache.rocketmq.eventbridge + demo + 0.0.0 + jar + demo + EventBridge SDK demo for Java + + + + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + ludi + EventBridge SDK + zjuludi@gmail.com + + + + + sonatype-nexus-snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + + + + + com.aliyun + tea-util + 0.2.23 + + + com.aliyun + tea-openapi + 0.3.6 + + + org.apache.rocketmq.eventbridge + sdk + 0.0.0 + + + com.aliyun + tea-console + 0.0.1 + + + com.aliyun + tea + 1.1.14 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 8 + 8 + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + true + + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.3 + true + + sonatype-nexus-staging + https://s01.oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + UTF-8 + none + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.1 + + + + \ No newline at end of file diff --git a/sdk/demo/EventSource/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java b/sdk/demo/EventSource/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java new file mode 100644 index 00000000..ab4dd0df --- /dev/null +++ b/sdk/demo/EventSource/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java @@ -0,0 +1,139 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.demo; + +import com.aliyun.tea.*; + +public class Demo { + + public org.apache.rocketmq.eventbridge.sdk.Client _sdkClient; + public String _endpoint; + public Demo() throws Exception { + this._endpoint = "127.0.0.1:7001"; + com.aliyun.teaopenapi.models.Config config = com.aliyun.teaopenapi.models.Config.build(TeaConverter.buildMap( + new TeaPair("endpoint", _endpoint) + )); + this._sdkClient = new org.apache.rocketmq.eventbridge.sdk.Client(config); + } + + public static void main(String[] args) { + try { + Demo demo = new Demo(); + demo.testListEventSources(); + } catch (Exception e) { + // TODO: handle exception + } + } + + /** + * description : + *

EventSource Controller apis: + * createEventSource * + * updateEventSource * + * deleteEventSource * + * getEventSource * + * listEventSources *

+ */ + public void testCreateEventSource() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.CreateEventSourceRequest request = org.apache.rocketmq.eventbridge.sdk.models.CreateEventSourceRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("eventSourceName", "newSource"), + new TeaPair("description", "a source for test") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.CreateEventSourceResponse res = _sdkClient.createEventSource(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testUpdateEventSource() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.UpdateEventSourceRequest request = org.apache.rocketmq.eventbridge.sdk.models.UpdateEventSourceRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("eventSourceName", "newSource"), + new TeaPair("description", "new description for testing Update API") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.UpdateEventSourceResponse res = _sdkClient.updateEventSource(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testDeleteEventSource() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.DeleteEventSourceRequest request = org.apache.rocketmq.eventbridge.sdk.models.DeleteEventSourceRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("eventSourceName", "newSource") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.DeleteEventSourceResponse res = _sdkClient.deleteEventSource(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testGetEventSource() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.GetEventSourceRequest request = org.apache.rocketmq.eventbridge.sdk.models.GetEventSourceRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("eventSourceName", "newSource") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.GetEventSourceResponse res = _sdkClient.getEventSource(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testListEventSources() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.ListEventSourcesRequest request = org.apache.rocketmq.eventbridge.sdk.models.ListEventSourcesRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("eventSourceType", "USER_DEFINED"), + new TeaPair("maxResults", 10), + new TeaPair("nextToken", "0") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.ListEventSourcesResponse res = _sdkClient.listEventSources(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } +} diff --git a/sdk/demo/EventSource/generated/php/.gitignore b/sdk/demo/EventSource/generated/php/.gitignore new file mode 100644 index 00000000..89c7aa58 --- /dev/null +++ b/sdk/demo/EventSource/generated/php/.gitignore @@ -0,0 +1,15 @@ +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +composer.lock + +.vscode/ +.idea +.DS_Store + +cache/ +*.cache +runtime/ +.php_cs.cache diff --git a/sdk/demo/EventSource/generated/php/.php_cs.dist b/sdk/demo/EventSource/generated/php/.php_cs.dist new file mode 100644 index 00000000..8617ec2f --- /dev/null +++ b/sdk/demo/EventSource/generated/php/.php_cs.dist @@ -0,0 +1,65 @@ +setRiskyAllowed(true) + ->setIndent(' ') + ->setRules([ + '@PSR2' => true, + '@PhpCsFixer' => true, + '@Symfony:risky' => true, + 'concat_space' => ['spacing' => 'one'], + 'array_syntax' => ['syntax' => 'short'], + 'array_indentation' => true, + 'combine_consecutive_unsets' => true, + 'method_separation' => true, + 'single_quote' => true, + 'declare_equal_normalize' => true, + 'function_typehint_space' => true, + 'hash_to_slash_comment' => true, + 'include' => true, + 'lowercase_cast' => true, + 'no_multiline_whitespace_before_semicolons' => true, + 'no_leading_import_slash' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_spaces_around_offset' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unused_imports' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'object_operator_without_whitespace' => true, + 'single_blank_line_before_namespace' => true, + 'single_class_element_per_statement' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline_array' => true, + 'trim_array_spaces' => true, + 'unary_operator_spaces' => true, + 'whitespace_after_comma_in_array' => true, + 'no_extra_consecutive_blank_lines' => [ + 'curly_brace_block', + 'extra', + 'parenthesis_brace_block', + 'square_brace_block', + 'throw', + 'use', + ], + 'binary_operator_spaces' => [ + 'align_double_arrow' => true, + 'align_equals' => true, + ], + 'braces' => [ + 'allow_single_line_closure' => true, + ], + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('vendor') + ->exclude('tests') + ->in(__DIR__) + ); diff --git a/sdk/demo/EventSource/generated/php/autoload.php b/sdk/demo/EventSource/generated/php/autoload.php new file mode 100644 index 00000000..5bfe0a1a --- /dev/null +++ b/sdk/demo/EventSource/generated/php/autoload.php @@ -0,0 +1,15 @@ +5.5", + "alibabacloud/tea-utils": "^0.2.21", + "alibabacloud/darabonba-openapi": "^0.2.12", + "rocketmq/eventbridge-sdk": "^0.0.0", + "alibabacloud/tea-console": "^0.1.0" + }, + "autoload": { + "psr-4": { + "RocketMQ\\Eventbridge\\SDK\\Demo\\": "src" + } + }, + "scripts": { + "fixer": "php-cs-fixer fix ./" + }, + "config": { + "sort-packages": true, + "preferred-install": "dist", + "optimize-autoloader": true + }, + "prefer-stable": true, + "repositories": { + "rocketmq":{ + "type" : "path", + "url": "../../../../generated/php" + } + } +} diff --git a/sdk/demo/EventSource/generated/php/main.php b/sdk/demo/EventSource/generated/php/main.php new file mode 100644 index 00000000..8ac08adb --- /dev/null +++ b/sdk/demo/EventSource/generated/php/main.php @@ -0,0 +1,8 @@ +testListEventSources(); diff --git a/sdk/demo/EventSource/generated/php/src/Demo.php b/sdk/demo/EventSource/generated/php/src/Demo.php new file mode 100644 index 00000000..2d3bbfc5 --- /dev/null +++ b/sdk/demo/EventSource/generated/php/src/Demo.php @@ -0,0 +1,161 @@ +_endpoint = "127.0.0.1:7001"; + $config = new Config([ + "endpoint" => $this->_endpoint + ]); + $this->_sdkClient = new SDKClient($config); + } + + /** + * EventSource Controller apis: + * * createEventSource * + * * updateEventSource * + * * deleteEventSource * + * * getEventSource * + * * listEventSources * + * @return void + */ + public function testCreateEventSource(){ + $request = new CreateEventSourceRequest([ + "eventBusName" => "newBus", + "eventSourceName" => "newSource", + "description" => "a source for test" + ]); + try { + $res = $this->_sdkClient->createEventSource($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testUpdateEventSource(){ + $request = new UpdateEventSourceRequest([ + "eventBusName" => "newBus", + "eventSourceName" => "newSource", + "description" => "new description for testing Update API" + ]); + try { + $res = $this->_sdkClient->updateEventSource($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testDeleteEventSource(){ + $request = new DeleteEventSourceRequest([ + "eventBusName" => "newBus", + "eventSourceName" => "newSource" + ]); + try { + $res = $this->_sdkClient->deleteEventSource($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testGetEventSource(){ + $request = new GetEventSourceRequest([ + "eventBusName" => "newBus", + "eventSourceName" => "newSource" + ]); + try { + $res = $this->_sdkClient->getEventSource($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testListEventSources(){ + $request = new ListEventSourcesRequest([ + "eventBusName" => "newBus", + "eventSourceType" => "USER_DEFINED", + "maxResults" => 10, + "nextToken" => "0" + ]); + try { + $res = $this->_sdkClient->listEventSources($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } +} diff --git a/sdk/demo/EventSource/generated/python/.gitignore b/sdk/demo/EventSource/generated/python/.gitignore new file mode 100644 index 00000000..2bcfffae --- /dev/null +++ b/sdk/demo/EventSource/generated/python/.gitignore @@ -0,0 +1,5 @@ +runtime/ +.idea/ +.vscode/ +__pycache__/ +.pytest_cache/ \ No newline at end of file diff --git a/sdk/demo/EventSource/generated/python/rocketmq_eventbridge_demo/__init__.py b/sdk/demo/EventSource/generated/python/rocketmq_eventbridge_demo/__init__.py new file mode 100644 index 00000000..5becc17c --- /dev/null +++ b/sdk/demo/EventSource/generated/python/rocketmq_eventbridge_demo/__init__.py @@ -0,0 +1 @@ +__version__ = "1.0.0" diff --git a/sdk/demo/EventSource/generated/python/rocketmq_eventbridge_demo/demo.py b/sdk/demo/EventSource/generated/python/rocketmq_eventbridge_demo/demo.py new file mode 100644 index 00000000..b1566818 --- /dev/null +++ b/sdk/demo/EventSource/generated/python/rocketmq_eventbridge_demo/demo.py @@ -0,0 +1,185 @@ +# -*- coding: utf-8 -*- +# This file is auto-generated, don't edit it. Thanks. +from rocketmq_eventbridge.client import Client as SDKClientClient +from alibabacloud_tea_openapi import models as open_api_models +from rocketmq_eventbridge import models as sdkclient_models +from alibabacloud_tea_console.client import Client as ConsoleClient +from alibabacloud_tea_util.client import Client as UtilClient + + +class Demo: + _sdk_client: SDKClientClient = None + _endpoint: str = None + + def __init__(self): + self._endpoint = '127.0.0.1:7001' + config = open_api_models.Config( + endpoint=self._endpoint + ) + self._sdk_client = SDKClientClient(config) + + def test_create_event_source(self) -> None: + """ + EventSource Controller apis: + createEventSource *\ + updateEventSource *\ + deleteEventSource *\ + getEventSource *\ + listEventSources *\ + """ + request = sdkclient_models.CreateEventSourceRequest( + event_bus_name='newBus', + event_source_name='newSource', + description='a source for test' + ) + try: + res = self._sdk_client.create_event_source(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_create_event_source_async(self) -> None: + """ + EventSource Controller apis: + createEventSource *\ + updateEventSource *\ + deleteEventSource *\ + getEventSource *\ + listEventSources *\ + """ + request = sdkclient_models.CreateEventSourceRequest( + event_bus_name='newBus', + event_source_name='newSource', + description='a source for test' + ) + try: + res = await self._sdk_client.create_event_source_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_update_event_source(self) -> None: + request = sdkclient_models.UpdateEventSourceRequest( + event_bus_name='newBus', + event_source_name='newSource', + description='new description for testing Update API' + ) + try: + res = self._sdk_client.update_event_source(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_update_event_source_async(self) -> None: + request = sdkclient_models.UpdateEventSourceRequest( + event_bus_name='newBus', + event_source_name='newSource', + description='new description for testing Update API' + ) + try: + res = await self._sdk_client.update_event_source_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_delete_event_source(self) -> None: + request = sdkclient_models.DeleteEventSourceRequest( + event_bus_name='newBus', + event_source_name='newSource' + ) + try: + res = self._sdk_client.delete_event_source(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_delete_event_source_async(self) -> None: + request = sdkclient_models.DeleteEventSourceRequest( + event_bus_name='newBus', + event_source_name='newSource' + ) + try: + res = await self._sdk_client.delete_event_source_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_get_event_source(self) -> None: + request = sdkclient_models.GetEventSourceRequest( + event_bus_name='newBus', + event_source_name='newSource' + ) + try: + res = self._sdk_client.get_event_source(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_get_event_source_async(self) -> None: + request = sdkclient_models.GetEventSourceRequest( + event_bus_name='newBus', + event_source_name='newSource' + ) + try: + res = await self._sdk_client.get_event_source_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_list_event_sources(self) -> None: + request = sdkclient_models.ListEventSourcesRequest( + event_bus_name='newBus', + event_source_type='USER_DEFINED', + max_results=10, + next_token='0' + ) + try: + res = self._sdk_client.list_event_sources(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_list_event_sources_async(self) -> None: + request = sdkclient_models.ListEventSourcesRequest( + event_bus_name='newBus', + event_source_type='USER_DEFINED', + max_results=10, + next_token='0' + ) + try: + res = await self._sdk_client.list_event_sources_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') +demo = Demo() +demo.test_list_event_sources() diff --git a/sdk/demo/EventSource/generated/python/setup.py b/sdk/demo/EventSource/generated/python/setup.py new file mode 100644 index 00000000..3824f4cc --- /dev/null +++ b/sdk/demo/EventSource/generated/python/setup.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +""" + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +""" + +import os +from setuptools import setup, find_packages + +""" +setup module for rocketmq_eventbridge_demo. + +Created on 14/10/2024 + +@author: +""" + +PACKAGE = "rocketmq_eventbridge_demo" +NAME = "rocketmq_eventbridge_demo" or "alibabacloud-package" +DESCRIPTION = "Alibaba Cloud eventbridge (20240701) SDK Library for Python" +AUTHOR = "" +AUTHOR_EMAIL = "" +URL = "unavailable" +VERSION = __import__(PACKAGE).__version__ +REQUIRES = [ + "alibabacloud_tea_util>=0.3.13, <1.0.0", + "alibabacloud_tea_openapi>=0.3.12, <1.0.0", + "rocketmq_eventbridge20240701>=0.0.0, <1.0.0", + "alibabacloud_tea_console>=0.0.1, <1.0.0" +] + +LONG_DESCRIPTION = '' +if os.path.exists('./README.md'): + with open("README.md", encoding='utf-8') as fp: + LONG_DESCRIPTION = fp.read() + +setup( + name=NAME, + version=VERSION, + description=DESCRIPTION, + long_description=LONG_DESCRIPTION, + long_description_content_type='text/markdown', + author=AUTHOR, + author_email=AUTHOR_EMAIL, + license="Apache License 2.0", + url=URL, + keywords=["rocketmq","eventbridge","demo"], + packages=find_packages(exclude=["tests*"]), + include_package_data=True, + platforms="any", + install_requires=REQUIRES, + python_requires=">=3.6", + classifiers=( + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + "Topic :: Software Development" + ) +) diff --git a/sdk/demo/EventSource/generated/ts/package.json b/sdk/demo/EventSource/generated/ts/package.json new file mode 100644 index 00000000..be9669b9 --- /dev/null +++ b/sdk/demo/EventSource/generated/ts/package.json @@ -0,0 +1,31 @@ +{ + "name": "", + "version": "1.0.0", + "description": "", + "main": "dist/client.js", + "scripts": { + "test": "mocha --reporter spec --timeout 3000 test/*.test.js", + "test-cov": "nyc -e .ts -r=html -r=text -r=lcov npm run test", + "build": "tsc", + "prepublishOnly": "tsc" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "@types/node": "^12.12.26", + "nyc": "^15.0.0", + "source-map-support": "^0.5.16", + "ts-node": "^8.6.2", + "typescript": "^3.7.5" + }, + "dependencies": { + "@alicloud/tea-typescript": "^1.7.1", + "@alicloud/tea-util": "^1.4.9", + "@alicloud/openapi-client": "^0.4.12", + "@alicloud/tea-console": "^1.0.0" + }, + "files": [ + "dist", + "src" + ] +} \ No newline at end of file diff --git a/sdk/demo/EventSource/generated/ts/src/client.ts b/sdk/demo/EventSource/generated/ts/src/client.ts new file mode 100644 index 00000000..9b9d8416 --- /dev/null +++ b/sdk/demo/EventSource/generated/ts/src/client.ts @@ -0,0 +1,115 @@ +// This file is auto-generated, don't edit it +import Util from '@alicloud/tea-util'; +import OpenApi, * as $OpenApi from '@alicloud/openapi-client'; +import SDKClient, * as $SDKClient from '../../../../../generated/ts/src/client'; +import Console from '@alicloud/tea-console'; +import * as $tea from '@alicloud/tea-typescript'; + + +export default class Client { + _sdkClient: SDKClient; + _endpoint: string; + + constructor() { + this._endpoint = "127.0.0.1:7001"; + let config = new $OpenApi.Config({ + endpoint: this._endpoint, + }); + this._sdkClient = new SDKClient(config); + } + + + /** + * @remarks + * EventSource Controller apis: + * createEventSource * + * updateEventSource * + * deleteEventSource * + * getEventSource * + * listEventSources * + */ + async testCreateEventSource(): Promise { + let request = new $SDKClient.CreateEventSourceRequest({ + eventBusName: "newBus", + eventSourceName: "newSource", + description: "a source for test", + }); + try { + let res = await this._sdkClient.createEventSource(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testUpdateEventSource(): Promise { + let request = new $SDKClient.UpdateEventSourceRequest({ + eventBusName: "newBus", + eventSourceName: "newSource", + description: "new description for testing Update API", + }); + try { + let res = await this._sdkClient.updateEventSource(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testDeleteEventSource(): Promise { + let request = new $SDKClient.DeleteEventSourceRequest({ + eventBusName: "newBus", + eventSourceName: "newSource", + }); + try { + let res = await this._sdkClient.deleteEventSource(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testGetEventSource(): Promise { + let request = new $SDKClient.GetEventSourceRequest({ + eventBusName: "newBus", + eventSourceName: "newSource", + }); + try { + let res = await this._sdkClient.getEventSource(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testListEventSources(): Promise { + let request = new $SDKClient.ListEventSourcesRequest({ + eventBusName: "newBus", + eventSourceType: "USER_DEFINED", + maxResults: 10, + nextToken: "0", + }); + try { + let res = await this._sdkClient.listEventSources(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + +} diff --git a/sdk/demo/EventSource/generated/ts/src/main.ts b/sdk/demo/EventSource/generated/ts/src/main.ts new file mode 100644 index 00000000..f732c02b --- /dev/null +++ b/sdk/demo/EventSource/generated/ts/src/main.ts @@ -0,0 +1,4 @@ +import Client from './client' + +let c = new Client() +c.testListEventSources() diff --git a/sdk/demo/EventSource/generated/ts/tsconfig.json b/sdk/demo/EventSource/generated/ts/tsconfig.json new file mode 100644 index 00000000..ae66f5b6 --- /dev/null +++ b/sdk/demo/EventSource/generated/ts/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es2017", + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "outDir": "./dist", + "esModuleInterop": true + }, + "include": [ + "src/**/*" + ] +} \ No newline at end of file diff --git a/sdk/demo/EventTarget/Darafile b/sdk/demo/EventTarget/Darafile new file mode 100644 index 00000000..b15ddca3 --- /dev/null +++ b/sdk/demo/EventTarget/Darafile @@ -0,0 +1,66 @@ +{ + "scope": "Demo", + "name": "demo", + "version": "0.0.0", + "main": "./demo.dara", + "libraries": { + "SDKClient" : "../../", + "Util": "darabonba:Util:*", + "OpenApi": "alibabacloud:OpenApi:*", + "OpenApiUtil": "alibabacloud:OpenApiUtil:*", + "Console": "darabonba:Console:*" + }, + "java": { + "package": "org.apache.rocketmq.eventbridge.demo", + "className": "Demo", + "packageInfo": { + "groupId": "org.apache.rocketmq.eventbridge", + "artifactId": "demo", + "version": "0.0.0", + "description": "EventBridge SDK demo for Java", + "url": "", + "licenseName": "The Apache License, Version 2.0", + "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.txt", + "developerId": "ludi", + "developerName": "EventBridge SDK", + "developerEmail": "zjuludi@gmail.com", + "scmConnection": "", + "scmDeveloperConnection": "", + "scmUrl": "" + } + }, + "go": { + "clientName": "DemoClient" + }, + "csharp": { + "className": "Demo", + "namespace": "RocketMQ.Eventbridge.Demo", + "packageInfo": { + "name": "sdkDemo", + "version": "0.0.0", + "title": "eventbridge-sdk-demo", + "description": "open source eventbridge (20240701) SDK Demo Library for .NET" + } + }, + "php": { + "package": "RocketMQ.Eventbridge.SDK.Demo", + "clientName": "Demo", + "packageInfo": { + "name": "rocketmq/eventbridge-sdk-demo", + "desc": "RocketMQ eventbridge (20240701) SDK Demo for PHP", + "github": "unavailable", + "files": { + "LICENSE": "../LICENSE" + } + } + }, + "python": { + "package": "rocketmq_eventbridge_demo", + "clientName": "demo", + "packageInfo": { + "name": "rocketmq_eventbridge_demo", + "desc": "Alibaba Cloud eventbridge (20240701) SDK Library for Python", + "github": "unavailable" + } + } +} \ No newline at end of file diff --git a/sdk/demo/EventTarget/demo.dara b/sdk/demo/EventTarget/demo.dara new file mode 100644 index 00000000..8fe7fc60 --- /dev/null +++ b/sdk/demo/EventTarget/demo.dara @@ -0,0 +1,162 @@ +import Util; +import OpenApi; +import SDKClient; +import Console; + +type @sdkClient = SDKClient; +type @endpoint = string; + +init(){ + @endpoint = '127.0.0.1:7001'; + var config = new OpenApi.Config{ + endpoint = @endpoint + }; + @sdkClient = new SDKClient(config); +} + +/** + EventTarget Controller apis: + * createEventTargets * + * updateEventTargets * + * deleteEventTargets * + * listEventTargets * +*/ + +async function testCreateEventTargets(): void { + var config_ : map[string]any = { + fileName = "~/Target", + line = "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}" + }; + + var config2_ : map[string]any = { + fileName = "~/Target222", + line = "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}" + }; + + var request = new SDKClient.CreateEventTargetsRequest{ + eventBusName = 'newBus', + eventRuleName = 'newRule', + eventTargets = [ + new SDKClient.EventTarget{ + eventTargetName = 'newTarget', + className = 'file', + config = config_, + runOptions = new SDKClient.EventTarget.runOptions{ + errorsTolerance = "", + retryStrategy = new SDKClient.EventTarget.runOptions.retryStrategy{ + pushRetryStrategy = "", + maximumEventAgeInSeconds = 100, + maximumRetryAttempts = 100 + }, + deadLetterQueue = new SDKClient.EventTarget.runOptions.deadLetterQueue{ + type = "" + } + } + }, + new SDKClient.EventTarget{ + eventTargetName = 'newTarget222', + className = 'file', + config = config2_, + runOptions = new SDKClient.EventTarget.runOptions{ + errorsTolerance = "", + retryStrategy = new SDKClient.EventTarget.runOptions.retryStrategy{ + pushRetryStrategy = "", + maximumEventAgeInSeconds = 100, + maximumRetryAttempts = 100 + }, + deadLetterQueue = new SDKClient.EventTarget.runOptions.deadLetterQueue{ + type = "" + } + } + } + ] + }; + + try { + var res = @sdkClient.createEventTargets(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testUpdateEventTargets(): void { + var config_ : map[string]any = { + fileName = "~/Target", + line = "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}" + }; + + var config2_ : map[string]any = { + fileName = "~/Target222", + line = "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}" + }; + + var request = new SDKClient.UpdateEventTargetsRequest{ + eventBusName = 'newBus', + eventRuleName = 'newRule', + eventTargets = [ + new SDKClient.EventTarget{ + eventTargetName = 'newTarget', + className = 'file', + config = config_ + }, + new SDKClient.EventTarget{ + eventTargetName = 'newTarget222', + className = 'file', + config = config2_ + } + ] + }; + + try { + var res = @sdkClient.updateEventTargets(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testDeleteEventTargets(): void { + var request = new SDKClient.DeleteEventTargetsRequest{ + eventBusName = 'newBus', + eventRuleName = 'newRule', + eventTargetNames = ["newTarget", "newTarget222"] + }; + + try { + var res = @sdkClient.deleteEventTargets(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} + +async function testListEventTargets(): void { + var request = new SDKClient.ListEventTargetsRequest{ + eventBusName = 'newBus', + eventRuleName = 'newRule' + }; + + try { + var res = @sdkClient.listEventTargets(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} diff --git a/sdk/demo/EventTarget/generated/csharp/core/Demo.cs b/sdk/demo/EventTarget/generated/csharp/core/Demo.cs new file mode 100644 index 00000000..45b30873 --- /dev/null +++ b/sdk/demo/EventTarget/generated/csharp/core/Demo.cs @@ -0,0 +1,474 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; + +using Tea; +using Tea.Utils; + + +namespace RocketMQ.Eventbridge.Demo +{ + public class Demo + { + protected RocketMQ.Eventbridge.SDK.SDKClient _sdkClient; + protected string _endpoint; + + public Demo() + { + this._endpoint = "127.0.0.1:7001"; + AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config + { + Endpoint = _endpoint, + }; + this._sdkClient = new RocketMQ.Eventbridge.SDK.SDKClient(config); + } + + static void Main(string[] _args){ + Demo demo = new Demo(); + demo.TestListEventTargets(); + } + + /// Description: + /// + /// EventTarget Controller apis: + /// createEventTargets * + /// updateEventTargets * + /// deleteEventTargets * + /// listEventTargets * + /// + public void TestCreateEventTargets() + { + Dictionary config_ = new Dictionary + { + {"fileName", "~/Target"}, + {"line", "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}"}, + }; + Dictionary config2_ = new Dictionary + { + {"fileName", "~/Target222"}, + {"line", "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}"}, + }; + RocketMQ.Eventbridge.SDK.Models.CreateEventTargetsRequest request = new RocketMQ.Eventbridge.SDK.Models.CreateEventTargetsRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + EventTargets = new List + { + new RocketMQ.Eventbridge.SDK.Models.EventTarget + { + EventTargetName = "newTarget", + ClassName = "file", + Config = config_, + RunOptions = new RocketMQ.Eventbridge.SDK.Models.EventTarget.EventTargetRunOptions + { + ErrorsTolerance = "", + RetryStrategy = new RocketMQ.Eventbridge.SDK.Models.EventTarget.EventTargetRunOptions.EventTargetRunOptionsRetryStrategy + { + PushRetryStrategy = "", + MaximumEventAgeInSeconds = 100, + MaximumRetryAttempts = 100, + }, + DeadLetterQueue = new RocketMQ.Eventbridge.SDK.Models.EventTarget.EventTargetRunOptions.EventTargetRunOptionsDeadLetterQueue + { + Type = "", + }, + }, + }, + new RocketMQ.Eventbridge.SDK.Models.EventTarget + { + EventTargetName = "newTarget222", + ClassName = "file", + Config = config2_, + RunOptions = new RocketMQ.Eventbridge.SDK.Models.EventTarget.EventTargetRunOptions + { + ErrorsTolerance = "", + RetryStrategy = new RocketMQ.Eventbridge.SDK.Models.EventTarget.EventTargetRunOptions.EventTargetRunOptionsRetryStrategy + { + PushRetryStrategy = "", + MaximumEventAgeInSeconds = 100, + MaximumRetryAttempts = 100, + }, + DeadLetterQueue = new RocketMQ.Eventbridge.SDK.Models.EventTarget.EventTargetRunOptions.EventTargetRunOptionsDeadLetterQueue + { + Type = "", + }, + }, + } + }, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.CreateEventTargetsResponse res = this._sdkClient.CreateEventTargets(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + /// Description: + /// + /// EventTarget Controller apis: + /// createEventTargets * + /// updateEventTargets * + /// deleteEventTargets * + /// listEventTargets * + /// + public async Task TestCreateEventTargetsAsync() + { + Dictionary config_ = new Dictionary + { + {"fileName", "~/Target"}, + {"line", "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}"}, + }; + Dictionary config2_ = new Dictionary + { + {"fileName", "~/Target222"}, + {"line", "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}"}, + }; + RocketMQ.Eventbridge.SDK.Models.CreateEventTargetsRequest request = new RocketMQ.Eventbridge.SDK.Models.CreateEventTargetsRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + EventTargets = new List + { + new RocketMQ.Eventbridge.SDK.Models.EventTarget + { + EventTargetName = "newTarget", + ClassName = "file", + Config = config_, + RunOptions = new RocketMQ.Eventbridge.SDK.Models.EventTarget.EventTargetRunOptions + { + ErrorsTolerance = "", + RetryStrategy = new RocketMQ.Eventbridge.SDK.Models.EventTarget.EventTargetRunOptions.EventTargetRunOptionsRetryStrategy + { + PushRetryStrategy = "", + MaximumEventAgeInSeconds = 100, + MaximumRetryAttempts = 100, + }, + DeadLetterQueue = new RocketMQ.Eventbridge.SDK.Models.EventTarget.EventTargetRunOptions.EventTargetRunOptionsDeadLetterQueue + { + Type = "", + }, + }, + }, + new RocketMQ.Eventbridge.SDK.Models.EventTarget + { + EventTargetName = "newTarget222", + ClassName = "file", + Config = config2_, + RunOptions = new RocketMQ.Eventbridge.SDK.Models.EventTarget.EventTargetRunOptions + { + ErrorsTolerance = "", + RetryStrategy = new RocketMQ.Eventbridge.SDK.Models.EventTarget.EventTargetRunOptions.EventTargetRunOptionsRetryStrategy + { + PushRetryStrategy = "", + MaximumEventAgeInSeconds = 100, + MaximumRetryAttempts = 100, + }, + DeadLetterQueue = new RocketMQ.Eventbridge.SDK.Models.EventTarget.EventTargetRunOptions.EventTargetRunOptionsDeadLetterQueue + { + Type = "", + }, + }, + } + }, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.CreateEventTargetsResponse res = await this._sdkClient.CreateEventTargetsAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestUpdateEventTargets() + { + Dictionary config_ = new Dictionary + { + {"fileName", "~/Target"}, + {"line", "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}"}, + }; + Dictionary config2_ = new Dictionary + { + {"fileName", "~/Target222"}, + {"line", "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}"}, + }; + RocketMQ.Eventbridge.SDK.Models.UpdateEventTargetsRequest request = new RocketMQ.Eventbridge.SDK.Models.UpdateEventTargetsRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + EventTargets = new List + { + new RocketMQ.Eventbridge.SDK.Models.EventTarget + { + EventTargetName = "newTarget", + ClassName = "file", + Config = config_, + }, + new RocketMQ.Eventbridge.SDK.Models.EventTarget + { + EventTargetName = "newTarget222", + ClassName = "file", + Config = config2_, + } + }, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.UpdateEventTargetsResponse res = this._sdkClient.UpdateEventTargets(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestUpdateEventTargetsAsync() + { + Dictionary config_ = new Dictionary + { + {"fileName", "~/Target"}, + {"line", "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}"}, + }; + Dictionary config2_ = new Dictionary + { + {"fileName", "~/Target222"}, + {"line", "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}"}, + }; + RocketMQ.Eventbridge.SDK.Models.UpdateEventTargetsRequest request = new RocketMQ.Eventbridge.SDK.Models.UpdateEventTargetsRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + EventTargets = new List + { + new RocketMQ.Eventbridge.SDK.Models.EventTarget + { + EventTargetName = "newTarget", + ClassName = "file", + Config = config_, + }, + new RocketMQ.Eventbridge.SDK.Models.EventTarget + { + EventTargetName = "newTarget222", + ClassName = "file", + Config = config2_, + } + }, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.UpdateEventTargetsResponse res = await this._sdkClient.UpdateEventTargetsAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestDeleteEventTargets() + { + RocketMQ.Eventbridge.SDK.Models.DeleteEventTargetsRequest request = new RocketMQ.Eventbridge.SDK.Models.DeleteEventTargetsRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + EventTargetNames = new List + { + "newTarget", + "newTarget222" + }, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.DeleteEventTargetsResponse res = this._sdkClient.DeleteEventTargets(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestDeleteEventTargetsAsync() + { + RocketMQ.Eventbridge.SDK.Models.DeleteEventTargetsRequest request = new RocketMQ.Eventbridge.SDK.Models.DeleteEventTargetsRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + EventTargetNames = new List + { + "newTarget", + "newTarget222" + }, + }; + try + { + RocketMQ.Eventbridge.SDK.Models.DeleteEventTargetsResponse res = await this._sdkClient.DeleteEventTargetsAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public void TestListEventTargets() + { + RocketMQ.Eventbridge.SDK.Models.ListEventTargetsRequest request = new RocketMQ.Eventbridge.SDK.Models.ListEventTargetsRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.ListEventTargetsResponse res = this._sdkClient.ListEventTargets(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + public async Task TestListEventTargetsAsync() + { + RocketMQ.Eventbridge.SDK.Models.ListEventTargetsRequest request = new RocketMQ.Eventbridge.SDK.Models.ListEventTargetsRequest + { + EventBusName = "newBus", + EventRuleName = "newRule", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.ListEventTargetsResponse res = await this._sdkClient.ListEventTargetsAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + } +} diff --git a/sdk/demo/EventTarget/generated/csharp/core/Properties/AssemblyInfo.cs b/sdk/demo/EventTarget/generated/csharp/core/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..d923df40 --- /dev/null +++ b/sdk/demo/EventTarget/generated/csharp/core/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("eventbridge-sdk-demo")] +[assembly: AssemblyDescription("open source eventbridge (20240701) SDK Demo Library for .NET")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("51cdc2f0-8a2f-11ef-80d7-99b8e5e82b54")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("0.0.1.0")] +[assembly: AssemblyFileVersion("0.0.1.0")] diff --git a/sdk/demo/EventTarget/generated/csharp/core/sdkDemo.csproj b/sdk/demo/EventTarget/generated/csharp/core/sdkDemo.csproj new file mode 100644 index 00000000..8ea12bc6 --- /dev/null +++ b/sdk/demo/EventTarget/generated/csharp/core/sdkDemo.csproj @@ -0,0 +1,44 @@ + + + + netstandard2.0;net45;netcoreapp8.0 + RocketMQ.Eventbridge.Demo + Exe + false + false + RocketMQ.Eventbridge.Demo + + 5 + open source eventbridge (20240701) SDK Demo Library for .NET + + + NETSTANDARD2_0 + + + NET45 + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + \ No newline at end of file diff --git a/sdk/demo/EventTarget/generated/go/client/client.go b/sdk/demo/EventTarget/generated/go/client/client.go new file mode 100644 index 00000000..d382be92 --- /dev/null +++ b/sdk/demo/EventTarget/generated/go/client/client.go @@ -0,0 +1,250 @@ +// This file is auto-generated, don't edit it. Thanks. +package client + +import ( + openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" + console "github.com/alibabacloud-go/tea-console/client" + util "github.com/alibabacloud-go/tea-utils/v2/service" + "github.com/alibabacloud-go/tea/tea" + sdkclient "github.com/org-apache-rocketmq/eventbridge-sdk/client" +) + +type DemoClient struct { + SdkClient *sdkclient.Client + Endpoint *string +} + +func NewClient() (*DemoClient, error) { + client := new(DemoClient) + err := client.Init() + return client, err +} + +func (client *DemoClient) Init() (_err error) { + client.Endpoint = tea.String("127.0.0.1:7001") + config := &openapi.Config{ + Endpoint: client.Endpoint, + } + client.SdkClient, _err = sdkclient.NewClient(config) + if _err != nil { + return _err + } + + return nil +} + +// Description: +// +// EventTarget Controller apis: +// +// createEventTargets * +// +// updateEventTargets * +// +// deleteEventTargets * +// +// listEventTargets * +func (client *DemoClient) TestCreateEventTargets() (_err error) { + config_ := map[string]interface{}{ + "fileName": "~/Target", + "line": "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}", + } + config2_ := map[string]interface{}{ + "fileName": "~/Target222", + "line": "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}", + } + request := &sdkclient.CreateEventTargetsRequest{ + EventBusName: tea.String("newBus"), + EventRuleName: tea.String("newRule"), + EventTargets: []*sdkclient.EventTarget{&sdkclient.EventTarget{ + EventTargetName: tea.String("newTarget"), + ClassName: tea.String("file"), + Config: config_, + RunOptions: &sdkclient.EventTargetRunOptions{ + ErrorsTolerance: tea.String(""), + RetryStrategy: &sdkclient.EventTargetRunOptionsRetryStrategy{ + PushRetryStrategy: tea.String(""), + MaximumEventAgeInSeconds: tea.Int32(100), + MaximumRetryAttempts: tea.Int32(100), + }, + DeadLetterQueue: &sdkclient.EventTargetRunOptionsDeadLetterQueue{ + Type: tea.String(""), + }, + }, + }, &sdkclient.EventTarget{ + EventTargetName: tea.String("newTarget222"), + ClassName: tea.String("file"), + Config: config2_, + RunOptions: &sdkclient.EventTargetRunOptions{ + ErrorsTolerance: tea.String(""), + RetryStrategy: &sdkclient.EventTargetRunOptionsRetryStrategy{ + PushRetryStrategy: tea.String(""), + MaximumEventAgeInSeconds: tea.Int32(100), + MaximumRetryAttempts: tea.Int32(100), + }, + DeadLetterQueue: &sdkclient.EventTargetRunOptionsDeadLetterQueue{ + Type: tea.String(""), + }, + }, + }}, + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.CreateEventTargets(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestUpdateEventTargets() (_err error) { + config_ := map[string]interface{}{ + "fileName": "~/Target", + "line": "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}", + } + config2_ := map[string]interface{}{ + "fileName": "~/Target222", + "line": "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}", + } + request := &sdkclient.UpdateEventTargetsRequest{ + EventBusName: tea.String("newBus"), + EventRuleName: tea.String("newRule"), + EventTargets: []*sdkclient.EventTarget{&sdkclient.EventTarget{ + EventTargetName: tea.String("newTarget"), + ClassName: tea.String("file"), + Config: config_, + }, &sdkclient.EventTarget{ + EventTargetName: tea.String("newTarget222"), + ClassName: tea.String("file"), + Config: config2_, + }}, + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.UpdateEventTargets(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestDeleteEventTargets() (_err error) { + request := &sdkclient.DeleteEventTargetsRequest{ + EventBusName: tea.String("newBus"), + EventRuleName: tea.String("newRule"), + EventTargetNames: []*string{tea.String("newTarget"), tea.String("newTarget222")}, + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.DeleteEventTargets(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} + +func (client *DemoClient) TestListEventTargets() (_err error) { + request := &sdkclient.ListEventTargetsRequest{ + EventBusName: tea.String("newBus"), + EventRuleName: tea.String("newRule"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.ListEventTargets(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} diff --git a/sdk/demo/EventTarget/generated/go/go.mod b/sdk/demo/EventTarget/generated/go/go.mod new file mode 100644 index 00000000..ff358240 --- /dev/null +++ b/sdk/demo/EventTarget/generated/go/go.mod @@ -0,0 +1,9 @@ +module client + +require ( + github.com/alibabacloud-go/tea-utils/v2 v2.0.6 + github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.10 + github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 + github.com/alibabacloud-go/tea-console v1.0.0 +) +replace github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 => ../../../../generated/go/ diff --git a/sdk/demo/EventTarget/generated/go/main.go b/sdk/demo/EventTarget/generated/go/main.go new file mode 100644 index 00000000..be528f5c --- /dev/null +++ b/sdk/demo/EventTarget/generated/go/main.go @@ -0,0 +1,11 @@ +package main + +import ( + "client/client" +) + +func main() { + demo := new(client.DemoClient) + demo.Init() + demo.TestListEventTargets() +} diff --git a/sdk/demo/EventTarget/generated/java/pom.xml b/sdk/demo/EventTarget/generated/java/pom.xml new file mode 100644 index 00000000..ef0ec329 --- /dev/null +++ b/sdk/demo/EventTarget/generated/java/pom.xml @@ -0,0 +1,122 @@ + + + 4.0.0 + org.apache.rocketmq.eventbridge + demo + 0.0.0 + jar + demo + EventBridge SDK demo for Java + + + + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + ludi + EventBridge SDK + zjuludi@gmail.com + + + + + sonatype-nexus-snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + + + + + com.aliyun + tea-util + 0.2.23 + + + com.aliyun + tea-openapi + 0.3.6 + + + org.apache.rocketmq.eventbridge + sdk + 0.0.0 + + + com.aliyun + tea-console + 0.0.1 + + + com.aliyun + tea + 1.1.14 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 8 + 8 + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + true + + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.3 + true + + sonatype-nexus-staging + https://s01.oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + UTF-8 + none + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.1 + + + + \ No newline at end of file diff --git a/sdk/demo/EventTarget/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java b/sdk/demo/EventTarget/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java new file mode 100644 index 00000000..ab933e76 --- /dev/null +++ b/sdk/demo/EventTarget/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java @@ -0,0 +1,186 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.demo; + +import com.aliyun.tea.*; + +public class Demo { + + public org.apache.rocketmq.eventbridge.sdk.Client _sdkClient; + public String _endpoint; + public Demo() throws Exception { + this._endpoint = "127.0.0.1:7001"; + com.aliyun.teaopenapi.models.Config config = com.aliyun.teaopenapi.models.Config.build(TeaConverter.buildMap( + new TeaPair("endpoint", _endpoint) + )); + this._sdkClient = new org.apache.rocketmq.eventbridge.sdk.Client(config); + } + + public static void main(String[] args) { + try { + Demo demo = new Demo(); + demo.testListEventTargets(); + // demo.testCreateEventTargets(); + // demo.testListEventTargets(); + // demo.testUpdateEventTargets(); + // demo.testListEventTargets(); + // demo.testDeleteEventTargets(); + // demo.testListEventTargets(); + } catch (Exception e) { + // TODO: handle exception + } + } + + /** + * description : + *

EventTarget Controller apis: + * createEventTargets * + * updateEventTargets * + * deleteEventTargets * + * listEventTargets *

+ */ + public void testCreateEventTargets() throws Exception { + java.util.Map config_ = TeaConverter.buildMap( + new TeaPair("fileName", "~/Target"), + new TeaPair("line", "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}") + ); + java.util.Map config2_ = TeaConverter.buildMap( + new TeaPair("fileName", "~/Target222"), + new TeaPair("line", "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}") + ); + org.apache.rocketmq.eventbridge.sdk.models.CreateEventTargetsRequest request = org.apache.rocketmq.eventbridge.sdk.models.CreateEventTargetsRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("eventRuleName", "newRule"), + new TeaPair("eventTargets", java.util.Arrays.asList( + org.apache.rocketmq.eventbridge.sdk.models.EventTarget.build(TeaConverter.buildMap( + new TeaPair("eventTargetName", "newTarget"), + new TeaPair("className", "file"), + new TeaPair("config", config_), + new TeaPair("runOptions", org.apache.rocketmq.eventbridge.sdk.models.EventTarget.EventTargetRunOptions.build(TeaConverter.buildMap( + new TeaPair("errorsTolerance", ""), + new TeaPair("retryStrategy", org.apache.rocketmq.eventbridge.sdk.models.EventTarget.EventTargetRunOptionsRetryStrategy.build(TeaConverter.buildMap( + new TeaPair("pushRetryStrategy", ""), + new TeaPair("maximumEventAgeInSeconds", 100), + new TeaPair("maximumRetryAttempts", 100) + ))), + new TeaPair("deadLetterQueue", org.apache.rocketmq.eventbridge.sdk.models.EventTarget.EventTargetRunOptionsDeadLetterQueue.build(TeaConverter.buildMap( + new TeaPair("type", "") + ))) + ))) + )), + org.apache.rocketmq.eventbridge.sdk.models.EventTarget.build(TeaConverter.buildMap( + new TeaPair("eventTargetName", "newTarget222"), + new TeaPair("className", "file"), + new TeaPair("config", config2_), + new TeaPair("runOptions", org.apache.rocketmq.eventbridge.sdk.models.EventTarget.EventTargetRunOptions.build(TeaConverter.buildMap( + new TeaPair("errorsTolerance", ""), + new TeaPair("retryStrategy", org.apache.rocketmq.eventbridge.sdk.models.EventTarget.EventTargetRunOptionsRetryStrategy.build(TeaConverter.buildMap( + new TeaPair("pushRetryStrategy", ""), + new TeaPair("maximumEventAgeInSeconds", 100), + new TeaPair("maximumRetryAttempts", 100) + ))), + new TeaPair("deadLetterQueue", org.apache.rocketmq.eventbridge.sdk.models.EventTarget.EventTargetRunOptionsDeadLetterQueue.build(TeaConverter.buildMap( + new TeaPair("type", "") + ))) + ))) + )) + )) + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.CreateEventTargetsResponse res = _sdkClient.createEventTargets(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testUpdateEventTargets() throws Exception { + java.util.Map config_ = TeaConverter.buildMap( + new TeaPair("fileName", "~/Target"), + new TeaPair("line", "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}") + ); + java.util.Map config2_ = TeaConverter.buildMap( + new TeaPair("fileName", "~/Target222"), + new TeaPair("line", "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}") + ); + org.apache.rocketmq.eventbridge.sdk.models.UpdateEventTargetsRequest request = org.apache.rocketmq.eventbridge.sdk.models.UpdateEventTargetsRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("eventRuleName", "newRule"), + new TeaPair("eventTargets", java.util.Arrays.asList( + org.apache.rocketmq.eventbridge.sdk.models.EventTarget.build(TeaConverter.buildMap( + new TeaPair("eventTargetName", "newTarget"), + new TeaPair("className", "file"), + new TeaPair("config", config_) + )), + org.apache.rocketmq.eventbridge.sdk.models.EventTarget.build(TeaConverter.buildMap( + new TeaPair("eventTargetName", "newTarget222"), + new TeaPair("className", "file"), + new TeaPair("config", config2_) + )) + )) + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.UpdateEventTargetsResponse res = _sdkClient.updateEventTargets(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testDeleteEventTargets() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.DeleteEventTargetsRequest request = org.apache.rocketmq.eventbridge.sdk.models.DeleteEventTargetsRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("eventRuleName", "newRule"), + new TeaPair("eventTargetNames", java.util.Arrays.asList( + "newTarget", + "newTarget222" + )) + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.DeleteEventTargetsResponse res = _sdkClient.deleteEventTargets(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } + + public void testListEventTargets() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.ListEventTargetsRequest request = org.apache.rocketmq.eventbridge.sdk.models.ListEventTargetsRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("eventRuleName", "newRule") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.ListEventTargetsResponse res = _sdkClient.listEventTargets(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } +} diff --git a/sdk/demo/EventTarget/generated/php/.gitignore b/sdk/demo/EventTarget/generated/php/.gitignore new file mode 100644 index 00000000..89c7aa58 --- /dev/null +++ b/sdk/demo/EventTarget/generated/php/.gitignore @@ -0,0 +1,15 @@ +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +composer.lock + +.vscode/ +.idea +.DS_Store + +cache/ +*.cache +runtime/ +.php_cs.cache diff --git a/sdk/demo/EventTarget/generated/php/.php_cs.dist b/sdk/demo/EventTarget/generated/php/.php_cs.dist new file mode 100644 index 00000000..8617ec2f --- /dev/null +++ b/sdk/demo/EventTarget/generated/php/.php_cs.dist @@ -0,0 +1,65 @@ +setRiskyAllowed(true) + ->setIndent(' ') + ->setRules([ + '@PSR2' => true, + '@PhpCsFixer' => true, + '@Symfony:risky' => true, + 'concat_space' => ['spacing' => 'one'], + 'array_syntax' => ['syntax' => 'short'], + 'array_indentation' => true, + 'combine_consecutive_unsets' => true, + 'method_separation' => true, + 'single_quote' => true, + 'declare_equal_normalize' => true, + 'function_typehint_space' => true, + 'hash_to_slash_comment' => true, + 'include' => true, + 'lowercase_cast' => true, + 'no_multiline_whitespace_before_semicolons' => true, + 'no_leading_import_slash' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_spaces_around_offset' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unused_imports' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'object_operator_without_whitespace' => true, + 'single_blank_line_before_namespace' => true, + 'single_class_element_per_statement' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline_array' => true, + 'trim_array_spaces' => true, + 'unary_operator_spaces' => true, + 'whitespace_after_comma_in_array' => true, + 'no_extra_consecutive_blank_lines' => [ + 'curly_brace_block', + 'extra', + 'parenthesis_brace_block', + 'square_brace_block', + 'throw', + 'use', + ], + 'binary_operator_spaces' => [ + 'align_double_arrow' => true, + 'align_equals' => true, + ], + 'braces' => [ + 'allow_single_line_closure' => true, + ], + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('vendor') + ->exclude('tests') + ->in(__DIR__) + ); diff --git a/sdk/demo/EventTarget/generated/php/autoload.php b/sdk/demo/EventTarget/generated/php/autoload.php new file mode 100644 index 00000000..5bfe0a1a --- /dev/null +++ b/sdk/demo/EventTarget/generated/php/autoload.php @@ -0,0 +1,15 @@ +5.5", + "alibabacloud/tea-utils": "^0.2.21", + "alibabacloud/darabonba-openapi": "^0.2.12", + "rocketmq/eventbridge-sdk": "^0.0.0", + "alibabacloud/tea-console": "^0.1.0" + }, + "autoload": { + "psr-4": { + "RocketMQ\\Eventbridge\\SDK\\Demo\\": "src" + } + }, + "scripts": { + "fixer": "php-cs-fixer fix ./" + }, + "config": { + "sort-packages": true, + "preferred-install": "dist", + "optimize-autoloader": true + }, + "prefer-stable": true, + "repositories": { + "rocketmq":{ + "type" : "path", + "url": "../../../../generated/php" + } + } +} diff --git a/sdk/demo/EventTarget/generated/php/main.php b/sdk/demo/EventTarget/generated/php/main.php new file mode 100644 index 00000000..e2fc8703 --- /dev/null +++ b/sdk/demo/EventTarget/generated/php/main.php @@ -0,0 +1,8 @@ +testListEventTargets(); diff --git a/sdk/demo/EventTarget/generated/php/src/Demo.php b/sdk/demo/EventTarget/generated/php/src/Demo.php new file mode 100644 index 00000000..567b1897 --- /dev/null +++ b/sdk/demo/EventTarget/generated/php/src/Demo.php @@ -0,0 +1,201 @@ +_endpoint = "127.0.0.1:7001"; + $config = new Config([ + "endpoint" => $this->_endpoint + ]); + $this->_sdkClient = new SDKClient($config); + } + + /** + * EventTarget Controller apis: + * * createEventTargets * + * * updateEventTargets * + * * deleteEventTargets * + * * listEventTargets * + * @return void + */ + public function testCreateEventTargets(){ + $config_ = [ + "fileName" => "~/Target", + "line" => "{ \"form\":\"JSONPATH\", \"value\":\"\$.data\"}" + ]; + $config2_ = [ + "fileName" => "~/Target222", + "line" => "{ \"form\":\"JSONPATH\", \"value\":\"\$.data\"}" + ]; + $request = new CreateEventTargetsRequest([ + "eventBusName" => "newBus", + "eventRuleName" => "newRule", + "eventTargets" => [ + new EventTarget([ + "eventTargetName" => "newTarget", + "className" => "file", + "config" => $config_, + "runOptions" => new runOptions([ + "errorsTolerance" => "", + "retryStrategy" => new retryStrategy([ + "pushRetryStrategy" => "", + "maximumEventAgeInSeconds" => 100, + "maximumRetryAttempts" => 100 + ]), + "deadLetterQueue" => new deadLetterQueue([ + "type" => "" + ]) + ]) + ]), + new EventTarget([ + "eventTargetName" => "newTarget222", + "className" => "file", + "config" => $config2_, + "runOptions" => new runOptions([ + "errorsTolerance" => "", + "retryStrategy" => new retryStrategy([ + "pushRetryStrategy" => "", + "maximumEventAgeInSeconds" => 100, + "maximumRetryAttempts" => 100 + ]), + "deadLetterQueue" => new deadLetterQueue([ + "type" => "" + ]) + ]) + ]) + ] + ]); + try { + $res = $this->_sdkClient->createEventTargets($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testUpdateEventTargets(){ + $config_ = [ + "fileName" => "~/Target", + "line" => "{ \"form\":\"JSONPATH\", \"value\":\"\$.data\"}" + ]; + $config2_ = [ + "fileName" => "~/Target222", + "line" => "{ \"form\":\"JSONPATH\", \"value\":\"\$.data\"}" + ]; + $request = new UpdateEventTargetsRequest([ + "eventBusName" => "newBus", + "eventRuleName" => "newRule", + "eventTargets" => [ + new EventTarget([ + "eventTargetName" => "newTarget", + "className" => "file", + "config" => $config_ + ]), + new EventTarget([ + "eventTargetName" => "newTarget222", + "className" => "file", + "config" => $config2_ + ]) + ] + ]); + try { + $res = $this->_sdkClient->updateEventTargets($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testDeleteEventTargets(){ + $request = new DeleteEventTargetsRequest([ + "eventBusName" => "newBus", + "eventRuleName" => "newRule", + "eventTargetNames" => [ + "newTarget", + "newTarget222" + ] + ]); + try { + $res = $this->_sdkClient->deleteEventTargets($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } + + /** + * @return void + */ + public function testListEventTargets(){ + $request = new ListEventTargetsRequest([ + "eventBusName" => "newBus", + "eventRuleName" => "newRule" + ]); + try { + $res = $this->_sdkClient->listEventTargets($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } +} diff --git a/sdk/demo/EventTarget/generated/python/.gitignore b/sdk/demo/EventTarget/generated/python/.gitignore new file mode 100644 index 00000000..2bcfffae --- /dev/null +++ b/sdk/demo/EventTarget/generated/python/.gitignore @@ -0,0 +1,5 @@ +runtime/ +.idea/ +.vscode/ +__pycache__/ +.pytest_cache/ \ No newline at end of file diff --git a/sdk/demo/EventTarget/generated/python/rocketmq_eventbridge_demo/__init__.py b/sdk/demo/EventTarget/generated/python/rocketmq_eventbridge_demo/__init__.py new file mode 100644 index 00000000..5becc17c --- /dev/null +++ b/sdk/demo/EventTarget/generated/python/rocketmq_eventbridge_demo/__init__.py @@ -0,0 +1 @@ +__version__ = "1.0.0" diff --git a/sdk/demo/EventTarget/generated/python/rocketmq_eventbridge_demo/demo.py b/sdk/demo/EventTarget/generated/python/rocketmq_eventbridge_demo/demo.py new file mode 100644 index 00000000..145233b4 --- /dev/null +++ b/sdk/demo/EventTarget/generated/python/rocketmq_eventbridge_demo/demo.py @@ -0,0 +1,279 @@ +# -*- coding: utf-8 -*- +# This file is auto-generated, don't edit it. Thanks. +from rocketmq_eventbridge.client import Client as SDKClientClient +from alibabacloud_tea_openapi import models as open_api_models +from rocketmq_eventbridge import models as sdkclient_models +from alibabacloud_tea_console.client import Client as ConsoleClient +from alibabacloud_tea_util.client import Client as UtilClient + + +class Demo: + _sdk_client: SDKClientClient = None + _endpoint: str = None + + def __init__(self): + self._endpoint = '127.0.0.1:7001' + config = open_api_models.Config( + endpoint=self._endpoint + ) + self._sdk_client = SDKClientClient(config) + + def test_create_event_targets(self) -> None: + """ + EventTarget Controller apis: + createEventTargets *\ + updateEventTargets *\ + deleteEventTargets *\ + listEventTargets *\ + """ + config_ = { + 'fileName': '~/Target', + 'line': '{ "form":"JSONPATH", "value":"$.data"}' + } + config_2_ = { + 'fileName': '~/Target222', + 'line': '{ "form":"JSONPATH", "value":"$.data"}' + } + request = sdkclient_models.CreateEventTargetsRequest( + event_bus_name='newBus', + event_rule_name='newRule', + event_targets=[ + sdkclient_models.EventTarget( + event_target_name='newTarget', + class_name='file', + config=config_, + run_options=sdkclient_models.EventTargetRunOptions( + errors_tolerance='', + retry_strategy=sdkclient_models.EventTargetRunOptionsRetryStrategy( + push_retry_strategy='', + maximum_event_age_in_seconds=100, + maximum_retry_attempts=100 + ), + dead_letter_queue=sdkclient_models.EventTargetRunOptionsDeadLetterQueue( + type='' + ) + ) + ), + sdkclient_models.EventTarget( + event_target_name='newTarget222', + class_name='file', + config=config_2_, + run_options=sdkclient_models.EventTargetRunOptions( + errors_tolerance='', + retry_strategy=sdkclient_models.EventTargetRunOptionsRetryStrategy( + push_retry_strategy='', + maximum_event_age_in_seconds=100, + maximum_retry_attempts=100 + ), + dead_letter_queue=sdkclient_models.EventTargetRunOptionsDeadLetterQueue( + type='' + ) + ) + ) + ] + ) + try: + res = self._sdk_client.create_event_targets(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_create_event_targets_async(self) -> None: + """ + EventTarget Controller apis: + createEventTargets *\ + updateEventTargets *\ + deleteEventTargets *\ + listEventTargets *\ + """ + config_ = { + 'fileName': '~/Target', + 'line': '{ "form":"JSONPATH", "value":"$.data"}' + } + config_2_ = { + 'fileName': '~/Target222', + 'line': '{ "form":"JSONPATH", "value":"$.data"}' + } + request = sdkclient_models.CreateEventTargetsRequest( + event_bus_name='newBus', + event_rule_name='newRule', + event_targets=[ + sdkclient_models.EventTarget( + event_target_name='newTarget', + class_name='file', + config=config_, + run_options=sdkclient_models.EventTargetRunOptions( + errors_tolerance='', + retry_strategy=sdkclient_models.EventTargetRunOptionsRetryStrategy( + push_retry_strategy='', + maximum_event_age_in_seconds=100, + maximum_retry_attempts=100 + ), + dead_letter_queue=sdkclient_models.EventTargetRunOptionsDeadLetterQueue( + type='' + ) + ) + ), + sdkclient_models.EventTarget( + event_target_name='newTarget222', + class_name='file', + config=config_2_, + run_options=sdkclient_models.EventTargetRunOptions( + errors_tolerance='', + retry_strategy=sdkclient_models.EventTargetRunOptionsRetryStrategy( + push_retry_strategy='', + maximum_event_age_in_seconds=100, + maximum_retry_attempts=100 + ), + dead_letter_queue=sdkclient_models.EventTargetRunOptionsDeadLetterQueue( + type='' + ) + ) + ) + ] + ) + try: + res = await self._sdk_client.create_event_targets_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_update_event_targets(self) -> None: + config_ = { + 'fileName': '~/Target', + 'line': '{ "form":"JSONPATH", "value":"$.data"}' + } + config_2_ = { + 'fileName': '~/Target222', + 'line': '{ "form":"JSONPATH", "value":"$.data"}' + } + request = sdkclient_models.UpdateEventTargetsRequest( + event_bus_name='newBus', + event_rule_name='newRule', + event_targets=[ + sdkclient_models.EventTarget( + event_target_name='newTarget', + class_name='file', + config=config_ + ), + sdkclient_models.EventTarget( + event_target_name='newTarget222', + class_name='file', + config=config_2_ + ) + ] + ) + try: + res = self._sdk_client.update_event_targets(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_update_event_targets_async(self) -> None: + config_ = { + 'fileName': '~/Target', + 'line': '{ "form":"JSONPATH", "value":"$.data"}' + } + config_2_ = { + 'fileName': '~/Target222', + 'line': '{ "form":"JSONPATH", "value":"$.data"}' + } + request = sdkclient_models.UpdateEventTargetsRequest( + event_bus_name='newBus', + event_rule_name='newRule', + event_targets=[ + sdkclient_models.EventTarget( + event_target_name='newTarget', + class_name='file', + config=config_ + ), + sdkclient_models.EventTarget( + event_target_name='newTarget222', + class_name='file', + config=config_2_ + ) + ] + ) + try: + res = await self._sdk_client.update_event_targets_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_delete_event_targets(self) -> None: + request = sdkclient_models.DeleteEventTargetsRequest( + event_bus_name='newBus', + event_rule_name='newRule', + event_target_names=[ + 'newTarget', + 'newTarget222' + ] + ) + try: + res = self._sdk_client.delete_event_targets(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_delete_event_targets_async(self) -> None: + request = sdkclient_models.DeleteEventTargetsRequest( + event_bus_name='newBus', + event_rule_name='newRule', + event_target_names=[ + 'newTarget', + 'newTarget222' + ] + ) + try: + res = await self._sdk_client.delete_event_targets_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + def test_list_event_targets(self) -> None: + request = sdkclient_models.ListEventTargetsRequest( + event_bus_name='newBus', + event_rule_name='newRule' + ) + try: + res = self._sdk_client.list_event_targets(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_list_event_targets_async(self) -> None: + request = sdkclient_models.ListEventTargetsRequest( + event_bus_name='newBus', + event_rule_name='newRule' + ) + try: + res = await self._sdk_client.list_event_targets_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') +demo = Demo() +demo.test_list_event_targets() diff --git a/sdk/demo/EventTarget/generated/python/setup.py b/sdk/demo/EventTarget/generated/python/setup.py new file mode 100644 index 00000000..3824f4cc --- /dev/null +++ b/sdk/demo/EventTarget/generated/python/setup.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +""" + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +""" + +import os +from setuptools import setup, find_packages + +""" +setup module for rocketmq_eventbridge_demo. + +Created on 14/10/2024 + +@author: +""" + +PACKAGE = "rocketmq_eventbridge_demo" +NAME = "rocketmq_eventbridge_demo" or "alibabacloud-package" +DESCRIPTION = "Alibaba Cloud eventbridge (20240701) SDK Library for Python" +AUTHOR = "" +AUTHOR_EMAIL = "" +URL = "unavailable" +VERSION = __import__(PACKAGE).__version__ +REQUIRES = [ + "alibabacloud_tea_util>=0.3.13, <1.0.0", + "alibabacloud_tea_openapi>=0.3.12, <1.0.0", + "rocketmq_eventbridge20240701>=0.0.0, <1.0.0", + "alibabacloud_tea_console>=0.0.1, <1.0.0" +] + +LONG_DESCRIPTION = '' +if os.path.exists('./README.md'): + with open("README.md", encoding='utf-8') as fp: + LONG_DESCRIPTION = fp.read() + +setup( + name=NAME, + version=VERSION, + description=DESCRIPTION, + long_description=LONG_DESCRIPTION, + long_description_content_type='text/markdown', + author=AUTHOR, + author_email=AUTHOR_EMAIL, + license="Apache License 2.0", + url=URL, + keywords=["rocketmq","eventbridge","demo"], + packages=find_packages(exclude=["tests*"]), + include_package_data=True, + platforms="any", + install_requires=REQUIRES, + python_requires=">=3.6", + classifiers=( + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + "Topic :: Software Development" + ) +) diff --git a/sdk/demo/EventTarget/generated/ts/package.json b/sdk/demo/EventTarget/generated/ts/package.json new file mode 100644 index 00000000..be9669b9 --- /dev/null +++ b/sdk/demo/EventTarget/generated/ts/package.json @@ -0,0 +1,31 @@ +{ + "name": "", + "version": "1.0.0", + "description": "", + "main": "dist/client.js", + "scripts": { + "test": "mocha --reporter spec --timeout 3000 test/*.test.js", + "test-cov": "nyc -e .ts -r=html -r=text -r=lcov npm run test", + "build": "tsc", + "prepublishOnly": "tsc" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "@types/node": "^12.12.26", + "nyc": "^15.0.0", + "source-map-support": "^0.5.16", + "ts-node": "^8.6.2", + "typescript": "^3.7.5" + }, + "dependencies": { + "@alicloud/tea-typescript": "^1.7.1", + "@alicloud/tea-util": "^1.4.9", + "@alicloud/openapi-client": "^0.4.12", + "@alicloud/tea-console": "^1.0.0" + }, + "files": [ + "dist", + "src" + ] +} \ No newline at end of file diff --git a/sdk/demo/EventTarget/generated/ts/src/client.ts b/sdk/demo/EventTarget/generated/ts/src/client.ts new file mode 100644 index 00000000..ebc88aa9 --- /dev/null +++ b/sdk/demo/EventTarget/generated/ts/src/client.ts @@ -0,0 +1,160 @@ +// This file is auto-generated, don't edit it +import Util from '@alicloud/tea-util'; +import OpenApi, * as $OpenApi from '@alicloud/openapi-client'; +import SDKClient, * as $SDKClient from '../../../../../generated/ts/src/client'; +import Console from '@alicloud/tea-console'; +import * as $tea from '@alicloud/tea-typescript'; + + +export default class Client { + _sdkClient: SDKClient; + _endpoint: string; + + constructor() { + this._endpoint = "127.0.0.1:7001"; + let config = new $OpenApi.Config({ + endpoint: this._endpoint, + }); + this._sdkClient = new SDKClient(config); + } + + + /** + * @remarks + * EventTarget Controller apis: + * createEventTargets * + * updateEventTargets * + * deleteEventTargets * + * listEventTargets * + */ + async testCreateEventTargets(): Promise { + let config_ : {[key: string ]: any} = { + fileName: "~/Target", + line: "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}", + }; + let config2_ : {[key: string ]: any} = { + fileName: "~/Target222", + line: "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}", + }; + let request = new $SDKClient.CreateEventTargetsRequest({ + eventBusName: "newBus", + eventRuleName: "newRule", + eventTargets: [ + new $SDKClient.EventTarget({ + eventTargetName: "newTarget", + className: "file", + config: config_, + runOptions: new $SDKClient.EventTargetRunOptions({ + errorsTolerance: "", + retryStrategy: new $SDKClient.EventTargetRunOptionsRetryStrategy({ + pushRetryStrategy: "", + maximumEventAgeInSeconds: 100, + maximumRetryAttempts: 100, + }), + deadLetterQueue: new $SDKClient.EventTargetRunOptionsDeadLetterQueue({ + type: "", + }), + }), + }), + new $SDKClient.EventTarget({ + eventTargetName: "newTarget222", + className: "file", + config: config2_, + runOptions: new $SDKClient.EventTargetRunOptions({ + errorsTolerance: "", + retryStrategy: new $SDKClient.EventTargetRunOptionsRetryStrategy({ + pushRetryStrategy: "", + maximumEventAgeInSeconds: 100, + maximumRetryAttempts: 100, + }), + deadLetterQueue: new $SDKClient.EventTargetRunOptionsDeadLetterQueue({ + type: "", + }), + }), + }) + ], + }); + try { + let res = await this._sdkClient.createEventTargets(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testUpdateEventTargets(): Promise { + let config_ : {[key: string ]: any} = { + fileName: "~/Target", + line: "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}", + }; + let config2_ : {[key: string ]: any} = { + fileName: "~/Target222", + line: "{ \"form\":\"JSONPATH\", \"value\":\"$.data\"}", + }; + let request = new $SDKClient.UpdateEventTargetsRequest({ + eventBusName: "newBus", + eventRuleName: "newRule", + eventTargets: [ + new $SDKClient.EventTarget({ + eventTargetName: "newTarget", + className: "file", + config: config_, + }), + new $SDKClient.EventTarget({ + eventTargetName: "newTarget222", + className: "file", + config: config2_, + }) + ], + }); + try { + let res = await this._sdkClient.updateEventTargets(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testDeleteEventTargets(): Promise { + let request = new $SDKClient.DeleteEventTargetsRequest({ + eventBusName: "newBus", + eventRuleName: "newRule", + eventTargetNames: [ + "newTarget", + "newTarget222" + ], + }); + try { + let res = await this._sdkClient.deleteEventTargets(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + + async testListEventTargets(): Promise { + let request = new $SDKClient.ListEventTargetsRequest({ + eventBusName: "newBus", + eventRuleName: "newRule", + }); + try { + let res = await this._sdkClient.listEventTargets(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + +} diff --git a/sdk/demo/EventTarget/generated/ts/src/main.ts b/sdk/demo/EventTarget/generated/ts/src/main.ts new file mode 100644 index 00000000..2faa5c20 --- /dev/null +++ b/sdk/demo/EventTarget/generated/ts/src/main.ts @@ -0,0 +1,4 @@ +import Client from './client' + +let c = new Client() +c.testListEventTargets() diff --git a/sdk/demo/EventTarget/generated/ts/tsconfig.json b/sdk/demo/EventTarget/generated/ts/tsconfig.json new file mode 100644 index 00000000..ae66f5b6 --- /dev/null +++ b/sdk/demo/EventTarget/generated/ts/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es2017", + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "outDir": "./dist", + "esModuleInterop": true + }, + "include": [ + "src/**/*" + ] +} \ No newline at end of file diff --git a/sdk/demo/EventType/Darafile b/sdk/demo/EventType/Darafile new file mode 100644 index 00000000..b15ddca3 --- /dev/null +++ b/sdk/demo/EventType/Darafile @@ -0,0 +1,66 @@ +{ + "scope": "Demo", + "name": "demo", + "version": "0.0.0", + "main": "./demo.dara", + "libraries": { + "SDKClient" : "../../", + "Util": "darabonba:Util:*", + "OpenApi": "alibabacloud:OpenApi:*", + "OpenApiUtil": "alibabacloud:OpenApiUtil:*", + "Console": "darabonba:Console:*" + }, + "java": { + "package": "org.apache.rocketmq.eventbridge.demo", + "className": "Demo", + "packageInfo": { + "groupId": "org.apache.rocketmq.eventbridge", + "artifactId": "demo", + "version": "0.0.0", + "description": "EventBridge SDK demo for Java", + "url": "", + "licenseName": "The Apache License, Version 2.0", + "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.txt", + "developerId": "ludi", + "developerName": "EventBridge SDK", + "developerEmail": "zjuludi@gmail.com", + "scmConnection": "", + "scmDeveloperConnection": "", + "scmUrl": "" + } + }, + "go": { + "clientName": "DemoClient" + }, + "csharp": { + "className": "Demo", + "namespace": "RocketMQ.Eventbridge.Demo", + "packageInfo": { + "name": "sdkDemo", + "version": "0.0.0", + "title": "eventbridge-sdk-demo", + "description": "open source eventbridge (20240701) SDK Demo Library for .NET" + } + }, + "php": { + "package": "RocketMQ.Eventbridge.SDK.Demo", + "clientName": "Demo", + "packageInfo": { + "name": "rocketmq/eventbridge-sdk-demo", + "desc": "RocketMQ eventbridge (20240701) SDK Demo for PHP", + "github": "unavailable", + "files": { + "LICENSE": "../LICENSE" + } + } + }, + "python": { + "package": "rocketmq_eventbridge_demo", + "clientName": "demo", + "packageInfo": { + "name": "rocketmq_eventbridge_demo", + "desc": "Alibaba Cloud eventbridge (20240701) SDK Library for Python", + "github": "unavailable" + } + } +} \ No newline at end of file diff --git a/sdk/demo/EventType/demo.dara b/sdk/demo/EventType/demo.dara new file mode 100644 index 00000000..c1e2ac90 --- /dev/null +++ b/sdk/demo/EventType/demo.dara @@ -0,0 +1,40 @@ +import Util; +import OpenApi; +import SDKClient; +import Console; + +type @sdkClient = SDKClient; +type @endpoint = string; + +init(){ + @endpoint = '127.0.0.1:7001'; + var config = new OpenApi.Config{ + endpoint = @endpoint + }; + @sdkClient = new SDKClient(config); +} + +/** + EventType Controller apis: + * listEventTypes * +*/ + +async function testListEventTypes(): void { + var request = new SDKClient.ListEventTypesRequest{ + eventBusName = 'newBus', + eventSourceName = 'newSource', + maxResults = 10, + nextToken = "0" + }; + + try { + var res = @sdkClient.listEventTypes(request); + Console.log(Util.toJSONString(res.body)); + } catch(err) { + Console.log('err!'); + Console.log(err.message); + } finally { + Console.log('test end!'); + } + +} diff --git a/sdk/demo/EventType/generated/csharp/core/Demo.cs b/sdk/demo/EventType/generated/csharp/core/Demo.cs new file mode 100644 index 00000000..dabb3d11 --- /dev/null +++ b/sdk/demo/EventType/generated/csharp/core/Demo.cs @@ -0,0 +1,114 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; + +using Tea; +using Tea.Utils; + + +namespace RocketMQ.Eventbridge.Demo +{ + public class Demo + { + protected RocketMQ.Eventbridge.SDK.SDKClient _sdkClient; + protected string _endpoint; + + public Demo() + { + this._endpoint = "127.0.0.1:7001"; + AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config + { + Endpoint = _endpoint, + }; + this._sdkClient = new RocketMQ.Eventbridge.SDK.SDKClient(config); + } + + static void Main(string[] _args){ + Demo demo = new Demo(); + demo.TestListEventTypes(); + } + + /// Description: + /// + /// EventType Controller apis: + /// listEventTypes * + /// + public void TestListEventTypes() + { + RocketMQ.Eventbridge.SDK.Models.ListEventTypesRequest request = new RocketMQ.Eventbridge.SDK.Models.ListEventTypesRequest + { + EventBusName = "newBus", + EventSourceName = "newSource", + MaxResults = 10, + NextToken = "0", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.ListEventTypesResponse res = this._sdkClient.ListEventTypes(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + /// Description: + /// + /// EventType Controller apis: + /// listEventTypes * + /// + public async Task TestListEventTypesAsync() + { + RocketMQ.Eventbridge.SDK.Models.ListEventTypesRequest request = new RocketMQ.Eventbridge.SDK.Models.ListEventTypesRequest + { + EventBusName = "newBus", + EventSourceName = "newSource", + MaxResults = 10, + NextToken = "0", + }; + try + { + RocketMQ.Eventbridge.SDK.Models.ListEventTypesResponse res = await this._sdkClient.ListEventTypesAsync(request); + AlibabaCloud.TeaConsole.Client.Log(AlibabaCloud.TeaUtil.Common.ToJSONString(res.Body)); + } + catch (TeaException err) + { + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + catch (Exception _err) + { + TeaException err = new TeaException(new Dictionary + { + { "message", _err.Message } + }); + AlibabaCloud.TeaConsole.Client.Log("err!"); + AlibabaCloud.TeaConsole.Client.Log(err.Message); + } + finally + { + AlibabaCloud.TeaConsole.Client.Log("test end!"); + } + } + + } +} diff --git a/sdk/demo/EventType/generated/csharp/core/Properties/AssemblyInfo.cs b/sdk/demo/EventType/generated/csharp/core/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..68364cd7 --- /dev/null +++ b/sdk/demo/EventType/generated/csharp/core/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("eventbridge-sdk-demo")] +[assembly: AssemblyDescription("open source eventbridge (20240701) SDK Demo Library for .NET")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("56d684d0-8a2f-11ef-8e5c-ff712b87d5c8")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("0.0.1.0")] +[assembly: AssemblyFileVersion("0.0.1.0")] diff --git a/sdk/demo/EventType/generated/csharp/core/sdkDemo.csproj b/sdk/demo/EventType/generated/csharp/core/sdkDemo.csproj new file mode 100644 index 00000000..8ea12bc6 --- /dev/null +++ b/sdk/demo/EventType/generated/csharp/core/sdkDemo.csproj @@ -0,0 +1,44 @@ + + + + netstandard2.0;net45;netcoreapp8.0 + RocketMQ.Eventbridge.Demo + Exe + false + false + RocketMQ.Eventbridge.Demo + + 5 + open source eventbridge (20240701) SDK Demo Library for .NET + + + NETSTANDARD2_0 + + + NET45 + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + \ No newline at end of file diff --git a/sdk/demo/EventType/generated/go/client/client.go b/sdk/demo/EventType/generated/go/client/client.go new file mode 100644 index 00000000..732d7acb --- /dev/null +++ b/sdk/demo/EventType/generated/go/client/client.go @@ -0,0 +1,78 @@ +// This file is auto-generated, don't edit it. Thanks. +package client + +import ( + openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" + console "github.com/alibabacloud-go/tea-console/client" + util "github.com/alibabacloud-go/tea-utils/v2/service" + "github.com/alibabacloud-go/tea/tea" + sdkclient "github.com/org-apache-rocketmq/eventbridge-sdk/client" +) + +type DemoClient struct { + SdkClient *sdkclient.Client + Endpoint *string +} + +func NewClient() (*DemoClient, error) { + client := new(DemoClient) + err := client.Init() + return client, err +} + +func (client *DemoClient) Init() (_err error) { + client.Endpoint = tea.String("127.0.0.1:7001") + config := &openapi.Config{ + Endpoint: client.Endpoint, + } + client.SdkClient, _err = sdkclient.NewClient(config) + if _err != nil { + return _err + } + + return nil +} + +// Description: +// +// EventType Controller apis: +// +// listEventTypes * +func (client *DemoClient) TestListEventTypes() (_err error) { + request := &sdkclient.ListEventTypesRequest{ + EventBusName: tea.String("newBus"), + EventSourceName: tea.String("newSource"), + MaxResults: tea.Int32(10), + NextToken: tea.String("0"), + } + defer func() { + console.Log(tea.String("test end!")) + }() + tryErr := func() (_e error) { + defer func() { + if r := tea.Recover(recover()); r != nil { + _e = r + } + }() + res, _err := client.SdkClient.ListEventTypes(request) + if _err != nil { + return _err + } + + console.Log(util.ToJSONString(res.Body)) + + return nil + }() + + if tryErr != nil { + var err = &tea.SDKError{} + if _t, ok := tryErr.(*tea.SDKError); ok { + err = _t + } else { + err.Message = tea.String(tryErr.Error()) + } + console.Log(tea.String("err!")) + console.Log(err.Message) + } + return _err +} diff --git a/sdk/demo/EventType/generated/go/go.mod b/sdk/demo/EventType/generated/go/go.mod new file mode 100644 index 00000000..ff358240 --- /dev/null +++ b/sdk/demo/EventType/generated/go/go.mod @@ -0,0 +1,9 @@ +module client + +require ( + github.com/alibabacloud-go/tea-utils/v2 v2.0.6 + github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.10 + github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 + github.com/alibabacloud-go/tea-console v1.0.0 +) +replace github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 => ../../../../generated/go/ diff --git a/sdk/demo/EventType/generated/go/main.go b/sdk/demo/EventType/generated/go/main.go new file mode 100644 index 00000000..b619b90a --- /dev/null +++ b/sdk/demo/EventType/generated/go/main.go @@ -0,0 +1,11 @@ +package main + +import ( + "client/client" +) + +func main() { + demo := new(client.DemoClient) + demo.Init() + demo.TestListEventTypes() +} diff --git a/sdk/demo/EventType/generated/java/pom.xml b/sdk/demo/EventType/generated/java/pom.xml new file mode 100644 index 00000000..ef0ec329 --- /dev/null +++ b/sdk/demo/EventType/generated/java/pom.xml @@ -0,0 +1,122 @@ + + + 4.0.0 + org.apache.rocketmq.eventbridge + demo + 0.0.0 + jar + demo + EventBridge SDK demo for Java + + + + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + ludi + EventBridge SDK + zjuludi@gmail.com + + + + + sonatype-nexus-snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + + + + + com.aliyun + tea-util + 0.2.23 + + + com.aliyun + tea-openapi + 0.3.6 + + + org.apache.rocketmq.eventbridge + sdk + 0.0.0 + + + com.aliyun + tea-console + 0.0.1 + + + com.aliyun + tea + 1.1.14 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 8 + 8 + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + true + + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.3 + true + + sonatype-nexus-staging + https://s01.oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + UTF-8 + none + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.1 + + + + \ No newline at end of file diff --git a/sdk/demo/EventType/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java b/sdk/demo/EventType/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java new file mode 100644 index 00000000..b93f088a --- /dev/null +++ b/sdk/demo/EventType/generated/java/src/main/java/org/apache/rocketmq/eventbridge/demo/Demo.java @@ -0,0 +1,53 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.demo; + +import com.aliyun.tea.*; + +public class Demo { + + public org.apache.rocketmq.eventbridge.sdk.Client _sdkClient; + public String _endpoint; + public Demo() throws Exception { + this._endpoint = "127.0.0.1:7001"; + com.aliyun.teaopenapi.models.Config config = com.aliyun.teaopenapi.models.Config.build(TeaConverter.buildMap( + new TeaPair("endpoint", _endpoint) + )); + this._sdkClient = new org.apache.rocketmq.eventbridge.sdk.Client(config); + } + + public static void main(String[] args) { + try { + Demo demo = new Demo(); + demo.testListEventTypes(); + } catch (Exception e) { + // TODO: handle exception + } + } + + /** + * description : + *

EventType Controller apis: + * listEventTypes *

+ */ + public void testListEventTypes() throws Exception { + org.apache.rocketmq.eventbridge.sdk.models.ListEventTypesRequest request = org.apache.rocketmq.eventbridge.sdk.models.ListEventTypesRequest.build(TeaConverter.buildMap( + new TeaPair("eventBusName", "newBus"), + new TeaPair("eventSourceName", "newSource"), + new TeaPair("maxResults", 10), + new TeaPair("nextToken", "0") + )); + try { + org.apache.rocketmq.eventbridge.sdk.models.ListEventTypesResponse res = _sdkClient.listEventTypes(request); + com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(res.body)); + } catch (TeaException err) { + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } catch (Exception _err) { + TeaException err = new TeaException(_err.getMessage(), _err); + com.aliyun.teaconsole.Client.log("err!"); + com.aliyun.teaconsole.Client.log(err.message); + } finally { + com.aliyun.teaconsole.Client.log("test end!"); + } + } +} diff --git a/sdk/demo/EventType/generated/php/.gitignore b/sdk/demo/EventType/generated/php/.gitignore new file mode 100644 index 00000000..89c7aa58 --- /dev/null +++ b/sdk/demo/EventType/generated/php/.gitignore @@ -0,0 +1,15 @@ +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +composer.lock + +.vscode/ +.idea +.DS_Store + +cache/ +*.cache +runtime/ +.php_cs.cache diff --git a/sdk/demo/EventType/generated/php/.php_cs.dist b/sdk/demo/EventType/generated/php/.php_cs.dist new file mode 100644 index 00000000..8617ec2f --- /dev/null +++ b/sdk/demo/EventType/generated/php/.php_cs.dist @@ -0,0 +1,65 @@ +setRiskyAllowed(true) + ->setIndent(' ') + ->setRules([ + '@PSR2' => true, + '@PhpCsFixer' => true, + '@Symfony:risky' => true, + 'concat_space' => ['spacing' => 'one'], + 'array_syntax' => ['syntax' => 'short'], + 'array_indentation' => true, + 'combine_consecutive_unsets' => true, + 'method_separation' => true, + 'single_quote' => true, + 'declare_equal_normalize' => true, + 'function_typehint_space' => true, + 'hash_to_slash_comment' => true, + 'include' => true, + 'lowercase_cast' => true, + 'no_multiline_whitespace_before_semicolons' => true, + 'no_leading_import_slash' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_spaces_around_offset' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unused_imports' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'object_operator_without_whitespace' => true, + 'single_blank_line_before_namespace' => true, + 'single_class_element_per_statement' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline_array' => true, + 'trim_array_spaces' => true, + 'unary_operator_spaces' => true, + 'whitespace_after_comma_in_array' => true, + 'no_extra_consecutive_blank_lines' => [ + 'curly_brace_block', + 'extra', + 'parenthesis_brace_block', + 'square_brace_block', + 'throw', + 'use', + ], + 'binary_operator_spaces' => [ + 'align_double_arrow' => true, + 'align_equals' => true, + ], + 'braces' => [ + 'allow_single_line_closure' => true, + ], + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('vendor') + ->exclude('tests') + ->in(__DIR__) + ); diff --git a/sdk/demo/EventType/generated/php/autoload.php b/sdk/demo/EventType/generated/php/autoload.php new file mode 100644 index 00000000..5bfe0a1a --- /dev/null +++ b/sdk/demo/EventType/generated/php/autoload.php @@ -0,0 +1,15 @@ +5.5", + "alibabacloud/tea-utils": "^0.2.21", + "alibabacloud/darabonba-openapi": "^0.2.12", + "rocketmq/eventbridge-sdk": "^0.0.0", + "alibabacloud/tea-console": "^0.1.0" + }, + "autoload": { + "psr-4": { + "RocketMQ\\Eventbridge\\SDK\\Demo\\": "src" + } + }, + "scripts": { + "fixer": "php-cs-fixer fix ./" + }, + "config": { + "sort-packages": true, + "preferred-install": "dist", + "optimize-autoloader": true + }, + "prefer-stable": true, + "repositories": { + "rocketmq":{ + "type" : "path", + "url": "../../../../generated/php" + } + } +} diff --git a/sdk/demo/EventType/generated/php/main.php b/sdk/demo/EventType/generated/php/main.php new file mode 100644 index 00000000..871eef85 --- /dev/null +++ b/sdk/demo/EventType/generated/php/main.php @@ -0,0 +1,8 @@ +testListEventTypes(); diff --git a/sdk/demo/EventType/generated/php/src/Demo.php b/sdk/demo/EventType/generated/php/src/Demo.php new file mode 100644 index 00000000..ad1d4632 --- /dev/null +++ b/sdk/demo/EventType/generated/php/src/Demo.php @@ -0,0 +1,55 @@ +_endpoint = "127.0.0.1:7001"; + $config = new Config([ + "endpoint" => $this->_endpoint + ]); + $this->_sdkClient = new SDKClient($config); + } + + /** + * EventType Controller apis: + * * listEventTypes * + * @return void + */ + public function testListEventTypes(){ + $request = new ListEventTypesRequest([ + "eventBusName" => "newBus", + "eventSourceName" => "newSource", + "maxResults" => 10, + "nextToken" => "0" + ]); + try { + $res = $this->_sdkClient->listEventTypes($request); + Console::log(Utils::toJSONString($res->body)); + } + catch (Exception $err) { + if (!($err instanceof TeaError)) { + $err = new TeaError([], $err->getMessage(), $err->getCode(), $err); + } + Console::log("err!"); + Console::log($err->message); + } + finally { + Console::log("test end!"); + } + } +} diff --git a/sdk/demo/EventType/generated/python/.gitignore b/sdk/demo/EventType/generated/python/.gitignore new file mode 100644 index 00000000..2bcfffae --- /dev/null +++ b/sdk/demo/EventType/generated/python/.gitignore @@ -0,0 +1,5 @@ +runtime/ +.idea/ +.vscode/ +__pycache__/ +.pytest_cache/ \ No newline at end of file diff --git a/sdk/demo/EventType/generated/python/rocketmq_eventbridge_demo/__init__.py b/sdk/demo/EventType/generated/python/rocketmq_eventbridge_demo/__init__.py new file mode 100644 index 00000000..5becc17c --- /dev/null +++ b/sdk/demo/EventType/generated/python/rocketmq_eventbridge_demo/__init__.py @@ -0,0 +1 @@ +__version__ = "1.0.0" diff --git a/sdk/demo/EventType/generated/python/rocketmq_eventbridge_demo/demo.py b/sdk/demo/EventType/generated/python/rocketmq_eventbridge_demo/demo.py new file mode 100644 index 00000000..0f956fd8 --- /dev/null +++ b/sdk/demo/EventType/generated/python/rocketmq_eventbridge_demo/demo.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# This file is auto-generated, don't edit it. Thanks. +from rocketmq_eventbridge.client import Client as SDKClientClient +from alibabacloud_tea_openapi import models as open_api_models +from rocketmq_eventbridge import models as sdkclient_models +from alibabacloud_tea_console.client import Client as ConsoleClient +from alibabacloud_tea_util.client import Client as UtilClient + + +class Demo: + _sdk_client: SDKClientClient = None + _endpoint: str = None + + def __init__(self): + self._endpoint = '127.0.0.1:7001' + config = open_api_models.Config( + endpoint=self._endpoint + ) + self._sdk_client = SDKClientClient(config) + + def test_list_event_types(self) -> None: + """ + EventType Controller apis: + listEventTypes *\ + """ + request = sdkclient_models.ListEventTypesRequest( + event_bus_name='newBus', + event_source_name='newSource', + max_results=10, + next_token='0' + ) + try: + res = self._sdk_client.list_event_types(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') + + async def test_list_event_types_async(self) -> None: + """ + EventType Controller apis: + listEventTypes *\ + """ + request = sdkclient_models.ListEventTypesRequest( + event_bus_name='newBus', + event_source_name='newSource', + max_results=10, + next_token='0' + ) + try: + res = await self._sdk_client.list_event_types_async(request) + ConsoleClient.log(UtilClient.to_jsonstring(res.body)) + except Exception as err: + ConsoleClient.log('err!') + ConsoleClient.log(err.message) + finally: + ConsoleClient.log('test end!') +demo = Demo() +demo.test_list_event_types() diff --git a/sdk/demo/EventType/generated/python/setup.py b/sdk/demo/EventType/generated/python/setup.py new file mode 100644 index 00000000..3824f4cc --- /dev/null +++ b/sdk/demo/EventType/generated/python/setup.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +""" + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +""" + +import os +from setuptools import setup, find_packages + +""" +setup module for rocketmq_eventbridge_demo. + +Created on 14/10/2024 + +@author: +""" + +PACKAGE = "rocketmq_eventbridge_demo" +NAME = "rocketmq_eventbridge_demo" or "alibabacloud-package" +DESCRIPTION = "Alibaba Cloud eventbridge (20240701) SDK Library for Python" +AUTHOR = "" +AUTHOR_EMAIL = "" +URL = "unavailable" +VERSION = __import__(PACKAGE).__version__ +REQUIRES = [ + "alibabacloud_tea_util>=0.3.13, <1.0.0", + "alibabacloud_tea_openapi>=0.3.12, <1.0.0", + "rocketmq_eventbridge20240701>=0.0.0, <1.0.0", + "alibabacloud_tea_console>=0.0.1, <1.0.0" +] + +LONG_DESCRIPTION = '' +if os.path.exists('./README.md'): + with open("README.md", encoding='utf-8') as fp: + LONG_DESCRIPTION = fp.read() + +setup( + name=NAME, + version=VERSION, + description=DESCRIPTION, + long_description=LONG_DESCRIPTION, + long_description_content_type='text/markdown', + author=AUTHOR, + author_email=AUTHOR_EMAIL, + license="Apache License 2.0", + url=URL, + keywords=["rocketmq","eventbridge","demo"], + packages=find_packages(exclude=["tests*"]), + include_package_data=True, + platforms="any", + install_requires=REQUIRES, + python_requires=">=3.6", + classifiers=( + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + "Topic :: Software Development" + ) +) diff --git a/sdk/demo/EventType/generated/ts/package.json b/sdk/demo/EventType/generated/ts/package.json new file mode 100644 index 00000000..be9669b9 --- /dev/null +++ b/sdk/demo/EventType/generated/ts/package.json @@ -0,0 +1,31 @@ +{ + "name": "", + "version": "1.0.0", + "description": "", + "main": "dist/client.js", + "scripts": { + "test": "mocha --reporter spec --timeout 3000 test/*.test.js", + "test-cov": "nyc -e .ts -r=html -r=text -r=lcov npm run test", + "build": "tsc", + "prepublishOnly": "tsc" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "@types/node": "^12.12.26", + "nyc": "^15.0.0", + "source-map-support": "^0.5.16", + "ts-node": "^8.6.2", + "typescript": "^3.7.5" + }, + "dependencies": { + "@alicloud/tea-typescript": "^1.7.1", + "@alicloud/tea-util": "^1.4.9", + "@alicloud/openapi-client": "^0.4.12", + "@alicloud/tea-console": "^1.0.0" + }, + "files": [ + "dist", + "src" + ] +} \ No newline at end of file diff --git a/sdk/demo/EventType/generated/ts/src/client.ts b/sdk/demo/EventType/generated/ts/src/client.ts new file mode 100644 index 00000000..baa4ce1a --- /dev/null +++ b/sdk/demo/EventType/generated/ts/src/client.ts @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it +import Util from '@alicloud/tea-util'; +import OpenApi, * as $OpenApi from '@alicloud/openapi-client'; +import SDKClient, * as $SDKClient from '../../../../../generated/ts/src/client'; +import Console from '@alicloud/tea-console'; +import * as $tea from '@alicloud/tea-typescript'; + + +export default class Client { + _sdkClient: SDKClient; + _endpoint: string; + + constructor() { + this._endpoint = "127.0.0.1:7001"; + let config = new $OpenApi.Config({ + endpoint: this._endpoint, + }); + this._sdkClient = new SDKClient(config); + } + + + /** + * @remarks + * EventType Controller apis: + * listEventTypes * + */ + async testListEventTypes(): Promise { + let request = new $SDKClient.ListEventTypesRequest({ + eventBusName: "newBus", + eventSourceName: "newSource", + maxResults: 10, + nextToken: "0", + }); + try { + let res = await this._sdkClient.listEventTypes(request); + Console.log(Util.toJSONString(res.body)); + } catch (err) { + Console.log("err!"); + Console.log(err.message); + } finally { + Console.log("test end!"); + } + } + +} diff --git a/sdk/demo/EventType/generated/ts/src/main.ts b/sdk/demo/EventType/generated/ts/src/main.ts new file mode 100644 index 00000000..26cd0e24 --- /dev/null +++ b/sdk/demo/EventType/generated/ts/src/main.ts @@ -0,0 +1,4 @@ +import Client from './client' + +let c = new Client() +c.testListEventTypes() diff --git a/sdk/demo/EventType/generated/ts/tsconfig.json b/sdk/demo/EventType/generated/ts/tsconfig.json new file mode 100644 index 00000000..ae66f5b6 --- /dev/null +++ b/sdk/demo/EventType/generated/ts/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es2017", + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "outDir": "./dist", + "esModuleInterop": true + }, + "include": [ + "src/**/*" + ] +} \ No newline at end of file diff --git a/sdk/doc/csharp.md b/sdk/doc/csharp.md new file mode 100644 index 00000000..e6ddb477 --- /dev/null +++ b/sdk/doc/csharp.md @@ -0,0 +1,222 @@ +# 生成Csharp版本sdk + +## sdk 使用 + +/sdk/generated/csharp 即为已经生成好的 sdk 源码和项目依赖。使用样例在 /sdk/demo/\*/generated/csharp 下。 + +每个 api 都有单独的测试函数,实际使用时在 main 函数中调用即可。除 EventData 外的各 Controller 默认的测试接口均为 list 接口(如 EventBusController 的 ListEventBuses)。如需测试其他接口,在 main 函数中调用对应的测试函数即可。 + +下面以 ListEventBuses 接口为例说明如何使用 sdk 和 demo。 + +### 打包 sdk + +在目录 /sdk/generated/csharp/core 下执行如下打包命令 +```sh +dotnet pack -c Release +``` +应有类似如下输出: +``` +Determining projects to restore... + ... + ... + Successfully created package '/root/rocketmq-eventbridge/sdk/csharp/core/bin/Release/RocketMQ.Eventbridge.SDK.1.0.0.nupkg'. +``` +检查 /sdk/generated/csharp/core/bin/Release/ 下应有 RocketMQ.Eventbridge.SDK.1.0.0.nupkg 文件,此时 sdk 打包完成。 + +### demo 添加 sdk 依赖 + +此时,需要在 demo 中手动添加 sdk 的本地依赖,也就是之前生成的 package。 +在 /sdk/demo/EventBus/generated/csharp/core 下执行: +```sh +dotnet add package RocketMQ.Eventbridge.SDK --version 1.0.0 --source ../../../../../generated/csharp/core/bin/Release +``` + +应有类似如下输出: +```log +Determining projects to restore... + Writing /tmp/tmpU2fqVy.tmp +info : X.509 certificate chain validation will use the fallback certificate bundle at '/usr/share/dotnet/sdk/8.0.401/trustedroots/codesignctl.pem'. +info : X.509 certificate chain validation will use the fallback certificate bundle at '/usr/share/dotnet/sdk/8.0.401/trustedroots/timestampctl.pem'. +info : Adding PackageReference for package 'RocketMQ.Eventbridge.SDK' into project '/root/rocketmq-eventbridge/sdk/demo/EventBus/csharp/core/sdkDemo.csproj'. +info : Restoring packages for /root/rocketmq-eventbridge/sdk/demo/EventBus/csharp/core/sdkDemo.csproj... +info : Installed RocketMQ.Eventbridge.SDK 1.0.0 from /root/rocketmq-eventbridge/sdk/csharp/core/bin/Release to /root/.nuget/packages/rocketmq.eventbridge.sdk/1.0.0 with content hash lxzRlGQsVxPB9fC1fsDntUt6QG7hWLZPuGCuhunJHyoN7+o78vm/UPNI7FeUkEBVeMJHVRtn0EUF0Pd9NMEcMw==. +info : Package 'RocketMQ.Eventbridge.SDK' is compatible with all the specified frameworks in project '/root/rocketmq-eventbridge/sdk/demo/EventBus/csharp/core/sdkDemo.csproj'. +info : PackageReference for package 'RocketMQ.Eventbridge.SDK' version '1.0.0' updated in file '/root/rocketmq-eventbridge/sdk/demo/EventBus/csharp/core/sdkDemo.csproj'. +info : PackageReference for package 'RocketMQ.Eventbridge.SDK' version '1.0.0' updated in file '/root/rocketmq-eventbridge/sdk/demo/EventBus/csharp/core/sdkDemo.csproj'. +info : Generating MSBuild file /root/rocketmq-eventbridge/sdk/demo/EventBus/csharp/core/obj/sdkDemo.csproj.nuget.g.props. +info : Generating MSBuild file /root/rocketmq-eventbridge/sdk/demo/EventBus/csharp/core/obj/sdkDemo.csproj.nuget.g.targets. +info : Writing assets file to disk. Path: /root/rocketmq-eventbridge/sdk/demo/EventBus/csharp/core/obj/project.assets.json +log : Restored /root/rocketmq-eventbridge/sdk/demo/EventBus/csharp/core/sdkDemo.csproj (in 243 ms). +``` + +此时依赖添加完成。 + +### 配置项目(根据运行框架可选) + +运行 csharp 需要相应的 sdk 和运行环境,检查本地已有的 sdk 版本可以通过 `dotnet --list-sdks` 或 `dotnet --info`检索。这里测试环境的配置: +```sh +.NET SDKs installed: + 8.0.401 [/usr/share/dotnet/sdk] + +.NET runtimes installed: + Microsoft.AspNetCore.App 8.0.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] + Microsoft.NETCore.App 8.0.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App] +``` + +如果您的环境配置未安装 8.0.8 版本的.net 运行环境,需要自行安装才能运行程序。如果您希望调整项目运行框架,请在 /sdk/demo/EventBus/generated/csharp/core 下的 sdkDemo.csproj 配置文件中修改相应配置。 + +### 编译运行 + +在 /sdk/demo/EventBus/generated/csharp/core 目录下执行 `dotnet run --framework netcoreapp8.0` 命令即可运行代码。请确保这里选择的 framework 已安装在环境中,否则会报错。 + +### 测试效果 + +成功在本地部署 RocketMQ(nameServer + broker) 和 Eventbridge 后,运行测试代码即可(EventBridge 监听端口需为默认的 7001)。返回体的 body 会自动输出到命令行。 + +以 ListEventBuses API 为例: + +```js +[LOG] {"Code":null,"EventBuses":[{"Description":"A demo bus.","EventBusName":"demo-bus"},{"Description":null,"EventBusName":"newBus"}],"Message":null,"RequestId":"c6f87b96-8106-4068-959b-b14831c66051","NextToken":null,"Total":2,"MaxResults":2} +[LOG] test end! +``` + + +## sdk 生成 + +生成条件: +- darabonba 安装完成 +- dotnet 安装完成 + +生成指令(在`/sdk`目录下运行): +``` +dara install +dara codegen csharp generated/csharp +``` +dara codegen 运行完后 /sdk/generated/csharp 下会生成 /core 目录,其下是项目代码和配置文件。 + +### sdk 依赖调整 + +首先,根据测试经验,需要调整项目的依赖版本。在 /sdk/generated/csharp/core/sdk.csproj 中,将 +```xml + +``` +修改为 +```xml + +``` +并添加版本信息 +```xml + + 1.0.0 + +``` + +### 生成测试代码 + +所有测试代码的 dara 版本均在 /sdk/demo/*/ 下的 demo.dara 中,每个 api 都有单独的测试函数,实际使用时在 main 函数中调用即可。 + +下面以 ListEventBuses 接口为例生成 csharp 测试代码 + +进入 /sdk/demo/EventBus/ 下 +```sh +dara install +dara codegen csharp generated/csharp +``` +dara codegen 运行完后 /sdk/demo/EventBus/generated/csharp 下会生成 /core 目录,其下是项目代码和配置文件 + +### 配置项目 + +运行 csharp 需要相应的 sdk 和运行环境,检查本地已有的 sdk 版本可以通过 `dotnet --list-sdks` 或 `dotnet --info`检索。这里给出测试环境的配置: +```sh +> dotnet --list-sdks +8.0.401 [/usr/share/dotnet/sdk] + +> dotnet --info +.NET SDK: + Version: 8.0.401 + Commit: 811edcc344 + Workload version: 8.0.400-manifests.b6724b7a + MSBuild version: 17.11.4+37eb419ad + +Runtime Environment: + OS Name: ubuntu + OS Version: 20.04 + OS Platform: Linux + RID: linux-x64 + Base Path: /usr/share/dotnet/sdk/8.0.401/ + +Host: + Version: 8.0.8 + Architecture: x64 + Commit: 08338fcaa5 + +.NET SDKs installed: + 8.0.401 [/usr/share/dotnet/sdk] + +.NET runtimes installed: + Microsoft.AspNetCore.App 8.0.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] + Microsoft.NETCore.App 8.0.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App] +``` + +在 /sdk/demo/EventBus/generated/csharp/core 下打开 sdkDemo.csproj 项目配置文件,修改相应的配置项。这里给出测试使用的配置: +```xml + + + + netstandard2.0;net45;netcoreapp8.0 + RocketMQ.Eventbridge.Demo + Exe + false + false + RocketMQ.Eventbridge.Demo + + 5 + open source eventbridge (20240701) SDK Demo Library for .NET + + + NETSTANDARD2_0 + + + NET45 + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + +``` + +### 添加 main 函数 +由于不同语言 main 函数格式不同,需要手动添加 main 函数来执行测试函数。仍以 ListEventBuses 为例, +在 /sdk/demo/EventBus/generated/csharp/core 下编辑 Demo.cs。在`Demo`类内部添加 Main 函数如下: + +```csharp + static void Main(string[] _args){ + Demo demo = new Demo(); + demo.TestListEventBuses(); + } +``` + +### 运行 + +参考 sdk 使用的步骤即可。 \ No newline at end of file diff --git a/sdk/doc/go.md b/sdk/doc/go.md new file mode 100644 index 00000000..42853750 --- /dev/null +++ b/sdk/doc/go.md @@ -0,0 +1,84 @@ +# 生成Go版本sdk + +## sdk 使用 + +/sdk/generated/go 即为已经生成好的 sdk 源码和项目依赖。使用样例在 /sdk/demo/\*/generated/go 下。 + +每个 api 都有单独的测试函数,实际使用时在 main 函数中调用即可。除 EventData 外的各 Controller 默认的测试接口均为 list 接口(如 EventBusController 的 ListEventBuses)。如需测试其他接口,在 main 函数中调用对应的测试函数即可。 + +下面以 ListEventBuses 接口为例说明如何使用 sdk 和 demo。 + +### 依赖安装 + +在 /sdk/demo/EventBus/generated/go/ 路径下执行 `go mod tidy` 即可。 + +### 测试效果 + +在 /sdk/demo/EventBus/generated/go/ 路径下执行 `go run main.go` 即可。 + +成功在本地部署 RocketMQ(nameServer + broker) 和 Eventbridge 后,运行测试代码即可(EventBridge 监听端口需为默认的 7001)。返回体的 body 会自动输出到命令行。 + +以 ListEventBuses API 为例: + +```js +[LOG] {"eventBuses":[{"description":"A demo bus.","eventBusName":"demo-bus"},{"eventBusName":"newBus"}],"requestId":"4484bc24-2519-42fa-92b7-908ffcb2b22b","total":2,"maxResults":2} +[LOG] test end! +``` + + +## sdk 生成 + +生成条件: +- darabonba 安装完成 +- go 1.19 以上 安装完成 + +生成指令(在`/sdk`目录下运行): +``` +dara install +dara codegen go generated/go +``` +dara codegen 运行完后 /sdk/generated/go 下会生成 /client 目录和 go.mod。 + + +### 生成测试代码 + +所有测试代码的 dara 版本均在 /sdk/demo/EventBus 下的 demo.dara 中,每个 api 都有单独的测试函数,实际使用时在 main 函数中调用即可。 + +下面以 ListEventBuses 接口为例生成 go 测试代码 + +进入 /sdk/demo/EventBus 下 +``` +dara install +dara codegen go generated/go +``` + +生成完毕后可在 /sdk/demo/EventBus/generated/go/client 下看到 client.go,通过编辑器打开改文件并修改 +`SdkClient sdkclient.Client` 为 `SdkClient *sdkclient.Client` + +### 添加 sdk 依赖 +由于 sdk 未发布到线上,需要在 go.mod 中修改为本地引用。在 /sdk/demo/EventBus/generated/go/go.mod 末尾添加如下部分: +``` +replace github.com/org-apache-rocketmq/eventbridge-sdk v0.0.0 => ../../../../generated/go/ +``` + +### 添加 main 函数 +由于不同语言 main 函数格式不同,需要手动添加 main 函数来执行测试函数。仍以 ListEventBuses 为例, +在 /sdk/demo/EventBus/generated/go/ 添加 main.go,并在其中写入如下代码: + +```go +package main + +import ( + "client/client" +) + +func main() { + demo := new(client.DemoClient) + demo.Init() + demo.TestListEventBuses() +} +``` + +### 运行 + +参考 sdk 使用的步骤即可。 \ No newline at end of file diff --git a/sdk/doc/java.md b/sdk/doc/java.md new file mode 100644 index 00000000..1e628956 --- /dev/null +++ b/sdk/doc/java.md @@ -0,0 +1,132 @@ +# 生成Java版本sdk + +## sdk 使用 + +/sdk/generated/java 即为已经生成好的 sdk 源码和项目依赖。使用样例在 /sdk/demo/\*/generated/java 下。 + +每个 api 都有单独的测试函数,实际使用时在 main 函数中调用即可。除 EventData 外的各 Controller 默认的测试接口均为 list 接口(如 EventBusController 的 ListEventBuses)。如需测试其他接口,在 main 函数中调用对应的测试函数即可。 + +下面以 ListEventBuses 接口为例说明如何使用 sdk 和 demo。 + +### sdk 安装到本地仓库 + +sdk 生成后,可通过 maven 安装到本地仓库,方便其他项目使用。 + +在 /sdk/generated/java 目录下运行 `mvn install` 安装依赖。安装成功时输出应包含如下内容: +```bash +$ mvn install +... +... +[INFO] Installing /root/rocketmq-eventbridge/sdk/java/target/sdk-0.0.0.jar to /root/.m2/repository/org/apache/rocketmq/eventbridge/sdk/0.0.0/sdk-0.0.0.jar +[INFO] Installing /root/rocketmq-eventbridge/sdk/java/pom.xml to /root/.m2/repository/org/apache/rocketmq/eventbridge/sdk/0.0.0/sdk-0.0.0.pom +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 2.691 s +[INFO] Finished at: 2024-08-17T17:21:58+08:00 +[INFO] ------------------------------------------------------------------------ +``` + +此时 sdk 已打包安装到本地仓库,可生成测试代码调用。 + +### demo 编译 + +在 /sdk/demo/EventBus/generated/java 路径下执行 mvn compile,编译通过后即可在 IDE 中或通过命令行工具进行测试 + +### 测试效果 + +成功在本地部署 RocketMQ(nameServer + broker) 和 Eventbridge 后,运行测试代码即可(EventBridge 监听端口需为默认的 7001)。返回体的 body 会自动输出到命令行。 + +以 ListEventBuses API 为例: + +```js +[LOG] {"eventBuses":[{"description":"A demo bus.","eventBusName":"demo-bus"},{"eventBusName":"newBus"}],"requestId":"4484bc24-2519-42fa-92b7-908ffcb2b22b","total":2,"maxResults":2} +[LOG] test end! +``` + + +## sdk 生成 + +生成条件: +- darabonba 安装完成 +- JDK 8 安装完成 +- maven 安装完成 + +生成指令(在`/sdk`目录下运行): +``` +dara install +dara codegen java generated/java +``` +dara codegen 运行完后 /sdk/generated/java 下会生成 /src 目录和 pom.xml,此时可以通过 maven 安装依赖。 + +### POM修改 + +darabonba 生成 maven 项目时会自动生成 pom.xml,但其中的一些配置需要修改。这里由于需要使用 JDK 8 运行代码,因此需将 maven-compiler-plugin 配置修改如下 + +```js + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 8 + 8 + + + +``` +另外由于需要把 sdk 安装到本地 maven 仓库,所以配置跳过 gpg 签名,继续修改 POM 如下: +```js + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + true + + + + sign-artifacts + verify + + sign + + + + +``` + +### 生成测试代码 + +所有测试代码的 dara 版本均在 /sdk/demo/*/ 下的 demo.dara 中,每个 api 都有单独的测试函数,实际使用时在 main 函数中调用即可。 + +下面以 ListEventBuses 接口为例生成 java 测试代码 + +进入 /sdk/demo/EventBus 下 +``` +dara install +dara codegen java generated/java +``` + +生成完毕后可在 /sdk/demo/EventBus/generated/java/src/.../demo 下看到 Demo.java + +> 此时也需要安装 sdk 的 POM 修改方式修改 demo 的 POM + +### 添加 main 函数 +由于不同语言 main 函数格式不同,需要手动添加 main 函数来执行测试函数。仍以 ListEventBuses 为例, +在 Demo.java 的 Demo class 中添加如下代码 + +```java + public static void main(String[] args) { + try { + Demo demo = new Demo(); + demo.testListEventBuses(); + } catch (Exception e) { + // TODO: handle exception + } + } +``` + +### 运行 + +参考 sdk 使用的步骤即可。 \ No newline at end of file diff --git a/sdk/doc/php.md b/sdk/doc/php.md new file mode 100644 index 00000000..59cad78e --- /dev/null +++ b/sdk/doc/php.md @@ -0,0 +1,142 @@ +# 生成Php版本sdk + +## sdk 使用 + +/sdk/generated/php 即为已经生成好的 sdk 源码和项目依赖。使用样例在 /sdk/demo/\*/generated/php 下。 + +每个 api 都有单独的测试函数,实际使用时在 main 函数中调用即可。除 EventData 外的各 Controller 默认的测试接口均为 list 接口(如 EventBusController 的 ListEventBuses)。如需测试其他接口,在 main 函数中调用对应的测试函数即可。 + +下面以 ListEventBuses 接口为例说明如何使用 sdk 和 demo。 + +### 安装 demo 依赖 + +在 /sdk/demo/EventBus/generated/php 目录下运行 composer install 即可安装依赖 + +### 测试效果 + +在 /sdk/demo/EventBus/generated/php 目录下运行 `php main.php` 即可运行测试代码。 + +成功在本地部署 RocketMQ(nameServer + broker) 和 Eventbridge 后,运行测试代码即可(EventBridge 监听端口需为默认的 7001)。返回体的 body 会自动输出到命令行。 + +以 ListEventBuses API 为例: + +```js +[2024-10-13T16:24:34.185871+08:00] tea-console-log.INFO: {"eventBuses":[{"description":"A demo bus.","eventBusName":"demo-bus"}],"requestId":"f17e6263-afb1-457b-8725-d25a28eec191","total":1,"maxResults":2} [] [] +[2024-10-13T16:24:34.186859+08:00] tea-console-log.INFO: test end! [] [] +``` + + +## sdk 生成 + +生成条件: +- darabonba 安装完成 +- php、composer 安装完成 +- 视环境可能需要安装 PHP extension curl、SimpleXML + +生成指令(在`/sdk`目录下运行): +``` +dara install +dara codegen php generated/php +``` +dara codegen 运行完后 /sdk/generated/php 下会生成源代码和 composer.json。 + +修改 composer.json 如下: +```json +{ + "name": "rocketmq/eventbridge-sdk", + "description": "RocketMQ eventbridge (20240701) SDK Library for PHP", + "type": "library", + "license": "Apache-2.0", + "authors": [], + "version": "0.0.0", + "require": { + "php": ">5.5", + "alibabacloud/tea-utils": "^0.2.21", + "alibabacloud/darabonba-openapi": "^0.2.12" + }, + "autoload": { + "psr-4": { + "RocketMQ\\Eventbridge\\SDK\\": "src" + } + }, + "scripts": { + "fixer": "php-cs-fixer fix ./" + }, + "config": { + "sort-packages": true, + "preferred-install": "dist", + "optimize-autoloader": true + }, + "prefer-stable": true +} +``` + +### 生成测试代码 + +所有测试代码的 dara 版本均在 /sdk/demo/*/ 下的 demo.dara 中,每个 api 都有单独的测试函数,实际使用时在 main 函数中调用即可。 + +下面以测试 ListEventBuses 接口为例生成 php 测试代码 + +进入 /sdk/demo/EventBus/ 下 +``` +dara install +dara codegen php generated/php +``` + +dara codegen 运行完后 /sdk/demo/EventBus/generated/php 下会生成源代码和 composer.json。 + +修改 composer.json 如下: +```json +{ + "name": "rocketmq/eventbridge-sdk-demo", + "description": "RocketMQ eventbridge (20240701) SDK Demo for PHP", + "type": "library", + "license": "Apache-2.0", + "authors": [], + "require": { + "php": ">5.5", + "alibabacloud/tea-utils": "^0.2.21", + "alibabacloud/darabonba-openapi": "^0.2.12", + "rocketmq/eventbridge-sdk": "^0.0.0", + "alibabacloud/tea-console": "^0.1.0" + }, + "autoload": { + "psr-4": { + "RocketMQ\\Eventbridge\\SDK\\Demo\\": "src" + } + }, + "scripts": { + "fixer": "php-cs-fixer fix ./" + }, + "config": { + "sort-packages": true, + "preferred-install": "dist", + "optimize-autoloader": true + }, + "prefer-stable": true, + "repositories": { + "rocketmq":{ + "type" : "path", + "url": "../../../../generated/php" + } + } +} +``` + +### 添加 main 函数 +由于不同语言 main 函数格式不同,需要手动添加 main 函数来执行测试函数。仍以 ListEventBuses 为例,在 /sdk/demo/EventBus/php 添加 main.php,并在其中写入如下代码: + +```php +testListEventBuses(); +``` + +### 运行 + +参考 sdk 使用的步骤即可。 \ No newline at end of file diff --git a/sdk/doc/python.md b/sdk/doc/python.md new file mode 100644 index 00000000..4a4ea1ee --- /dev/null +++ b/sdk/doc/python.md @@ -0,0 +1,81 @@ +# 生成Python版本sdk + +> 由于阿里云已经不再支持 python2,所以这里 python 统一指代 python3 + +## sdk 使用 +/sdk/generated/python 即为已经生成好的 sdk 源码和项目依赖。使用样例在 /sdk/demo/\*/generated/python 下。 + +每个 api 都有单独的测试函数,实际使用时在 main 函数中调用即可。除 EventData 外的各 Controller 默认的测试接口均为 list 接口(如 EventBusController 的 ListEventBuses)。如需测试其他接口,在 main 函数中调用对应的测试函数即可。 + +下面以 ListEventBuses 接口为例说明如何使用 sdk 和 demo。 + +使用条件: +- 安装 python3 + +### 安装 sdk + +在 /sdk/generated/python 目录下运行 `python3 setup.py install`,即可将 sdk 作为库安装到本地仓库。 + +### 编译运行 + +可通过在 /sdk/demo/EventBus/generated/python 目录下执行 `python3 demo.py` 执行测试代码。 + +成功在本地部署 RocketMQ(nameServer + broker) 和 Eventbridge 后,运行测试代码即可(EventBridge 监听端口需为默认的 7001)。返回体的 body 会自动输出到命令行。 + +以 ListEventBuses API 为例: + +```js +[LOG] {"eventBuses":[{"description":"A demo bus.","eventBusName":"demo-bus"},{"eventBusName":"newBus"}],"requestId":"4484bc24-2519-42fa-92b7-908ffcb2b22b","total":2,"maxResults":2} +[LOG] test end! +``` + +## sdk 生成 + +如果重新从 darabonba 生成 python 版本的 sdk 和 demo,需要先安装以下依赖: + +生成条件: +- darabonba 安装完成 +- python 安装完成 + +生成指令(在`/sdk`目录下运行): +``` +dara install +dara codegen python generated/python +``` +dara codegen 运行完后 /sdk/generated/python 下会生成源代码和 setup.py + +### 生成测试代码 + +所有测试代码的 dara 版本均在 /sdk/demo/*/ 下的 demo.dara 中,每个 api 都有单独的测试函数,实际使用时在 main 函数中调用即可。 + +下面以测试 ListEventBuses 接口为例生成 python 测试代码 + +进入 /sdk/demo/EventBus/ 下 +``` +dara install +dara codegen python generated/python +``` + +dara codegen 运行完后 /sdk/demo/EventBus/generated/python 下会生成源代码和 setup.py + +### 添加 main 函数 +由于不同语言 main 函数格式不同,需要手动添加 main 函数来执行测试函数。仍以 ListEventBuses 为例,在 /sdk/demo/EventBus/generated/python/rocketmq_eventbridge_demo/demo.py 中追加写入如下代码: + +```py3 +demo = Demo() +demo.test_list_event_buses() +``` + +同时,需要将文件内的 Demo 类的 Init 函数修改如下: +```py3 + def __init__(self): + self._endpoint = '127.0.0.1:7001' + config = open_api_models.Config( + endpoint=self._endpoint + ) + self._sdk_client = SDKClientClient(config) +``` + +### 运行 + +参考 sdk 使用的步骤即可。 \ No newline at end of file diff --git a/sdk/doc/ts.md b/sdk/doc/ts.md new file mode 100644 index 00000000..10d87561 --- /dev/null +++ b/sdk/doc/ts.md @@ -0,0 +1,99 @@ +# Typescript版本sdk + +## sdk 使用 +/sdk/generated/ts 即为已经生成好的 sdk 源码和项目依赖。使用样例在 /sdk/demo/\*/generated/ts 下。 + +每个 api 都有单独的测试函数,实际使用时在 main 函数中调用即可。除 EventData 外的各 Controller 默认的测试接口均为 list 接口(如 EventBusController 的 ListEventBuses)。如需测试其他接口,在 main 函数中调用对应的测试函数即可。 + +下面以 ListEventBuses 接口为例说明如何使用 sdk 和 demo。 + +使用条件: +- 安装 nodejs + +### 安装 sdk 依赖 + +在 /sdk/generated/ts 下运行 `npm install` 即可 + +### 安装 demo 依赖 + +在 /sdk/demo/EventBus/generated/ts 目录下执行 `npm install` 即可 + +### 编译运行 + +在 /sdk/demo/EventBus/generated/ts 目录下执行 `tsc` 命令即可编译,编译完成会生成 /sdk/demo/EventBus/generated/ts/dist 目录。 + +进入 /sdk/demo/EventBus/generated/ts/dist/demo/EventBus/ts/src 目录,命令行中执行 `node main.js` 即可执行测试代码。 + +### 测试效果 + +成功在本地部署 RocketMQ(nameServer + broker) 和 Eventbridge 后,运行测试代码即可(EventBridge 监听端口需为默认的 7001)。返回体的 body 会自动输出到命令行。 + +以 ListEventBuses API 为例: + +```js +[LOG] {"eventBuses":[{"description":"A demo bus.","eventBusName":"demo-bus"},{"eventBusName":"newBus"}],"requestId":"4484bc24-2519-42fa-92b7-908ffcb2b22b","total":2,"maxResults":2} +[LOG] test end! +``` + + + +## sdk 生成 + +如果重新从 darabonba 生成 typescript 版本的 sdk 和 demo,需要先安装以下依赖: + +生成条件: +- darabonba 安装完成 +- npm 安装完成 + - npm 换源(可选) +- node-typescript 安装完成(linux) + +生成指令(在`/sdk`目录下运行): +``` +dara install +dara codegen ts generated/ts +``` +dara codegen 运行完后 /sdk/generated/ts 下会生成 /src 目录、package.json 和 tsconfig.json。 + +### 生成测试代码 + +所有测试代码的 dara 版本均在 /sdk/demo/*/ 下的 demo.dara 中,每个 api 都有单独的测试函数,实际使用时在 main 函数中调用即可。 + +下面以 ListEventBuses 接口为例生成 ts 测试代码 + +进入 /sdk/demo/EventBus 下 +``` +dara install +dara codegen ts generated/ts +``` + +生成完毕后可在 /sdk/demo/EventBus/generated/ts/src 下看到 client.ts + +### 添加 main 函数 +由于不同语言 main 函数格式不同,需要手动添加 main 函数来执行测试函数。仍以 ListEventBuses 为例, +在 /sdk/demo/EventBus/generated/ts/src 下添加 main.ts。其内部代码如下: + +```ts +import Client from './client' + +let c = new Client() +c.testListEventBuses() +``` + +### 安装 demo 依赖 + +由于 demo 中引用的 sdk client 尚未发布,所以需要在 /sdk/demo/EventBus/generated/ts/package.json 中删除依赖: +```js +"dependencies": { + ... + "@org.apache.rocketmq/eventbridge-sdk": "0.0.0",(删除该行) + ... +}, +``` +同时,需要在 /sdk/demo/EventBus/generated/ts/src/client.ts 中将 SDKClient 的引用路径**修改**为本地路径: +```ts +import SDKClient, * as $SDKClient from '../../../../../generated/ts/src/client'; +``` + +### 运行 + +参考 sdk 使用的步骤即可。 \ No newline at end of file diff --git a/sdk/generated/csharp/core/Models/CreateApiDestinationRequest.cs b/sdk/generated/csharp/core/Models/CreateApiDestinationRequest.cs new file mode 100644 index 00000000..7eb0a177 --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateApiDestinationRequest.cs @@ -0,0 +1,133 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + /// Description: + /// + /// ApiDestination Controller apis: + /// createApiDestination * + /// updateApiDestination * + /// getApiDestination * + /// deleteApiDestination * + /// listApiDestinations * + /// + public class CreateApiDestinationRequest : TeaModel { + /// + /// The name of the API destination. The name must be 2 to 127 characters in length. This parameter is required. + /// + /// Example: + /// api-destination-name + /// + [NameInMap("apiDestinationName")] + [Validation(Required=false)] + public string ApiDestinationName { get; set; } + + /// + /// The name of the connection. The name must be 2 to 127 characters in length. Before you configure this parameter, you must call the CreateConnection operation to create a connection. Then, set this parameter to the name of the connection that you created. This parameter is required. + /// + /// Example: + /// connection-name + /// + [NameInMap("connectionName")] + [Validation(Required=false)] + public string ConnectionName { get; set; } + + /// + /// The description of the API destination. The description can be up to 255 characters in length. + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + /// + /// The parameters that are configured for the API destination. This parameter is required. + /// + [NameInMap("httpApiParameters")] + [Validation(Required=false)] + public CreateApiDestinationRequestHttpApiParameters HttpApiParameters { get; set; } + public class CreateApiDestinationRequestHttpApiParameters : TeaModel { + /// + /// The endpoint of the API destination. The endpoint can be up to 127 characters in length. This parameter is required. + /// + /// Example: + /// http://127.0.0.1:8001/api + /// + [NameInMap("endpoint")] + [Validation(Required=false)] + public string Endpoint { get; set; } + + /// + /// The HTTP request method. Valid values: + ///
  *   GET 
+            /// 
+            ///   *   POST 
+            /// 
+            ///   *   HEAD 
+            /// 
+            ///   *   DELETE 
+            /// 
+            ///   *   PUT 
+            /// 
+            ///   *   PATCH 
+            /// 
+            /// 
+            ///   This parameter is required.
+            /// 
+ /// + /// Example: + /// POST + ///
+ [NameInMap("method")] + [Validation(Required=false)] + public string Method { get; set; } + + /// + /// TODO + /// + [NameInMap("apiParameters")] + [Validation(Required=false)] + public List ApiParameters { get; set; } + public class CreateApiDestinationRequestHttpApiParametersApiParameters : TeaModel { + [NameInMap("name")] + [Validation(Required=false)] + public string Name { get; set; } + + /// + /// The description of the API destination. The description can be up to 255 characters in length. + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + [NameInMap("type")] + [Validation(Required=false)] + public string Type { get; set; } + + [NameInMap("defaultValue")] + [Validation(Required=false)] + public string DefaultValue { get; set; } + + [NameInMap("in")] + [Validation(Required=false)] + public string In { get; set; } + + } + + } + + /// + /// TODO + /// + [NameInMap("invocationRateLimitPerSecond")] + [Validation(Required=false)] + public int? InvocationRateLimitPerSecond { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateApiDestinationResponse.cs b/sdk/generated/csharp/core/Models/CreateApiDestinationResponse.cs new file mode 100644 index 00000000..bf39eff9 --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateApiDestinationResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class CreateApiDestinationResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public CreateApiDestinationResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateApiDestinationResponseBody.cs b/sdk/generated/csharp/core/Models/CreateApiDestinationResponseBody.cs new file mode 100644 index 00000000..c0ed2c7e --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateApiDestinationResponseBody.cs @@ -0,0 +1,54 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class CreateApiDestinationResponseBody : TeaModel { + /// + /// The returned response code. The value Success indicates that the request is successful. + /// + /// Example: + /// Success + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The name of the API destination. + /// + /// Example: + /// ApiDestinationName + /// + [NameInMap("apiDestinationName")] + [Validation(Required=false)] + public string ApiDestinationName { get; set; } + + /// + /// The returned message. + /// + /// Example: + /// success + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 5DAF96FB-A4B6-548C-B999-0BFDCB2261B9 + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateConnectionRequest.cs b/sdk/generated/csharp/core/Models/CreateConnectionRequest.cs new file mode 100644 index 00000000..20aba61f --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateConnectionRequest.cs @@ -0,0 +1,387 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + /// Description: + /// + /// Connection Controller apis: + /// createConnection * + /// deleteConnection * + /// updateConnection * + /// getConnection * + /// selectOneConnection * + /// listConnections * + /// listEnumsResponse * + /// + public class CreateConnectionRequest : TeaModel { + /// + /// The parameters that are configured for authentication. + /// + [NameInMap("authParameters")] + [Validation(Required=false)] + public CreateConnectionRequestAuthParameters AuthParameters { get; set; } + public class CreateConnectionRequestAuthParameters : TeaModel { + /// + /// The parameters that are configured for API key authentication. + /// + [NameInMap("apiKeyAuthParameters")] + [Validation(Required=false)] + public CreateConnectionRequestAuthParametersApiKeyAuthParameters ApiKeyAuthParameters { get; set; } + public class CreateConnectionRequestAuthParametersApiKeyAuthParameters : TeaModel { + /// + /// The key of the API key. + /// + /// Example: + /// Token + /// + [NameInMap("apiKeyName")] + [Validation(Required=false)] + public string ApiKeyName { get; set; } + + /// + /// The value of the API key. + /// + /// Example: + /// adkjnakddh**** + /// + [NameInMap("apiKeyValue")] + [Validation(Required=false)] + public string ApiKeyValue { get; set; } + + } + + /// + /// The authentication type. Valid values: + ///
  BASIC_AUTH: basic authentication.
+            /// 
+            ///   Introduction: Basic authentication is a simple authentication scheme built into the HTTP protocol. When you use the HTTP protocol for communications, the authentication method that the HTTP server uses to authenticate user identities on the client is defined in the protocol. The request header is in the Authorization: Basic Base64-encoded string (Username:Password) format.
+            /// 
+            ///   1.  Username and Password are required
+            /// 
+            ///   API_KEY_AUTH: API key authentication.
+            /// 
+            ///   Introduction: The request header is in the Token: Token value format.
+            /// 
+            ///   *   ApiKeyName and ApiKeyValue are required.
+            /// 
+            ///   OAUTH_AUTH: OAuth authentication.
+            /// 
+            ///   Introduction: OAuth2.0 is an authentication mechanism. In normal cases, a system that does not use OAuth2.0 can access the resources of the server from the client. To ensure access security, access tokens are used to authenticate users in OAuth 2.0. The client must use an access token to access protected resources. This way, OAuth 2.0 protects resources from being accessed from malicious clients and improves system security.
+            /// 
+            ///   *   AuthorizationEndpoint, OAuthHttpParameters, and HttpMethod are required.
+            /// 
+ /// + /// Example: + /// BASIC_AUTH + ///
+ [NameInMap("authorizationType")] + [Validation(Required=false)] + public string AuthorizationType { get; set; } + + /// + /// The parameters that are configured for basic authentication. + /// + [NameInMap("basicAuthParameters")] + [Validation(Required=false)] + public CreateConnectionRequestAuthParametersBasicAuthParameters BasicAuthParameters { get; set; } + public class CreateConnectionRequestAuthParametersBasicAuthParameters : TeaModel { + /// + /// The password for basic authentication. + /// + /// Example: + ///
+ ///
+ [NameInMap("password")] + [Validation(Required=false)] + public string Password { get; set; } + + /// + /// The username for basic authentication. + /// + /// Example: + /// admin + /// + [NameInMap("username")] + [Validation(Required=false)] + public string Username { get; set; } + + } + + /// + /// The parameters that are configured for OAuth authentication. + /// + [NameInMap("oauthParameters")] + [Validation(Required=false)] + public CreateConnectionRequestAuthParametersOauthParameters OauthParameters { get; set; } + public class CreateConnectionRequestAuthParametersOauthParameters : TeaModel { + /// + /// The endpoint that is used to obtain the OAuth token. + /// + /// Example: + /// http://localhost:8080/oauth/token + /// + [NameInMap("authorizationEndpoint")] + [Validation(Required=false)] + public string AuthorizationEndpoint { get; set; } + + /// + /// The parameters that are configured for the client. + /// + [NameInMap("clientParameters")] + [Validation(Required=false)] + public CreateConnectionRequestAuthParametersOauthParametersClientParameters ClientParameters { get; set; } + public class CreateConnectionRequestAuthParametersOauthParametersClientParameters : TeaModel { + /// + /// The client ID. + /// + /// Example: + /// ClientID + /// + [NameInMap("clientID")] + [Validation(Required=false)] + public string ClientID { get; set; } + + /// + /// The client key secret of the application. + /// + /// Example: + /// ClientSecret + /// + [NameInMap("clientSecret")] + [Validation(Required=false)] + public string ClientSecret { get; set; } + + } + + /// + /// The HTTP request method. Valid values: + ///
    - GET
+                /// 
+                ///     - POST
+                /// 
+                ///     - HEAD
+                /// 
+ /// + /// Example: + /// POST + ///
+ [NameInMap("httpMethod")] + [Validation(Required=false)] + public string HttpMethod { get; set; } + + /// + /// The request parameters for OAuth authentication. + /// + [NameInMap("oauthHttpParameters")] + [Validation(Required=false)] + public CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters OauthHttpParameters { get; set; } + public class CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters : TeaModel { + /// + /// The parameters that are configured for the request. + /// + [NameInMap("bodyParameters")] + [Validation(Required=false)] + public List BodyParameters { get; set; } + public class CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters : TeaModel { + /// + /// Indicates whether authentication is enabled. + /// + /// Example: + /// false + /// + [NameInMap("isValueSecret")] + [Validation(Required=false)] + public string IsValueSecret { get; set; } + + /// + /// The key in the request body. + /// + /// Example: + /// name + /// + [NameInMap("key")] + [Validation(Required=false)] + public string Key { get; set; } + + /// + /// The value of the key in the request body. + /// + /// Example: + /// demo + /// + [NameInMap("value")] + [Validation(Required=false)] + public string Value { get; set; } + + } + + /// + /// The parameters that are configured for the request header. + /// + [NameInMap("headerParameters")] + [Validation(Required=false)] + public List HeaderParameters { get; set; } + public class CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters : TeaModel { + /// + /// Indicates whether authentication is enabled. + /// + /// Example: + /// false + /// + [NameInMap("isValueSecret")] + [Validation(Required=false)] + public string IsValueSecret { get; set; } + + /// + /// The key in the request header. + /// + /// Example: + /// name + /// + [NameInMap("key")] + [Validation(Required=false)] + public string Key { get; set; } + + /// + /// The value of the key in the request header. + /// + /// Example: + /// demo + /// + [NameInMap("value")] + [Validation(Required=false)] + public string Value { get; set; } + + } + + /// + /// The parameters that are configured for the request path. + /// + [NameInMap("queryStringParameters")] + [Validation(Required=false)] + public List QueryStringParameters { get; set; } + public class CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters : TeaModel { + /// + /// Indicates whether authentication is enabled. + /// + /// Example: + /// false + /// + [NameInMap("isValueSecret")] + [Validation(Required=false)] + public string IsValueSecret { get; set; } + + /// + /// The key in the request path. + /// + /// Example: + /// name + /// + [NameInMap("key")] + [Validation(Required=false)] + public string Key { get; set; } + + /// + /// The value of the key in the request path. + /// + /// Example: + /// demo + /// + [NameInMap("value")] + [Validation(Required=false)] + public string Value { get; set; } + + } + + } + + } + + } + + /// + /// The name of the connection. The name must be 2 to 127 characters in length. + ///
This parameter is required.
+        /// 
+ /// + /// Example: + /// connection-name + ///
+ [NameInMap("connectionName")] + [Validation(Required=false)] + public string ConnectionName { get; set; } + + /// + /// The description of the connection. The description can be up to 255 characters in length. + /// + /// Example: + /// demo + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + /// + /// The parameters that are configured for the network. This parameter is required. + /// + [NameInMap("networkParameters")] + [Validation(Required=false)] + public CreateConnectionRequestNetworkParameters NetworkParameters { get; set; } + public class CreateConnectionRequestNetworkParameters : TeaModel { + /// + /// The network type. Valid values: + ///
  PublicNetwork and PrivateNetwork.
+            /// 
+            ///   *   Note: If you set this parameter to PrivateNetwork, you must configure VpcId, VswitcheId, and SecurityGroupId.
+            /// 
+            ///   This parameter is required.
+            /// 
+ /// + /// Example: + /// PublicNetwork + ///
+ [NameInMap("networkType")] + [Validation(Required=false)] + public string NetworkType { get; set; } + + /// + /// The ID of the security group. + /// + /// Example: + /// eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9**** + /// + [NameInMap("securityGroupId")] + [Validation(Required=false)] + public string SecurityGroupId { get; set; } + + /// + /// The VPC. ID + /// + /// Example: + /// eb-test/vpc-bp1symadadwnwg**** + /// + [NameInMap("vpcId")] + [Validation(Required=false)] + public string VpcId { get; set; } + + /// + /// The vSwitch ID. + /// + /// Example: + /// vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeq**** + /// + [NameInMap("vswitcheId")] + [Validation(Required=false)] + public string VswitcheId { get; set; } + + } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateConnectionResponse.cs b/sdk/generated/csharp/core/Models/CreateConnectionResponse.cs new file mode 100644 index 00000000..593b4b66 --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateConnectionResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class CreateConnectionResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public CreateConnectionResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateConnectionResponseBody.cs b/sdk/generated/csharp/core/Models/CreateConnectionResponseBody.cs new file mode 100644 index 00000000..944c37f4 --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateConnectionResponseBody.cs @@ -0,0 +1,54 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class CreateConnectionResponseBody : TeaModel { + /// + /// The returned response code. The value Success indicates that the request is successful. + /// + /// Example: + /// Success + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The connection name. + /// + /// Example: + /// connection-demo + /// + [NameInMap("connectionName")] + [Validation(Required=false)] + public string ConnectionName { get; set; } + + /// + /// The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + /// + /// Example: + /// success + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 7DA60DED-CD36-5837-B848-C01A23D2**** + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateEventBusRequest.cs b/sdk/generated/csharp/core/Models/CreateEventBusRequest.cs new file mode 100644 index 00000000..1da45b99 --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateEventBusRequest.cs @@ -0,0 +1,42 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + /// Description: + /// + /// EventBus Controller apis: + /// createEventBus * + /// getEventBus * + /// deleteEventBus * + /// listEventBuses * + /// + public class CreateEventBusRequest : TeaModel { + /// + /// The description of the event bus. + /// + /// Example: + /// demo + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + /// + /// The name of the event bus. This parameter is required. + /// + /// Example: + /// MyEventBus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateEventBusResponse.cs b/sdk/generated/csharp/core/Models/CreateEventBusResponse.cs new file mode 100644 index 00000000..c24ef1ff --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateEventBusResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class CreateEventBusResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public CreateEventBusResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateEventBusResponseBody.cs b/sdk/generated/csharp/core/Models/CreateEventBusResponseBody.cs new file mode 100644 index 00000000..f5ced1c7 --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateEventBusResponseBody.cs @@ -0,0 +1,64 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class CreateEventBusResponseBody : TeaModel { + /// + /// The returned response code. The value Success indicates that the request is successful. Other values indicate that the request failed. For more information about error codes, see Error codes. + /// + /// Example: + /// Success + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The name of the event bus. This parameter is required. + /// + /// Example: + /// MyEventBus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The returned error message. + /// + /// Example: + /// The event bus [xxxx] not existed! + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// A995F07C-E503-5881-9962-9CECA8566876 + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + /// + /// Indicates whether the request is successful. The value true indicates that the request is successful. + /// + /// Example: + /// true + /// + [NameInMap("success")] + [Validation(Required=false)] + public bool? Success { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateEventRuleRequest.cs b/sdk/generated/csharp/core/Models/CreateEventRuleRequest.cs new file mode 100644 index 00000000..7a607c2c --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateEventRuleRequest.cs @@ -0,0 +1,63 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + /// Description: + /// + /// EventRule Controller apis: + /// createEventRule * + /// getEventRule * + /// deleteEventRule * + /// updateEventRule * + /// listEventRules * + /// enableEventRule * + /// disableEventRule * + /// + public class CreateEventRuleRequest : TeaModel { + /// + /// The name of the event bus with which the event source is associated. + /// This parameter is required. + /// + /// Example: + /// my-event-bus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event rule. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventRuleName")] + [Validation(Required=false)] + public string EventRuleName { get; set; } + + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + /// + /// The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + ///
You can specify up to five expressions in the map data structure in each field.
+        /// 
+ /// + /// Example: + /// {"source": [{"prefix": "acs."}],"type": [{"prefix":"oss:ObjectReplication"}],"subject":[{"prefix":"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/", "suffix":".txt"}]} + ///
+ [NameInMap("filterPattern")] + [Validation(Required=false)] + public string FilterPattern { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateEventRuleResponse.cs b/sdk/generated/csharp/core/Models/CreateEventRuleResponse.cs new file mode 100644 index 00000000..50f62dfd --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateEventRuleResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class CreateEventRuleResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public CreateEventRuleResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateEventRuleResponseBody.cs b/sdk/generated/csharp/core/Models/CreateEventRuleResponseBody.cs new file mode 100644 index 00000000..d16cf0ae --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateEventRuleResponseBody.cs @@ -0,0 +1,58 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class CreateEventRuleResponseBody : TeaModel { + /// + /// The returned response code. Valid values: + ///
*   Success: The request is successful.
+        /// 
+        /// *   Other codes: The request failed. For more information about error codes, see Error codes.
+        /// 
+ /// + /// Example: + /// Success + ///
+ [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The name of the event rule. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventRuleName")] + [Validation(Required=false)] + public string EventRuleName { get; set; } + + /// + /// The returned error message. + /// + /// Example: + /// Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 2922208e-e1c6-43ee-bfd1-aca50263bc8a + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateEventSourceRequest.cs b/sdk/generated/csharp/core/Models/CreateEventSourceRequest.cs new file mode 100644 index 00000000..1295c4b1 --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateEventSourceRequest.cs @@ -0,0 +1,60 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + /// Description: + /// + /// EventSource Controller apis: + /// createEventSource * + /// updateEventSource * + /// deleteEventSource * + /// getEventSource * + /// listEventSources * + /// + public class CreateEventSourceRequest : TeaModel { + /// + /// The description of the event source. + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + /// + /// The name of the event bus with which the event source is associated. + /// This parameter is required. + /// + /// Example: + /// my-event-bus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event source. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventSourceName")] + [Validation(Required=false)] + public string EventSourceName { get; set; } + + [NameInMap("className")] + [Validation(Required=false)] + public string ClassName { get; set; } + + [NameInMap("config")] + [Validation(Required=false)] + public Dictionary Config { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateEventSourceResponse.cs b/sdk/generated/csharp/core/Models/CreateEventSourceResponse.cs new file mode 100644 index 00000000..7505cbb6 --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateEventSourceResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class CreateEventSourceResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public CreateEventSourceResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateEventSourceResponseBody.cs b/sdk/generated/csharp/core/Models/CreateEventSourceResponseBody.cs new file mode 100644 index 00000000..cf73188d --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateEventSourceResponseBody.cs @@ -0,0 +1,58 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class CreateEventSourceResponseBody : TeaModel { + /// + /// The returned response code. Valid values: + ///
*   Success: The request is successful.
+        /// 
+        /// *   Other codes: The request failed. For more information about error codes, see Error codes.
+        /// 
+ /// + /// Example: + /// Success + ///
+ [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The name of the event source. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventSourceName")] + [Validation(Required=false)] + public string EventSourceName { get; set; } + + /// + /// The returned error message. + /// + /// Example: + /// Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 2922208e-e1c6-43ee-bfd1-aca50263bc8a + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateEventTargetsRequest.cs b/sdk/generated/csharp/core/Models/CreateEventTargetsRequest.cs new file mode 100644 index 00000000..f22ebe69 --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateEventTargetsRequest.cs @@ -0,0 +1,40 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class CreateEventTargetsRequest : TeaModel { + /// + /// The name of the event bus with which the event target is associated. + /// This parameter is required. + /// + /// Example: + /// my-event-bus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event rule. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventRuleName")] + [Validation(Required=false)] + public string EventRuleName { get; set; } + + [NameInMap("eventTargets")] + [Validation(Required=false)] + public List EventTargets { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateEventTargetsResponse.cs b/sdk/generated/csharp/core/Models/CreateEventTargetsResponse.cs new file mode 100644 index 00000000..aeacc36e --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateEventTargetsResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class CreateEventTargetsResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public CreateEventTargetsResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/CreateEventTargetsResponseBody.cs b/sdk/generated/csharp/core/Models/CreateEventTargetsResponseBody.cs new file mode 100644 index 00000000..c837c3a8 --- /dev/null +++ b/sdk/generated/csharp/core/Models/CreateEventTargetsResponseBody.cs @@ -0,0 +1,48 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class CreateEventTargetsResponseBody : TeaModel { + /// + /// The returned response code. Valid values: + ///
*   Success: The request is successful.
+        /// 
+        /// *   Other codes: The request failed. For more information about error codes, see Error codes.
+        /// 
+ /// + /// Example: + /// Success + ///
+ [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The returned error message. + /// + /// Example: + /// Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 2922208e-e1c6-43ee-bfd1-aca50263bc8a + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteApiDestinationRequest.cs b/sdk/generated/csharp/core/Models/DeleteApiDestinationRequest.cs new file mode 100644 index 00000000..b5025342 --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteApiDestinationRequest.cs @@ -0,0 +1,24 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteApiDestinationRequest : TeaModel { + /// + /// The name of the API destination. This parameter is required. + /// + /// Example: + /// ApiDestinationName + /// + [NameInMap("apiDestinationName")] + [Validation(Required=false)] + public string ApiDestinationName { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteApiDestinationResponse.cs b/sdk/generated/csharp/core/Models/DeleteApiDestinationResponse.cs new file mode 100644 index 00000000..3bc85f45 --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteApiDestinationResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteApiDestinationResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public DeleteApiDestinationResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteApiDestinationResponseBody.cs b/sdk/generated/csharp/core/Models/DeleteApiDestinationResponseBody.cs new file mode 100644 index 00000000..b1d458b3 --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteApiDestinationResponseBody.cs @@ -0,0 +1,44 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteApiDestinationResponseBody : TeaModel { + /// + /// The returned response code. The value Success indicates that the request is successful. + /// + /// Example: + /// Success + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + /// + /// Example: + /// success + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 382E6272-8E9C-5681-AC96-A8AF0BFAC1A5 + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteConnectionRequest.cs b/sdk/generated/csharp/core/Models/DeleteConnectionRequest.cs new file mode 100644 index 00000000..64615a6d --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteConnectionRequest.cs @@ -0,0 +1,24 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteConnectionRequest : TeaModel { + /// + /// The name of the connection that you want to delete. This parameter is required. + /// + /// Example: + /// connection-name + /// + [NameInMap("connectionName")] + [Validation(Required=false)] + public string ConnectionName { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteConnectionResponse.cs b/sdk/generated/csharp/core/Models/DeleteConnectionResponse.cs new file mode 100644 index 00000000..8c88762c --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteConnectionResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteConnectionResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public DeleteConnectionResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteConnectionResponseBody.cs b/sdk/generated/csharp/core/Models/DeleteConnectionResponseBody.cs new file mode 100644 index 00000000..604c0222 --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteConnectionResponseBody.cs @@ -0,0 +1,44 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteConnectionResponseBody : TeaModel { + /// + /// The returned response code. The value Success indicates that the request is successful. + /// + /// Example: + /// Success + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + /// + /// Example: + /// success + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 8EF25E37-1750-5D7A-BA56-F8AE081A69C8 + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteEventBusRequest.cs b/sdk/generated/csharp/core/Models/DeleteEventBusRequest.cs new file mode 100644 index 00000000..4d6ac2e1 --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteEventBusRequest.cs @@ -0,0 +1,24 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteEventBusRequest : TeaModel { + /// + /// The name of the event bus. This parameter is required. + /// + /// Example: + /// MyEventBus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteEventBusResponse.cs b/sdk/generated/csharp/core/Models/DeleteEventBusResponse.cs new file mode 100644 index 00000000..e84b70f0 --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteEventBusResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteEventBusResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public DeleteEventBusResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteEventBusResponseBody.cs b/sdk/generated/csharp/core/Models/DeleteEventBusResponseBody.cs new file mode 100644 index 00000000..25f96628 --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteEventBusResponseBody.cs @@ -0,0 +1,44 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteEventBusResponseBody : TeaModel { + /// + /// The returned HTTP status code. The HTTP status code 200 indicates that the request is successful. + /// + /// Example: + /// 200 + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The returned error message. + /// + /// Example: + /// EventBusNotExist + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// C229E140-1A5C-5D55-8904-CFC5BA4CAA98 + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteEventRuleRequest.cs b/sdk/generated/csharp/core/Models/DeleteEventRuleRequest.cs new file mode 100644 index 00000000..28abc5f9 --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteEventRuleRequest.cs @@ -0,0 +1,36 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteEventRuleRequest : TeaModel { + /// + /// The name of the event bus with which the event source is associated. + /// This parameter is required. + /// + /// Example: + /// my-event-bus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event rule. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventRuleName")] + [Validation(Required=false)] + public string EventRuleName { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteEventRuleResponse.cs b/sdk/generated/csharp/core/Models/DeleteEventRuleResponse.cs new file mode 100644 index 00000000..f12d2535 --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteEventRuleResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteEventRuleResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public DeleteEventRuleResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteEventRuleResponseBody.cs b/sdk/generated/csharp/core/Models/DeleteEventRuleResponseBody.cs new file mode 100644 index 00000000..194a2276 --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteEventRuleResponseBody.cs @@ -0,0 +1,48 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteEventRuleResponseBody : TeaModel { + /// + /// The returned response code. Valid values: + ///
*   Success: The request is successful.
+        /// 
+        /// *   Other codes: The request failed. For more information about error codes, see Error codes.
+        /// 
+ /// + /// Example: + /// Success + ///
+ [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The returned error message. + /// + /// Example: + /// Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 2922208e-e1c6-43ee-bfd1-aca50263bc8a + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteEventSourceRequest.cs b/sdk/generated/csharp/core/Models/DeleteEventSourceRequest.cs new file mode 100644 index 00000000..9456909e --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteEventSourceRequest.cs @@ -0,0 +1,29 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteEventSourceRequest : TeaModel { + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event source. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.source + /// + [NameInMap("eventSourceName")] + [Validation(Required=false)] + public string EventSourceName { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteEventSourceResponse.cs b/sdk/generated/csharp/core/Models/DeleteEventSourceResponse.cs new file mode 100644 index 00000000..81ed2b26 --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteEventSourceResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteEventSourceResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public DeleteEventSourceResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteEventSourceResponseBody.cs b/sdk/generated/csharp/core/Models/DeleteEventSourceResponseBody.cs new file mode 100644 index 00000000..1d85761d --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteEventSourceResponseBody.cs @@ -0,0 +1,44 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteEventSourceResponseBody : TeaModel { + /// + /// The returned response code. The value Success indicates that the request is successful. Other values indicate that the request failed. For more information about error codes, see Error codes. + /// + /// Example: + /// Success + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The returned error message. + /// + /// Example: + /// Remote error. requestId: [78B66E68-E778-1F33-84BD-xxxx], error code: [EventSourceNotExist], message: [The event source in request is not exist! ] + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 5f80e9b3-98d5-4f51-8412-c758818a03e4 + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteEventTargetsRequest.cs b/sdk/generated/csharp/core/Models/DeleteEventTargetsRequest.cs new file mode 100644 index 00000000..3a1acad5 --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteEventTargetsRequest.cs @@ -0,0 +1,41 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteEventTargetsRequest : TeaModel { + /// + /// The name of the event bus. + /// + /// Example: + /// MyEventBus + /// + [NameInMap("eventBusName")] + [Validation(Required=true)] + public string EventBusName { get; set; } + + /// + /// The name of the event rule. + /// + /// Example: + /// ramrolechange-mns + /// + [NameInMap("eventRuleName")] + [Validation(Required=true)] + public string EventRuleName { get; set; } + + /// + /// The names of the event targets that you want to delete. + /// + [NameInMap("eventTargetNames")] + [Validation(Required=false)] + public List EventTargetNames { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteEventTargetsResponse.cs b/sdk/generated/csharp/core/Models/DeleteEventTargetsResponse.cs new file mode 100644 index 00000000..7b7c1112 --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteEventTargetsResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteEventTargetsResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public DeleteEventTargetsResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DeleteEventTargetsResponseBody.cs b/sdk/generated/csharp/core/Models/DeleteEventTargetsResponseBody.cs new file mode 100644 index 00000000..4e65eced --- /dev/null +++ b/sdk/generated/csharp/core/Models/DeleteEventTargetsResponseBody.cs @@ -0,0 +1,48 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DeleteEventTargetsResponseBody : TeaModel { + /// + /// The returned response code. Valid values: + ///
*   Success: The request is successful.
+        /// 
+        /// *   Other codes: The request failed. For more information about error codes, see Error codes.
+        /// 
+ /// + /// Example: + /// Success + ///
+ [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The returned error message. + /// + /// Example: + /// Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 2922208e-e1c6-43ee-bfd1-aca50263bc8a + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DisableEventRuleRequest.cs b/sdk/generated/csharp/core/Models/DisableEventRuleRequest.cs new file mode 100644 index 00000000..1fb86cb9 --- /dev/null +++ b/sdk/generated/csharp/core/Models/DisableEventRuleRequest.cs @@ -0,0 +1,36 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DisableEventRuleRequest : TeaModel { + /// + /// The name of the event bus with which the event source is associated. + /// This parameter is required. + /// + /// Example: + /// my-event-bus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event rule. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventRuleName")] + [Validation(Required=false)] + public string EventRuleName { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DisableEventRuleResponse.cs b/sdk/generated/csharp/core/Models/DisableEventRuleResponse.cs new file mode 100644 index 00000000..20ccb2c8 --- /dev/null +++ b/sdk/generated/csharp/core/Models/DisableEventRuleResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DisableEventRuleResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public DisableEventRuleResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/DisableEventRuleResponseBody.cs b/sdk/generated/csharp/core/Models/DisableEventRuleResponseBody.cs new file mode 100644 index 00000000..ea87598a --- /dev/null +++ b/sdk/generated/csharp/core/Models/DisableEventRuleResponseBody.cs @@ -0,0 +1,48 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class DisableEventRuleResponseBody : TeaModel { + /// + /// The returned response code. Valid values: + ///
*   Success: The request is successful.
+        /// 
+        /// *   Other codes: The request failed. For more information about error codes, see Error codes.
+        /// 
+ /// + /// Example: + /// Success + ///
+ [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The returned error message. + /// + /// Example: + /// Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 2922208e-e1c6-43ee-bfd1-aca50263bc8a + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/EnableEventRuleRequest.cs b/sdk/generated/csharp/core/Models/EnableEventRuleRequest.cs new file mode 100644 index 00000000..3adb3bb2 --- /dev/null +++ b/sdk/generated/csharp/core/Models/EnableEventRuleRequest.cs @@ -0,0 +1,36 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class EnableEventRuleRequest : TeaModel { + /// + /// The name of the event bus with which the event source is associated. + /// This parameter is required. + /// + /// Example: + /// my-event-bus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event rule. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventRuleName")] + [Validation(Required=false)] + public string EventRuleName { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/EnableEventRuleResponse.cs b/sdk/generated/csharp/core/Models/EnableEventRuleResponse.cs new file mode 100644 index 00000000..8880c4f4 --- /dev/null +++ b/sdk/generated/csharp/core/Models/EnableEventRuleResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class EnableEventRuleResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public EnableEventRuleResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/EnableEventRuleResponseBody.cs b/sdk/generated/csharp/core/Models/EnableEventRuleResponseBody.cs new file mode 100644 index 00000000..53a6541e --- /dev/null +++ b/sdk/generated/csharp/core/Models/EnableEventRuleResponseBody.cs @@ -0,0 +1,48 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class EnableEventRuleResponseBody : TeaModel { + /// + /// The returned response code. Valid values: + ///
*   Success: The request is successful.
+        /// 
+        /// *   Other codes: The request failed. For more information about error codes, see Error codes.
+        /// 
+ /// + /// Example: + /// Success + ///
+ [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The returned error message. + /// + /// Example: + /// Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 2922208e-e1c6-43ee-bfd1-aca50263bc8a + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/EventTarget.cs b/sdk/generated/csharp/core/Models/EventTarget.cs new file mode 100644 index 00000000..058cb19c --- /dev/null +++ b/sdk/generated/csharp/core/Models/EventTarget.cs @@ -0,0 +1,76 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + /// Description: + /// + /// EventTarget Controller apis: + /// createEventTargets * + /// updateEventTargets * + /// deleteEventTargets * + /// listEventTargets * + /// + public class EventTarget : TeaModel { + [NameInMap("eventTargetName")] + [Validation(Required=false)] + public string EventTargetName { get; set; } + + [NameInMap("className")] + [Validation(Required=false)] + public string ClassName { get; set; } + + [NameInMap("config")] + [Validation(Required=false)] + public Dictionary Config { get; set; } + + [NameInMap("runOptions")] + [Validation(Required=false)] + public EventTargetRunOptions RunOptions { get; set; } + public class EventTargetRunOptions : TeaModel { + [NameInMap("errorsTolerance")] + [Validation(Required=false)] + public string ErrorsTolerance { get; set; } + + [NameInMap("retryStrategy")] + [Validation(Required=false)] + public EventTargetRunOptionsRetryStrategy RetryStrategy { get; set; } + public class EventTargetRunOptionsRetryStrategy : TeaModel { + [NameInMap("pushRetryStrategy")] + [Validation(Required=false)] + public string PushRetryStrategy { get; set; } + + [NameInMap("maximumEventAgeInSeconds")] + [Validation(Required=false)] + public int? MaximumEventAgeInSeconds { get; set; } + + [NameInMap("maximumRetryAttempts")] + [Validation(Required=false)] + public int? MaximumRetryAttempts { get; set; } + + } + + [NameInMap("deadLetterQueue")] + [Validation(Required=false)] + public EventTargetRunOptionsDeadLetterQueue DeadLetterQueue { get; set; } + public class EventTargetRunOptionsDeadLetterQueue : TeaModel { + [NameInMap("type")] + [Validation(Required=false)] + public string Type { get; set; } + + [NameInMap("config")] + [Validation(Required=false)] + public Dictionary Config { get; set; } + + } + + } + + } + +} diff --git a/sdk/generated/csharp/core/Models/GetApiDestinationRequest.cs b/sdk/generated/csharp/core/Models/GetApiDestinationRequest.cs new file mode 100644 index 00000000..dd330fe0 --- /dev/null +++ b/sdk/generated/csharp/core/Models/GetApiDestinationRequest.cs @@ -0,0 +1,24 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class GetApiDestinationRequest : TeaModel { + /// + /// The name of the API destination. This parameter is required. + /// + /// Example: + /// api-destination-name + /// + [NameInMap("apiDestinationName")] + [Validation(Required=false)] + public string ApiDestinationName { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/GetApiDestinationResponse.cs b/sdk/generated/csharp/core/Models/GetApiDestinationResponse.cs new file mode 100644 index 00000000..3afe9613 --- /dev/null +++ b/sdk/generated/csharp/core/Models/GetApiDestinationResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class GetApiDestinationResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public GetApiDestinationResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/GetApiDestinationResponseBody.cs b/sdk/generated/csharp/core/Models/GetApiDestinationResponseBody.cs new file mode 100644 index 00000000..d0aad92e --- /dev/null +++ b/sdk/generated/csharp/core/Models/GetApiDestinationResponseBody.cs @@ -0,0 +1,166 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class GetApiDestinationResponseBody : TeaModel { + /// + /// The returned response code. The value Success indicates that the request is successful. + /// + /// Example: + /// Success + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The name of the API destination. + /// + /// Example: + /// api-destination-2 + /// + [NameInMap("apiDestinationName")] + [Validation(Required=false)] + public string ApiDestinationName { get; set; } + + /// + /// The connection name. + /// + /// Example: + /// connection-name + /// + [NameInMap("connectionName")] + [Validation(Required=false)] + public string ConnectionName { get; set; } + + /// + /// The description of the connection. + /// + /// Example: + /// demo + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + /// + /// The time when the API destination was created. + /// + /// Example: + /// 1665223213000 + /// + [NameInMap("gmtCreate")] + [Validation(Required=false)] + public long? GmtCreate { get; set; } + + /// + /// The request parameters that are configured for the API destination. + /// + [NameInMap("httpApiParameters")] + [Validation(Required=false)] + public GetApiDestinationResponseBodyHttpApiParameters HttpApiParameters { get; set; } + public class GetApiDestinationResponseBodyHttpApiParameters : TeaModel { + /// + /// The endpoint of the API destination. + /// + /// Example: + /// http://127.0.0.1:8001/api + /// + [NameInMap("endpoint")] + [Validation(Required=false)] + public string Endpoint { get; set; } + + /// + /// The HTTP request method. Valid values: + ///
  - POST
+            /// 
+            ///   - GET
+            /// 
+            ///   - DELETE
+            /// 
+            ///   - PUT
+            /// 
+            ///   - HEAD
+            /// 
+            ///   - TRACE
+            /// 
+            ///   - PATCH
+            /// 
+ /// + /// Example: + /// POST + ///
+ [NameInMap("method")] + [Validation(Required=false)] + public string Method { get; set; } + + /// + /// TODO + /// + [NameInMap("apiParameters")] + [Validation(Required=false)] + public List ApiParameters { get; set; } + public class GetApiDestinationResponseBodyHttpApiParametersApiParameters : TeaModel { + [NameInMap("name")] + [Validation(Required=false)] + public string Name { get; set; } + + /// + /// The description of the API destination. The description can be up to 255 characters in length. + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + [NameInMap("type")] + [Validation(Required=false)] + public string Type { get; set; } + + [NameInMap("defaultValue")] + [Validation(Required=false)] + public string DefaultValue { get; set; } + + [NameInMap("in")] + [Validation(Required=false)] + public string In { get; set; } + + } + + } + + /// + /// TODO + /// + [NameInMap("invocationRateLimitPerSecond")] + [Validation(Required=false)] + public int? InvocationRateLimitPerSecond { get; set; } + + /// + /// The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + /// + /// Example: + /// success + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// B896B484-F16D-59DE-9E23-DD0E5C361108 + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/GetConnectionRequest.cs b/sdk/generated/csharp/core/Models/GetConnectionRequest.cs new file mode 100644 index 00000000..f50b8518 --- /dev/null +++ b/sdk/generated/csharp/core/Models/GetConnectionRequest.cs @@ -0,0 +1,24 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class GetConnectionRequest : TeaModel { + /// + /// The connection name. This parameter is required. + /// + /// Example: + /// connection-name + /// + [NameInMap("connectionName")] + [Validation(Required=false)] + public string ConnectionName { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/GetConnectionResponse.cs b/sdk/generated/csharp/core/Models/GetConnectionResponse.cs new file mode 100644 index 00000000..57788a08 --- /dev/null +++ b/sdk/generated/csharp/core/Models/GetConnectionResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class GetConnectionResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public GetConnectionResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/GetConnectionResponseBody.cs b/sdk/generated/csharp/core/Models/GetConnectionResponseBody.cs new file mode 100644 index 00000000..4d867f05 --- /dev/null +++ b/sdk/generated/csharp/core/Models/GetConnectionResponseBody.cs @@ -0,0 +1,414 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class GetConnectionResponseBody : TeaModel { + /// + /// The returned response code. The value Success indicates that the request is successful. + /// + /// Example: + /// Success + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The value of the key in the request path. + /// + [NameInMap("connections")] + [Validation(Required=false)] + public List Connections { get; set; } + public class GetConnectionResponseBodyConnections : TeaModel { + /// + /// The parameters that are configured for authentication. + /// + [NameInMap("authParameters")] + [Validation(Required=false)] + public GetConnectionResponseBodyConnectionsAuthParameters AuthParameters { get; set; } + public class GetConnectionResponseBodyConnectionsAuthParameters : TeaModel { + /// + /// The parameters that are configured for API key authentication. + /// + [NameInMap("apiKeyAuthParameters")] + [Validation(Required=false)] + public GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters ApiKeyAuthParameters { get; set; } + public class GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters : TeaModel { + /// + /// The API key. + /// + /// Example: + /// Token + /// + [NameInMap("apiKeyName")] + [Validation(Required=false)] + public string ApiKeyName { get; set; } + + /// + /// The value of the API key. + /// + /// Example: + /// asdkjnqkwejooa + /// + [NameInMap("apiKeyValue")] + [Validation(Required=false)] + public string ApiKeyValue { get; set; } + + } + + /// + /// The authentication type. Valid values: + ///
      - BASIC_AUTH: basic authentication.
+                /// 
+                /// 
+                ///       - API_KEY_AUTH: API key authentication.
+                /// 
+                /// 
+                ///       - OAUTH_AUTH: OAuth authentication.
+                /// 
+ /// + /// Example: + /// BASIC_AUTH + ///
+ [NameInMap("authorizationType")] + [Validation(Required=false)] + public string AuthorizationType { get; set; } + + /// + /// The parameters that are configured for basic authentication. + /// + [NameInMap("basicAuthParameters")] + [Validation(Required=false)] + public GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters BasicAuthParameters { get; set; } + public class GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters : TeaModel { + /// + /// The password for basic authentication. + /// + /// Example: + /// admin + /// + [NameInMap("password")] + [Validation(Required=false)] + public string Password { get; set; } + + /// + /// The username for basic authentication. + /// + /// Example: + /// admin + /// + [NameInMap("username")] + [Validation(Required=false)] + public string Username { get; set; } + + } + + /// + /// The parameters that are configured for OAuth authentication. + /// + [NameInMap("oauthParameters")] + [Validation(Required=false)] + public GetConnectionResponseBodyConnectionsAuthParametersOauthParameters OauthParameters { get; set; } + public class GetConnectionResponseBodyConnectionsAuthParametersOauthParameters : TeaModel { + /// + /// The endpoint that is used to obtain the OAuth token. + /// + /// Example: + /// http://localhost:8080/oauth/token + /// + [NameInMap("authorizationEndpoint")] + [Validation(Required=false)] + public string AuthorizationEndpoint { get; set; } + + /// + /// The parameters that are configured for the client. + /// + [NameInMap("clientParameters")] + [Validation(Required=false)] + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters ClientParameters { get; set; } + public class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters : TeaModel { + /// + /// The client ID. + /// + /// Example: + /// ClientID + /// + [NameInMap("clientID")] + [Validation(Required=false)] + public string ClientID { get; set; } + + /// + /// The client key secret of the application. + /// + /// Example: + /// ClientSecret + /// + [NameInMap("clientSecret")] + [Validation(Required=false)] + public string ClientSecret { get; set; } + + } + + /// + /// The HTTP request method. Valid values: + ///
        - GET
+                    /// 
+                    ///         - POST
+                    /// 
+                    ///         - HEAD
+                    /// 
+ /// + /// Example: + /// POST + ///
+ [NameInMap("httpMethod")] + [Validation(Required=false)] + public string HttpMethod { get; set; } + + /// + /// The request parameters for OAuth authentication. + /// + [NameInMap("oauthHttpParameters")] + [Validation(Required=false)] + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters OauthHttpParameters { get; set; } + public class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters : TeaModel { + /// + /// The parameters that are configured for the request. + /// + [NameInMap("bodyParameters")] + [Validation(Required=false)] + public List BodyParameters { get; set; } + public class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters : TeaModel { + /// + /// Indicates whether authentication is enabled. + /// + /// Example: + /// false + /// + [NameInMap("isValueSecret")] + [Validation(Required=false)] + public string IsValueSecret { get; set; } + + /// + /// The key in the request body. + /// + /// Example: + /// name + /// + [NameInMap("key")] + [Validation(Required=false)] + public string Key { get; set; } + + /// + /// The value of the key in the request body. + /// + /// Example: + /// demo + /// + [NameInMap("value")] + [Validation(Required=false)] + public string Value { get; set; } + + } + + /// + /// The parameters that are configured for the request header. + /// + [NameInMap("headerParameters")] + [Validation(Required=false)] + public List HeaderParameters { get; set; } + public class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters : TeaModel { + /// + /// Indicates whether authentication is enabled. + /// + /// Example: + /// false + /// + [NameInMap("isValueSecret")] + [Validation(Required=false)] + public string IsValueSecret { get; set; } + + /// + /// The key in the request header. + /// + /// Example: + /// name + /// + [NameInMap("key")] + [Validation(Required=false)] + public string Key { get; set; } + + /// + /// The value of the key in the request header. + /// + /// Example: + /// demo + /// + [NameInMap("value")] + [Validation(Required=false)] + public string Value { get; set; } + + } + + /// + /// The parameters that are configured for the request path. + /// + [NameInMap("queryStringParameters")] + [Validation(Required=false)] + public List QueryStringParameters { get; set; } + public class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters : TeaModel { + /// + /// Indicates whether authentication is enabled. + /// + /// Example: + /// false + /// + [NameInMap("isValueSecret")] + [Validation(Required=false)] + public string IsValueSecret { get; set; } + + /// + /// The key in the request path. + /// + /// Example: + /// name + /// + [NameInMap("key")] + [Validation(Required=false)] + public string Key { get; set; } + + /// + /// The value of the key in the request path. + /// + /// Example: + /// demo + /// + [NameInMap("value")] + [Validation(Required=false)] + public string Value { get; set; } + + } + + } + + } + + } + + /// + /// The connection name. + /// + /// Example: + /// connection-name + /// + [NameInMap("connectionName")] + [Validation(Required=false)] + public string ConnectionName { get; set; } + + /// + /// The connection description. + /// + /// Example: + /// The description of the connection. + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + /// + /// The time when the connection was created. + /// + /// Example: + /// 1592838994234 + /// + [NameInMap("gmtCreate")] + [Validation(Required=false)] + public long? GmtCreate { get; set; } + + /// + /// The connection ID. + /// + /// Example: + /// 1141093 + /// + [NameInMap("id")] + [Validation(Required=false)] + public int? Id { get; set; } + + [NameInMap("networkParameters")] + [Validation(Required=false)] + public GetConnectionResponseBodyConnectionsNetworkParameters NetworkParameters { get; set; } + public class GetConnectionResponseBodyConnectionsNetworkParameters : TeaModel { + /// + /// The network type. Valid values:PublicNetwork and PrivateNetwork. + /// + /// Example: + /// PublicNetwork + /// + [NameInMap("networkType")] + [Validation(Required=false)] + public string NetworkType { get; set; } + + /// + /// The security group ID. + /// + /// Example: + /// eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb + /// + [NameInMap("securityGroupId")] + [Validation(Required=false)] + public string SecurityGroupId { get; set; } + + /// + /// The virtual private cloud (VPC) ID. + /// + /// Example: + /// eb-test/vpc-bp1symadadwnwgmqud + /// + [NameInMap("vpcId")] + [Validation(Required=false)] + public string VpcId { get; set; } + + /// + /// The vSwitch ID. + /// + /// Example: + /// vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c + /// + [NameInMap("vswitcheId")] + [Validation(Required=false)] + public string VswitcheId { get; set; } + + } + + } + + /// + /// The returned message. + /// + /// Example: + /// success + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The returned request ID. + /// + /// Example: + /// 34AD682D-5B91-5773-8132-AA38C130**** + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/GetEventBusRequest.cs b/sdk/generated/csharp/core/Models/GetEventBusRequest.cs new file mode 100644 index 00000000..0aae03bc --- /dev/null +++ b/sdk/generated/csharp/core/Models/GetEventBusRequest.cs @@ -0,0 +1,24 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class GetEventBusRequest : TeaModel { + /// + /// The name of the event bus. This parameter is required. + /// + /// Example: + /// MyEventBus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/GetEventBusResponse.cs b/sdk/generated/csharp/core/Models/GetEventBusResponse.cs new file mode 100644 index 00000000..98516456 --- /dev/null +++ b/sdk/generated/csharp/core/Models/GetEventBusResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class GetEventBusResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public GetEventBusResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/GetEventBusResponseBody.cs b/sdk/generated/csharp/core/Models/GetEventBusResponseBody.cs new file mode 100644 index 00000000..f34e3432 --- /dev/null +++ b/sdk/generated/csharp/core/Models/GetEventBusResponseBody.cs @@ -0,0 +1,74 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class GetEventBusResponseBody : TeaModel { + /// + /// The response code. The value Success indicates that the request is successful. + /// + /// Example: + /// Success + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The timestamp that indicates when the event bus was created. + /// + /// Example: + /// 1641781825000 + /// + [NameInMap("createTimestamp")] + [Validation(Required=false)] + public long? CreateTimestamp { get; set; } + + /// + /// The description of the event bus. + /// + /// Example: + /// demo + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + /// + /// The name of the event bus. + /// + /// Example: + /// MyEventBus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The error message that is returned if the request failed. + /// + /// Example: + /// EventBusNotExist + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// d5bfc188-4452-4ba7-b73a-a9005e522439 + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/GetEventRuleRequest.cs b/sdk/generated/csharp/core/Models/GetEventRuleRequest.cs new file mode 100644 index 00000000..0fe645ce --- /dev/null +++ b/sdk/generated/csharp/core/Models/GetEventRuleRequest.cs @@ -0,0 +1,36 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class GetEventRuleRequest : TeaModel { + /// + /// The name of the event bus with which the event source is associated. + /// This parameter is required. + /// + /// Example: + /// my-event-bus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event rule. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventRuleName")] + [Validation(Required=false)] + public string EventRuleName { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/GetEventRuleResponse.cs b/sdk/generated/csharp/core/Models/GetEventRuleResponse.cs new file mode 100644 index 00000000..4675966f --- /dev/null +++ b/sdk/generated/csharp/core/Models/GetEventRuleResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class GetEventRuleResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public GetEventRuleResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/GetEventRuleResponseBody.cs b/sdk/generated/csharp/core/Models/GetEventRuleResponseBody.cs new file mode 100644 index 00000000..01fdba32 --- /dev/null +++ b/sdk/generated/csharp/core/Models/GetEventRuleResponseBody.cs @@ -0,0 +1,164 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class GetEventRuleResponseBody : TeaModel { + /// + /// The returned response code. Valid values: + ///
*   Success: The request is successful.
+        /// 
+        /// *   Other codes: The request failed. For more information about error codes, see Error codes.
+        /// 
+ /// + /// Example: + /// Success + ///
+ [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The name of the event bus with which the event source is associated. + /// This parameter is required. + /// + /// Example: + /// my-event-bus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event rule. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventRuleName")] + [Validation(Required=false)] + public string EventRuleName { get; set; } + + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + /// + /// The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + ///
You can specify up to five expressions in the map data structure in each field.
+        /// 
+ /// + /// Example: + /// {"source": [{"prefix": "acs."}],"type": [{"prefix":"oss:ObjectReplication"}],"subject":[{"prefix":"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/", "suffix":".txt"}]} + ///
+ [NameInMap("filterPattern")] + [Validation(Required=false)] + public string FilterPattern { get; set; } + + /// + /// The status of the event rule. Valid values: ENABLE (default): The event rule is enabled. DISABLE: The event rule is disabled. + /// + /// Example: + /// ENABLE + /// + [NameInMap("status")] + [Validation(Required=false)] + public string Status { get; set; } + + [NameInMap("gmtCreate")] + [Validation(Required=false)] + public string GmtCreate { get; set; } + + [NameInMap("gmtModify")] + [Validation(Required=false)] + public string GmtModify { get; set; } + + [NameInMap("eventTargets")] + [Validation(Required=false)] + public List EventTargets { get; set; } + public class GetEventRuleResponseBodyEventTargets : TeaModel { + [NameInMap("eventTargetName")] + [Validation(Required=false)] + public string EventTargetName { get; set; } + + [NameInMap("className")] + [Validation(Required=false)] + public string ClassName { get; set; } + + [NameInMap("config")] + [Validation(Required=false)] + public Dictionary Config { get; set; } + + [NameInMap("runOptions")] + [Validation(Required=false)] + public GetEventRuleResponseBodyEventTargetsRunOptions RunOptions { get; set; } + public class GetEventRuleResponseBodyEventTargetsRunOptions : TeaModel { + [NameInMap("errorsTolerance")] + [Validation(Required=false)] + public string ErrorsTolerance { get; set; } + + [NameInMap("retryStrategy")] + [Validation(Required=false)] + public GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy RetryStrategy { get; set; } + public class GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy : TeaModel { + [NameInMap("pushRetryStrategy")] + [Validation(Required=false)] + public string PushRetryStrategy { get; set; } + + [NameInMap("maximumEventAgeInSeconds")] + [Validation(Required=false)] + public int? MaximumEventAgeInSeconds { get; set; } + + [NameInMap("maximumRetryAttempts")] + [Validation(Required=false)] + public int? MaximumRetryAttempts { get; set; } + + } + + [NameInMap("deadLetterQueue")] + [Validation(Required=false)] + public GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue DeadLetterQueue { get; set; } + public class GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue : TeaModel { + [NameInMap("type")] + [Validation(Required=false)] + public string Type { get; set; } + + [NameInMap("config")] + [Validation(Required=false)] + public Dictionary Config { get; set; } + + } + + } + + } + + /// + /// The returned error message. + /// + /// Example: + /// Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 2922208e-e1c6-43ee-bfd1-aca50263bc8a + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/GetEventSourceRequest.cs b/sdk/generated/csharp/core/Models/GetEventSourceRequest.cs new file mode 100644 index 00000000..93b3382b --- /dev/null +++ b/sdk/generated/csharp/core/Models/GetEventSourceRequest.cs @@ -0,0 +1,29 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class GetEventSourceRequest : TeaModel { + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event source. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.source + /// + [NameInMap("eventSourceName")] + [Validation(Required=false)] + public string EventSourceName { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/GetEventSourceResponse.cs b/sdk/generated/csharp/core/Models/GetEventSourceResponse.cs new file mode 100644 index 00000000..c1a8b0f3 --- /dev/null +++ b/sdk/generated/csharp/core/Models/GetEventSourceResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class GetEventSourceResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public GetEventSourceResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/GetEventSourceResponseBody.cs b/sdk/generated/csharp/core/Models/GetEventSourceResponseBody.cs new file mode 100644 index 00000000..694696bc --- /dev/null +++ b/sdk/generated/csharp/core/Models/GetEventSourceResponseBody.cs @@ -0,0 +1,51 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class GetEventSourceResponseBody : TeaModel { + /// + /// The name of the event bus with which the event source is associated. + /// This parameter is required. + /// + /// Example: + /// my-event-bus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event source. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventSourceName")] + [Validation(Required=false)] + public string EventSourceName { get; set; } + + /// + /// The description of the event source. + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + [NameInMap("className")] + [Validation(Required=false)] + public string ClassName { get; set; } + + [NameInMap("config")] + [Validation(Required=false)] + public Dictionary Config { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListApiDestinationsRequest.cs b/sdk/generated/csharp/core/Models/ListApiDestinationsRequest.cs new file mode 100644 index 00000000..80d43e25 --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListApiDestinationsRequest.cs @@ -0,0 +1,58 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListApiDestinationsRequest : TeaModel { + /// + /// The prefix of the API destination name. + /// + /// Example: + /// api-demo + /// + [NameInMap("apiDestinationNamePrefix")] + [Validation(Required=false)] + public string ApiDestinationNamePrefix { get; set; } + + /// + /// The connection name. + /// + /// Example: + /// connection-name + /// + [NameInMap("connectionName")] + [Validation(Required=false)] + public string ConnectionName { get; set; } + + /// + /// The maximum number of entries to be returned in a call. You can use this parameter and NextToken to implement paging. + ///
*   Default value: 10.
+        /// 
+ /// + /// Example: + /// 10 + ///
+ [NameInMap("maxResults")] + [Validation(Required=false)] + public int? MaxResults { get; set; } + + /// + /// If you set Limit and excess return values exist, this parameter is returned. + ///
*   Default value: 0.
+        /// 
+ /// + /// Example: + /// 0 + ///
+ [NameInMap("nextToken")] + [Validation(Required=false)] + public string NextToken { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListApiDestinationsResponse.cs b/sdk/generated/csharp/core/Models/ListApiDestinationsResponse.cs new file mode 100644 index 00000000..c9b38b4a --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListApiDestinationsResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListApiDestinationsResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public ListApiDestinationsResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListApiDestinationsResponseBody.cs b/sdk/generated/csharp/core/Models/ListApiDestinationsResponseBody.cs new file mode 100644 index 00000000..df8750ca --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListApiDestinationsResponseBody.cs @@ -0,0 +1,205 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListApiDestinationsResponseBody : TeaModel { + /// + /// The returned response code. The value Success indicates that the request is successful. + /// + /// Example: + /// Success + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The API destinations. + /// + [NameInMap("apiDestinations")] + [Validation(Required=false)] + public List ApiDestinations { get; set; } + public class ListApiDestinationsResponseBodyApiDestinations : TeaModel { + /// + /// The name of the API destination. + /// + /// Example: + /// api-destination-2 + /// + [NameInMap("apiDestinationName")] + [Validation(Required=false)] + public string ApiDestinationName { get; set; } + + /// + /// The connection name. + /// + /// Example: + /// connection-name + /// + [NameInMap("connectionName")] + [Validation(Required=false)] + public string ConnectionName { get; set; } + + /// + /// The description of the connection. + /// + /// Example: + /// demo + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + /// + /// The time when the API destination was created. + /// + /// Example: + /// 1665223213000 + /// + [NameInMap("gmtCreate")] + [Validation(Required=false)] + public long? GmtCreate { get; set; } + + /// + /// The request parameters that are configured for the API destination. + /// + [NameInMap("httpApiParameters")] + [Validation(Required=false)] + public ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters HttpApiParameters { get; set; } + public class ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters : TeaModel { + /// + /// The endpoint of the API destination. + /// + /// Example: + /// http://127.0.0.1:8001/api + /// + [NameInMap("endpoint")] + [Validation(Required=false)] + public string Endpoint { get; set; } + + /// + /// The HTTP request method. Valid values: + ///
      - POST
+                /// 
+                ///       - GET
+                /// 
+                ///       - DELETE
+                /// 
+                ///       - PUT
+                /// 
+                ///       - HEAD
+                /// 
+                ///       - TRACE
+                /// 
+                ///       - PATCH
+                /// 
+ /// + /// Example: + /// POST + ///
+ [NameInMap("method")] + [Validation(Required=false)] + public string Method { get; set; } + + /// + /// TODO + /// + [NameInMap("apiParameters")] + [Validation(Required=false)] + public List ApiParameters { get; set; } + public class ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters : TeaModel { + [NameInMap("name")] + [Validation(Required=false)] + public string Name { get; set; } + + /// + /// The description of the API destination. The description can be up to 255 characters in length. + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + [NameInMap("type")] + [Validation(Required=false)] + public string Type { get; set; } + + [NameInMap("defaultValue")] + [Validation(Required=false)] + public string DefaultValue { get; set; } + + [NameInMap("in")] + [Validation(Required=false)] + public string In { get; set; } + + } + + } + + /// + /// TODO + /// + [NameInMap("invocationRateLimitPerSecond")] + [Validation(Required=false)] + public int? InvocationRateLimitPerSecond { get; set; } + + } + + /// + /// The maximum number of entries returned per page. + /// + /// Example: + /// 10 + /// + [NameInMap("maxResults")] + [Validation(Required=false)] + public int? MaxResults { get; set; } + + /// + /// If excess return values exist, this parameter is returned. + /// + /// Example: + /// 1 + /// + [NameInMap("nextToken")] + [Validation(Required=false)] + public string NextToken { get; set; } + + /// + /// The total number of entries returned. + /// + /// Example: + /// 2 + /// + [NameInMap("total")] + [Validation(Required=false)] + public int? Total { get; set; } + + /// + /// The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + /// + /// Example: + /// success + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 96D7C0AB-DCE5-5E82-96B8-4725E1706BB1 + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListConnectionsRequest.cs b/sdk/generated/csharp/core/Models/ListConnectionsRequest.cs new file mode 100644 index 00000000..9ee80e76 --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListConnectionsRequest.cs @@ -0,0 +1,48 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListConnectionsRequest : TeaModel { + /// + /// The key word that you specify to query connections. Connections can be queried by prefixes. + /// + /// Example: + /// connection-name + /// + [NameInMap("connectionNamePrefix")] + [Validation(Required=false)] + public string ConnectionNamePrefix { get; set; } + + /// + /// The maximum number of entries to be returned in a single call. You can use this parameter and the NextToken parameter to implement paging. + ///
*   Default value: 10.
+        /// 
+ /// + /// Example: + /// 10 + ///
+ [NameInMap("maxResults")] + [Validation(Required=false)] + public int? MaxResults { get; set; } + + /// + /// If you set the Limit parameter and excess return values exist, this parameter is returned. + ///
*   Default value: 0.
+        /// 
+ /// + /// Example: + /// 0 + ///
+ [NameInMap("nextToken")] + [Validation(Required=false)] + public string NextToken { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListConnectionsResponse.cs b/sdk/generated/csharp/core/Models/ListConnectionsResponse.cs new file mode 100644 index 00000000..9eb19f7b --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListConnectionsResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListConnectionsResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public ListConnectionsResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListConnectionsResponseBody.cs b/sdk/generated/csharp/core/Models/ListConnectionsResponseBody.cs new file mode 100644 index 00000000..4546dbff --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListConnectionsResponseBody.cs @@ -0,0 +1,444 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListConnectionsResponseBody : TeaModel { + /// + /// The HTTP status code. The value Success indicates that the request is successful. + /// + /// Example: + /// Success + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The value of the key in the request path. + /// + [NameInMap("connections")] + [Validation(Required=false)] + public List Connections { get; set; } + public class ListConnectionsResponseBodyConnections : TeaModel { + /// + /// The parameters that are configured for authentication. + /// + [NameInMap("authParameters")] + [Validation(Required=false)] + public ListConnectionsResponseBodyConnectionsAuthParameters AuthParameters { get; set; } + public class ListConnectionsResponseBodyConnectionsAuthParameters : TeaModel { + /// + /// The parameters that are configured for API key authentication. + /// + [NameInMap("apiKeyAuthParameters")] + [Validation(Required=false)] + public ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters ApiKeyAuthParameters { get; set; } + public class ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters : TeaModel { + /// + /// The API key. + /// + /// Example: + /// Token + /// + [NameInMap("apiKeyName")] + [Validation(Required=false)] + public string ApiKeyName { get; set; } + + /// + /// The value of the API key. + /// + /// Example: + /// asdkjnqkwejooa + /// + [NameInMap("apiKeyValue")] + [Validation(Required=false)] + public string ApiKeyValue { get; set; } + + } + + /// + /// The authentication type. Valid values: + ///
      - BASIC_AUTH: basic authentication.
+                /// 
+                /// 
+                ///       - API_KEY_AUTH: API key authentication.
+                /// 
+                /// 
+                ///       - OAUTH_AUTH: OAuth authentication.
+                /// 
+ /// + /// Example: + /// BASIC_AUTH + ///
+ [NameInMap("authorizationType")] + [Validation(Required=false)] + public string AuthorizationType { get; set; } + + /// + /// The parameters that are configured for basic authentication. + /// + [NameInMap("basicAuthParameters")] + [Validation(Required=false)] + public ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters BasicAuthParameters { get; set; } + public class ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters : TeaModel { + /// + /// The password for basic authentication. + /// + /// Example: + /// admin + /// + [NameInMap("password")] + [Validation(Required=false)] + public string Password { get; set; } + + /// + /// The username for basic authentication. + /// + /// Example: + /// admin + /// + [NameInMap("username")] + [Validation(Required=false)] + public string Username { get; set; } + + } + + /// + /// The parameters that are configured for OAuth authentication. + /// + [NameInMap("oauthParameters")] + [Validation(Required=false)] + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters OauthParameters { get; set; } + public class ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters : TeaModel { + /// + /// The endpoint that is used to obtain the OAuth token. + /// + /// Example: + /// http://localhost:8080/oauth/token + /// + [NameInMap("authorizationEndpoint")] + [Validation(Required=false)] + public string AuthorizationEndpoint { get; set; } + + /// + /// The parameters that are configured for the client. + /// + [NameInMap("clientParameters")] + [Validation(Required=false)] + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters ClientParameters { get; set; } + public class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters : TeaModel { + /// + /// The client ID. + /// + /// Example: + /// ClientID + /// + [NameInMap("clientID")] + [Validation(Required=false)] + public string ClientID { get; set; } + + /// + /// The client key secret of the application. + /// + /// Example: + /// ClientSecret + /// + [NameInMap("clientSecret")] + [Validation(Required=false)] + public string ClientSecret { get; set; } + + } + + /// + /// The HTTP request method. Valid values: + ///
        - GET
+                    /// 
+                    ///         - POST
+                    /// 
+                    ///         - HEAD
+                    /// 
+ /// + /// Example: + /// POST + ///
+ [NameInMap("httpMethod")] + [Validation(Required=false)] + public string HttpMethod { get; set; } + + /// + /// The request parameters for OAuth authentication. + /// + [NameInMap("oauthHttpParameters")] + [Validation(Required=false)] + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters OauthHttpParameters { get; set; } + public class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters : TeaModel { + /// + /// The parameters that are configured for the request. + /// + [NameInMap("bodyParameters")] + [Validation(Required=false)] + public List BodyParameters { get; set; } + public class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters : TeaModel { + /// + /// Indicates whether authentication is enabled. + /// + /// Example: + /// false + /// + [NameInMap("isValueSecret")] + [Validation(Required=false)] + public string IsValueSecret { get; set; } + + /// + /// The key in the request body. + /// + /// Example: + /// name + /// + [NameInMap("key")] + [Validation(Required=false)] + public string Key { get; set; } + + /// + /// The value of the key in the request body. + /// + /// Example: + /// demo + /// + [NameInMap("value")] + [Validation(Required=false)] + public string Value { get; set; } + + } + + /// + /// The parameters that are configured for the request header. + /// + [NameInMap("headerParameters")] + [Validation(Required=false)] + public List HeaderParameters { get; set; } + public class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters : TeaModel { + /// + /// Indicates whether authentication is enabled. + /// + /// Example: + /// false + /// + [NameInMap("isValueSecret")] + [Validation(Required=false)] + public string IsValueSecret { get; set; } + + /// + /// The key in the request header. + /// + /// Example: + /// name + /// + [NameInMap("key")] + [Validation(Required=false)] + public string Key { get; set; } + + /// + /// The value of the key in the request header. + /// + /// Example: + /// demo + /// + [NameInMap("value")] + [Validation(Required=false)] + public string Value { get; set; } + + } + + /// + /// The parameters that are configured for the request path. + /// + [NameInMap("queryStringParameters")] + [Validation(Required=false)] + public List QueryStringParameters { get; set; } + public class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters : TeaModel { + /// + /// Indicates whether authentication is enabled. + /// + /// Example: + /// false + /// + [NameInMap("isValueSecret")] + [Validation(Required=false)] + public string IsValueSecret { get; set; } + + /// + /// The key in the request path. + /// + /// Example: + /// name + /// + [NameInMap("key")] + [Validation(Required=false)] + public string Key { get; set; } + + /// + /// The value of the key in the request path. + /// + /// Example: + /// demo + /// + [NameInMap("value")] + [Validation(Required=false)] + public string Value { get; set; } + + } + + } + + } + + } + + /// + /// The connection name. + /// + /// Example: + /// connection-name + /// + [NameInMap("connectionName")] + [Validation(Required=false)] + public string ConnectionName { get; set; } + + /// + /// The connection description. + /// + /// Example: + /// The description of the connection. + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + /// + /// The time when the connection was created. + /// + /// Example: + /// 1592838994234 + /// + [NameInMap("gmtCreate")] + [Validation(Required=false)] + public long? GmtCreate { get; set; } + + /// + /// The connection ID. + /// + /// Example: + /// 1141093 + /// + [NameInMap("id")] + [Validation(Required=false)] + public int? Id { get; set; } + + [NameInMap("networkParameters")] + [Validation(Required=false)] + public ListConnectionsResponseBodyConnectionsNetworkParameters NetworkParameters { get; set; } + public class ListConnectionsResponseBodyConnectionsNetworkParameters : TeaModel { + /// + /// The network type. Valid values:PublicNetwork and PrivateNetwork. + /// + /// Example: + /// PublicNetwork + /// + [NameInMap("networkType")] + [Validation(Required=false)] + public string NetworkType { get; set; } + + /// + /// The security group ID. + /// + /// Example: + /// eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb + /// + [NameInMap("securityGroupId")] + [Validation(Required=false)] + public string SecurityGroupId { get; set; } + + /// + /// The virtual private cloud (VPC) ID. + /// + /// Example: + /// eb-test/vpc-bp1symadadwnwgmqud + /// + [NameInMap("vpcId")] + [Validation(Required=false)] + public string VpcId { get; set; } + + /// + /// The vSwitch ID. + /// + /// Example: + /// vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c + /// + [NameInMap("vswitcheId")] + [Validation(Required=false)] + public string VswitcheId { get; set; } + + } + + } + + /// + /// The number of entries returned per page. + /// + /// Example: + /// 10 + /// + [NameInMap("maxResults")] + [Validation(Required=false)] + public int? MaxResults { get; set; } + + /// + /// If excess return values exist, this parameter is returned. + /// + /// Example: + /// 0 + /// + [NameInMap("nextToken")] + [Validation(Required=false)] + public string NextToken { get; set; } + + /// + /// The total number of entries returned. + /// + /// Example: + /// 1 + /// + [NameInMap("total")] + [Validation(Required=false)] + public int? Total { get; set; } + + /// + /// The message returned. + /// + /// Example: + /// success + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The ID of the request. This parameter is a common parameter. Each request has a unique ID. You can use the ID to troubleshoot issues. + /// + /// Example: + /// E3619976-8714-5D88-BBA2-6983D798A8BB + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEnumsResponseResponse.cs b/sdk/generated/csharp/core/Models/ListEnumsResponseResponse.cs new file mode 100644 index 00000000..c88dfec0 --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEnumsResponseResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListEnumsResponseResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public UpdateConnectionResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEnumsResponseResponseBody.cs b/sdk/generated/csharp/core/Models/ListEnumsResponseResponseBody.cs new file mode 100644 index 00000000..08390352 --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEnumsResponseResponseBody.cs @@ -0,0 +1,61 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + // enum AuthorizationTypeEnums : string { + // API_KEY_AUTH(name="API_KEY_AUTH", value="API_KEY_AUTH"), + // BASIC_AUTH(name="BASIC_AUTH", value="BASIC_AUTH"), + // OAUTH_AUTH(name="OAUTH_AUTH", value="OAUTH_AUTH"), + // } + // enum NetworkTypeEnum : string { + // PUBLIC_NETWORK(name="PUBLIC_NETWORK", value="PublicNetwork"), + // PRIVATE_NETWORK(name="PRIVATE_NETWORK", value="PrivateNetwork") + // } + public class ListEnumsResponseResponseBody : TeaModel { + [NameInMap("authorizationTypeEnums")] + [Validation(Required=false)] + public string AuthorizationTypeEnums { get; set; } + + [NameInMap("networkTypeEnums")] + [Validation(Required=false)] + public string NetworkTypeEnums { get; set; } + + /// + /// The returned response code. + /// + /// Example: + /// Success + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The returned message. + /// + /// Example: + /// success + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 8346BE8F-40F3-533D-A0B8-1359C31BD5BA + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEventBusesRequest.cs b/sdk/generated/csharp/core/Models/ListEventBusesRequest.cs new file mode 100644 index 00000000..1b3849fa --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEventBusesRequest.cs @@ -0,0 +1,34 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListEventBusesRequest : TeaModel { + /// + /// The maximum number of entries to be returned in a call. You can use this parameter and NextToken to implement paging. Note: Up to 100 entries can be returned in a call. + /// + /// Example: + /// 10 + /// + [NameInMap("maxResults")] + [Validation(Required=false)] + public int? MaxResults { get; set; } + + /// + /// If you set Limit and excess return values exist, this parameter is returned. + /// + /// Example: + /// 10 + /// + [NameInMap("nextToken")] + [Validation(Required=false)] + public string NextToken { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEventBusesResponse.cs b/sdk/generated/csharp/core/Models/ListEventBusesResponse.cs new file mode 100644 index 00000000..f7ef0e46 --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEventBusesResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListEventBusesResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public ListEventBusesResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEventBusesResponseBody.cs b/sdk/generated/csharp/core/Models/ListEventBusesResponseBody.cs new file mode 100644 index 00000000..9314096d --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEventBusesResponseBody.cs @@ -0,0 +1,103 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListEventBusesResponseBody : TeaModel { + /// + /// The returned HTTP status code. The HTTP status code 200 indicates that the request is successful. + /// + /// Example: + /// 200 + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The timestamp that indicates when the event bus was created. + /// + [NameInMap("eventBuses")] + [Validation(Required=false)] + public List EventBuses { get; set; } + public class ListEventBusesResponseBodyEventBuses : TeaModel { + /// + /// The description of the queried event bus. + /// + /// Example: + /// bus_description + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + /// + /// The name of the queried event bus. + /// + /// Example: + /// default + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + } + + /// + /// The returned error message. + /// + /// Example: + /// InvalidArgument + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// D1DCF64A-3F2C-5323-ADCB-3F4DF30FAD2D + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + /// + /// If excess return values exist, this parameter is returned. + /// + /// Example: + /// 10 + /// + [NameInMap("nextToken")] + [Validation(Required=false)] + public string NextToken { get; set; } + + /// + /// The total number of entries. + /// + /// Example: + /// 2 + /// + [NameInMap("total")] + [Validation(Required=false)] + public int? Total { get; set; } + + /// + /// If you set Limit and excess return values exist, this parameter is returned. + /// + /// Example: + /// 10 + /// + [NameInMap("maxResults")] + [Validation(Required=false)] + public int? MaxResults { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEventRulesRequest.cs b/sdk/generated/csharp/core/Models/ListEventRulesRequest.cs new file mode 100644 index 00000000..6653f10a --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEventRulesRequest.cs @@ -0,0 +1,38 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListEventRulesRequest : TeaModel { + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The number of entries returned per page. + /// + /// Example: + /// 10 + /// + [NameInMap("maxResults")] + [Validation(Required=false)] + public int? MaxResults { get; set; } + + /// + /// If excess return values exist, this parameter is returned. + /// + /// Example: + /// 0 + /// + [NameInMap("nextToken")] + [Validation(Required=false)] + public string NextToken { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEventRulesResponse.cs b/sdk/generated/csharp/core/Models/ListEventRulesResponse.cs new file mode 100644 index 00000000..c8ee62a3 --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEventRulesResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListEventRulesResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public ListEventRulesResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEventRulesResponseBody.cs b/sdk/generated/csharp/core/Models/ListEventRulesResponseBody.cs new file mode 100644 index 00000000..67dff5b6 --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEventRulesResponseBody.cs @@ -0,0 +1,106 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListEventRulesResponseBody : TeaModel { + [NameInMap("eventRules")] + [Validation(Required=false)] + public List EventRules { get; set; } + public class ListEventRulesResponseBodyEventRules : TeaModel { + /// + /// The name of the event bus with which the event source is associated. + /// This parameter is required. + /// + /// Example: + /// my-event-bus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event rule. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventRuleName")] + [Validation(Required=false)] + public string EventRuleName { get; set; } + + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + /// + /// The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + ///
    You can specify up to five expressions in the map data structure in each field.
+            /// 
+ /// + /// Example: + /// {"source": [{"prefix": "acs."}],"type": [{"prefix":"oss:ObjectReplication"}],"subject":[{"prefix":"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/", "suffix":".txt"}]} + ///
+ [NameInMap("filterPattern")] + [Validation(Required=false)] + public string FilterPattern { get; set; } + + /// + /// The status of the event rule. Valid values: ENABLE (default): The event rule is enabled. DISABLE: The event rule is disabled. + /// + /// Example: + /// ENABLE + /// + [NameInMap("status")] + [Validation(Required=false)] + public string Status { get; set; } + + [NameInMap("gmtCreate")] + [Validation(Required=false)] + public string GmtCreate { get; set; } + + [NameInMap("gmtModify")] + [Validation(Required=false)] + public string GmtModify { get; set; } + + } + + /// + /// The total number of entries. + /// + /// Example: + /// 2 + /// + [NameInMap("total")] + [Validation(Required=false)] + public int? Total { get; set; } + + /// + /// The number of entries returned per page. + /// + /// Example: + /// 10 + /// + [NameInMap("maxResults")] + [Validation(Required=false)] + public int? MaxResults { get; set; } + + /// + /// If excess return values exist, this parameter is returned. + /// + /// Example: + /// 0 + /// + [NameInMap("nextToken")] + [Validation(Required=false)] + public string NextToken { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEventSourcesRequest.cs b/sdk/generated/csharp/core/Models/ListEventSourcesRequest.cs new file mode 100644 index 00000000..7be1b967 --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEventSourcesRequest.cs @@ -0,0 +1,49 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListEventSourcesRequest : TeaModel { + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The type of the event source. + /// This parameter is required. + /// + /// Example: + /// USER_DEFINED + /// + [NameInMap("eventSourceType")] + [Validation(Required=false)] + public string EventSourceType { get; set; } + + /// + /// The number of entries returned per page. + /// + /// Example: + /// 10 + /// + [NameInMap("maxResults")] + [Validation(Required=false)] + public int? MaxResults { get; set; } + + /// + /// If excess return values exist, this parameter is returned. + /// + /// Example: + /// 0 + /// + [NameInMap("nextToken")] + [Validation(Required=false)] + public string NextToken { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEventSourcesResponse.cs b/sdk/generated/csharp/core/Models/ListEventSourcesResponse.cs new file mode 100644 index 00000000..58aa8564 --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEventSourcesResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListEventSourcesResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public ListEventSourcesResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEventSourcesResponseBody.cs b/sdk/generated/csharp/core/Models/ListEventSourcesResponseBody.cs new file mode 100644 index 00000000..332251ca --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEventSourcesResponseBody.cs @@ -0,0 +1,97 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListEventSourcesResponseBody : TeaModel { + [NameInMap("eventSources")] + [Validation(Required=false)] + public List EventSources { get; set; } + public class ListEventSourcesResponseBodyEventSources : TeaModel { + /// + /// The name of the event bus. + /// This parameter is required. + /// + /// Example: + /// demo + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// EventSource is required for querying default bus events. + /// + /// Example: + /// testEventSourceName + /// + [NameInMap("eventSourceName")] + [Validation(Required=false)] + public string EventSourceName { get; set; } + + /// + /// The description of the event type. + /// + /// Example: + /// The description of the event type. + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + [NameInMap("className")] + [Validation(Required=false)] + public string ClassName { get; set; } + + [NameInMap("config")] + [Validation(Required=false)] + public Dictionary Config { get; set; } + + [NameInMap("gmtCreate")] + [Validation(Required=false)] + public string GmtCreate { get; set; } + + [NameInMap("gmtModify")] + [Validation(Required=false)] + public string GmtModify { get; set; } + + } + + /// + /// The total number of entries. + /// + /// Example: + /// 2 + /// + [NameInMap("total")] + [Validation(Required=false)] + public int? Total { get; set; } + + /// + /// The number of entries returned per page. + /// + /// Example: + /// 10 + /// + [NameInMap("maxResults")] + [Validation(Required=false)] + public int? MaxResults { get; set; } + + /// + /// If excess return values exist, this parameter is returned. + /// + /// Example: + /// 0 + /// + [NameInMap("nextToken")] + [Validation(Required=false)] + public string NextToken { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEventTargetsRequest.cs b/sdk/generated/csharp/core/Models/ListEventTargetsRequest.cs new file mode 100644 index 00000000..aa204bb0 --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEventTargetsRequest.cs @@ -0,0 +1,36 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListEventTargetsRequest : TeaModel { + /// + /// The name of the event bus with which the event target is associated. + /// This parameter is required. + /// + /// Example: + /// my-event-bus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event rule. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventRuleName")] + [Validation(Required=false)] + public string EventRuleName { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEventTargetsResponse.cs b/sdk/generated/csharp/core/Models/ListEventTargetsResponse.cs new file mode 100644 index 00000000..1c91d059 --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEventTargetsResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListEventTargetsResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public ListEventTargetsResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEventTargetsResponseBody.cs b/sdk/generated/csharp/core/Models/ListEventTargetsResponseBody.cs new file mode 100644 index 00000000..095a67bf --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEventTargetsResponseBody.cs @@ -0,0 +1,96 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListEventTargetsResponseBody : TeaModel { + /// + /// The name of the event bus with which the event target is associated. + /// This parameter is required. + /// + /// Example: + /// my-event-bus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event rule. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventRuleName")] + [Validation(Required=false)] + public string EventRuleName { get; set; } + + [NameInMap("eventTargets")] + [Validation(Required=false)] + public List EventTargets { get; set; } + public class ListEventTargetsResponseBodyEventTargets : TeaModel { + [NameInMap("eventTargetName")] + [Validation(Required=false)] + public string EventTargetName { get; set; } + + [NameInMap("className")] + [Validation(Required=false)] + public string ClassName { get; set; } + + [NameInMap("config")] + [Validation(Required=false)] + public Dictionary Config { get; set; } + + [NameInMap("runOptions")] + [Validation(Required=false)] + public ListEventTargetsResponseBodyEventTargetsRunOptions RunOptions { get; set; } + public class ListEventTargetsResponseBodyEventTargetsRunOptions : TeaModel { + [NameInMap("errorsTolerance")] + [Validation(Required=false)] + public string ErrorsTolerance { get; set; } + + [NameInMap("retryStrategy")] + [Validation(Required=false)] + public ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy RetryStrategy { get; set; } + public class ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy : TeaModel { + [NameInMap("pushRetryStrategy")] + [Validation(Required=false)] + public string PushRetryStrategy { get; set; } + + [NameInMap("maximumEventAgeInSeconds")] + [Validation(Required=false)] + public int? MaximumEventAgeInSeconds { get; set; } + + [NameInMap("maximumRetryAttempts")] + [Validation(Required=false)] + public int? MaximumRetryAttempts { get; set; } + + } + + [NameInMap("deadLetterQueue")] + [Validation(Required=false)] + public ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue DeadLetterQueue { get; set; } + public class ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue : TeaModel { + [NameInMap("type")] + [Validation(Required=false)] + public string Type { get; set; } + + [NameInMap("config")] + [Validation(Required=false)] + public Dictionary Config { get; set; } + + } + + } + + } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEventTypesRequest.cs b/sdk/generated/csharp/core/Models/ListEventTypesRequest.cs new file mode 100644 index 00000000..f5c4acbd --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEventTypesRequest.cs @@ -0,0 +1,60 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + /// Description: + /// + /// EventType Controller apis: + /// listEventTypes * + /// + public class ListEventTypesRequest : TeaModel { + /// + /// The name of the event bus. + /// This parameter is required. + /// + /// Example: + /// demo + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// EventSource is required for querying default bus events. + /// + /// Example: + /// testEventSourceName + /// + [NameInMap("eventSourceName")] + [Validation(Required=false)] + public string EventSourceName { get; set; } + + /// + /// The number of entries returned per page. + /// + /// Example: + /// 10 + /// + [NameInMap("maxResults")] + [Validation(Required=false)] + public int? MaxResults { get; set; } + + /// + /// If excess return values exist, this parameter is returned. + /// + /// Example: + /// 0 + /// + [NameInMap("nextToken")] + [Validation(Required=false)] + public string NextToken { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEventTypesResponse.cs b/sdk/generated/csharp/core/Models/ListEventTypesResponse.cs new file mode 100644 index 00000000..dee6d5ba --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEventTypesResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListEventTypesResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public ListEventTypesResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/ListEventTypesResponseBody.cs b/sdk/generated/csharp/core/Models/ListEventTypesResponseBody.cs new file mode 100644 index 00000000..fb65f73b --- /dev/null +++ b/sdk/generated/csharp/core/Models/ListEventTypesResponseBody.cs @@ -0,0 +1,126 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class ListEventTypesResponseBody : TeaModel { + [NameInMap("eventTypes")] + [Validation(Required=false)] + public List EventTypes { get; set; } + public class ListEventTypesResponseBodyEventTypes : TeaModel { + /// + /// The name of the event bus. + /// This parameter is required. + /// + /// Example: + /// demo + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// EventSource is required for querying default bus events. + /// + /// Example: + /// testEventSourceName + /// + [NameInMap("eventSourceName")] + [Validation(Required=false)] + public string EventSourceName { get; set; } + + /// + /// The name of the event type. + /// + [NameInMap("eventTypeName")] + [Validation(Required=false)] + public string EventTypeName { get; set; } + + /// + /// The description of the event type. + /// + /// Example: + /// The description of the event type. + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + [NameInMap("gmtCreate")] + [Validation(Required=false)] + public string GmtCreate { get; set; } + + [NameInMap("gmtModify")] + [Validation(Required=false)] + public string GmtModify { get; set; } + + } + + /// + /// If excess return values exist, this parameter is returned. + /// + /// Example: + /// 10 + /// + [NameInMap("nextToken")] + [Validation(Required=false)] + public string NextToken { get; set; } + + /// + /// The total number of entries. + /// + /// Example: + /// 2 + /// + [NameInMap("total")] + [Validation(Required=false)] + public int? Total { get; set; } + + /// + /// If you set Limit and excess return values exist, this parameter is returned. + /// + /// Example: + /// 10 + /// + [NameInMap("maxResults")] + [Validation(Required=false)] + public int? MaxResults { get; set; } + + /// + /// The status code returned. The status code 200 indicates that the request was successful. + /// + /// Example: + /// 200 + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The error message that is returned if the request failed. + /// + /// Example: + /// EventBusNotExist + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 580A938B-6107-586C-8EC7-F22EEBEDA9E6 + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/PutEventsRequest.cs b/sdk/generated/csharp/core/Models/PutEventsRequest.cs new file mode 100644 index 00000000..590311a1 --- /dev/null +++ b/sdk/generated/csharp/core/Models/PutEventsRequest.cs @@ -0,0 +1,40 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + /// Description: + /// + /// EventData Controller apis: + /// putEvents + /// + public class PutEventsRequest : TeaModel { + /// + /// The name of the event bus. + /// This parameter is required. + /// + /// Example: + /// demo + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The content of the event. + /// + /// Example: + /// The description of the event. + /// + [NameInMap("event")] + [Validation(Required=false)] + public string Event { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/PutEventsResponse.cs b/sdk/generated/csharp/core/Models/PutEventsResponse.cs new file mode 100644 index 00000000..bd88cd6a --- /dev/null +++ b/sdk/generated/csharp/core/Models/PutEventsResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class PutEventsResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public PutEventsResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/PutEventsResponseBody.cs b/sdk/generated/csharp/core/Models/PutEventsResponseBody.cs new file mode 100644 index 00000000..545e60ab --- /dev/null +++ b/sdk/generated/csharp/core/Models/PutEventsResponseBody.cs @@ -0,0 +1,78 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class PutEventsResponseBody : TeaModel { + [NameInMap("failedEntryCount")] + [Validation(Required=false)] + public int? FailedEntryCount { get; set; } + + [NameInMap("entryList")] + [Validation(Required=false)] + public List EntryList { get; set; } + public class PutEventsResponseBodyEntryList : TeaModel { + /// + /// The event ID. + /// + /// Example: + /// a5747e4f-2af2-40b6-b262-d0140e995bf7 + /// + [NameInMap("eventId")] + [Validation(Required=false)] + public string EventId { get; set; } + + /// + /// The returned error code. + /// + [NameInMap("errorCode")] + [Validation(Required=false)] + public string ErrorCode { get; set; } + + /// + /// The returned error message. + /// + [NameInMap("errorMessage")] + [Validation(Required=false)] + public string ErrorMessage { get; set; } + + } + + /// + /// The status code returned. The status code 200 indicates that the request was successful. + /// + /// Example: + /// 200 + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The error message that is returned if the request failed. + /// + /// Example: + /// EventBusNotExist + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 580A938B-6107-586C-8EC7-F22EEBEDA9E6 + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/UpdateApiDestinationRequest.cs b/sdk/generated/csharp/core/Models/UpdateApiDestinationRequest.cs new file mode 100644 index 00000000..15bf5e1b --- /dev/null +++ b/sdk/generated/csharp/core/Models/UpdateApiDestinationRequest.cs @@ -0,0 +1,124 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class UpdateApiDestinationRequest : TeaModel { + /// + /// The name of the API destination. The name must be 2 to 127 characters in length. This parameter is required. + /// + /// Example: + /// api-destination-name + /// + [NameInMap("apiDestinationName")] + [Validation(Required=false)] + public string ApiDestinationName { get; set; } + + /// + /// The name of the connection. The name must be 2 to 127 characters in length. Before you configure this parameter, you must call the CreateConnection operation to create a connection. Then, set this parameter to the name of the connection that you created. This parameter is required. + /// + /// Example: + /// connection-name + /// + [NameInMap("connectionName")] + [Validation(Required=false)] + public string ConnectionName { get; set; } + + /// + /// The description of the API destination. The description can be up to 255 characters in length. + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + /// + /// The parameters that are configured for the API destination. This parameter is required. + /// + [NameInMap("httpApiParameters")] + [Validation(Required=false)] + public UpdateApiDestinationRequestHttpApiParameters HttpApiParameters { get; set; } + public class UpdateApiDestinationRequestHttpApiParameters : TeaModel { + /// + /// The endpoint of the API destination. The endpoint can be up to 127 characters in length. This parameter is required. + /// + /// Example: + /// http://127.0.0.1:8001/api + /// + [NameInMap("endpoint")] + [Validation(Required=false)] + public string Endpoint { get; set; } + + /// + /// The HTTP request method. Valid values: + ///
  *   GET 
+            /// 
+            ///   *   POST 
+            /// 
+            ///   *   HEAD 
+            /// 
+            ///   *   DELETE 
+            /// 
+            ///   *   PUT 
+            /// 
+            ///   *   PATCH 
+            /// 
+            /// 
+            ///   This parameter is required.
+            /// 
+ /// + /// Example: + /// POST + ///
+ [NameInMap("method")] + [Validation(Required=false)] + public string Method { get; set; } + + /// + /// TODO + /// + [NameInMap("apiParameters")] + [Validation(Required=false)] + public List ApiParameters { get; set; } + public class UpdateApiDestinationRequestHttpApiParametersApiParameters : TeaModel { + [NameInMap("name")] + [Validation(Required=false)] + public string Name { get; set; } + + /// + /// The description of the API destination. The description can be up to 255 characters in length. + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + [NameInMap("type")] + [Validation(Required=false)] + public string Type { get; set; } + + [NameInMap("defaultValue")] + [Validation(Required=false)] + public string DefaultValue { get; set; } + + [NameInMap("in")] + [Validation(Required=false)] + public string In { get; set; } + + } + + } + + /// + /// TODO + /// + [NameInMap("invocationRateLimitPerSecond")] + [Validation(Required=false)] + public int? InvocationRateLimitPerSecond { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/UpdateApiDestinationResponse.cs b/sdk/generated/csharp/core/Models/UpdateApiDestinationResponse.cs new file mode 100644 index 00000000..2ea3908c --- /dev/null +++ b/sdk/generated/csharp/core/Models/UpdateApiDestinationResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class UpdateApiDestinationResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public UpdateApiDestinationResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/UpdateApiDestinationResponseBody.cs b/sdk/generated/csharp/core/Models/UpdateApiDestinationResponseBody.cs new file mode 100644 index 00000000..a249c470 --- /dev/null +++ b/sdk/generated/csharp/core/Models/UpdateApiDestinationResponseBody.cs @@ -0,0 +1,44 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class UpdateApiDestinationResponseBody : TeaModel { + /// + /// The returned response code. The value Success indicates that the request is successful. + /// + /// Example: + /// Success + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The returned message. + /// + /// Example: + /// success + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 5DAF96FB-A4B6-548C-B999-0BFDCB2261B9 + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/UpdateConnectionRequest.cs b/sdk/generated/csharp/core/Models/UpdateConnectionRequest.cs new file mode 100644 index 00000000..f3de273d --- /dev/null +++ b/sdk/generated/csharp/core/Models/UpdateConnectionRequest.cs @@ -0,0 +1,376 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class UpdateConnectionRequest : TeaModel { + /// + /// The parameters that are configured for authentication. + /// + [NameInMap("authParameters")] + [Validation(Required=false)] + public UpdateConnectionRequestAuthParameters AuthParameters { get; set; } + public class UpdateConnectionRequestAuthParameters : TeaModel { + /// + /// The parameters that are configured for API key authentication. + /// + [NameInMap("apiKeyAuthParameters")] + [Validation(Required=false)] + public UpdateConnectionRequestAuthParametersApiKeyAuthParameters ApiKeyAuthParameters { get; set; } + public class UpdateConnectionRequestAuthParametersApiKeyAuthParameters : TeaModel { + /// + /// The key of the API key. + /// + /// Example: + /// Token + /// + [NameInMap("apiKeyName")] + [Validation(Required=false)] + public string ApiKeyName { get; set; } + + /// + /// The value of the API key. + /// + /// Example: + /// adkjnakddh**** + /// + [NameInMap("apiKeyValue")] + [Validation(Required=false)] + public string ApiKeyValue { get; set; } + + } + + /// + /// The authentication type. Valid values: + ///
  BASIC_AUTH: basic authentication.
+            /// 
+            ///   Introduction: Basic authentication is a simple authentication scheme built into the HTTP protocol. When you use the HTTP protocol for communications, the authentication method that the HTTP server uses to authenticate user identities on the client is defined in the protocol. The request header is in the Authorization: Basic Base64-encoded string (Username:Password) format.
+            /// 
+            ///   1.  Username and Password are required
+            /// 
+            ///   API_KEY_AUTH: API key authentication.
+            /// 
+            ///   Introduction: The request header is in the Token: Token value format.
+            /// 
+            ///   *   ApiKeyName and ApiKeyValue are required.
+            /// 
+            ///   OAUTH_AUTH: OAuth authentication.
+            /// 
+            ///   Introduction: OAuth2.0 is an authentication mechanism. In normal cases, a system that does not use OAuth2.0 can access the resources of the server from the client. To ensure access security, access tokens are used to authenticate users in OAuth 2.0. The client must use an access token to access protected resources. This way, OAuth 2.0 protects resources from being accessed from malicious clients and improves system security.
+            /// 
+            ///   *   AuthorizationEndpoint, OAuthHttpParameters, and HttpMethod are required.
+            /// 
+ /// + /// Example: + /// BASIC_AUTH + ///
+ [NameInMap("authorizationType")] + [Validation(Required=false)] + public string AuthorizationType { get; set; } + + /// + /// The parameters that are configured for basic authentication. + /// + [NameInMap("basicAuthParameters")] + [Validation(Required=false)] + public UpdateConnectionRequestAuthParametersBasicAuthParameters BasicAuthParameters { get; set; } + public class UpdateConnectionRequestAuthParametersBasicAuthParameters : TeaModel { + /// + /// The password for basic authentication. + /// + /// Example: + ///
+ ///
+ [NameInMap("password")] + [Validation(Required=false)] + public string Password { get; set; } + + /// + /// The username for basic authentication. + /// + /// Example: + /// admin + /// + [NameInMap("username")] + [Validation(Required=false)] + public string Username { get; set; } + + } + + /// + /// The parameters that are configured for OAuth authentication. + /// + [NameInMap("oauthParameters")] + [Validation(Required=false)] + public UpdateConnectionRequestAuthParametersOauthParameters OauthParameters { get; set; } + public class UpdateConnectionRequestAuthParametersOauthParameters : TeaModel { + /// + /// The endpoint that is used to obtain the OAuth token. + /// + /// Example: + /// http://localhost:8080/oauth/token + /// + [NameInMap("authorizationEndpoint")] + [Validation(Required=false)] + public string AuthorizationEndpoint { get; set; } + + /// + /// The parameters that are configured for the client. + /// + [NameInMap("clientParameters")] + [Validation(Required=false)] + public UpdateConnectionRequestAuthParametersOauthParametersClientParameters ClientParameters { get; set; } + public class UpdateConnectionRequestAuthParametersOauthParametersClientParameters : TeaModel { + /// + /// The client ID. + /// + /// Example: + /// ClientID + /// + [NameInMap("clientID")] + [Validation(Required=false)] + public string ClientID { get; set; } + + /// + /// The client key secret of the application. + /// + /// Example: + /// ClientSecret + /// + [NameInMap("clientSecret")] + [Validation(Required=false)] + public string ClientSecret { get; set; } + + } + + /// + /// The HTTP request method. Valid values: + ///
    - GET
+                /// 
+                ///     - POST
+                /// 
+                ///     - HEAD
+                /// 
+ /// + /// Example: + /// POST + ///
+ [NameInMap("httpMethod")] + [Validation(Required=false)] + public string HttpMethod { get; set; } + + /// + /// The request parameters for OAuth authentication. + /// + [NameInMap("oauthHttpParameters")] + [Validation(Required=false)] + public UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters OauthHttpParameters { get; set; } + public class UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters : TeaModel { + /// + /// The parameters that are configured for the request. + /// + [NameInMap("bodyParameters")] + [Validation(Required=false)] + public List BodyParameters { get; set; } + public class UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters : TeaModel { + /// + /// Indicates whether authentication is enabled. + /// + /// Example: + /// false + /// + [NameInMap("isValueSecret")] + [Validation(Required=false)] + public string IsValueSecret { get; set; } + + /// + /// The key in the request body. + /// + /// Example: + /// name + /// + [NameInMap("key")] + [Validation(Required=false)] + public string Key { get; set; } + + /// + /// The value of the key in the request body. + /// + /// Example: + /// demo + /// + [NameInMap("value")] + [Validation(Required=false)] + public string Value { get; set; } + + } + + /// + /// The parameters that are configured for the request header. + /// + [NameInMap("headerParameters")] + [Validation(Required=false)] + public List HeaderParameters { get; set; } + public class UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters : TeaModel { + /// + /// Indicates whether authentication is enabled. + /// + /// Example: + /// false + /// + [NameInMap("isValueSecret")] + [Validation(Required=false)] + public string IsValueSecret { get; set; } + + /// + /// The key in the request header. + /// + /// Example: + /// name + /// + [NameInMap("key")] + [Validation(Required=false)] + public string Key { get; set; } + + /// + /// The value of the key in the request header. + /// + /// Example: + /// demo + /// + [NameInMap("value")] + [Validation(Required=false)] + public string Value { get; set; } + + } + + /// + /// The parameters that are configured for the request path. + /// + [NameInMap("queryStringParameters")] + [Validation(Required=false)] + public List QueryStringParameters { get; set; } + public class UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters : TeaModel { + /// + /// Indicates whether authentication is enabled. + /// + /// Example: + /// false + /// + [NameInMap("isValueSecret")] + [Validation(Required=false)] + public string IsValueSecret { get; set; } + + /// + /// The key in the request path. + /// + /// Example: + /// name + /// + [NameInMap("key")] + [Validation(Required=false)] + public string Key { get; set; } + + /// + /// The value of the key in the request path. + /// + /// Example: + /// demo + /// + [NameInMap("value")] + [Validation(Required=false)] + public string Value { get; set; } + + } + + } + + } + + } + + /// + /// The name of the connection. The name must be 2 to 127 characters in length. + ///
This parameter is required.
+        /// 
+ /// + /// Example: + /// connection-name + ///
+ [NameInMap("connectionName")] + [Validation(Required=false)] + public string ConnectionName { get; set; } + + /// + /// The description of the connection. The description can be up to 255 characters in length. + /// + /// Example: + /// demo + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + /// + /// The parameters that are configured for the network. This parameter is required. + /// + [NameInMap("networkParameters")] + [Validation(Required=false)] + public UpdateConnectionRequestNetworkParameters NetworkParameters { get; set; } + public class UpdateConnectionRequestNetworkParameters : TeaModel { + /// + /// The network type. Valid values: + ///
  PublicNetwork and PrivateNetwork.
+            /// 
+            ///   *   Note: If you set this parameter to PrivateNetwork, you must configure VpcId, VswitcheId, and SecurityGroupId.
+            /// 
+            ///   This parameter is required.
+            /// 
+ /// + /// Example: + /// PublicNetwork + ///
+ [NameInMap("networkType")] + [Validation(Required=false)] + public string NetworkType { get; set; } + + /// + /// The ID of the security group. + /// + /// Example: + /// eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9**** + /// + [NameInMap("securityGroupId")] + [Validation(Required=false)] + public string SecurityGroupId { get; set; } + + /// + /// The VPC. ID + /// + /// Example: + /// eb-test/vpc-bp1symadadwnwg**** + /// + [NameInMap("vpcId")] + [Validation(Required=false)] + public string VpcId { get; set; } + + /// + /// The vSwitch ID. + /// + /// Example: + /// vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeq**** + /// + [NameInMap("vswitcheId")] + [Validation(Required=false)] + public string VswitcheId { get; set; } + + } + + } + +} diff --git a/sdk/generated/csharp/core/Models/UpdateConnectionResponse.cs b/sdk/generated/csharp/core/Models/UpdateConnectionResponse.cs new file mode 100644 index 00000000..91170a29 --- /dev/null +++ b/sdk/generated/csharp/core/Models/UpdateConnectionResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class UpdateConnectionResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public UpdateConnectionResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/UpdateConnectionResponseBody.cs b/sdk/generated/csharp/core/Models/UpdateConnectionResponseBody.cs new file mode 100644 index 00000000..93aa4cd7 --- /dev/null +++ b/sdk/generated/csharp/core/Models/UpdateConnectionResponseBody.cs @@ -0,0 +1,44 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class UpdateConnectionResponseBody : TeaModel { + /// + /// The returned response code. + /// + /// Example: + /// Success + /// + [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The returned message. + /// + /// Example: + /// success + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 8346BE8F-40F3-533D-A0B8-1359C31BD5BA + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/UpdateEventRuleRequest.cs b/sdk/generated/csharp/core/Models/UpdateEventRuleRequest.cs new file mode 100644 index 00000000..0669fe88 --- /dev/null +++ b/sdk/generated/csharp/core/Models/UpdateEventRuleRequest.cs @@ -0,0 +1,53 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class UpdateEventRuleRequest : TeaModel { + /// + /// The name of the event bus with which the event source is associated. + /// This parameter is required. + /// + /// Example: + /// my-event-bus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event rule. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventRuleName")] + [Validation(Required=false)] + public string EventRuleName { get; set; } + + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + /// + /// The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + ///
You can specify up to five expressions in the map data structure in each field.
+        /// 
+ /// This parameter is required. + /// + /// Example: + /// {"source": [{"prefix": "acs."}],"type": [{"prefix":"oss:ObjectReplication"}],"subject":[{"prefix":"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/", "suffix":".txt"}]} + ///
+ [NameInMap("filterPattern")] + [Validation(Required=false)] + public string FilterPattern { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/UpdateEventRuleResponse.cs b/sdk/generated/csharp/core/Models/UpdateEventRuleResponse.cs new file mode 100644 index 00000000..04b98067 --- /dev/null +++ b/sdk/generated/csharp/core/Models/UpdateEventRuleResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class UpdateEventRuleResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public UpdateEventRuleResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/UpdateEventRuleResponseBody.cs b/sdk/generated/csharp/core/Models/UpdateEventRuleResponseBody.cs new file mode 100644 index 00000000..cd7d894c --- /dev/null +++ b/sdk/generated/csharp/core/Models/UpdateEventRuleResponseBody.cs @@ -0,0 +1,48 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class UpdateEventRuleResponseBody : TeaModel { + /// + /// The returned response code. Valid values: + ///
*   Success: The request is successful.
+        /// 
+        /// *   Other codes: The request failed. For more information about error codes, see Error codes.
+        /// 
+ /// + /// Example: + /// Success + ///
+ [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The returned error message. + /// + /// Example: + /// Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 2922208e-e1c6-43ee-bfd1-aca50263bc8a + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/UpdateEventSourceRequest.cs b/sdk/generated/csharp/core/Models/UpdateEventSourceRequest.cs new file mode 100644 index 00000000..10e1098b --- /dev/null +++ b/sdk/generated/csharp/core/Models/UpdateEventSourceRequest.cs @@ -0,0 +1,55 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class UpdateEventSourceRequest : TeaModel { + /// + /// The name of the event bus with which the event source is associated. + /// This parameter is required. + /// + /// Example: + /// my-event-bus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event source. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventSourceName")] + [Validation(Required=false)] + public string EventSourceName { get; set; } + + /// + /// The description of the event source. + /// + [NameInMap("description")] + [Validation(Required=false)] + public string Description { get; set; } + + [NameInMap("className")] + [Validation(Required=false)] + public string ClassName { get; set; } + + [NameInMap("status")] + [Validation(Required=false)] + public int? Status { get; set; } + + [NameInMap("config")] + [Validation(Required=false)] + public Dictionary Config { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/UpdateEventSourceResponse.cs b/sdk/generated/csharp/core/Models/UpdateEventSourceResponse.cs new file mode 100644 index 00000000..2882bc1b --- /dev/null +++ b/sdk/generated/csharp/core/Models/UpdateEventSourceResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class UpdateEventSourceResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public UpdateEventSourceResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/UpdateEventSourceResponseBody.cs b/sdk/generated/csharp/core/Models/UpdateEventSourceResponseBody.cs new file mode 100644 index 00000000..ea2d3eae --- /dev/null +++ b/sdk/generated/csharp/core/Models/UpdateEventSourceResponseBody.cs @@ -0,0 +1,48 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class UpdateEventSourceResponseBody : TeaModel { + /// + /// The returned response code. Valid values: + ///
*   Success: The request is successful.
+        /// 
+        /// *   Other codes: The request failed. For more information about error codes, see Error codes.
+        /// 
+ /// + /// Example: + /// Success + ///
+ [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The returned error message. + /// + /// Example: + /// Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 2922208e-e1c6-43ee-bfd1-aca50263bc8a + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/UpdateEventTargetsRequest.cs b/sdk/generated/csharp/core/Models/UpdateEventTargetsRequest.cs new file mode 100644 index 00000000..ede90b95 --- /dev/null +++ b/sdk/generated/csharp/core/Models/UpdateEventTargetsRequest.cs @@ -0,0 +1,40 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class UpdateEventTargetsRequest : TeaModel { + /// + /// The name of the event bus with which the event target is associated. + /// This parameter is required. + /// + /// Example: + /// my-event-bus + /// + [NameInMap("eventBusName")] + [Validation(Required=false)] + public string EventBusName { get; set; } + + /// + /// The name of the event rule. + /// This parameter is required. + /// + /// Example: + /// myrabbitmq.sourc + /// + [NameInMap("eventRuleName")] + [Validation(Required=false)] + public string EventRuleName { get; set; } + + [NameInMap("eventTargets")] + [Validation(Required=false)] + public List EventTargets { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/UpdateEventTargetsResponse.cs b/sdk/generated/csharp/core/Models/UpdateEventTargetsResponse.cs new file mode 100644 index 00000000..9901f618 --- /dev/null +++ b/sdk/generated/csharp/core/Models/UpdateEventTargetsResponse.cs @@ -0,0 +1,26 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class UpdateEventTargetsResponse : TeaModel { + [NameInMap("headers")] + [Validation(Required=false)] + public Dictionary Headers { get; set; } + + [NameInMap("statusCode")] + [Validation(Required=false)] + public int? StatusCode { get; set; } + + [NameInMap("body")] + [Validation(Required=false)] + public UpdateEventTargetsResponseBody Body { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Models/UpdateEventTargetsResponseBody.cs b/sdk/generated/csharp/core/Models/UpdateEventTargetsResponseBody.cs new file mode 100644 index 00000000..e638149c --- /dev/null +++ b/sdk/generated/csharp/core/Models/UpdateEventTargetsResponseBody.cs @@ -0,0 +1,48 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections.Generic; +using System.IO; + +using Tea; + +namespace RocketMQ.Eventbridge.SDK.Models +{ + public class UpdateEventTargetsResponseBody : TeaModel { + /// + /// The returned response code. Valid values: + ///
*   Success: The request is successful.
+        /// 
+        /// *   Other codes: The request failed. For more information about error codes, see Error codes.
+        /// 
+ /// + /// Example: + /// Success + ///
+ [NameInMap("code")] + [Validation(Required=false)] + public string Code { get; set; } + + /// + /// The returned error message. + /// + /// Example: + /// Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + /// + [NameInMap("message")] + [Validation(Required=false)] + public string Message { get; set; } + + /// + /// The request ID. + /// + /// Example: + /// 2922208e-e1c6-43ee-bfd1-aca50263bc8a + /// + [NameInMap("requestId")] + [Validation(Required=false)] + public string RequestId { get; set; } + + } + +} diff --git a/sdk/generated/csharp/core/Properties/AssemblyInfo.cs b/sdk/generated/csharp/core/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..26e8d3b1 --- /dev/null +++ b/sdk/generated/csharp/core/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("eventbridge-sdk")] +[assembly: AssemblyDescription("open source eventbridge (20240701) SDK Library for .NET")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ed09f970-8a2d-11ef-b88e-9bb2217aedfc")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/sdk/generated/csharp/core/SDKClient.cs b/sdk/generated/csharp/core/SDKClient.cs new file mode 100644 index 00000000..e99911af --- /dev/null +++ b/sdk/generated/csharp/core/SDKClient.cs @@ -0,0 +1,5254 @@ +// This file is auto-generated, don't edit it. Thanks. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; + +using Tea; +using Tea.Utils; + +using RocketMQ.Eventbridge.SDK.Models; + +namespace RocketMQ.Eventbridge.SDK +{ + public class SDKClient : AlibabaCloud.OpenApiClient.Client + { + + public SDKClient(AlibabaCloud.OpenApiClient.Models.Config config): base(config) + { + this._endpointRule = ""; + CheckConfig(config); + this._endpoint = GetEndpoint("eventbridge", _regionId, _endpointRule, _network, _suffix, _endpointMap, _endpoint); + } + + + public string GetEndpoint(string productId, string regionId, string endpointRule, string network, string suffix, Dictionary endpointMap, string endpoint) + { + if (!AlibabaCloud.TeaUtil.Common.Empty(endpoint)) + { + return endpoint; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(endpointMap) && !AlibabaCloud.TeaUtil.Common.Empty(endpointMap.Get(regionId))) + { + return endpointMap.Get(regionId); + } + string result = ""; + if (!AlibabaCloud.TeaUtil.Common.Empty(network) && !AlibabaCloud.TeaUtil.Common.EqualString(network, "public")) + { + network = "-" + network; + } + else + { + network = ""; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(suffix)) + { + suffix = ""; + } + else + { + suffix = "-" + suffix; + } + if (AlibabaCloud.TeaUtil.Common.EqualString(endpointRule, "regional")) + { + if (AlibabaCloud.TeaUtil.Common.Empty(regionId)) + { + throw new TeaException(new Dictionary + { + {"message", "RegionId is empty, please set a valid RegionId"}, + }); + } + result = "" + productId + suffix + network + "." + regionId + ".aliyuncs.com"; + } + else + { + result = "" + productId + suffix + network + ".aliyuncs.com"; + } + return result; + // return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix); + } + + /// Summary: + /// + /// Creates an event bus. + /// + /// + /// Description: + /// + /// You can call this API operation to create an event bus. + /// + /// + /// + /// CreateEventBusRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// CreateEventBusResponse + /// + public CreateEventBusResponse CreateEventBusWithOptions(CreateEventBusRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "CreateEventBus", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/bus/createEventBus", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Creates an event bus. + /// + /// + /// Description: + /// + /// You can call this API operation to create an event bus. + /// + /// + /// + /// CreateEventBusRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// CreateEventBusResponse + /// + public async Task CreateEventBusWithOptionsAsync(CreateEventBusRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "CreateEventBus", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/bus/createEventBus", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Creates an event bus. + /// + /// + /// Description: + /// + /// You can call this API operation to create an event bus. + /// + /// + /// + /// CreateEventBusRequest + /// + /// + /// + /// CreateEventBusResponse + /// + public CreateEventBusResponse CreateEventBus(CreateEventBusRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return CreateEventBusWithOptions(request, runtime); + } + + /// Summary: + /// + /// Creates an event bus. + /// + /// + /// Description: + /// + /// You can call this API operation to create an event bus. + /// + /// + /// + /// CreateEventBusRequest + /// + /// + /// + /// CreateEventBusResponse + /// + public async Task CreateEventBusAsync(CreateEventBusRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await CreateEventBusWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Queries the detailed information about an event bus. + /// + /// + /// Description: + /// + /// You can call this API operation to query the detailed information about an event bus. + /// + /// + /// + /// GetEventBusRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// GetEventBusResponse + /// + public GetEventBusResponse GetEventBusWithOptions(GetEventBusRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "GetEventBus", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/bus/getEventBus", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries the detailed information about an event bus. + /// + /// + /// Description: + /// + /// You can call this API operation to query the detailed information about an event bus. + /// + /// + /// + /// GetEventBusRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// GetEventBusResponse + /// + public async Task GetEventBusWithOptionsAsync(GetEventBusRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "GetEventBus", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/bus/getEventBus", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries the detailed information about an event bus. + /// + /// + /// Description: + /// + /// You can call this API operation to query the detailed information about an event bus. + /// + /// + /// + /// GetEventBusRequest + /// + /// + /// + /// GetEventBusResponse + /// + public GetEventBusResponse GetEventBus(GetEventBusRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return GetEventBusWithOptions(request, runtime); + } + + /// Summary: + /// + /// Queries the detailed information about an event bus. + /// + /// + /// Description: + /// + /// You can call this API operation to query the detailed information about an event bus. + /// + /// + /// + /// GetEventBusRequest + /// + /// + /// + /// GetEventBusResponse + /// + public async Task GetEventBusAsync(GetEventBusRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await GetEventBusWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Queries all event buses. + /// + /// + /// Description: + /// + /// You can call this API operation to query all event buses. + /// + /// + /// + /// ListEventBusesRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// ListEventBusesResponse + /// + public ListEventBusesResponse ListEventBusesWithOptions(ListEventBusesRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults)) + { + body["maxResults"] = request.MaxResults; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken)) + { + body["nextToken"] = request.NextToken; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "ListEventBuses", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/bus/listEventBuses", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries all event buses. + /// + /// + /// Description: + /// + /// You can call this API operation to query all event buses. + /// + /// + /// + /// ListEventBusesRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// ListEventBusesResponse + /// + public async Task ListEventBusesWithOptionsAsync(ListEventBusesRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults)) + { + body["maxResults"] = request.MaxResults; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken)) + { + body["nextToken"] = request.NextToken; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "ListEventBuses", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/bus/listEventBuses", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries all event buses. + /// + /// + /// Description: + /// + /// You can call this API operation to query all event buses. + /// + /// + /// + /// ListEventBusesRequest + /// + /// + /// + /// ListEventBusesResponse + /// + public ListEventBusesResponse ListEventBuses(ListEventBusesRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return ListEventBusesWithOptions(request, runtime); + } + + /// Summary: + /// + /// Queries all event buses. + /// + /// + /// Description: + /// + /// You can call this API operation to query all event buses. + /// + /// + /// + /// ListEventBusesRequest + /// + /// + /// + /// ListEventBusesResponse + /// + public async Task ListEventBusesAsync(ListEventBusesRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await ListEventBusesWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Deletes an event bus. + /// + /// + /// Description: + /// + /// You can call this API operation to delete an event bus. + /// + /// + /// + /// DeleteEventBusRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// DeleteEventBusResponse + /// + public DeleteEventBusResponse DeleteEventBusWithOptions(DeleteEventBusRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "DeleteEventBus", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/bus/deleteEventBus", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Deletes an event bus. + /// + /// + /// Description: + /// + /// You can call this API operation to delete an event bus. + /// + /// + /// + /// DeleteEventBusRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// DeleteEventBusResponse + /// + public async Task DeleteEventBusWithOptionsAsync(DeleteEventBusRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "DeleteEventBus", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/bus/deleteEventBus", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Deletes an event bus. + /// + /// + /// Description: + /// + /// You can call this API operation to delete an event bus. + /// + /// + /// + /// DeleteEventBusRequest + /// + /// + /// + /// DeleteEventBusResponse + /// + public DeleteEventBusResponse DeleteEventBus(DeleteEventBusRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return DeleteEventBusWithOptions(request, runtime); + } + + /// Summary: + /// + /// Deletes an event bus. + /// + /// + /// Description: + /// + /// You can call this API operation to delete an event bus. + /// + /// + /// + /// DeleteEventBusRequest + /// + /// + /// + /// DeleteEventBusResponse + /// + public async Task DeleteEventBusAsync(DeleteEventBusRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await DeleteEventBusWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Creates an API destination. + /// + /// + /// Description: + /// + /// You can call this API operation to create an API destination. + /// + /// + /// + /// CreateApiDestinationRequest (tmpReq before) + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// CreateApiDestinationResponse + /// + public CreateApiDestinationResponse CreateApiDestinationWithOptions(CreateApiDestinationRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationName)) + { + body["apiDestinationName"] = request.ApiDestinationName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName)) + { + body["connectionName"] = request.ConnectionName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.HttpApiParameters)) + { + body["httpApiParameters"] = request.HttpApiParameters; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.InvocationRateLimitPerSecond)) + { + body["invocationRateLimitPerSecond"] = request.InvocationRateLimitPerSecond; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "CreateApiDestination", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/api-destination/createApiDestination", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Creates an API destination. + /// + /// + /// Description: + /// + /// You can call this API operation to create an API destination. + /// + /// + /// + /// CreateApiDestinationRequest (tmpReq before) + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// CreateApiDestinationResponse + /// + public async Task CreateApiDestinationWithOptionsAsync(CreateApiDestinationRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationName)) + { + body["apiDestinationName"] = request.ApiDestinationName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName)) + { + body["connectionName"] = request.ConnectionName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.HttpApiParameters)) + { + body["httpApiParameters"] = request.HttpApiParameters; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.InvocationRateLimitPerSecond)) + { + body["invocationRateLimitPerSecond"] = request.InvocationRateLimitPerSecond; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "CreateApiDestination", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/api-destination/createApiDestination", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Creates an API destination. + /// + /// + /// Description: + /// + /// You can call this API operation to create an API destination. + /// + /// + /// + /// CreateApiDestinationRequest + /// + /// + /// + /// CreateApiDestinationResponse + /// + public CreateApiDestinationResponse CreateApiDestination(CreateApiDestinationRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return CreateApiDestinationWithOptions(request, runtime); + } + + /// Summary: + /// + /// Creates an API destination. + /// + /// + /// Description: + /// + /// You can call this API operation to create an API destination. + /// + /// + /// + /// CreateApiDestinationRequest + /// + /// + /// + /// CreateApiDestinationResponse + /// + public async Task CreateApiDestinationAsync(CreateApiDestinationRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await CreateApiDestinationWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Updates an API destination. + /// + /// + /// Description: + /// + /// You can call this API operation to update an API destination. + /// + /// + /// + /// UpdateApiDestinationRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// UpdateApiDestinationResponse + /// + public UpdateApiDestinationResponse UpdateApiDestinationWithOptions(UpdateApiDestinationRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationName)) + { + body["apiDestinationName"] = request.ApiDestinationName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName)) + { + body["connectionName"] = request.ConnectionName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.HttpApiParameters)) + { + body["httpApiParameters"] = request.HttpApiParameters; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.InvocationRateLimitPerSecond)) + { + body["invocationRateLimitPerSecond"] = request.InvocationRateLimitPerSecond; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "UpdateApiDestination", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/api-destination/updateApiDestination", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Updates an API destination. + /// + /// + /// Description: + /// + /// You can call this API operation to update an API destination. + /// + /// + /// + /// UpdateApiDestinationRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// UpdateApiDestinationResponse + /// + public async Task UpdateApiDestinationWithOptionsAsync(UpdateApiDestinationRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationName)) + { + body["apiDestinationName"] = request.ApiDestinationName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName)) + { + body["connectionName"] = request.ConnectionName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.HttpApiParameters)) + { + body["httpApiParameters"] = request.HttpApiParameters; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.InvocationRateLimitPerSecond)) + { + body["invocationRateLimitPerSecond"] = request.InvocationRateLimitPerSecond; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "UpdateApiDestination", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/api-destination/updateApiDestination", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Updates an API destination. + /// + /// + /// Description: + /// + /// You can call this API operation to update an API destination. + /// + /// + /// + /// UpdateApiDestinationRequest + /// + /// + /// + /// UpdateApiDestinationResponse + /// + public UpdateApiDestinationResponse UpdateApiDestination(UpdateApiDestinationRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return UpdateApiDestinationWithOptions(request, runtime); + } + + /// Summary: + /// + /// Updates an API destination. + /// + /// + /// Description: + /// + /// You can call this API operation to update an API destination. + /// + /// + /// + /// UpdateApiDestinationRequest + /// + /// + /// + /// UpdateApiDestinationResponse + /// + public async Task UpdateApiDestinationAsync(UpdateApiDestinationRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await UpdateApiDestinationWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Queries the information about an API destination. + /// + /// + /// Description: + /// + /// You can call this API operation to query the information about an API destination. + /// + /// + /// + /// GetApiDestinationRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// GetApiDestinationResponse + /// + public GetApiDestinationResponse GetApiDestinationWithOptions(GetApiDestinationRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationName)) + { + body["apiDestinationName"] = request.ApiDestinationName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "GetApiDestination", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/api-destination/getApiDestination", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries the information about an API destination. + /// + /// + /// Description: + /// + /// You can call this API operation to query the information about an API destination. + /// + /// + /// + /// GetApiDestinationRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// GetApiDestinationResponse + /// + public async Task GetApiDestinationWithOptionsAsync(GetApiDestinationRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationName)) + { + body["apiDestinationName"] = request.ApiDestinationName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "GetApiDestination", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/api-destination/getApiDestination", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries the information about an API destination. + /// + /// + /// Description: + /// + /// You can call this API operation to query the information about an API destination. + /// + /// + /// + /// GetApiDestinationRequest + /// + /// + /// + /// GetApiDestinationResponse + /// + public GetApiDestinationResponse GetApiDestination(GetApiDestinationRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return GetApiDestinationWithOptions(request, runtime); + } + + /// Summary: + /// + /// Queries the information about an API destination. + /// + /// + /// Description: + /// + /// You can call this API operation to query the information about an API destination. + /// + /// + /// + /// GetApiDestinationRequest + /// + /// + /// + /// GetApiDestinationResponse + /// + public async Task GetApiDestinationAsync(GetApiDestinationRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await GetApiDestinationWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Deletes an API destination. + /// + /// + /// Description: + /// + /// You can call this API operation to delete an API destination. + /// + /// + /// + /// DeleteApiDestinationRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// DeleteApiDestinationResponse + /// + public DeleteApiDestinationResponse DeleteApiDestinationWithOptions(DeleteApiDestinationRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationName)) + { + body["apiDestinationName"] = request.ApiDestinationName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "DeleteApiDestination", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/api-destination/deleteApiDestination", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Deletes an API destination. + /// + /// + /// Description: + /// + /// You can call this API operation to delete an API destination. + /// + /// + /// + /// DeleteApiDestinationRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// DeleteApiDestinationResponse + /// + public async Task DeleteApiDestinationWithOptionsAsync(DeleteApiDestinationRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationName)) + { + body["apiDestinationName"] = request.ApiDestinationName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "DeleteApiDestination", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/api-destination/deleteApiDestination", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Deletes an API destination. + /// + /// + /// Description: + /// + /// You can call this API operation to delete an API destination. + /// + /// + /// + /// DeleteApiDestinationRequest + /// + /// + /// + /// DeleteApiDestinationResponse + /// + public DeleteApiDestinationResponse DeleteApiDestination(DeleteApiDestinationRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return DeleteApiDestinationWithOptions(request, runtime); + } + + /// Summary: + /// + /// Deletes an API destination. + /// + /// + /// Description: + /// + /// You can call this API operation to delete an API destination. + /// + /// + /// + /// DeleteApiDestinationRequest + /// + /// + /// + /// DeleteApiDestinationResponse + /// + public async Task DeleteApiDestinationAsync(DeleteApiDestinationRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await DeleteApiDestinationWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Queries a list of API destinations. + /// + /// + /// Description: + /// + /// You can use this API operation to query a list of API destinations. + /// + /// + /// + /// ListApiDestinationsRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// ListApiDestinationsResponse + /// + public ListApiDestinationsResponse ListApiDestinationsWithOptions(ListApiDestinationsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationNamePrefix)) + { + body["apiDestinationNamePrefix"] = request.ApiDestinationNamePrefix; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName)) + { + body["connectionName"] = request.ConnectionName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults)) + { + body["maxResults"] = request.MaxResults; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken)) + { + body["nextToken"] = request.NextToken; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "ListApiDestinations", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/api-destination/listApiDestinations", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries a list of API destinations. + /// + /// + /// Description: + /// + /// You can use this API operation to query a list of API destinations. + /// + /// + /// + /// ListApiDestinationsRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// ListApiDestinationsResponse + /// + public async Task ListApiDestinationsWithOptionsAsync(ListApiDestinationsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ApiDestinationNamePrefix)) + { + body["apiDestinationNamePrefix"] = request.ApiDestinationNamePrefix; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName)) + { + body["connectionName"] = request.ConnectionName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults)) + { + body["maxResults"] = request.MaxResults; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken)) + { + body["nextToken"] = request.NextToken; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "ListApiDestinations", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/api-destination/listApiDestinations", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries a list of API destinations. + /// + /// + /// Description: + /// + /// You can use this API operation to query a list of API destinations. + /// + /// + /// + /// ListApiDestinationsRequest + /// + /// + /// + /// ListApiDestinationsResponse + /// + public ListApiDestinationsResponse ListApiDestinations(ListApiDestinationsRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return ListApiDestinationsWithOptions(request, runtime); + } + + /// Summary: + /// + /// Queries a list of API destinations. + /// + /// + /// Description: + /// + /// You can use this API operation to query a list of API destinations. + /// + /// + /// + /// ListApiDestinationsRequest + /// + /// + /// + /// ListApiDestinationsResponse + /// + public async Task ListApiDestinationsAsync(ListApiDestinationsRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await ListApiDestinationsWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Creates a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to create a connection. + /// + /// + /// + /// CreateConnectionRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// CreateConnectionResponse + /// + public CreateConnectionResponse CreateConnectionWithOptions(CreateConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.AuthParameters)) + { + body["authParameters"] = request.AuthParameters; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName)) + { + body["connectionName"] = request.ConnectionName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NetworkParameters)) + { + body["networkParameters"] = request.NetworkParameters; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "CreateConnection", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/connection/createConnection", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Creates a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to create a connection. + /// + /// + /// + /// CreateConnectionRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// CreateConnectionResponse + /// + public async Task CreateConnectionWithOptionsAsync(CreateConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.AuthParameters)) + { + body["authParameters"] = request.AuthParameters; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName)) + { + body["connectionName"] = request.ConnectionName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NetworkParameters)) + { + body["networkParameters"] = request.NetworkParameters; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "CreateConnection", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/connection/createConnection", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Creates a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to create a connection. + /// + /// + /// + /// CreateConnectionRequest + /// + /// + /// + /// CreateConnectionResponse + /// + public CreateConnectionResponse CreateConnection(CreateConnectionRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return CreateConnectionWithOptions(request, runtime); + } + + /// Summary: + /// + /// Creates a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to create a connection. + /// + /// + /// + /// CreateConnectionRequest + /// + /// + /// + /// CreateConnectionResponse + /// + public async Task CreateConnectionAsync(CreateConnectionRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await CreateConnectionWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Deletes a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to delete a connection. + /// + /// + /// + /// DeleteConnectionRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// DeleteConnectionResponse + /// + public DeleteConnectionResponse DeleteConnectionWithOptions(DeleteConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName)) + { + body["connectionName"] = request.ConnectionName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "DeleteConnection", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/connection/deleteConnection", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Deletes a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to delete a connection. + /// + /// + /// + /// DeleteConnectionRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// DeleteConnectionResponse + /// + public async Task DeleteConnectionWithOptionsAsync(DeleteConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName)) + { + body["connectionName"] = request.ConnectionName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "DeleteConnection", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/connection/deleteConnection", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Deletes a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to delete a connection. + /// + /// + /// + /// DeleteConnectionRequest + /// + /// + /// + /// DeleteConnectionResponse + /// + public DeleteConnectionResponse DeleteConnection(DeleteConnectionRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return DeleteConnectionWithOptions(request, runtime); + } + + /// Summary: + /// + /// Deletes a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to delete a connection. + /// + /// + /// + /// DeleteConnectionRequest + /// + /// + /// + /// DeleteConnectionResponse + /// + public async Task DeleteConnectionAsync(DeleteConnectionRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await DeleteConnectionWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Updates a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to update a connection. + /// + /// + /// + /// UpdateConnectionRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// UpdateConnectionResponse + /// + public UpdateConnectionResponse UpdateConnectionWithOptions(UpdateConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.AuthParameters)) + { + body["authParameters"] = request.AuthParameters; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName)) + { + body["connectionName"] = request.ConnectionName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NetworkParameters)) + { + body["networkParameters"] = request.NetworkParameters; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "UpdateConnection", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/connection/updateConnection", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Updates a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to update a connection. + /// + /// + /// + /// UpdateConnectionRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// UpdateConnectionResponse + /// + public async Task UpdateConnectionWithOptionsAsync(UpdateConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.AuthParameters)) + { + body["authParameters"] = request.AuthParameters; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName)) + { + body["connectionName"] = request.ConnectionName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NetworkParameters)) + { + body["networkParameters"] = request.NetworkParameters; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "UpdateConnection", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/connection/updateConnection", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Updates a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to update a connection. + /// + /// + /// + /// UpdateConnectionRequest + /// + /// + /// + /// UpdateConnectionResponse + /// + public UpdateConnectionResponse UpdateConnection(UpdateConnectionRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return UpdateConnectionWithOptions(request, runtime); + } + + /// Summary: + /// + /// Updates a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to update a connection. + /// + /// + /// + /// UpdateConnectionRequest + /// + /// + /// + /// UpdateConnectionResponse + /// + public async Task UpdateConnectionAsync(UpdateConnectionRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await UpdateConnectionWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Queries the configurations of a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to query the configurations of a connection. + /// + /// + /// + /// GetConnectionRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// GetConnectionResponse + /// + public GetConnectionResponse GetConnectionWithOptions(GetConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName)) + { + body["connectionName"] = request.ConnectionName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "GetConnection", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/connection/getConnection", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries the configurations of a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to query the configurations of a connection. + /// + /// + /// + /// GetConnectionRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// GetConnectionResponse + /// + public async Task GetConnectionWithOptionsAsync(GetConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName)) + { + body["connectionName"] = request.ConnectionName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "GetConnection", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/connection/getConnection", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries the configurations of a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to query the configurations of a connection. + /// + /// + /// + /// GetConnectionRequest + /// + /// + /// + /// GetConnectionResponse + /// + public GetConnectionResponse GetConnection(GetConnectionRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return GetConnectionWithOptions(request, runtime); + } + + /// Summary: + /// + /// Queries the configurations of a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to query the configurations of a connection. + /// + /// + /// + /// GetConnectionRequest + /// + /// + /// + /// GetConnectionResponse + /// + public async Task GetConnectionAsync(GetConnectionRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await GetConnectionWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Queries the configurations of a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to query the configurations of a connection. + /// + /// + /// + /// GetConnectionRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// GetConnectionResponse + /// + public GetConnectionResponse SelectOneConnectionWithOptions(GetConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName)) + { + body["connectionName"] = request.ConnectionName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "selectOneConnection", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/connection/selectOneConnection", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries the configurations of a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to query the configurations of a connection. + /// + /// + /// + /// GetConnectionRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// GetConnectionResponse + /// + public async Task SelectOneConnectionWithOptionsAsync(GetConnectionRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionName)) + { + body["connectionName"] = request.ConnectionName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "selectOneConnection", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/connection/selectOneConnection", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries the configurations of a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to query the configurations of a connection. + /// + /// + /// + /// GetConnectionRequest + /// + /// + /// + /// GetConnectionResponse + /// + public GetConnectionResponse SelectOneConnection(GetConnectionRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return SelectOneConnectionWithOptions(request, runtime); + } + + /// Summary: + /// + /// Queries the configurations of a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to query the configurations of a connection. + /// + /// + /// + /// GetConnectionRequest + /// + /// + /// + /// GetConnectionResponse + /// + public async Task SelectOneConnectionAsync(GetConnectionRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await SelectOneConnectionWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Queries connections. + /// + /// + /// Description: + /// + /// You can call this API operation to query connections. + /// + /// + /// + /// ListConnectionsRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// ListConnectionsResponse + /// + public ListConnectionsResponse ListConnectionsWithOptions(ListConnectionsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionNamePrefix)) + { + body["connectionNamePrefix"] = request.ConnectionNamePrefix; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults)) + { + body["maxResults"] = request.MaxResults; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken)) + { + body["nextToken"] = request.NextToken; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "ListConnections", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/connection/listConnections", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries connections. + /// + /// + /// Description: + /// + /// You can call this API operation to query connections. + /// + /// + /// + /// ListConnectionsRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// ListConnectionsResponse + /// + public async Task ListConnectionsWithOptionsAsync(ListConnectionsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ConnectionNamePrefix)) + { + body["connectionNamePrefix"] = request.ConnectionNamePrefix; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults)) + { + body["maxResults"] = request.MaxResults; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken)) + { + body["nextToken"] = request.NextToken; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "ListConnections", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/connection/listConnections", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// list connections. + /// + /// + /// Description: + /// + /// You can call this API operation to list connections. + /// + /// + /// + /// ListConnectionsRequest + /// + /// + /// + /// ListConnectionsResponse + /// + public ListConnectionsResponse ListConnections(ListConnectionsRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return ListConnectionsWithOptions(request, runtime); + } + + /// Summary: + /// + /// list connections. + /// + /// + /// Description: + /// + /// You can call this API operation to list connections. + /// + /// + /// + /// ListConnectionsRequest + /// + /// + /// + /// ListConnectionsResponse + /// + public async Task ListConnectionsAsync(ListConnectionsRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await ListConnectionsWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Updates a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to update a connection. + /// + /// + /// + /// ListEnumsResponseResponse + /// + public ListEnumsResponseResponse ListEnumsResponse() + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + Dictionary body = new Dictionary(){}; + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "listEnumsResponse", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/connection/listEnumsResponse", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Updates a connection. + /// + /// + /// Description: + /// + /// You can call this API operation to update a connection. + /// + /// + /// + /// ListEnumsResponseResponse + /// + public async Task ListEnumsResponseAsync() + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + Dictionary body = new Dictionary(){}; + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "listEnumsResponse", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/connection/listEnumsResponse", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries the content of an event. + /// + /// + /// Description: + /// + /// You can call this API operation to query the content of an event. + /// + /// + /// + /// PutEventsRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// PutEventsResponse + /// + public PutEventsResponse PutEventsWithOptions(PutEventsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary headers = new Dictionary + { + {"ce-specversion", "1.0"}, + {"ce-type", "com.github.pull_request.opened"}, + {"ce-source", "https://github.com/cloudevents/spec/pull"}, + {"ce-subject", "demo"}, + {"ce-id", "1234-1234-1234"}, + {"ce-datacontenttype", "application/json"}, + {"ce-time", "2024-07-01T17:31:00Z"}, + {"ce-eventbusname", "demo-bus"}, + }; + string body = "{}"; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + headers["ce-eventbusname"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Event)) + { + body = request.Event; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = body, + Headers = headers, + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "putEvents", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/putEvents", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries the content of an event. + /// + /// + /// Description: + /// + /// You can call this API operation to query the content of an event. + /// + /// + /// + /// PutEventsRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// PutEventsResponse + /// + public async Task PutEventsWithOptionsAsync(PutEventsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary headers = new Dictionary + { + {"ce-specversion", "1.0"}, + {"ce-type", "com.github.pull_request.opened"}, + {"ce-source", "https://github.com/cloudevents/spec/pull"}, + {"ce-subject", "demo"}, + {"ce-id", "1234-1234-1234"}, + {"ce-datacontenttype", "application/json"}, + {"ce-time", "2024-07-01T17:31:00Z"}, + {"ce-eventbusname", "demo-bus"}, + }; + string body = "{}"; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + headers["ce-eventbusname"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Event)) + { + body = request.Event; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = body, + Headers = headers, + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "putEvents", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/putEvents", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries the content of an event. + /// + /// + /// Description: + /// + /// You can call this API operation to query the content of an event. + /// + /// + /// + /// PutEventsRequest + /// + /// + /// + /// PutEventsResponse + /// + public PutEventsResponse PutEvents(PutEventsRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return PutEventsWithOptions(request, runtime); + } + + /// Summary: + /// + /// Queries the content of an event. + /// + /// + /// Description: + /// + /// You can call this API operation to query the content of an event. + /// + /// + /// + /// PutEventsRequest + /// + /// + /// + /// PutEventsResponse + /// + public async Task PutEventsAsync(PutEventsRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await PutEventsWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Creates an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to create an event rule. + /// + /// + /// + /// CreateEventRuleRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// CreateEventRuleResponse + /// + public CreateEventRuleResponse CreateEventRuleWithOptions(CreateEventRuleRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.FilterPattern)) + { + body["filterPattern"] = request.FilterPattern; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "CreateEventRule", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/rule/createEventRule", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Creates an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to create an event rule. + /// + /// + /// + /// CreateEventRuleRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// CreateEventRuleResponse + /// + public async Task CreateEventRuleWithOptionsAsync(CreateEventRuleRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.FilterPattern)) + { + body["filterPattern"] = request.FilterPattern; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "CreateEventRule", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/rule/createEventRule", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Creates an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to create an event rule. + /// + /// + /// + /// CreateEventRuleRequest + /// + /// + /// + /// CreateEventRuleResponse + /// + public CreateEventRuleResponse CreateEventRule(CreateEventRuleRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return CreateEventRuleWithOptions(request, runtime); + } + + /// Summary: + /// + /// Creates an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to create an event rule. + /// + /// + /// + /// CreateEventRuleRequest + /// + /// + /// + /// CreateEventRuleResponse + /// + public async Task CreateEventRuleAsync(CreateEventRuleRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await CreateEventRuleWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Gets an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to get an event rule. + /// + /// + /// + /// GetEventRuleRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// GetEventRuleResponse + /// + public GetEventRuleResponse GetEventRuleWithOptions(GetEventRuleRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "GetEventRule", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/rule/getEventRule", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Gets an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to get an event rule. + /// + /// + /// + /// GetEventRuleRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// GetEventRuleResponse + /// + public async Task GetEventRuleWithOptionsAsync(GetEventRuleRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "GetEventRule", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/rule/getEventRule", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Gets an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to get an event rule. + /// + /// + /// + /// GetEventRuleRequest + /// + /// + /// + /// GetEventRuleResponse + /// + public GetEventRuleResponse GetEventRule(GetEventRuleRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return GetEventRuleWithOptions(request, runtime); + } + + /// Summary: + /// + /// Gets an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to get an event rule. + /// + /// + /// + /// GetEventRuleRequest + /// + /// + /// + /// GetEventRuleResponse + /// + public async Task GetEventRuleAsync(GetEventRuleRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await GetEventRuleWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Deletes an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to delete an event rule. + /// + /// + /// + /// DeleteEventRuleRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// DeleteEventRuleResponse + /// + public DeleteEventRuleResponse DeleteEventRuleWithOptions(DeleteEventRuleRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "DeleteEventRule", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/rule/deleteEventRule", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Deletes an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to delete an event rule. + /// + /// + /// + /// DeleteEventRuleRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// DeleteEventRuleResponse + /// + public async Task DeleteEventRuleWithOptionsAsync(DeleteEventRuleRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "DeleteEventRule", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/rule/deleteEventRule", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Deletes an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to delete an event rule. + /// + /// + /// + /// DeleteEventRuleRequest + /// + /// + /// + /// DeleteEventRuleResponse + /// + public DeleteEventRuleResponse DeleteEventRule(DeleteEventRuleRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return DeleteEventRuleWithOptions(request, runtime); + } + + /// Summary: + /// + /// Deletes an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to delete an event rule. + /// + /// + /// + /// DeleteEventRuleRequest + /// + /// + /// + /// DeleteEventRuleResponse + /// + public async Task DeleteEventRuleAsync(DeleteEventRuleRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await DeleteEventRuleWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Updates an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to update an event rule. + /// + /// + /// + /// UpdateEventRuleRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// UpdateEventRuleResponse + /// + public UpdateEventRuleResponse UpdateEventRuleWithOptions(UpdateEventRuleRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.FilterPattern)) + { + body["filterPattern"] = request.FilterPattern; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "UpdateEventRule", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/rule/updateEventRule", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Updates an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to update an event rule. + /// + /// + /// + /// UpdateEventRuleRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// UpdateEventRuleResponse + /// + public async Task UpdateEventRuleWithOptionsAsync(UpdateEventRuleRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.FilterPattern)) + { + body["filterPattern"] = request.FilterPattern; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "UpdateEventRule", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/rule/updateEventRule", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Updates an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to update an event rule. + /// + /// + /// + /// UpdateEventRuleRequest + /// + /// + /// + /// UpdateEventRuleResponse + /// + public UpdateEventRuleResponse UpdateEventRule(UpdateEventRuleRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return UpdateEventRuleWithOptions(request, runtime); + } + + /// Summary: + /// + /// Updates an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to update an event rule. + /// + /// + /// + /// UpdateEventRuleRequest + /// + /// + /// + /// UpdateEventRuleResponse + /// + public async Task UpdateEventRuleAsync(UpdateEventRuleRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await UpdateEventRuleWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Lists event rules. + /// + /// + /// Description: + /// + /// You can call this operation to list event rules. + /// + /// + /// + /// ListEventRulesRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// ListEventRulesResponse + /// + public ListEventRulesResponse ListEventRulesWithOptions(ListEventRulesRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults)) + { + body["maxResults"] = request.MaxResults; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken)) + { + body["nextToken"] = request.NextToken; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "ListEventRules", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/rule/listEventRules", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Lists event rules. + /// + /// + /// Description: + /// + /// You can call this operation to list event rules. + /// + /// + /// + /// ListEventRulesRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// ListEventRulesResponse + /// + public async Task ListEventRulesWithOptionsAsync(ListEventRulesRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults)) + { + body["maxResults"] = request.MaxResults; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken)) + { + body["nextToken"] = request.NextToken; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "ListEventRules", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/rule/listEventRules", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Lists event rules. + /// + /// + /// Description: + /// + /// You can call this operation to list event rules. + /// + /// + /// + /// ListEventRulesRequest + /// + /// + /// + /// ListEventRulesResponse + /// + public ListEventRulesResponse ListEventRules(ListEventRulesRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return ListEventRulesWithOptions(request, runtime); + } + + /// Summary: + /// + /// Lists event rules. + /// + /// + /// Description: + /// + /// You can call this operation to list event rules. + /// + /// + /// + /// ListEventRulesRequest + /// + /// + /// + /// ListEventRulesResponse + /// + public async Task ListEventRulesAsync(ListEventRulesRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await ListEventRulesWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Enables an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to enable an event rule. + /// + /// + /// + /// EnableEventRuleRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// EnableEventRuleResponse + /// + public EnableEventRuleResponse EnableEventRuleWithOptions(EnableEventRuleRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "EnableEventRule", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/rule/enableEventRule", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Enables an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to enable an event rule. + /// + /// + /// + /// EnableEventRuleRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// EnableEventRuleResponse + /// + public async Task EnableEventRuleWithOptionsAsync(EnableEventRuleRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "EnableEventRule", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/rule/enableEventRule", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Enables an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to enable an event rule. + /// + /// + /// + /// EnableEventRuleRequest + /// + /// + /// + /// EnableEventRuleResponse + /// + public EnableEventRuleResponse EnableEventRule(EnableEventRuleRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return EnableEventRuleWithOptions(request, runtime); + } + + /// Summary: + /// + /// Enables an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to enable an event rule. + /// + /// + /// + /// EnableEventRuleRequest + /// + /// + /// + /// EnableEventRuleResponse + /// + public async Task EnableEventRuleAsync(EnableEventRuleRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await EnableEventRuleWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Disables an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to disable an event rule. + /// + /// + /// + /// DisableEventRuleRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// DisableEventRuleResponse + /// + public DisableEventRuleResponse DisableEventRuleWithOptions(DisableEventRuleRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "DisableEventRule", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/rule/disableEventRule", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Disables an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to disable an event rule. + /// + /// + /// + /// DisableEventRuleRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// DisableEventRuleResponse + /// + public async Task DisableEventRuleWithOptionsAsync(DisableEventRuleRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "DisableEventRule", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/rule/disableEventRule", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Disables an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to disable an event rule. + /// + /// + /// + /// DisableEventRuleRequest + /// + /// + /// + /// DisableEventRuleResponse + /// + public DisableEventRuleResponse DisableEventRule(DisableEventRuleRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return DisableEventRuleWithOptions(request, runtime); + } + + /// Summary: + /// + /// Disables an event rule. + /// + /// + /// Description: + /// + /// You can call this operation to disable an event rule. + /// + /// + /// + /// DisableEventRuleRequest + /// + /// + /// + /// DisableEventRuleResponse + /// + public async Task DisableEventRuleAsync(DisableEventRuleRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await DisableEventRuleWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Creates an event source. + /// + /// + /// Description: + /// + /// You can call this operation to create an event source. + /// + /// + /// + /// CreateEventSourceRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// CreateEventSourceResponse + /// + public CreateEventSourceResponse CreateEventSourceWithOptions(CreateEventSourceRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventSourceName)) + { + body["eventSourceName"] = request.EventSourceName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ClassName)) + { + body["className"] = request.ClassName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Config)) + { + body["config"] = request.Config; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "CreateEventSource", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/source/createEventSource", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Creates an event source. + /// + /// + /// Description: + /// + /// You can call this operation to create an event source. + /// + /// + /// + /// CreateEventSourceRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// CreateEventSourceResponse + /// + public async Task CreateEventSourceWithOptionsAsync(CreateEventSourceRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventSourceName)) + { + body["eventSourceName"] = request.EventSourceName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ClassName)) + { + body["className"] = request.ClassName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Config)) + { + body["config"] = request.Config; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "CreateEventSource", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/source/createEventSource", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Creates an event source. + /// + /// + /// Description: + /// + /// You can call this operation to create an event source. + /// + /// + /// + /// CreateEventSourceRequest + /// + /// + /// + /// CreateEventSourceResponse + /// + public CreateEventSourceResponse CreateEventSource(CreateEventSourceRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return CreateEventSourceWithOptions(request, runtime); + } + + /// Summary: + /// + /// Creates an event source. + /// + /// + /// Description: + /// + /// You can call this operation to create an event source. + /// + /// + /// + /// CreateEventSourceRequest + /// + /// + /// + /// CreateEventSourceResponse + /// + public async Task CreateEventSourceAsync(CreateEventSourceRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await CreateEventSourceWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Updates an event source. + /// + /// + /// Description: + /// + /// You can call this operation to update an event source. + /// + /// + /// + /// UpdateEventSourceRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// UpdateEventSourceResponse + /// + public UpdateEventSourceResponse UpdateEventSourceWithOptions(UpdateEventSourceRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventSourceName)) + { + body["eventSourceName"] = request.EventSourceName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ClassName)) + { + body["className"] = request.ClassName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Status)) + { + body["status"] = request.Status; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Config)) + { + body["config"] = request.Config; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "UpdateEventSource", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/source/updateEventSource", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Updates an event source. + /// + /// + /// Description: + /// + /// You can call this operation to update an event source. + /// + /// + /// + /// UpdateEventSourceRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// UpdateEventSourceResponse + /// + public async Task UpdateEventSourceWithOptionsAsync(UpdateEventSourceRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventSourceName)) + { + body["eventSourceName"] = request.EventSourceName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Description)) + { + body["description"] = request.Description; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ClassName)) + { + body["className"] = request.ClassName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Status)) + { + body["status"] = request.Status; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Config)) + { + body["config"] = request.Config; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "UpdateEventSource", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/source/updateEventSource", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Updates an event source. + /// + /// + /// Description: + /// + /// You can call this operation to update an event source. + /// + /// + /// + /// UpdateEventSourceRequest + /// + /// + /// + /// UpdateEventSourceResponse + /// + public UpdateEventSourceResponse UpdateEventSource(UpdateEventSourceRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return UpdateEventSourceWithOptions(request, runtime); + } + + /// Summary: + /// + /// Updates an event source. + /// + /// + /// Description: + /// + /// You can call this operation to update an event source. + /// + /// + /// + /// UpdateEventSourceRequest + /// + /// + /// + /// UpdateEventSourceResponse + /// + public async Task UpdateEventSourceAsync(UpdateEventSourceRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await UpdateEventSourceWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Deletes an event source. + /// + /// + /// Description: + /// + /// You can call this API operation to delete an event source. + /// + /// + /// + /// DeleteEventSourceRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// DeleteEventSourceResponse + /// + public DeleteEventSourceResponse DeleteEventSourceWithOptions(DeleteEventSourceRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventSourceName)) + { + body["eventSourceName"] = request.EventSourceName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "DeleteEventSource", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/source/deleteEventSource", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Deletes an event source. + /// + /// + /// Description: + /// + /// You can call this API operation to delete an event source. + /// + /// + /// + /// DeleteEventSourceRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// DeleteEventSourceResponse + /// + public async Task DeleteEventSourceWithOptionsAsync(DeleteEventSourceRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventSourceName)) + { + body["eventSourceName"] = request.EventSourceName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "DeleteEventSource", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/source/deleteEventSource", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Deletes an event source. + /// + /// + /// Description: + /// + /// You can call this API operation to delete an event source. + /// + /// + /// + /// DeleteEventSourceRequest + /// + /// + /// + /// DeleteEventSourceResponse + /// + public DeleteEventSourceResponse DeleteEventSource(DeleteEventSourceRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return DeleteEventSourceWithOptions(request, runtime); + } + + /// Summary: + /// + /// Deletes an event source. + /// + /// + /// Description: + /// + /// You can call this API operation to delete an event source. + /// + /// + /// + /// DeleteEventSourceRequest + /// + /// + /// + /// DeleteEventSourceResponse + /// + public async Task DeleteEventSourceAsync(DeleteEventSourceRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await DeleteEventSourceWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Gets an event source. + /// + /// + /// Description: + /// + /// You can call this API operation to get an event source. + /// + /// + /// + /// GetEventSourceRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// GetEventSourceResponse + /// + public GetEventSourceResponse GetEventSourceWithOptions(GetEventSourceRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventSourceName)) + { + body["eventSourceName"] = request.EventSourceName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "GetEventSource", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/source/getEventSource", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Gets an event source. + /// + /// + /// Description: + /// + /// You can call this API operation to get an event source. + /// + /// + /// + /// GetEventSourceRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// GetEventSourceResponse + /// + public async Task GetEventSourceWithOptionsAsync(GetEventSourceRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventSourceName)) + { + body["eventSourceName"] = request.EventSourceName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "GetEventSource", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/source/getEventSource", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Gets an event source. + /// + /// + /// Description: + /// + /// You can call this API operation to get an event source. + /// + /// + /// + /// GetEventSourceRequest + /// + /// + /// + /// GetEventSourceResponse + /// + public GetEventSourceResponse GetEventSource(GetEventSourceRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return GetEventSourceWithOptions(request, runtime); + } + + /// Summary: + /// + /// Gets an event source. + /// + /// + /// Description: + /// + /// You can call this API operation to get an event source. + /// + /// + /// + /// GetEventSourceRequest + /// + /// + /// + /// GetEventSourceResponse + /// + public async Task GetEventSourceAsync(GetEventSourceRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await GetEventSourceWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Lists event sources. + /// + /// + /// Description: + /// + /// You can call this API operation to list event sources. + /// + /// + /// + /// ListEventSourcesRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// ListEventSourcesResponse + /// + public ListEventSourcesResponse ListEventSourcesWithOptions(ListEventSourcesRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventSourceType)) + { + body["eventSourceType"] = request.EventSourceType; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults)) + { + body["maxResults"] = request.MaxResults; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken)) + { + body["nextToken"] = request.NextToken; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "ListEventSources", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/source/listEventSources", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Lists event sources. + /// + /// + /// Description: + /// + /// You can call this API operation to list event sources. + /// + /// + /// + /// ListEventSourcesRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// ListEventSourcesResponse + /// + public async Task ListEventSourcesWithOptionsAsync(ListEventSourcesRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventSourceType)) + { + body["eventSourceType"] = request.EventSourceType; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults)) + { + body["maxResults"] = request.MaxResults; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken)) + { + body["nextToken"] = request.NextToken; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "ListEventSources", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/source/listEventSources", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Lists event sources. + /// + /// + /// Description: + /// + /// You can call this API operation to list event sources. + /// + /// + /// + /// ListEventSourcesRequest + /// + /// + /// + /// ListEventSourcesResponse + /// + public ListEventSourcesResponse ListEventSources(ListEventSourcesRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return ListEventSourcesWithOptions(request, runtime); + } + + /// Summary: + /// + /// Lists event sources. + /// + /// + /// Description: + /// + /// You can call this API operation to list event sources. + /// + /// + /// + /// ListEventSourcesRequest + /// + /// + /// + /// ListEventSourcesResponse + /// + public async Task ListEventSourcesAsync(ListEventSourcesRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await ListEventSourcesWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Creates event targets. + /// + /// + /// Description: + /// + /// You can call this operation to create event targets. + /// + /// + /// + /// CreateEventTargetsRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// CreateEventTargetsResponse + /// + public CreateEventTargetsResponse CreateEventTargetsWithOptions(CreateEventTargetsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventTargets)) + { + body["eventTargets"] = request.EventTargets; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "CreateEventTargets", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/target/createEventTargets", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Creates event targets. + /// + /// + /// Description: + /// + /// You can call this operation to create event targets. + /// + /// + /// + /// CreateEventTargetsRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// CreateEventTargetsResponse + /// + public async Task CreateEventTargetsWithOptionsAsync(CreateEventTargetsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventTargets)) + { + body["eventTargets"] = request.EventTargets; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "CreateEventTargets", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/target/createEventTargets", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Creates event targets. + /// + /// + /// Description: + /// + /// You can call this operation to create event targets. + /// + /// + /// + /// CreateEventTargetsRequest + /// + /// + /// + /// CreateEventTargetsResponse + /// + public CreateEventTargetsResponse CreateEventTargets(CreateEventTargetsRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return CreateEventTargetsWithOptions(request, runtime); + } + + /// Summary: + /// + /// Creates event targets. + /// + /// + /// Description: + /// + /// You can call this operation to create event targets. + /// + /// + /// + /// CreateEventTargetsRequest + /// + /// + /// + /// CreateEventTargetsResponse + /// + public async Task CreateEventTargetsAsync(CreateEventTargetsRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await CreateEventTargetsWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Updates event targets. + /// + /// + /// Description: + /// + /// You can call this operation to update event targets. + /// + /// + /// + /// UpdateEventTargetsRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// UpdateEventTargetsResponse + /// + public UpdateEventTargetsResponse UpdateEventTargetsWithOptions(UpdateEventTargetsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventTargets)) + { + body["eventTargets"] = request.EventTargets; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "UpdateEventTargets", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/target/updateEventTargets", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Updates event targets. + /// + /// + /// Description: + /// + /// You can call this operation to update event targets. + /// + /// + /// + /// UpdateEventTargetsRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// UpdateEventTargetsResponse + /// + public async Task UpdateEventTargetsWithOptionsAsync(UpdateEventTargetsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventTargets)) + { + body["eventTargets"] = request.EventTargets; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "UpdateEventTargets", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/target/updateEventTargets", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Updates event targets. + /// + /// + /// Description: + /// + /// You can call this operation to update event targets. + /// + /// + /// + /// UpdateEventTargetsRequest + /// + /// + /// + /// UpdateEventTargetsResponse + /// + public UpdateEventTargetsResponse UpdateEventTargets(UpdateEventTargetsRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return UpdateEventTargetsWithOptions(request, runtime); + } + + /// Summary: + /// + /// Updates event targets. + /// + /// + /// Description: + /// + /// You can call this operation to update event targets. + /// + /// + /// + /// UpdateEventTargetsRequest + /// + /// + /// + /// UpdateEventTargetsResponse + /// + public async Task UpdateEventTargetsAsync(UpdateEventTargetsRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await UpdateEventTargetsWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Deletes event targets. + /// + /// + /// Description: + /// + /// You can call this operation to delete event targets. + /// + /// + /// + /// DeleteEventTargetsRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// DeleteEventTargetsResponse + /// + public DeleteEventTargetsResponse DeleteEventTargetsWithOptions(DeleteEventTargetsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventTargetNames)) + { + body["eventTargetNames"] = request.EventTargetNames; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "DeleteEventTargets", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/target/deleteEventTargets", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Deletes event targets. + /// + /// + /// Description: + /// + /// You can call this operation to delete event targets. + /// + /// + /// + /// DeleteEventTargetsRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// DeleteEventTargetsResponse + /// + public async Task DeleteEventTargetsWithOptionsAsync(DeleteEventTargetsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventTargetNames)) + { + body["eventTargetNames"] = request.EventTargetNames; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "DeleteEventTargets", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/target/deleteEventTargets", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Deletes event targets. + /// + /// + /// Description: + /// + /// You can call this operation to delete event targets. + /// + /// + /// + /// DeleteEventTargetsRequest + /// + /// + /// + /// DeleteEventTargetsResponse + /// + public DeleteEventTargetsResponse DeleteEventTargets(DeleteEventTargetsRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return DeleteEventTargetsWithOptions(request, runtime); + } + + /// Summary: + /// + /// Deletes event targets. + /// + /// + /// Description: + /// + /// You can call this operation to delete event targets. + /// + /// + /// + /// DeleteEventTargetsRequest + /// + /// + /// + /// DeleteEventTargetsResponse + /// + public async Task DeleteEventTargetsAsync(DeleteEventTargetsRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await DeleteEventTargetsWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Lists event targets. + /// + /// + /// Description: + /// + /// You can call this operation to list event targets. + /// + /// + /// + /// ListEventTargetsRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// ListEventTargetsResponse + /// + public ListEventTargetsResponse ListEventTargetsWithOptions(ListEventTargetsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "ListEventTargets", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/target/listEventTargets", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Lists event targets. + /// + /// + /// Description: + /// + /// You can call this operation to list event targets. + /// + /// + /// + /// ListEventTargetsRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// ListEventTargetsResponse + /// + public async Task ListEventTargetsWithOptionsAsync(ListEventTargetsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventRuleName)) + { + body["eventRuleName"] = request.EventRuleName; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "ListEventTargets", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/target/listEventTargets", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Lists event targets. + /// + /// + /// Description: + /// + /// You can call this operation to list event targets. + /// + /// + /// + /// ListEventTargetsRequest + /// + /// + /// + /// ListEventTargetsResponse + /// + public ListEventTargetsResponse ListEventTargets(ListEventTargetsRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return ListEventTargetsWithOptions(request, runtime); + } + + /// Summary: + /// + /// Lists event targets. + /// + /// + /// Description: + /// + /// You can call this operation to list event targets. + /// + /// + /// + /// ListEventTargetsRequest + /// + /// + /// + /// ListEventTargetsResponse + /// + public async Task ListEventTargetsAsync(ListEventTargetsRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await ListEventTargetsWithOptionsAsync(request, runtime); + } + + /// Summary: + /// + /// Queries all event buses. + /// + /// + /// Description: + /// + /// You can call this API operation to query all event buses. + /// + /// + /// + /// ListEventTypesRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// ListEventTypesResponse + /// + public ListEventTypesResponse ListEventTypesWithOptions(ListEventTypesRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventSourceName)) + { + body["eventSourceName"] = request.EventSourceName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults)) + { + body["maxResults"] = request.MaxResults; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken)) + { + body["nextToken"] = request.NextToken; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "listEventTypes", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/type/listEventTypes", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(CallApi(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries all event buses. + /// + /// + /// Description: + /// + /// You can call this API operation to query all event buses. + /// + /// + /// + /// ListEventTypesRequest + /// + /// + /// runtime options for this request RuntimeOptions + /// + /// + /// + /// ListEventTypesResponse + /// + public async Task ListEventTypesWithOptionsAsync(ListEventTypesRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) + { + AlibabaCloud.TeaUtil.Common.ValidateModel(request); + Dictionary body = new Dictionary(){}; + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventBusName)) + { + body["eventBusName"] = request.EventBusName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.EventSourceName)) + { + body["eventSourceName"] = request.EventSourceName; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MaxResults)) + { + body["maxResults"] = request.MaxResults; + } + if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.NextToken)) + { + body["nextToken"] = request.NextToken; + } + AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest + { + Body = AlibabaCloud.TeaUtil.Common.ToJSONString(body), + }; + AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params + { + Action = "listEventTypes", + Version = "2024-07-01", + Protocol = "HTTP", + Pathname = "/type/listEventTypes", + Method = "POST", + AuthType = "Anonymous", + Style = "RPC", + ReqBodyType = "json", + BodyType = "json", + }; + return TeaModel.ToObject(await CallApiAsync(params_, req, runtime)); + } + + /// Summary: + /// + /// Queries all event buses. + /// + /// + /// Description: + /// + /// You can call this API operation to query all event buses. + /// + /// + /// + /// ListEventTypesRequest + /// + /// + /// + /// ListEventTypesResponse + /// + public ListEventTypesResponse ListEventTypes(ListEventTypesRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return ListEventTypesWithOptions(request, runtime); + } + + /// Summary: + /// + /// Queries all event buses. + /// + /// + /// Description: + /// + /// You can call this API operation to query all event buses. + /// + /// + /// + /// ListEventTypesRequest + /// + /// + /// + /// ListEventTypesResponse + /// + public async Task ListEventTypesAsync(ListEventTypesRequest request) + { + AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); + return await ListEventTypesWithOptionsAsync(request, runtime); + } + + } +} diff --git a/sdk/generated/csharp/core/sdk.csproj b/sdk/generated/csharp/core/sdk.csproj new file mode 100644 index 00000000..575fded7 --- /dev/null +++ b/sdk/generated/csharp/core/sdk.csproj @@ -0,0 +1,42 @@ + + + + netstandard2.0;net45 + RocketMQ.Eventbridge.SDK + Library + false + false + RocketMQ.Eventbridge.SDK + 1.0.0 + 5 + open source eventbridge (20240701) SDK Library for .NET + + + NETSTANDARD2_0 + + + NET45 + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + \ No newline at end of file diff --git a/sdk/generated/go/client/client.go b/sdk/generated/go/client/client.go new file mode 100644 index 00000000..ce67dae3 --- /dev/null +++ b/sdk/generated/go/client/client.go @@ -0,0 +1,9915 @@ +// This file is auto-generated, don't edit it. Thanks. +package client + +import ( + util "github.com/alibabacloud-go/tea-utils/v2/service" + openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client" + "github.com/alibabacloud-go/tea/tea" +) + +// Description: +// +// EventBus Controller apis: +// +// createEventBus * +// +// getEventBus * +// +// deleteEventBus * +// +// listEventBuses * +type CreateEventBusRequest struct { + // The description of the event bus. + // + // example: + // + // demo + Description *string `json:"description,omitempty" xml:"description,omitempty"` + // The name of the event bus. This parameter is required. + // + // example: + // + // MyEventBus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` +} + +func (s CreateEventBusRequest) String() string { + return tea.Prettify(s) +} + +func (s CreateEventBusRequest) GoString() string { + return s.String() +} + +func (s *CreateEventBusRequest) SetDescription(v string) *CreateEventBusRequest { + s.Description = &v + return s +} + +func (s *CreateEventBusRequest) SetEventBusName(v string) *CreateEventBusRequest { + s.EventBusName = &v + return s +} + +type CreateEventBusResponseBody struct { + // The returned response code. The value Success indicates that the request is successful. Other values indicate that the request failed. For more information about error codes, see Error codes. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The name of the event bus. This parameter is required. + // + // example: + // + // MyEventBus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The returned error message. + // + // example: + // + // The event bus [xxxx] not existed! + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // A995F07C-E503-5881-9962-9CECA8566876 + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` + // Indicates whether the request is successful. The value true indicates that the request is successful. + // + // example: + // + // true + Success *bool `json:"success,omitempty" xml:"success,omitempty"` +} + +func (s CreateEventBusResponseBody) String() string { + return tea.Prettify(s) +} + +func (s CreateEventBusResponseBody) GoString() string { + return s.String() +} + +func (s *CreateEventBusResponseBody) SetCode(v string) *CreateEventBusResponseBody { + s.Code = &v + return s +} + +func (s *CreateEventBusResponseBody) SetEventBusName(v string) *CreateEventBusResponseBody { + s.EventBusName = &v + return s +} + +func (s *CreateEventBusResponseBody) SetMessage(v string) *CreateEventBusResponseBody { + s.Message = &v + return s +} + +func (s *CreateEventBusResponseBody) SetRequestId(v string) *CreateEventBusResponseBody { + s.RequestId = &v + return s +} + +func (s *CreateEventBusResponseBody) SetSuccess(v bool) *CreateEventBusResponseBody { + s.Success = &v + return s +} + +type CreateEventBusResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *CreateEventBusResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s CreateEventBusResponse) String() string { + return tea.Prettify(s) +} + +func (s CreateEventBusResponse) GoString() string { + return s.String() +} + +func (s *CreateEventBusResponse) SetHeaders(v map[string]*string) *CreateEventBusResponse { + s.Headers = v + return s +} + +func (s *CreateEventBusResponse) SetStatusCode(v int32) *CreateEventBusResponse { + s.StatusCode = &v + return s +} + +func (s *CreateEventBusResponse) SetBody(v *CreateEventBusResponseBody) *CreateEventBusResponse { + s.Body = v + return s +} + +type GetEventBusRequest struct { + // The name of the event bus. This parameter is required. + // + // example: + // + // MyEventBus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` +} + +func (s GetEventBusRequest) String() string { + return tea.Prettify(s) +} + +func (s GetEventBusRequest) GoString() string { + return s.String() +} + +func (s *GetEventBusRequest) SetEventBusName(v string) *GetEventBusRequest { + s.EventBusName = &v + return s +} + +type GetEventBusResponseBody struct { + // The response code. The value Success indicates that the request is successful. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The timestamp that indicates when the event bus was created. + // + // example: + // + // 1641781825000 + CreateTimestamp *int64 `json:"createTimestamp,omitempty" xml:"createTimestamp,omitempty"` + // The description of the event bus. + // + // example: + // + // demo + Description *string `json:"description,omitempty" xml:"description,omitempty"` + // The name of the event bus. + // + // example: + // + // MyEventBus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The error message that is returned if the request failed. + // + // example: + // + // EventBusNotExist + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // d5bfc188-4452-4ba7-b73a-a9005e522439 + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s GetEventBusResponseBody) String() string { + return tea.Prettify(s) +} + +func (s GetEventBusResponseBody) GoString() string { + return s.String() +} + +func (s *GetEventBusResponseBody) SetCode(v string) *GetEventBusResponseBody { + s.Code = &v + return s +} + +func (s *GetEventBusResponseBody) SetCreateTimestamp(v int64) *GetEventBusResponseBody { + s.CreateTimestamp = &v + return s +} + +func (s *GetEventBusResponseBody) SetDescription(v string) *GetEventBusResponseBody { + s.Description = &v + return s +} + +func (s *GetEventBusResponseBody) SetEventBusName(v string) *GetEventBusResponseBody { + s.EventBusName = &v + return s +} + +func (s *GetEventBusResponseBody) SetMessage(v string) *GetEventBusResponseBody { + s.Message = &v + return s +} + +func (s *GetEventBusResponseBody) SetRequestId(v string) *GetEventBusResponseBody { + s.RequestId = &v + return s +} + +type GetEventBusResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *GetEventBusResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s GetEventBusResponse) String() string { + return tea.Prettify(s) +} + +func (s GetEventBusResponse) GoString() string { + return s.String() +} + +func (s *GetEventBusResponse) SetHeaders(v map[string]*string) *GetEventBusResponse { + s.Headers = v + return s +} + +func (s *GetEventBusResponse) SetStatusCode(v int32) *GetEventBusResponse { + s.StatusCode = &v + return s +} + +func (s *GetEventBusResponse) SetBody(v *GetEventBusResponseBody) *GetEventBusResponse { + s.Body = v + return s +} + +type ListEventBusesRequest struct { + // The maximum number of entries to be returned in a call. You can use this parameter and NextToken to implement paging. Note: Up to 100 entries can be returned in a call. + // + // example: + // + // 10 + MaxResults *int32 `json:"maxResults,omitempty" xml:"maxResults,omitempty"` + // If you set Limit and excess return values exist, this parameter is returned. + // + // example: + // + // 10 + NextToken *string `json:"nextToken,omitempty" xml:"nextToken,omitempty"` +} + +func (s ListEventBusesRequest) String() string { + return tea.Prettify(s) +} + +func (s ListEventBusesRequest) GoString() string { + return s.String() +} + +func (s *ListEventBusesRequest) SetMaxResults(v int32) *ListEventBusesRequest { + s.MaxResults = &v + return s +} + +func (s *ListEventBusesRequest) SetNextToken(v string) *ListEventBusesRequest { + s.NextToken = &v + return s +} + +type ListEventBusesResponseBody struct { + // The returned HTTP status code. The HTTP status code 200 indicates that the request is successful. + // + // example: + // + // 200 + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The timestamp that indicates when the event bus was created. + EventBuses []*ListEventBusesResponseBodyEventBuses `json:"eventBuses,omitempty" xml:"eventBuses,omitempty" type:"Repeated"` + // The returned error message. + // + // example: + // + // InvalidArgument + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // D1DCF64A-3F2C-5323-ADCB-3F4DF30FAD2D + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` + // If excess return values exist, this parameter is returned. + // + // example: + // + // 10 + NextToken *string `json:"nextToken,omitempty" xml:"nextToken,omitempty"` + // The total number of entries. + // + // example: + // + // 2 + Total *int `json:"total,omitempty" xml:"total,omitempty"` + // If you set Limit and excess return values exist, this parameter is returned. + // + // example: + // + // 10 + MaxResults *int32 `json:"maxResults,omitempty" xml:"maxResults,omitempty"` +} + +func (s ListEventBusesResponseBody) String() string { + return tea.Prettify(s) +} + +func (s ListEventBusesResponseBody) GoString() string { + return s.String() +} + +func (s *ListEventBusesResponseBody) SetCode(v string) *ListEventBusesResponseBody { + s.Code = &v + return s +} + +func (s *ListEventBusesResponseBody) SetEventBuses(v []*ListEventBusesResponseBodyEventBuses) *ListEventBusesResponseBody { + s.EventBuses = v + return s +} + +func (s *ListEventBusesResponseBody) SetMessage(v string) *ListEventBusesResponseBody { + s.Message = &v + return s +} + +func (s *ListEventBusesResponseBody) SetRequestId(v string) *ListEventBusesResponseBody { + s.RequestId = &v + return s +} + +func (s *ListEventBusesResponseBody) SetNextToken(v string) *ListEventBusesResponseBody { + s.NextToken = &v + return s +} + +func (s *ListEventBusesResponseBody) SetTotal(v int) *ListEventBusesResponseBody { + s.Total = &v + return s +} + +func (s *ListEventBusesResponseBody) SetMaxResults(v int32) *ListEventBusesResponseBody { + s.MaxResults = &v + return s +} + +type ListEventBusesResponseBodyEventBuses struct { + // The description of the queried event bus. + // + // example: + // + // bus_description + Description *string `json:"description,omitempty" xml:"description,omitempty"` + // The name of the queried event bus. + // + // example: + // + // default + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` +} + +func (s ListEventBusesResponseBodyEventBuses) String() string { + return tea.Prettify(s) +} + +func (s ListEventBusesResponseBodyEventBuses) GoString() string { + return s.String() +} + +func (s *ListEventBusesResponseBodyEventBuses) SetDescription(v string) *ListEventBusesResponseBodyEventBuses { + s.Description = &v + return s +} + +func (s *ListEventBusesResponseBodyEventBuses) SetEventBusName(v string) *ListEventBusesResponseBodyEventBuses { + s.EventBusName = &v + return s +} + +type ListEventBusesResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *ListEventBusesResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s ListEventBusesResponse) String() string { + return tea.Prettify(s) +} + +func (s ListEventBusesResponse) GoString() string { + return s.String() +} + +func (s *ListEventBusesResponse) SetHeaders(v map[string]*string) *ListEventBusesResponse { + s.Headers = v + return s +} + +func (s *ListEventBusesResponse) SetStatusCode(v int32) *ListEventBusesResponse { + s.StatusCode = &v + return s +} + +func (s *ListEventBusesResponse) SetBody(v *ListEventBusesResponseBody) *ListEventBusesResponse { + s.Body = v + return s +} + +type DeleteEventBusRequest struct { + // The name of the event bus. This parameter is required. + // + // example: + // + // MyEventBus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` +} + +func (s DeleteEventBusRequest) String() string { + return tea.Prettify(s) +} + +func (s DeleteEventBusRequest) GoString() string { + return s.String() +} + +func (s *DeleteEventBusRequest) SetEventBusName(v string) *DeleteEventBusRequest { + s.EventBusName = &v + return s +} + +type DeleteEventBusResponseBody struct { + // The returned HTTP status code. The HTTP status code 200 indicates that the request is successful. + // + // example: + // + // 200 + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The returned error message. + // + // example: + // + // EventBusNotExist + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // C229E140-1A5C-5D55-8904-CFC5BA4CAA98 + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s DeleteEventBusResponseBody) String() string { + return tea.Prettify(s) +} + +func (s DeleteEventBusResponseBody) GoString() string { + return s.String() +} + +func (s *DeleteEventBusResponseBody) SetCode(v string) *DeleteEventBusResponseBody { + s.Code = &v + return s +} + +func (s *DeleteEventBusResponseBody) SetMessage(v string) *DeleteEventBusResponseBody { + s.Message = &v + return s +} + +func (s *DeleteEventBusResponseBody) SetRequestId(v string) *DeleteEventBusResponseBody { + s.RequestId = &v + return s +} + +type DeleteEventBusResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *DeleteEventBusResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s DeleteEventBusResponse) String() string { + return tea.Prettify(s) +} + +func (s DeleteEventBusResponse) GoString() string { + return s.String() +} + +func (s *DeleteEventBusResponse) SetHeaders(v map[string]*string) *DeleteEventBusResponse { + s.Headers = v + return s +} + +func (s *DeleteEventBusResponse) SetStatusCode(v int32) *DeleteEventBusResponse { + s.StatusCode = &v + return s +} + +func (s *DeleteEventBusResponse) SetBody(v *DeleteEventBusResponseBody) *DeleteEventBusResponse { + s.Body = v + return s +} + +// Description: +// +// ApiDestination Controller apis: +// +// createApiDestination * +// +// updateApiDestination * +// +// getApiDestination * +// +// deleteApiDestination * +// +// listApiDestinations * +type CreateApiDestinationRequest struct { + // The name of the API destination. The name must be 2 to 127 characters in length. This parameter is required. + // + // example: + // + // api-destination-name + ApiDestinationName *string `json:"apiDestinationName,omitempty" xml:"apiDestinationName,omitempty"` + // The name of the connection. The name must be 2 to 127 characters in length. Before you configure this parameter, you must call the CreateConnection operation to create a connection. Then, set this parameter to the name of the connection that you created. This parameter is required. + // + // example: + // + // connection-name + ConnectionName *string `json:"connectionName,omitempty" xml:"connectionName,omitempty"` + // The description of the API destination. The description can be up to 255 characters in length. + Description *string `json:"description,omitempty" xml:"description,omitempty"` + // The parameters that are configured for the API destination. This parameter is required. + HttpApiParameters *CreateApiDestinationRequestHttpApiParameters `json:"httpApiParameters,omitempty" xml:"httpApiParameters,omitempty" type:"Struct"` + // TODO + InvocationRateLimitPerSecond *int `json:"invocationRateLimitPerSecond,omitempty" xml:"invocationRateLimitPerSecond,omitempty"` +} + +func (s CreateApiDestinationRequest) String() string { + return tea.Prettify(s) +} + +func (s CreateApiDestinationRequest) GoString() string { + return s.String() +} + +func (s *CreateApiDestinationRequest) SetApiDestinationName(v string) *CreateApiDestinationRequest { + s.ApiDestinationName = &v + return s +} + +func (s *CreateApiDestinationRequest) SetConnectionName(v string) *CreateApiDestinationRequest { + s.ConnectionName = &v + return s +} + +func (s *CreateApiDestinationRequest) SetDescription(v string) *CreateApiDestinationRequest { + s.Description = &v + return s +} + +func (s *CreateApiDestinationRequest) SetHttpApiParameters(v *CreateApiDestinationRequestHttpApiParameters) *CreateApiDestinationRequest { + s.HttpApiParameters = v + return s +} + +func (s *CreateApiDestinationRequest) SetInvocationRateLimitPerSecond(v int) *CreateApiDestinationRequest { + s.InvocationRateLimitPerSecond = &v + return s +} + +type CreateApiDestinationRequestHttpApiParameters struct { + // The endpoint of the API destination. The endpoint can be up to 127 characters in length. This parameter is required. + // + // example: + // + // http://127.0.0.1:8001/api + Endpoint *string `json:"endpoint,omitempty" xml:"endpoint,omitempty"` + // The HTTP request method. Valid values: + // + // + // - GET + // + // - POST + // + // - HEAD + // + // - DELETE + // + // - PUT + // + // - PATCH + // + // + // This parameter is required. + // + // example: + // + // POST + Method *string `json:"method,omitempty" xml:"method,omitempty"` + // TODO + ApiParameters []*CreateApiDestinationRequestHttpApiParametersApiParameters `json:"apiParameters,omitempty" xml:"apiParameters,omitempty" type:"Repeated"` +} + +func (s CreateApiDestinationRequestHttpApiParameters) String() string { + return tea.Prettify(s) +} + +func (s CreateApiDestinationRequestHttpApiParameters) GoString() string { + return s.String() +} + +func (s *CreateApiDestinationRequestHttpApiParameters) SetEndpoint(v string) *CreateApiDestinationRequestHttpApiParameters { + s.Endpoint = &v + return s +} + +func (s *CreateApiDestinationRequestHttpApiParameters) SetMethod(v string) *CreateApiDestinationRequestHttpApiParameters { + s.Method = &v + return s +} + +func (s *CreateApiDestinationRequestHttpApiParameters) SetApiParameters(v []*CreateApiDestinationRequestHttpApiParametersApiParameters) *CreateApiDestinationRequestHttpApiParameters { + s.ApiParameters = v + return s +} + +type CreateApiDestinationRequestHttpApiParametersApiParameters struct { + Name *string `json:"name,omitempty" xml:"name,omitempty"` + // The description of the API destination. The description can be up to 255 characters in length. + Description *string `json:"description,omitempty" xml:"description,omitempty"` + Type *string `json:"type,omitempty" xml:"type,omitempty"` + DefaultValue *string `json:"defaultValue,omitempty" xml:"defaultValue,omitempty"` + In *string `json:"in,omitempty" xml:"in,omitempty"` +} + +func (s CreateApiDestinationRequestHttpApiParametersApiParameters) String() string { + return tea.Prettify(s) +} + +func (s CreateApiDestinationRequestHttpApiParametersApiParameters) GoString() string { + return s.String() +} + +func (s *CreateApiDestinationRequestHttpApiParametersApiParameters) SetName(v string) *CreateApiDestinationRequestHttpApiParametersApiParameters { + s.Name = &v + return s +} + +func (s *CreateApiDestinationRequestHttpApiParametersApiParameters) SetDescription(v string) *CreateApiDestinationRequestHttpApiParametersApiParameters { + s.Description = &v + return s +} + +func (s *CreateApiDestinationRequestHttpApiParametersApiParameters) SetType(v string) *CreateApiDestinationRequestHttpApiParametersApiParameters { + s.Type = &v + return s +} + +func (s *CreateApiDestinationRequestHttpApiParametersApiParameters) SetDefaultValue(v string) *CreateApiDestinationRequestHttpApiParametersApiParameters { + s.DefaultValue = &v + return s +} + +func (s *CreateApiDestinationRequestHttpApiParametersApiParameters) SetIn(v string) *CreateApiDestinationRequestHttpApiParametersApiParameters { + s.In = &v + return s +} + +type CreateApiDestinationResponseBody struct { + // The returned response code. The value Success indicates that the request is successful. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The name of the API destination. + // + // example: + // + // ApiDestinationName + ApiDestinationName *string `json:"apiDestinationName,omitempty" xml:"apiDestinationName,omitempty"` + // The returned message. + // + // example: + // + // success + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 5DAF96FB-A4B6-548C-B999-0BFDCB2261B9 + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s CreateApiDestinationResponseBody) String() string { + return tea.Prettify(s) +} + +func (s CreateApiDestinationResponseBody) GoString() string { + return s.String() +} + +func (s *CreateApiDestinationResponseBody) SetCode(v string) *CreateApiDestinationResponseBody { + s.Code = &v + return s +} + +func (s *CreateApiDestinationResponseBody) SetApiDestinationName(v string) *CreateApiDestinationResponseBody { + s.ApiDestinationName = &v + return s +} + +func (s *CreateApiDestinationResponseBody) SetMessage(v string) *CreateApiDestinationResponseBody { + s.Message = &v + return s +} + +func (s *CreateApiDestinationResponseBody) SetRequestId(v string) *CreateApiDestinationResponseBody { + s.RequestId = &v + return s +} + +type CreateApiDestinationResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *CreateApiDestinationResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s CreateApiDestinationResponse) String() string { + return tea.Prettify(s) +} + +func (s CreateApiDestinationResponse) GoString() string { + return s.String() +} + +func (s *CreateApiDestinationResponse) SetHeaders(v map[string]*string) *CreateApiDestinationResponse { + s.Headers = v + return s +} + +func (s *CreateApiDestinationResponse) SetStatusCode(v int32) *CreateApiDestinationResponse { + s.StatusCode = &v + return s +} + +func (s *CreateApiDestinationResponse) SetBody(v *CreateApiDestinationResponseBody) *CreateApiDestinationResponse { + s.Body = v + return s +} + +type UpdateApiDestinationRequest struct { + // The name of the API destination. The name must be 2 to 127 characters in length. This parameter is required. + // + // example: + // + // api-destination-name + ApiDestinationName *string `json:"apiDestinationName,omitempty" xml:"apiDestinationName,omitempty"` + // The name of the connection. The name must be 2 to 127 characters in length. Before you configure this parameter, you must call the CreateConnection operation to create a connection. Then, set this parameter to the name of the connection that you created. This parameter is required. + // + // example: + // + // connection-name + ConnectionName *string `json:"connectionName,omitempty" xml:"connectionName,omitempty"` + // The description of the API destination. The description can be up to 255 characters in length. + Description *string `json:"description,omitempty" xml:"description,omitempty"` + // The parameters that are configured for the API destination. This parameter is required. + HttpApiParameters *UpdateApiDestinationRequestHttpApiParameters `json:"httpApiParameters,omitempty" xml:"httpApiParameters,omitempty" type:"Struct"` + // TODO + InvocationRateLimitPerSecond *int `json:"invocationRateLimitPerSecond,omitempty" xml:"invocationRateLimitPerSecond,omitempty"` +} + +func (s UpdateApiDestinationRequest) String() string { + return tea.Prettify(s) +} + +func (s UpdateApiDestinationRequest) GoString() string { + return s.String() +} + +func (s *UpdateApiDestinationRequest) SetApiDestinationName(v string) *UpdateApiDestinationRequest { + s.ApiDestinationName = &v + return s +} + +func (s *UpdateApiDestinationRequest) SetConnectionName(v string) *UpdateApiDestinationRequest { + s.ConnectionName = &v + return s +} + +func (s *UpdateApiDestinationRequest) SetDescription(v string) *UpdateApiDestinationRequest { + s.Description = &v + return s +} + +func (s *UpdateApiDestinationRequest) SetHttpApiParameters(v *UpdateApiDestinationRequestHttpApiParameters) *UpdateApiDestinationRequest { + s.HttpApiParameters = v + return s +} + +func (s *UpdateApiDestinationRequest) SetInvocationRateLimitPerSecond(v int) *UpdateApiDestinationRequest { + s.InvocationRateLimitPerSecond = &v + return s +} + +type UpdateApiDestinationRequestHttpApiParameters struct { + // The endpoint of the API destination. The endpoint can be up to 127 characters in length. This parameter is required. + // + // example: + // + // http://127.0.0.1:8001/api + Endpoint *string `json:"endpoint,omitempty" xml:"endpoint,omitempty"` + // The HTTP request method. Valid values: + // + // + // - GET + // + // - POST + // + // - HEAD + // + // - DELETE + // + // - PUT + // + // - PATCH + // + // + // This parameter is required. + // + // example: + // + // POST + Method *string `json:"method,omitempty" xml:"method,omitempty"` + // TODO + ApiParameters []*UpdateApiDestinationRequestHttpApiParametersApiParameters `json:"apiParameters,omitempty" xml:"apiParameters,omitempty" type:"Repeated"` +} + +func (s UpdateApiDestinationRequestHttpApiParameters) String() string { + return tea.Prettify(s) +} + +func (s UpdateApiDestinationRequestHttpApiParameters) GoString() string { + return s.String() +} + +func (s *UpdateApiDestinationRequestHttpApiParameters) SetEndpoint(v string) *UpdateApiDestinationRequestHttpApiParameters { + s.Endpoint = &v + return s +} + +func (s *UpdateApiDestinationRequestHttpApiParameters) SetMethod(v string) *UpdateApiDestinationRequestHttpApiParameters { + s.Method = &v + return s +} + +func (s *UpdateApiDestinationRequestHttpApiParameters) SetApiParameters(v []*UpdateApiDestinationRequestHttpApiParametersApiParameters) *UpdateApiDestinationRequestHttpApiParameters { + s.ApiParameters = v + return s +} + +type UpdateApiDestinationRequestHttpApiParametersApiParameters struct { + Name *string `json:"name,omitempty" xml:"name,omitempty"` + // The description of the API destination. The description can be up to 255 characters in length. + Description *string `json:"description,omitempty" xml:"description,omitempty"` + Type *string `json:"type,omitempty" xml:"type,omitempty"` + DefaultValue *string `json:"defaultValue,omitempty" xml:"defaultValue,omitempty"` + In *string `json:"in,omitempty" xml:"in,omitempty"` +} + +func (s UpdateApiDestinationRequestHttpApiParametersApiParameters) String() string { + return tea.Prettify(s) +} + +func (s UpdateApiDestinationRequestHttpApiParametersApiParameters) GoString() string { + return s.String() +} + +func (s *UpdateApiDestinationRequestHttpApiParametersApiParameters) SetName(v string) *UpdateApiDestinationRequestHttpApiParametersApiParameters { + s.Name = &v + return s +} + +func (s *UpdateApiDestinationRequestHttpApiParametersApiParameters) SetDescription(v string) *UpdateApiDestinationRequestHttpApiParametersApiParameters { + s.Description = &v + return s +} + +func (s *UpdateApiDestinationRequestHttpApiParametersApiParameters) SetType(v string) *UpdateApiDestinationRequestHttpApiParametersApiParameters { + s.Type = &v + return s +} + +func (s *UpdateApiDestinationRequestHttpApiParametersApiParameters) SetDefaultValue(v string) *UpdateApiDestinationRequestHttpApiParametersApiParameters { + s.DefaultValue = &v + return s +} + +func (s *UpdateApiDestinationRequestHttpApiParametersApiParameters) SetIn(v string) *UpdateApiDestinationRequestHttpApiParametersApiParameters { + s.In = &v + return s +} + +type UpdateApiDestinationResponseBody struct { + // The returned response code. The value Success indicates that the request is successful. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The returned message. + // + // example: + // + // success + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 5DAF96FB-A4B6-548C-B999-0BFDCB2261B9 + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s UpdateApiDestinationResponseBody) String() string { + return tea.Prettify(s) +} + +func (s UpdateApiDestinationResponseBody) GoString() string { + return s.String() +} + +func (s *UpdateApiDestinationResponseBody) SetCode(v string) *UpdateApiDestinationResponseBody { + s.Code = &v + return s +} + +func (s *UpdateApiDestinationResponseBody) SetMessage(v string) *UpdateApiDestinationResponseBody { + s.Message = &v + return s +} + +func (s *UpdateApiDestinationResponseBody) SetRequestId(v string) *UpdateApiDestinationResponseBody { + s.RequestId = &v + return s +} + +type UpdateApiDestinationResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *UpdateApiDestinationResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s UpdateApiDestinationResponse) String() string { + return tea.Prettify(s) +} + +func (s UpdateApiDestinationResponse) GoString() string { + return s.String() +} + +func (s *UpdateApiDestinationResponse) SetHeaders(v map[string]*string) *UpdateApiDestinationResponse { + s.Headers = v + return s +} + +func (s *UpdateApiDestinationResponse) SetStatusCode(v int32) *UpdateApiDestinationResponse { + s.StatusCode = &v + return s +} + +func (s *UpdateApiDestinationResponse) SetBody(v *UpdateApiDestinationResponseBody) *UpdateApiDestinationResponse { + s.Body = v + return s +} + +type GetApiDestinationRequest struct { + // The name of the API destination. This parameter is required. + // + // example: + // + // api-destination-name + ApiDestinationName *string `json:"apiDestinationName,omitempty" xml:"apiDestinationName,omitempty"` +} + +func (s GetApiDestinationRequest) String() string { + return tea.Prettify(s) +} + +func (s GetApiDestinationRequest) GoString() string { + return s.String() +} + +func (s *GetApiDestinationRequest) SetApiDestinationName(v string) *GetApiDestinationRequest { + s.ApiDestinationName = &v + return s +} + +type GetApiDestinationResponseBody struct { + // The returned response code. The value Success indicates that the request is successful. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The name of the API destination. + // + // example: + // + // api-destination-2 + ApiDestinationName *string `json:"apiDestinationName,omitempty" xml:"apiDestinationName,omitempty"` + // The connection name. + // + // example: + // + // connection-name + ConnectionName *string `json:"connectionName,omitempty" xml:"connectionName,omitempty"` + // The description of the connection. + // + // example: + // + // demo + Description *string `json:"description,omitempty" xml:"description,omitempty"` + // The time when the API destination was created. + // + // example: + // + // 1665223213000 + GmtCreate *int64 `json:"gmtCreate,omitempty" xml:"gmtCreate,omitempty"` + // The request parameters that are configured for the API destination. + HttpApiParameters *GetApiDestinationResponseBodyHttpApiParameters `json:"httpApiParameters,omitempty" xml:"httpApiParameters,omitempty" type:"Struct"` + // TODO + InvocationRateLimitPerSecond *int `json:"invocationRateLimitPerSecond,omitempty" xml:"invocationRateLimitPerSecond,omitempty"` + // The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + // + // example: + // + // success + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // B896B484-F16D-59DE-9E23-DD0E5C361108 + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s GetApiDestinationResponseBody) String() string { + return tea.Prettify(s) +} + +func (s GetApiDestinationResponseBody) GoString() string { + return s.String() +} + +func (s *GetApiDestinationResponseBody) SetCode(v string) *GetApiDestinationResponseBody { + s.Code = &v + return s +} + +func (s *GetApiDestinationResponseBody) SetApiDestinationName(v string) *GetApiDestinationResponseBody { + s.ApiDestinationName = &v + return s +} + +func (s *GetApiDestinationResponseBody) SetConnectionName(v string) *GetApiDestinationResponseBody { + s.ConnectionName = &v + return s +} + +func (s *GetApiDestinationResponseBody) SetDescription(v string) *GetApiDestinationResponseBody { + s.Description = &v + return s +} + +func (s *GetApiDestinationResponseBody) SetGmtCreate(v int64) *GetApiDestinationResponseBody { + s.GmtCreate = &v + return s +} + +func (s *GetApiDestinationResponseBody) SetHttpApiParameters(v *GetApiDestinationResponseBodyHttpApiParameters) *GetApiDestinationResponseBody { + s.HttpApiParameters = v + return s +} + +func (s *GetApiDestinationResponseBody) SetInvocationRateLimitPerSecond(v int) *GetApiDestinationResponseBody { + s.InvocationRateLimitPerSecond = &v + return s +} + +func (s *GetApiDestinationResponseBody) SetMessage(v string) *GetApiDestinationResponseBody { + s.Message = &v + return s +} + +func (s *GetApiDestinationResponseBody) SetRequestId(v string) *GetApiDestinationResponseBody { + s.RequestId = &v + return s +} + +type GetApiDestinationResponseBodyHttpApiParameters struct { + // The endpoint of the API destination. + // + // example: + // + // http://127.0.0.1:8001/api + Endpoint *string `json:"endpoint,omitempty" xml:"endpoint,omitempty"` + // The HTTP request method. Valid values: + // + // - POST + // + // - GET + // + // - DELETE + // + // - PUT + // + // - HEAD + // + // - TRACE + // + // - PATCH + // + // example: + // + // POST + Method *string `json:"method,omitempty" xml:"method,omitempty"` + // TODO + ApiParameters []*GetApiDestinationResponseBodyHttpApiParametersApiParameters `json:"apiParameters,omitempty" xml:"apiParameters,omitempty" type:"Repeated"` +} + +func (s GetApiDestinationResponseBodyHttpApiParameters) String() string { + return tea.Prettify(s) +} + +func (s GetApiDestinationResponseBodyHttpApiParameters) GoString() string { + return s.String() +} + +func (s *GetApiDestinationResponseBodyHttpApiParameters) SetEndpoint(v string) *GetApiDestinationResponseBodyHttpApiParameters { + s.Endpoint = &v + return s +} + +func (s *GetApiDestinationResponseBodyHttpApiParameters) SetMethod(v string) *GetApiDestinationResponseBodyHttpApiParameters { + s.Method = &v + return s +} + +func (s *GetApiDestinationResponseBodyHttpApiParameters) SetApiParameters(v []*GetApiDestinationResponseBodyHttpApiParametersApiParameters) *GetApiDestinationResponseBodyHttpApiParameters { + s.ApiParameters = v + return s +} + +type GetApiDestinationResponseBodyHttpApiParametersApiParameters struct { + Name *string `json:"name,omitempty" xml:"name,omitempty"` + // The description of the API destination. The description can be up to 255 characters in length. + Description *string `json:"description,omitempty" xml:"description,omitempty"` + Type *string `json:"type,omitempty" xml:"type,omitempty"` + DefaultValue *string `json:"defaultValue,omitempty" xml:"defaultValue,omitempty"` + In *string `json:"in,omitempty" xml:"in,omitempty"` +} + +func (s GetApiDestinationResponseBodyHttpApiParametersApiParameters) String() string { + return tea.Prettify(s) +} + +func (s GetApiDestinationResponseBodyHttpApiParametersApiParameters) GoString() string { + return s.String() +} + +func (s *GetApiDestinationResponseBodyHttpApiParametersApiParameters) SetName(v string) *GetApiDestinationResponseBodyHttpApiParametersApiParameters { + s.Name = &v + return s +} + +func (s *GetApiDestinationResponseBodyHttpApiParametersApiParameters) SetDescription(v string) *GetApiDestinationResponseBodyHttpApiParametersApiParameters { + s.Description = &v + return s +} + +func (s *GetApiDestinationResponseBodyHttpApiParametersApiParameters) SetType(v string) *GetApiDestinationResponseBodyHttpApiParametersApiParameters { + s.Type = &v + return s +} + +func (s *GetApiDestinationResponseBodyHttpApiParametersApiParameters) SetDefaultValue(v string) *GetApiDestinationResponseBodyHttpApiParametersApiParameters { + s.DefaultValue = &v + return s +} + +func (s *GetApiDestinationResponseBodyHttpApiParametersApiParameters) SetIn(v string) *GetApiDestinationResponseBodyHttpApiParametersApiParameters { + s.In = &v + return s +} + +type GetApiDestinationResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *GetApiDestinationResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s GetApiDestinationResponse) String() string { + return tea.Prettify(s) +} + +func (s GetApiDestinationResponse) GoString() string { + return s.String() +} + +func (s *GetApiDestinationResponse) SetHeaders(v map[string]*string) *GetApiDestinationResponse { + s.Headers = v + return s +} + +func (s *GetApiDestinationResponse) SetStatusCode(v int32) *GetApiDestinationResponse { + s.StatusCode = &v + return s +} + +func (s *GetApiDestinationResponse) SetBody(v *GetApiDestinationResponseBody) *GetApiDestinationResponse { + s.Body = v + return s +} + +type DeleteApiDestinationRequest struct { + // The name of the API destination. This parameter is required. + // + // example: + // + // ApiDestinationName + ApiDestinationName *string `json:"apiDestinationName,omitempty" xml:"apiDestinationName,omitempty"` +} + +func (s DeleteApiDestinationRequest) String() string { + return tea.Prettify(s) +} + +func (s DeleteApiDestinationRequest) GoString() string { + return s.String() +} + +func (s *DeleteApiDestinationRequest) SetApiDestinationName(v string) *DeleteApiDestinationRequest { + s.ApiDestinationName = &v + return s +} + +type DeleteApiDestinationResponseBody struct { + // The returned response code. The value Success indicates that the request is successful. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + // + // example: + // + // success + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 382E6272-8E9C-5681-AC96-A8AF0BFAC1A5 + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s DeleteApiDestinationResponseBody) String() string { + return tea.Prettify(s) +} + +func (s DeleteApiDestinationResponseBody) GoString() string { + return s.String() +} + +func (s *DeleteApiDestinationResponseBody) SetCode(v string) *DeleteApiDestinationResponseBody { + s.Code = &v + return s +} + +func (s *DeleteApiDestinationResponseBody) SetMessage(v string) *DeleteApiDestinationResponseBody { + s.Message = &v + return s +} + +func (s *DeleteApiDestinationResponseBody) SetRequestId(v string) *DeleteApiDestinationResponseBody { + s.RequestId = &v + return s +} + +type DeleteApiDestinationResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *DeleteApiDestinationResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s DeleteApiDestinationResponse) String() string { + return tea.Prettify(s) +} + +func (s DeleteApiDestinationResponse) GoString() string { + return s.String() +} + +func (s *DeleteApiDestinationResponse) SetHeaders(v map[string]*string) *DeleteApiDestinationResponse { + s.Headers = v + return s +} + +func (s *DeleteApiDestinationResponse) SetStatusCode(v int32) *DeleteApiDestinationResponse { + s.StatusCode = &v + return s +} + +func (s *DeleteApiDestinationResponse) SetBody(v *DeleteApiDestinationResponseBody) *DeleteApiDestinationResponse { + s.Body = v + return s +} + +type ListApiDestinationsRequest struct { + // The prefix of the API destination name. + // + // example: + // + // api-demo + ApiDestinationNamePrefix *string `json:"apiDestinationNamePrefix,omitempty" xml:"apiDestinationNamePrefix,omitempty"` + // The connection name. + // + // example: + // + // connection-name + ConnectionName *string `json:"connectionName,omitempty" xml:"connectionName,omitempty"` + // The maximum number of entries to be returned in a call. You can use this parameter and NextToken to implement paging. + // + // - Default value: 10. + // + // example: + // + // 10 + MaxResults *int32 `json:"maxResults,omitempty" xml:"maxResults,omitempty"` + // If you set Limit and excess return values exist, this parameter is returned. + // + // - Default value: 0. + // + // example: + // + // 0 + NextToken *string `json:"nextToken,omitempty" xml:"nextToken,omitempty"` +} + +func (s ListApiDestinationsRequest) String() string { + return tea.Prettify(s) +} + +func (s ListApiDestinationsRequest) GoString() string { + return s.String() +} + +func (s *ListApiDestinationsRequest) SetApiDestinationNamePrefix(v string) *ListApiDestinationsRequest { + s.ApiDestinationNamePrefix = &v + return s +} + +func (s *ListApiDestinationsRequest) SetConnectionName(v string) *ListApiDestinationsRequest { + s.ConnectionName = &v + return s +} + +func (s *ListApiDestinationsRequest) SetMaxResults(v int32) *ListApiDestinationsRequest { + s.MaxResults = &v + return s +} + +func (s *ListApiDestinationsRequest) SetNextToken(v string) *ListApiDestinationsRequest { + s.NextToken = &v + return s +} + +type ListApiDestinationsResponseBody struct { + // The returned response code. The value Success indicates that the request is successful. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The API destinations. + ApiDestinations []*ListApiDestinationsResponseBodyApiDestinations `json:"apiDestinations,omitempty" xml:"apiDestinations,omitempty" type:"Repeated"` + // The maximum number of entries returned per page. + // + // example: + // + // 10 + MaxResults *int32 `json:"maxResults,omitempty" xml:"maxResults,omitempty"` + // If excess return values exist, this parameter is returned. + // + // example: + // + // 1 + NextToken *string `json:"nextToken,omitempty" xml:"nextToken,omitempty"` + // The total number of entries returned. + // + // example: + // + // 2 + Total *int `json:"total,omitempty" xml:"total,omitempty"` + // The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + // + // example: + // + // success + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 96D7C0AB-DCE5-5E82-96B8-4725E1706BB1 + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s ListApiDestinationsResponseBody) String() string { + return tea.Prettify(s) +} + +func (s ListApiDestinationsResponseBody) GoString() string { + return s.String() +} + +func (s *ListApiDestinationsResponseBody) SetCode(v string) *ListApiDestinationsResponseBody { + s.Code = &v + return s +} + +func (s *ListApiDestinationsResponseBody) SetApiDestinations(v []*ListApiDestinationsResponseBodyApiDestinations) *ListApiDestinationsResponseBody { + s.ApiDestinations = v + return s +} + +func (s *ListApiDestinationsResponseBody) SetMaxResults(v int32) *ListApiDestinationsResponseBody { + s.MaxResults = &v + return s +} + +func (s *ListApiDestinationsResponseBody) SetNextToken(v string) *ListApiDestinationsResponseBody { + s.NextToken = &v + return s +} + +func (s *ListApiDestinationsResponseBody) SetTotal(v int) *ListApiDestinationsResponseBody { + s.Total = &v + return s +} + +func (s *ListApiDestinationsResponseBody) SetMessage(v string) *ListApiDestinationsResponseBody { + s.Message = &v + return s +} + +func (s *ListApiDestinationsResponseBody) SetRequestId(v string) *ListApiDestinationsResponseBody { + s.RequestId = &v + return s +} + +type ListApiDestinationsResponseBodyApiDestinations struct { + // The name of the API destination. + // + // example: + // + // api-destination-2 + ApiDestinationName *string `json:"apiDestinationName,omitempty" xml:"apiDestinationName,omitempty"` + // The connection name. + // + // example: + // + // connection-name + ConnectionName *string `json:"connectionName,omitempty" xml:"connectionName,omitempty"` + // The description of the connection. + // + // example: + // + // demo + Description *string `json:"description,omitempty" xml:"description,omitempty"` + // The time when the API destination was created. + // + // example: + // + // 1665223213000 + GmtCreate *int64 `json:"gmtCreate,omitempty" xml:"gmtCreate,omitempty"` + // The request parameters that are configured for the API destination. + HttpApiParameters *ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters `json:"httpApiParameters,omitempty" xml:"httpApiParameters,omitempty" type:"Struct"` + // TODO + InvocationRateLimitPerSecond *int `json:"invocationRateLimitPerSecond,omitempty" xml:"invocationRateLimitPerSecond,omitempty"` +} + +func (s ListApiDestinationsResponseBodyApiDestinations) String() string { + return tea.Prettify(s) +} + +func (s ListApiDestinationsResponseBodyApiDestinations) GoString() string { + return s.String() +} + +func (s *ListApiDestinationsResponseBodyApiDestinations) SetApiDestinationName(v string) *ListApiDestinationsResponseBodyApiDestinations { + s.ApiDestinationName = &v + return s +} + +func (s *ListApiDestinationsResponseBodyApiDestinations) SetConnectionName(v string) *ListApiDestinationsResponseBodyApiDestinations { + s.ConnectionName = &v + return s +} + +func (s *ListApiDestinationsResponseBodyApiDestinations) SetDescription(v string) *ListApiDestinationsResponseBodyApiDestinations { + s.Description = &v + return s +} + +func (s *ListApiDestinationsResponseBodyApiDestinations) SetGmtCreate(v int64) *ListApiDestinationsResponseBodyApiDestinations { + s.GmtCreate = &v + return s +} + +func (s *ListApiDestinationsResponseBodyApiDestinations) SetHttpApiParameters(v *ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters) *ListApiDestinationsResponseBodyApiDestinations { + s.HttpApiParameters = v + return s +} + +func (s *ListApiDestinationsResponseBodyApiDestinations) SetInvocationRateLimitPerSecond(v int) *ListApiDestinationsResponseBodyApiDestinations { + s.InvocationRateLimitPerSecond = &v + return s +} + +type ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters struct { + // The endpoint of the API destination. + // + // example: + // + // http://127.0.0.1:8001/api + Endpoint *string `json:"endpoint,omitempty" xml:"endpoint,omitempty"` + // The HTTP request method. Valid values: + // + // - POST + // + // - GET + // + // - DELETE + // + // - PUT + // + // - HEAD + // + // - TRACE + // + // - PATCH + // + // example: + // + // POST + Method *string `json:"method,omitempty" xml:"method,omitempty"` + // TODO + ApiParameters []*ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters `json:"apiParameters,omitempty" xml:"apiParameters,omitempty" type:"Repeated"` +} + +func (s ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters) String() string { + return tea.Prettify(s) +} + +func (s ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters) GoString() string { + return s.String() +} + +func (s *ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters) SetEndpoint(v string) *ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters { + s.Endpoint = &v + return s +} + +func (s *ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters) SetMethod(v string) *ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters { + s.Method = &v + return s +} + +func (s *ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters) SetApiParameters(v []*ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters) *ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters { + s.ApiParameters = v + return s +} + +type ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters struct { + Name *string `json:"name,omitempty" xml:"name,omitempty"` + // The description of the API destination. The description can be up to 255 characters in length. + Description *string `json:"description,omitempty" xml:"description,omitempty"` + Type *string `json:"type,omitempty" xml:"type,omitempty"` + DefaultValue *string `json:"defaultValue,omitempty" xml:"defaultValue,omitempty"` + In *string `json:"in,omitempty" xml:"in,omitempty"` +} + +func (s ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters) String() string { + return tea.Prettify(s) +} + +func (s ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters) GoString() string { + return s.String() +} + +func (s *ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters) SetName(v string) *ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters { + s.Name = &v + return s +} + +func (s *ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters) SetDescription(v string) *ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters { + s.Description = &v + return s +} + +func (s *ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters) SetType(v string) *ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters { + s.Type = &v + return s +} + +func (s *ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters) SetDefaultValue(v string) *ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters { + s.DefaultValue = &v + return s +} + +func (s *ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters) SetIn(v string) *ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters { + s.In = &v + return s +} + +type ListApiDestinationsResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *ListApiDestinationsResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s ListApiDestinationsResponse) String() string { + return tea.Prettify(s) +} + +func (s ListApiDestinationsResponse) GoString() string { + return s.String() +} + +func (s *ListApiDestinationsResponse) SetHeaders(v map[string]*string) *ListApiDestinationsResponse { + s.Headers = v + return s +} + +func (s *ListApiDestinationsResponse) SetStatusCode(v int32) *ListApiDestinationsResponse { + s.StatusCode = &v + return s +} + +func (s *ListApiDestinationsResponse) SetBody(v *ListApiDestinationsResponseBody) *ListApiDestinationsResponse { + s.Body = v + return s +} + +// Description: +// +// Connection Controller apis: +// +// createConnection * +// +// deleteConnection * +// +// updateConnection * +// +// getConnection * +// +// selectOneConnection * +// +// listConnections * +// +// listEnumsResponse * +type CreateConnectionRequest struct { + // The parameters that are configured for authentication. + AuthParameters *CreateConnectionRequestAuthParameters `json:"authParameters,omitempty" xml:"authParameters,omitempty" type:"Struct"` + // The name of the connection. The name must be 2 to 127 characters in length. + // + // This parameter is required. + // + // example: + // + // connection-name + ConnectionName *string `json:"connectionName,omitempty" xml:"connectionName,omitempty"` + // The description of the connection. The description can be up to 255 characters in length. + // + // example: + // + // demo + Description *string `json:"description,omitempty" xml:"description,omitempty"` + // The parameters that are configured for the network. This parameter is required. + NetworkParameters *CreateConnectionRequestNetworkParameters `json:"networkParameters,omitempty" xml:"networkParameters,omitempty" type:"Struct"` +} + +func (s CreateConnectionRequest) String() string { + return tea.Prettify(s) +} + +func (s CreateConnectionRequest) GoString() string { + return s.String() +} + +func (s *CreateConnectionRequest) SetAuthParameters(v *CreateConnectionRequestAuthParameters) *CreateConnectionRequest { + s.AuthParameters = v + return s +} + +func (s *CreateConnectionRequest) SetConnectionName(v string) *CreateConnectionRequest { + s.ConnectionName = &v + return s +} + +func (s *CreateConnectionRequest) SetDescription(v string) *CreateConnectionRequest { + s.Description = &v + return s +} + +func (s *CreateConnectionRequest) SetNetworkParameters(v *CreateConnectionRequestNetworkParameters) *CreateConnectionRequest { + s.NetworkParameters = v + return s +} + +type CreateConnectionRequestAuthParameters struct { + // The parameters that are configured for API key authentication. + ApiKeyAuthParameters *CreateConnectionRequestAuthParametersApiKeyAuthParameters `json:"apiKeyAuthParameters,omitempty" xml:"apiKeyAuthParameters,omitempty" type:"Struct"` + // The authentication type. Valid values: + // + // BASIC_AUTH: basic authentication. + // + // Introduction: Basic authentication is a simple authentication scheme built into the HTTP protocol. When you use the HTTP protocol for communications, the authentication method that the HTTP server uses to authenticate user identities on the client is defined in the protocol. The request header is in the Authorization: Basic Base64-encoded string (Username:Password) format. + // + // 1. Username and Password are required + // + // API_KEY_AUTH: API key authentication. + // + // Introduction: The request header is in the Token: Token value format. + // + // - ApiKeyName and ApiKeyValue are required. + // + // OAUTH_AUTH: OAuth authentication. + // + // Introduction: OAuth2.0 is an authentication mechanism. In normal cases, a system that does not use OAuth2.0 can access the resources of the server from the client. To ensure access security, access tokens are used to authenticate users in OAuth 2.0. The client must use an access token to access protected resources. This way, OAuth 2.0 protects resources from being accessed from malicious clients and improves system security. + // + // - AuthorizationEndpoint, OAuthHttpParameters, and HttpMethod are required. + // + // example: + // + // BASIC_AUTH + AuthorizationType *string `json:"authorizationType,omitempty" xml:"authorizationType,omitempty"` + // The parameters that are configured for basic authentication. + BasicAuthParameters *CreateConnectionRequestAuthParametersBasicAuthParameters `json:"basicAuthParameters,omitempty" xml:"basicAuthParameters,omitempty" type:"Struct"` + // The parameters that are configured for OAuth authentication. + OauthParameters *CreateConnectionRequestAuthParametersOauthParameters `json:"oauthParameters,omitempty" xml:"oauthParameters,omitempty" type:"Struct"` +} + +func (s CreateConnectionRequestAuthParameters) String() string { + return tea.Prettify(s) +} + +func (s CreateConnectionRequestAuthParameters) GoString() string { + return s.String() +} + +func (s *CreateConnectionRequestAuthParameters) SetApiKeyAuthParameters(v *CreateConnectionRequestAuthParametersApiKeyAuthParameters) *CreateConnectionRequestAuthParameters { + s.ApiKeyAuthParameters = v + return s +} + +func (s *CreateConnectionRequestAuthParameters) SetAuthorizationType(v string) *CreateConnectionRequestAuthParameters { + s.AuthorizationType = &v + return s +} + +func (s *CreateConnectionRequestAuthParameters) SetBasicAuthParameters(v *CreateConnectionRequestAuthParametersBasicAuthParameters) *CreateConnectionRequestAuthParameters { + s.BasicAuthParameters = v + return s +} + +func (s *CreateConnectionRequestAuthParameters) SetOauthParameters(v *CreateConnectionRequestAuthParametersOauthParameters) *CreateConnectionRequestAuthParameters { + s.OauthParameters = v + return s +} + +type CreateConnectionRequestAuthParametersApiKeyAuthParameters struct { + // The key of the API key. + // + // example: + // + // Token + ApiKeyName *string `json:"apiKeyName,omitempty" xml:"apiKeyName,omitempty"` + // The value of the API key. + // + // example: + // + // adkjnakddh**** + ApiKeyValue *string `json:"apiKeyValue,omitempty" xml:"apiKeyValue,omitempty"` +} + +func (s CreateConnectionRequestAuthParametersApiKeyAuthParameters) String() string { + return tea.Prettify(s) +} + +func (s CreateConnectionRequestAuthParametersApiKeyAuthParameters) GoString() string { + return s.String() +} + +func (s *CreateConnectionRequestAuthParametersApiKeyAuthParameters) SetApiKeyName(v string) *CreateConnectionRequestAuthParametersApiKeyAuthParameters { + s.ApiKeyName = &v + return s +} + +func (s *CreateConnectionRequestAuthParametersApiKeyAuthParameters) SetApiKeyValue(v string) *CreateConnectionRequestAuthParametersApiKeyAuthParameters { + s.ApiKeyValue = &v + return s +} + +type CreateConnectionRequestAuthParametersBasicAuthParameters struct { + // The password for basic authentication. + // + // example: + // + // ******* + Password *string `json:"password,omitempty" xml:"password,omitempty"` + // The username for basic authentication. + // + // example: + // + // admin + Username *string `json:"username,omitempty" xml:"username,omitempty"` +} + +func (s CreateConnectionRequestAuthParametersBasicAuthParameters) String() string { + return tea.Prettify(s) +} + +func (s CreateConnectionRequestAuthParametersBasicAuthParameters) GoString() string { + return s.String() +} + +func (s *CreateConnectionRequestAuthParametersBasicAuthParameters) SetPassword(v string) *CreateConnectionRequestAuthParametersBasicAuthParameters { + s.Password = &v + return s +} + +func (s *CreateConnectionRequestAuthParametersBasicAuthParameters) SetUsername(v string) *CreateConnectionRequestAuthParametersBasicAuthParameters { + s.Username = &v + return s +} + +type CreateConnectionRequestAuthParametersOauthParameters struct { + // The endpoint that is used to obtain the OAuth token. + // + // example: + // + // http://localhost:8080/oauth/token + AuthorizationEndpoint *string `json:"authorizationEndpoint,omitempty" xml:"authorizationEndpoint,omitempty"` + // The parameters that are configured for the client. + ClientParameters *CreateConnectionRequestAuthParametersOauthParametersClientParameters `json:"clientParameters,omitempty" xml:"clientParameters,omitempty" type:"Struct"` + // The HTTP request method. Valid values: + // + // - GET + // + // - POST + // + // - HEAD + // + // example: + // + // POST + HttpMethod *string `json:"httpMethod,omitempty" xml:"httpMethod,omitempty"` + // The request parameters for OAuth authentication. + OauthHttpParameters *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters `json:"oauthHttpParameters,omitempty" xml:"oauthHttpParameters,omitempty" type:"Struct"` +} + +func (s CreateConnectionRequestAuthParametersOauthParameters) String() string { + return tea.Prettify(s) +} + +func (s CreateConnectionRequestAuthParametersOauthParameters) GoString() string { + return s.String() +} + +func (s *CreateConnectionRequestAuthParametersOauthParameters) SetAuthorizationEndpoint(v string) *CreateConnectionRequestAuthParametersOauthParameters { + s.AuthorizationEndpoint = &v + return s +} + +func (s *CreateConnectionRequestAuthParametersOauthParameters) SetClientParameters(v *CreateConnectionRequestAuthParametersOauthParametersClientParameters) *CreateConnectionRequestAuthParametersOauthParameters { + s.ClientParameters = v + return s +} + +func (s *CreateConnectionRequestAuthParametersOauthParameters) SetHttpMethod(v string) *CreateConnectionRequestAuthParametersOauthParameters { + s.HttpMethod = &v + return s +} + +func (s *CreateConnectionRequestAuthParametersOauthParameters) SetOauthHttpParameters(v *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters) *CreateConnectionRequestAuthParametersOauthParameters { + s.OauthHttpParameters = v + return s +} + +type CreateConnectionRequestAuthParametersOauthParametersClientParameters struct { + // The client ID. + // + // example: + // + // ClientID + ClientID *string `json:"clientID,omitempty" xml:"clientID,omitempty"` + // The client key secret of the application. + // + // example: + // + // ClientSecret + ClientSecret *string `json:"clientSecret,omitempty" xml:"clientSecret,omitempty"` +} + +func (s CreateConnectionRequestAuthParametersOauthParametersClientParameters) String() string { + return tea.Prettify(s) +} + +func (s CreateConnectionRequestAuthParametersOauthParametersClientParameters) GoString() string { + return s.String() +} + +func (s *CreateConnectionRequestAuthParametersOauthParametersClientParameters) SetClientID(v string) *CreateConnectionRequestAuthParametersOauthParametersClientParameters { + s.ClientID = &v + return s +} + +func (s *CreateConnectionRequestAuthParametersOauthParametersClientParameters) SetClientSecret(v string) *CreateConnectionRequestAuthParametersOauthParametersClientParameters { + s.ClientSecret = &v + return s +} + +type CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters struct { + // The parameters that are configured for the request. + BodyParameters []*CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters `json:"bodyParameters,omitempty" xml:"bodyParameters,omitempty" type:"Repeated"` + // The parameters that are configured for the request header. + HeaderParameters []*CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters `json:"headerParameters,omitempty" xml:"headerParameters,omitempty" type:"Repeated"` + // The parameters that are configured for the request path. + QueryStringParameters []*CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters `json:"queryStringParameters,omitempty" xml:"queryStringParameters,omitempty" type:"Repeated"` +} + +func (s CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters) String() string { + return tea.Prettify(s) +} + +func (s CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters) GoString() string { + return s.String() +} + +func (s *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters) SetBodyParameters(v []*CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters) *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters { + s.BodyParameters = v + return s +} + +func (s *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters) SetHeaderParameters(v []*CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters) *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters { + s.HeaderParameters = v + return s +} + +func (s *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters) SetQueryStringParameters(v []*CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters { + s.QueryStringParameters = v + return s +} + +type CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters struct { + // Indicates whether authentication is enabled. + // + // example: + // + // false + IsValueSecret *string `json:"isValueSecret,omitempty" xml:"isValueSecret,omitempty"` + // The key in the request body. + // + // example: + // + // name + Key *string `json:"key,omitempty" xml:"key,omitempty"` + // The value of the key in the request body. + // + // example: + // + // demo + Value *string `json:"value,omitempty" xml:"value,omitempty"` +} + +func (s CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters) String() string { + return tea.Prettify(s) +} + +func (s CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters) GoString() string { + return s.String() +} + +func (s *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters) SetIsValueSecret(v string) *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters { + s.IsValueSecret = &v + return s +} + +func (s *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters) SetKey(v string) *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters { + s.Key = &v + return s +} + +func (s *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters) SetValue(v string) *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters { + s.Value = &v + return s +} + +type CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters struct { + // Indicates whether authentication is enabled. + // + // example: + // + // false + IsValueSecret *string `json:"isValueSecret,omitempty" xml:"isValueSecret,omitempty"` + // The key in the request header. + // + // example: + // + // name + Key *string `json:"key,omitempty" xml:"key,omitempty"` + // The value of the key in the request header. + // + // example: + // + // demo + Value *string `json:"value,omitempty" xml:"value,omitempty"` +} + +func (s CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters) String() string { + return tea.Prettify(s) +} + +func (s CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters) GoString() string { + return s.String() +} + +func (s *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters) SetIsValueSecret(v string) *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters { + s.IsValueSecret = &v + return s +} + +func (s *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters) SetKey(v string) *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters { + s.Key = &v + return s +} + +func (s *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters) SetValue(v string) *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters { + s.Value = &v + return s +} + +type CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters struct { + // Indicates whether authentication is enabled. + // + // example: + // + // false + IsValueSecret *string `json:"isValueSecret,omitempty" xml:"isValueSecret,omitempty"` + // The key in the request path. + // + // example: + // + // name + Key *string `json:"key,omitempty" xml:"key,omitempty"` + // The value of the key in the request path. + // + // example: + // + // demo + Value *string `json:"value,omitempty" xml:"value,omitempty"` +} + +func (s CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) String() string { + return tea.Prettify(s) +} + +func (s CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) GoString() string { + return s.String() +} + +func (s *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) SetIsValueSecret(v string) *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters { + s.IsValueSecret = &v + return s +} + +func (s *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) SetKey(v string) *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters { + s.Key = &v + return s +} + +func (s *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) SetValue(v string) *CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters { + s.Value = &v + return s +} + +type CreateConnectionRequestNetworkParameters struct { + // The network type. Valid values: + // + // PublicNetwork and PrivateNetwork. + // + // - Note: If you set this parameter to PrivateNetwork, you must configure VpcId, VswitcheId, and SecurityGroupId. + // + // This parameter is required. + // + // example: + // + // PublicNetwork + NetworkType *string `json:"networkType,omitempty" xml:"networkType,omitempty"` + // The ID of the security group. + // + // example: + // + // eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9**** + SecurityGroupId *string `json:"securityGroupId,omitempty" xml:"securityGroupId,omitempty"` + // The VPC. ID + // + // example: + // + // eb-test/vpc-bp1symadadwnwg**** + VpcId *string `json:"vpcId,omitempty" xml:"vpcId,omitempty"` + // The vSwitch ID. + // + // example: + // + // vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeq**** + VswitcheId *string `json:"vswitcheId,omitempty" xml:"vswitcheId,omitempty"` +} + +func (s CreateConnectionRequestNetworkParameters) String() string { + return tea.Prettify(s) +} + +func (s CreateConnectionRequestNetworkParameters) GoString() string { + return s.String() +} + +func (s *CreateConnectionRequestNetworkParameters) SetNetworkType(v string) *CreateConnectionRequestNetworkParameters { + s.NetworkType = &v + return s +} + +func (s *CreateConnectionRequestNetworkParameters) SetSecurityGroupId(v string) *CreateConnectionRequestNetworkParameters { + s.SecurityGroupId = &v + return s +} + +func (s *CreateConnectionRequestNetworkParameters) SetVpcId(v string) *CreateConnectionRequestNetworkParameters { + s.VpcId = &v + return s +} + +func (s *CreateConnectionRequestNetworkParameters) SetVswitcheId(v string) *CreateConnectionRequestNetworkParameters { + s.VswitcheId = &v + return s +} + +type CreateConnectionResponseBody struct { + // The returned response code. The value Success indicates that the request is successful. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The connection name. + // + // example: + // + // connection-demo + ConnectionName *string `json:"connectionName,omitempty" xml:"connectionName,omitempty"` + // The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + // + // example: + // + // success + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 7DA60DED-CD36-5837-B848-C01A23D2**** + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s CreateConnectionResponseBody) String() string { + return tea.Prettify(s) +} + +func (s CreateConnectionResponseBody) GoString() string { + return s.String() +} + +func (s *CreateConnectionResponseBody) SetCode(v string) *CreateConnectionResponseBody { + s.Code = &v + return s +} + +func (s *CreateConnectionResponseBody) SetConnectionName(v string) *CreateConnectionResponseBody { + s.ConnectionName = &v + return s +} + +func (s *CreateConnectionResponseBody) SetMessage(v string) *CreateConnectionResponseBody { + s.Message = &v + return s +} + +func (s *CreateConnectionResponseBody) SetRequestId(v string) *CreateConnectionResponseBody { + s.RequestId = &v + return s +} + +type CreateConnectionResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *CreateConnectionResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s CreateConnectionResponse) String() string { + return tea.Prettify(s) +} + +func (s CreateConnectionResponse) GoString() string { + return s.String() +} + +func (s *CreateConnectionResponse) SetHeaders(v map[string]*string) *CreateConnectionResponse { + s.Headers = v + return s +} + +func (s *CreateConnectionResponse) SetStatusCode(v int32) *CreateConnectionResponse { + s.StatusCode = &v + return s +} + +func (s *CreateConnectionResponse) SetBody(v *CreateConnectionResponseBody) *CreateConnectionResponse { + s.Body = v + return s +} + +type DeleteConnectionRequest struct { + // The name of the connection that you want to delete. This parameter is required. + // + // example: + // + // connection-name + ConnectionName *string `json:"connectionName,omitempty" xml:"connectionName,omitempty"` +} + +func (s DeleteConnectionRequest) String() string { + return tea.Prettify(s) +} + +func (s DeleteConnectionRequest) GoString() string { + return s.String() +} + +func (s *DeleteConnectionRequest) SetConnectionName(v string) *DeleteConnectionRequest { + s.ConnectionName = &v + return s +} + +type DeleteConnectionResponseBody struct { + // The returned response code. The value Success indicates that the request is successful. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + // + // example: + // + // success + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 8EF25E37-1750-5D7A-BA56-F8AE081A69C8 + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s DeleteConnectionResponseBody) String() string { + return tea.Prettify(s) +} + +func (s DeleteConnectionResponseBody) GoString() string { + return s.String() +} + +func (s *DeleteConnectionResponseBody) SetCode(v string) *DeleteConnectionResponseBody { + s.Code = &v + return s +} + +func (s *DeleteConnectionResponseBody) SetMessage(v string) *DeleteConnectionResponseBody { + s.Message = &v + return s +} + +func (s *DeleteConnectionResponseBody) SetRequestId(v string) *DeleteConnectionResponseBody { + s.RequestId = &v + return s +} + +type DeleteConnectionResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *DeleteConnectionResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s DeleteConnectionResponse) String() string { + return tea.Prettify(s) +} + +func (s DeleteConnectionResponse) GoString() string { + return s.String() +} + +func (s *DeleteConnectionResponse) SetHeaders(v map[string]*string) *DeleteConnectionResponse { + s.Headers = v + return s +} + +func (s *DeleteConnectionResponse) SetStatusCode(v int32) *DeleteConnectionResponse { + s.StatusCode = &v + return s +} + +func (s *DeleteConnectionResponse) SetBody(v *DeleteConnectionResponseBody) *DeleteConnectionResponse { + s.Body = v + return s +} + +type UpdateConnectionRequest struct { + // The parameters that are configured for authentication. + AuthParameters *UpdateConnectionRequestAuthParameters `json:"authParameters,omitempty" xml:"authParameters,omitempty" type:"Struct"` + // The name of the connection. The name must be 2 to 127 characters in length. + // + // This parameter is required. + // + // example: + // + // connection-name + ConnectionName *string `json:"connectionName,omitempty" xml:"connectionName,omitempty"` + // The description of the connection. The description can be up to 255 characters in length. + // + // example: + // + // demo + Description *string `json:"description,omitempty" xml:"description,omitempty"` + // The parameters that are configured for the network. This parameter is required. + NetworkParameters *UpdateConnectionRequestNetworkParameters `json:"networkParameters,omitempty" xml:"networkParameters,omitempty" type:"Struct"` +} + +func (s UpdateConnectionRequest) String() string { + return tea.Prettify(s) +} + +func (s UpdateConnectionRequest) GoString() string { + return s.String() +} + +func (s *UpdateConnectionRequest) SetAuthParameters(v *UpdateConnectionRequestAuthParameters) *UpdateConnectionRequest { + s.AuthParameters = v + return s +} + +func (s *UpdateConnectionRequest) SetConnectionName(v string) *UpdateConnectionRequest { + s.ConnectionName = &v + return s +} + +func (s *UpdateConnectionRequest) SetDescription(v string) *UpdateConnectionRequest { + s.Description = &v + return s +} + +func (s *UpdateConnectionRequest) SetNetworkParameters(v *UpdateConnectionRequestNetworkParameters) *UpdateConnectionRequest { + s.NetworkParameters = v + return s +} + +type UpdateConnectionRequestAuthParameters struct { + // The parameters that are configured for API key authentication. + ApiKeyAuthParameters *UpdateConnectionRequestAuthParametersApiKeyAuthParameters `json:"apiKeyAuthParameters,omitempty" xml:"apiKeyAuthParameters,omitempty" type:"Struct"` + // The authentication type. Valid values: + // + // BASIC_AUTH: basic authentication. + // + // Introduction: Basic authentication is a simple authentication scheme built into the HTTP protocol. When you use the HTTP protocol for communications, the authentication method that the HTTP server uses to authenticate user identities on the client is defined in the protocol. The request header is in the Authorization: Basic Base64-encoded string (Username:Password) format. + // + // 1. Username and Password are required + // + // API_KEY_AUTH: API key authentication. + // + // Introduction: The request header is in the Token: Token value format. + // + // - ApiKeyName and ApiKeyValue are required. + // + // OAUTH_AUTH: OAuth authentication. + // + // Introduction: OAuth2.0 is an authentication mechanism. In normal cases, a system that does not use OAuth2.0 can access the resources of the server from the client. To ensure access security, access tokens are used to authenticate users in OAuth 2.0. The client must use an access token to access protected resources. This way, OAuth 2.0 protects resources from being accessed from malicious clients and improves system security. + // + // - AuthorizationEndpoint, OAuthHttpParameters, and HttpMethod are required. + // + // example: + // + // BASIC_AUTH + AuthorizationType *string `json:"authorizationType,omitempty" xml:"authorizationType,omitempty"` + // The parameters that are configured for basic authentication. + BasicAuthParameters *UpdateConnectionRequestAuthParametersBasicAuthParameters `json:"basicAuthParameters,omitempty" xml:"basicAuthParameters,omitempty" type:"Struct"` + // The parameters that are configured for OAuth authentication. + OauthParameters *UpdateConnectionRequestAuthParametersOauthParameters `json:"oauthParameters,omitempty" xml:"oauthParameters,omitempty" type:"Struct"` +} + +func (s UpdateConnectionRequestAuthParameters) String() string { + return tea.Prettify(s) +} + +func (s UpdateConnectionRequestAuthParameters) GoString() string { + return s.String() +} + +func (s *UpdateConnectionRequestAuthParameters) SetApiKeyAuthParameters(v *UpdateConnectionRequestAuthParametersApiKeyAuthParameters) *UpdateConnectionRequestAuthParameters { + s.ApiKeyAuthParameters = v + return s +} + +func (s *UpdateConnectionRequestAuthParameters) SetAuthorizationType(v string) *UpdateConnectionRequestAuthParameters { + s.AuthorizationType = &v + return s +} + +func (s *UpdateConnectionRequestAuthParameters) SetBasicAuthParameters(v *UpdateConnectionRequestAuthParametersBasicAuthParameters) *UpdateConnectionRequestAuthParameters { + s.BasicAuthParameters = v + return s +} + +func (s *UpdateConnectionRequestAuthParameters) SetOauthParameters(v *UpdateConnectionRequestAuthParametersOauthParameters) *UpdateConnectionRequestAuthParameters { + s.OauthParameters = v + return s +} + +type UpdateConnectionRequestAuthParametersApiKeyAuthParameters struct { + // The key of the API key. + // + // example: + // + // Token + ApiKeyName *string `json:"apiKeyName,omitempty" xml:"apiKeyName,omitempty"` + // The value of the API key. + // + // example: + // + // adkjnakddh**** + ApiKeyValue *string `json:"apiKeyValue,omitempty" xml:"apiKeyValue,omitempty"` +} + +func (s UpdateConnectionRequestAuthParametersApiKeyAuthParameters) String() string { + return tea.Prettify(s) +} + +func (s UpdateConnectionRequestAuthParametersApiKeyAuthParameters) GoString() string { + return s.String() +} + +func (s *UpdateConnectionRequestAuthParametersApiKeyAuthParameters) SetApiKeyName(v string) *UpdateConnectionRequestAuthParametersApiKeyAuthParameters { + s.ApiKeyName = &v + return s +} + +func (s *UpdateConnectionRequestAuthParametersApiKeyAuthParameters) SetApiKeyValue(v string) *UpdateConnectionRequestAuthParametersApiKeyAuthParameters { + s.ApiKeyValue = &v + return s +} + +type UpdateConnectionRequestAuthParametersBasicAuthParameters struct { + // The password for basic authentication. + // + // example: + // + // ******* + Password *string `json:"password,omitempty" xml:"password,omitempty"` + // The username for basic authentication. + // + // example: + // + // admin + Username *string `json:"username,omitempty" xml:"username,omitempty"` +} + +func (s UpdateConnectionRequestAuthParametersBasicAuthParameters) String() string { + return tea.Prettify(s) +} + +func (s UpdateConnectionRequestAuthParametersBasicAuthParameters) GoString() string { + return s.String() +} + +func (s *UpdateConnectionRequestAuthParametersBasicAuthParameters) SetPassword(v string) *UpdateConnectionRequestAuthParametersBasicAuthParameters { + s.Password = &v + return s +} + +func (s *UpdateConnectionRequestAuthParametersBasicAuthParameters) SetUsername(v string) *UpdateConnectionRequestAuthParametersBasicAuthParameters { + s.Username = &v + return s +} + +type UpdateConnectionRequestAuthParametersOauthParameters struct { + // The endpoint that is used to obtain the OAuth token. + // + // example: + // + // http://localhost:8080/oauth/token + AuthorizationEndpoint *string `json:"authorizationEndpoint,omitempty" xml:"authorizationEndpoint,omitempty"` + // The parameters that are configured for the client. + ClientParameters *UpdateConnectionRequestAuthParametersOauthParametersClientParameters `json:"clientParameters,omitempty" xml:"clientParameters,omitempty" type:"Struct"` + // The HTTP request method. Valid values: + // + // - GET + // + // - POST + // + // - HEAD + // + // example: + // + // POST + HttpMethod *string `json:"httpMethod,omitempty" xml:"httpMethod,omitempty"` + // The request parameters for OAuth authentication. + OauthHttpParameters *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters `json:"oauthHttpParameters,omitempty" xml:"oauthHttpParameters,omitempty" type:"Struct"` +} + +func (s UpdateConnectionRequestAuthParametersOauthParameters) String() string { + return tea.Prettify(s) +} + +func (s UpdateConnectionRequestAuthParametersOauthParameters) GoString() string { + return s.String() +} + +func (s *UpdateConnectionRequestAuthParametersOauthParameters) SetAuthorizationEndpoint(v string) *UpdateConnectionRequestAuthParametersOauthParameters { + s.AuthorizationEndpoint = &v + return s +} + +func (s *UpdateConnectionRequestAuthParametersOauthParameters) SetClientParameters(v *UpdateConnectionRequestAuthParametersOauthParametersClientParameters) *UpdateConnectionRequestAuthParametersOauthParameters { + s.ClientParameters = v + return s +} + +func (s *UpdateConnectionRequestAuthParametersOauthParameters) SetHttpMethod(v string) *UpdateConnectionRequestAuthParametersOauthParameters { + s.HttpMethod = &v + return s +} + +func (s *UpdateConnectionRequestAuthParametersOauthParameters) SetOauthHttpParameters(v *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters) *UpdateConnectionRequestAuthParametersOauthParameters { + s.OauthHttpParameters = v + return s +} + +type UpdateConnectionRequestAuthParametersOauthParametersClientParameters struct { + // The client ID. + // + // example: + // + // ClientID + ClientID *string `json:"clientID,omitempty" xml:"clientID,omitempty"` + // The client key secret of the application. + // + // example: + // + // ClientSecret + ClientSecret *string `json:"clientSecret,omitempty" xml:"clientSecret,omitempty"` +} + +func (s UpdateConnectionRequestAuthParametersOauthParametersClientParameters) String() string { + return tea.Prettify(s) +} + +func (s UpdateConnectionRequestAuthParametersOauthParametersClientParameters) GoString() string { + return s.String() +} + +func (s *UpdateConnectionRequestAuthParametersOauthParametersClientParameters) SetClientID(v string) *UpdateConnectionRequestAuthParametersOauthParametersClientParameters { + s.ClientID = &v + return s +} + +func (s *UpdateConnectionRequestAuthParametersOauthParametersClientParameters) SetClientSecret(v string) *UpdateConnectionRequestAuthParametersOauthParametersClientParameters { + s.ClientSecret = &v + return s +} + +type UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters struct { + // The parameters that are configured for the request. + BodyParameters []*UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters `json:"bodyParameters,omitempty" xml:"bodyParameters,omitempty" type:"Repeated"` + // The parameters that are configured for the request header. + HeaderParameters []*UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters `json:"headerParameters,omitempty" xml:"headerParameters,omitempty" type:"Repeated"` + // The parameters that are configured for the request path. + QueryStringParameters []*UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters `json:"queryStringParameters,omitempty" xml:"queryStringParameters,omitempty" type:"Repeated"` +} + +func (s UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters) String() string { + return tea.Prettify(s) +} + +func (s UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters) GoString() string { + return s.String() +} + +func (s *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters) SetBodyParameters(v []*UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters) *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters { + s.BodyParameters = v + return s +} + +func (s *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters) SetHeaderParameters(v []*UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters) *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters { + s.HeaderParameters = v + return s +} + +func (s *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters) SetQueryStringParameters(v []*UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters { + s.QueryStringParameters = v + return s +} + +type UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters struct { + // Indicates whether authentication is enabled. + // + // example: + // + // false + IsValueSecret *string `json:"isValueSecret,omitempty" xml:"isValueSecret,omitempty"` + // The key in the request body. + // + // example: + // + // name + Key *string `json:"key,omitempty" xml:"key,omitempty"` + // The value of the key in the request body. + // + // example: + // + // demo + Value *string `json:"value,omitempty" xml:"value,omitempty"` +} + +func (s UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters) String() string { + return tea.Prettify(s) +} + +func (s UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters) GoString() string { + return s.String() +} + +func (s *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters) SetIsValueSecret(v string) *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters { + s.IsValueSecret = &v + return s +} + +func (s *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters) SetKey(v string) *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters { + s.Key = &v + return s +} + +func (s *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters) SetValue(v string) *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters { + s.Value = &v + return s +} + +type UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters struct { + // Indicates whether authentication is enabled. + // + // example: + // + // false + IsValueSecret *string `json:"isValueSecret,omitempty" xml:"isValueSecret,omitempty"` + // The key in the request header. + // + // example: + // + // name + Key *string `json:"key,omitempty" xml:"key,omitempty"` + // The value of the key in the request header. + // + // example: + // + // demo + Value *string `json:"value,omitempty" xml:"value,omitempty"` +} + +func (s UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters) String() string { + return tea.Prettify(s) +} + +func (s UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters) GoString() string { + return s.String() +} + +func (s *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters) SetIsValueSecret(v string) *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters { + s.IsValueSecret = &v + return s +} + +func (s *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters) SetKey(v string) *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters { + s.Key = &v + return s +} + +func (s *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters) SetValue(v string) *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters { + s.Value = &v + return s +} + +type UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters struct { + // Indicates whether authentication is enabled. + // + // example: + // + // false + IsValueSecret *string `json:"isValueSecret,omitempty" xml:"isValueSecret,omitempty"` + // The key in the request path. + // + // example: + // + // name + Key *string `json:"key,omitempty" xml:"key,omitempty"` + // The value of the key in the request path. + // + // example: + // + // demo + Value *string `json:"value,omitempty" xml:"value,omitempty"` +} + +func (s UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) String() string { + return tea.Prettify(s) +} + +func (s UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) GoString() string { + return s.String() +} + +func (s *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) SetIsValueSecret(v string) *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters { + s.IsValueSecret = &v + return s +} + +func (s *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) SetKey(v string) *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters { + s.Key = &v + return s +} + +func (s *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) SetValue(v string) *UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters { + s.Value = &v + return s +} + +type UpdateConnectionRequestNetworkParameters struct { + // The network type. Valid values: + // + // PublicNetwork and PrivateNetwork. + // + // - Note: If you set this parameter to PrivateNetwork, you must configure VpcId, VswitcheId, and SecurityGroupId. + // + // This parameter is required. + // + // example: + // + // PublicNetwork + NetworkType *string `json:"networkType,omitempty" xml:"networkType,omitempty"` + // The ID of the security group. + // + // example: + // + // eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9**** + SecurityGroupId *string `json:"securityGroupId,omitempty" xml:"securityGroupId,omitempty"` + // The VPC. ID + // + // example: + // + // eb-test/vpc-bp1symadadwnwg**** + VpcId *string `json:"vpcId,omitempty" xml:"vpcId,omitempty"` + // The vSwitch ID. + // + // example: + // + // vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeq**** + VswitcheId *string `json:"vswitcheId,omitempty" xml:"vswitcheId,omitempty"` +} + +func (s UpdateConnectionRequestNetworkParameters) String() string { + return tea.Prettify(s) +} + +func (s UpdateConnectionRequestNetworkParameters) GoString() string { + return s.String() +} + +func (s *UpdateConnectionRequestNetworkParameters) SetNetworkType(v string) *UpdateConnectionRequestNetworkParameters { + s.NetworkType = &v + return s +} + +func (s *UpdateConnectionRequestNetworkParameters) SetSecurityGroupId(v string) *UpdateConnectionRequestNetworkParameters { + s.SecurityGroupId = &v + return s +} + +func (s *UpdateConnectionRequestNetworkParameters) SetVpcId(v string) *UpdateConnectionRequestNetworkParameters { + s.VpcId = &v + return s +} + +func (s *UpdateConnectionRequestNetworkParameters) SetVswitcheId(v string) *UpdateConnectionRequestNetworkParameters { + s.VswitcheId = &v + return s +} + +type UpdateConnectionResponseBody struct { + // The returned response code. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The returned message. + // + // example: + // + // success + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 8346BE8F-40F3-533D-A0B8-1359C31BD5BA + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s UpdateConnectionResponseBody) String() string { + return tea.Prettify(s) +} + +func (s UpdateConnectionResponseBody) GoString() string { + return s.String() +} + +func (s *UpdateConnectionResponseBody) SetCode(v string) *UpdateConnectionResponseBody { + s.Code = &v + return s +} + +func (s *UpdateConnectionResponseBody) SetMessage(v string) *UpdateConnectionResponseBody { + s.Message = &v + return s +} + +func (s *UpdateConnectionResponseBody) SetRequestId(v string) *UpdateConnectionResponseBody { + s.RequestId = &v + return s +} + +type UpdateConnectionResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *UpdateConnectionResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s UpdateConnectionResponse) String() string { + return tea.Prettify(s) +} + +func (s UpdateConnectionResponse) GoString() string { + return s.String() +} + +func (s *UpdateConnectionResponse) SetHeaders(v map[string]*string) *UpdateConnectionResponse { + s.Headers = v + return s +} + +func (s *UpdateConnectionResponse) SetStatusCode(v int32) *UpdateConnectionResponse { + s.StatusCode = &v + return s +} + +func (s *UpdateConnectionResponse) SetBody(v *UpdateConnectionResponseBody) *UpdateConnectionResponse { + s.Body = v + return s +} + +type GetConnectionRequest struct { + // The connection name. This parameter is required. + // + // example: + // + // connection-name + ConnectionName *string `json:"connectionName,omitempty" xml:"connectionName,omitempty"` +} + +func (s GetConnectionRequest) String() string { + return tea.Prettify(s) +} + +func (s GetConnectionRequest) GoString() string { + return s.String() +} + +func (s *GetConnectionRequest) SetConnectionName(v string) *GetConnectionRequest { + s.ConnectionName = &v + return s +} + +type GetConnectionResponseBody struct { + // The returned response code. The value Success indicates that the request is successful. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The value of the key in the request path. + Connections []*GetConnectionResponseBodyConnections `json:"connections,omitempty" xml:"connections,omitempty" type:"Repeated"` + // The returned message. + // + // example: + // + // success + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The returned request ID. + // + // example: + // + // 34AD682D-5B91-5773-8132-AA38C130**** + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s GetConnectionResponseBody) String() string { + return tea.Prettify(s) +} + +func (s GetConnectionResponseBody) GoString() string { + return s.String() +} + +func (s *GetConnectionResponseBody) SetCode(v string) *GetConnectionResponseBody { + s.Code = &v + return s +} + +func (s *GetConnectionResponseBody) SetConnections(v []*GetConnectionResponseBodyConnections) *GetConnectionResponseBody { + s.Connections = v + return s +} + +func (s *GetConnectionResponseBody) SetMessage(v string) *GetConnectionResponseBody { + s.Message = &v + return s +} + +func (s *GetConnectionResponseBody) SetRequestId(v string) *GetConnectionResponseBody { + s.RequestId = &v + return s +} + +type GetConnectionResponseBodyConnections struct { + // The parameters that are configured for authentication. + AuthParameters *GetConnectionResponseBodyConnectionsAuthParameters `json:"authParameters,omitempty" xml:"authParameters,omitempty" type:"Struct"` + // The connection name. + // + // example: + // + // connection-name + ConnectionName *string `json:"connectionName,omitempty" xml:"connectionName,omitempty"` + // The connection description. + // + // example: + // + // The description of the connection. + Description *string `json:"description,omitempty" xml:"description,omitempty"` + // The time when the connection was created. + // + // example: + // + // 1592838994234 + GmtCreate *int64 `json:"gmtCreate,omitempty" xml:"gmtCreate,omitempty"` + // The connection ID. + // + // example: + // + // 1141093 + Id *int `json:"id,omitempty" xml:"id,omitempty"` + NetworkParameters *GetConnectionResponseBodyConnectionsNetworkParameters `json:"networkParameters,omitempty" xml:"networkParameters,omitempty" type:"Struct"` +} + +func (s GetConnectionResponseBodyConnections) String() string { + return tea.Prettify(s) +} + +func (s GetConnectionResponseBodyConnections) GoString() string { + return s.String() +} + +func (s *GetConnectionResponseBodyConnections) SetAuthParameters(v *GetConnectionResponseBodyConnectionsAuthParameters) *GetConnectionResponseBodyConnections { + s.AuthParameters = v + return s +} + +func (s *GetConnectionResponseBodyConnections) SetConnectionName(v string) *GetConnectionResponseBodyConnections { + s.ConnectionName = &v + return s +} + +func (s *GetConnectionResponseBodyConnections) SetDescription(v string) *GetConnectionResponseBodyConnections { + s.Description = &v + return s +} + +func (s *GetConnectionResponseBodyConnections) SetGmtCreate(v int64) *GetConnectionResponseBodyConnections { + s.GmtCreate = &v + return s +} + +func (s *GetConnectionResponseBodyConnections) SetId(v int) *GetConnectionResponseBodyConnections { + s.Id = &v + return s +} + +func (s *GetConnectionResponseBodyConnections) SetNetworkParameters(v *GetConnectionResponseBodyConnectionsNetworkParameters) *GetConnectionResponseBodyConnections { + s.NetworkParameters = v + return s +} + +type GetConnectionResponseBodyConnectionsAuthParameters struct { + // The parameters that are configured for API key authentication. + ApiKeyAuthParameters *GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters `json:"apiKeyAuthParameters,omitempty" xml:"apiKeyAuthParameters,omitempty" type:"Struct"` + // The authentication type. Valid values: + // + // + // - BASIC_AUTH: basic authentication. + // + // + // - API_KEY_AUTH: API key authentication. + // + // + // - OAUTH_AUTH: OAuth authentication. + // + // example: + // + // BASIC_AUTH + AuthorizationType *string `json:"authorizationType,omitempty" xml:"authorizationType,omitempty"` + // The parameters that are configured for basic authentication. + BasicAuthParameters *GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters `json:"basicAuthParameters,omitempty" xml:"basicAuthParameters,omitempty" type:"Struct"` + // The parameters that are configured for OAuth authentication. + OauthParameters *GetConnectionResponseBodyConnectionsAuthParametersOauthParameters `json:"oauthParameters,omitempty" xml:"oauthParameters,omitempty" type:"Struct"` +} + +func (s GetConnectionResponseBodyConnectionsAuthParameters) String() string { + return tea.Prettify(s) +} + +func (s GetConnectionResponseBodyConnectionsAuthParameters) GoString() string { + return s.String() +} + +func (s *GetConnectionResponseBodyConnectionsAuthParameters) SetApiKeyAuthParameters(v *GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters) *GetConnectionResponseBodyConnectionsAuthParameters { + s.ApiKeyAuthParameters = v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParameters) SetAuthorizationType(v string) *GetConnectionResponseBodyConnectionsAuthParameters { + s.AuthorizationType = &v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParameters) SetBasicAuthParameters(v *GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters) *GetConnectionResponseBodyConnectionsAuthParameters { + s.BasicAuthParameters = v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParameters) SetOauthParameters(v *GetConnectionResponseBodyConnectionsAuthParametersOauthParameters) *GetConnectionResponseBodyConnectionsAuthParameters { + s.OauthParameters = v + return s +} + +type GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters struct { + // The API key. + // + // example: + // + // Token + ApiKeyName *string `json:"apiKeyName,omitempty" xml:"apiKeyName,omitempty"` + // The value of the API key. + // + // example: + // + // asdkjnqkwejooa + ApiKeyValue *string `json:"apiKeyValue,omitempty" xml:"apiKeyValue,omitempty"` +} + +func (s GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters) String() string { + return tea.Prettify(s) +} + +func (s GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters) GoString() string { + return s.String() +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters) SetApiKeyName(v string) *GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters { + s.ApiKeyName = &v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters) SetApiKeyValue(v string) *GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters { + s.ApiKeyValue = &v + return s +} + +type GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters struct { + // The password for basic authentication. + // + // example: + // + // admin + Password *string `json:"password,omitempty" xml:"password,omitempty"` + // The username for basic authentication. + // + // example: + // + // admin + Username *string `json:"username,omitempty" xml:"username,omitempty"` +} + +func (s GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters) String() string { + return tea.Prettify(s) +} + +func (s GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters) GoString() string { + return s.String() +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters) SetPassword(v string) *GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters { + s.Password = &v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters) SetUsername(v string) *GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters { + s.Username = &v + return s +} + +type GetConnectionResponseBodyConnectionsAuthParametersOauthParameters struct { + // The endpoint that is used to obtain the OAuth token. + // + // example: + // + // http://localhost:8080/oauth/token + AuthorizationEndpoint *string `json:"authorizationEndpoint,omitempty" xml:"authorizationEndpoint,omitempty"` + // The parameters that are configured for the client. + ClientParameters *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters `json:"clientParameters,omitempty" xml:"clientParameters,omitempty" type:"Struct"` + // The HTTP request method. Valid values: + // + // - GET + // + // - POST + // + // - HEAD + // + // example: + // + // POST + HttpMethod *string `json:"httpMethod,omitempty" xml:"httpMethod,omitempty"` + // The request parameters for OAuth authentication. + OauthHttpParameters *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters `json:"oauthHttpParameters,omitempty" xml:"oauthHttpParameters,omitempty" type:"Struct"` +} + +func (s GetConnectionResponseBodyConnectionsAuthParametersOauthParameters) String() string { + return tea.Prettify(s) +} + +func (s GetConnectionResponseBodyConnectionsAuthParametersOauthParameters) GoString() string { + return s.String() +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParameters) SetAuthorizationEndpoint(v string) *GetConnectionResponseBodyConnectionsAuthParametersOauthParameters { + s.AuthorizationEndpoint = &v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParameters) SetClientParameters(v *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters) *GetConnectionResponseBodyConnectionsAuthParametersOauthParameters { + s.ClientParameters = v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParameters) SetHttpMethod(v string) *GetConnectionResponseBodyConnectionsAuthParametersOauthParameters { + s.HttpMethod = &v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParameters) SetOauthHttpParameters(v *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters) *GetConnectionResponseBodyConnectionsAuthParametersOauthParameters { + s.OauthHttpParameters = v + return s +} + +type GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters struct { + // The client ID. + // + // example: + // + // ClientID + ClientID *string `json:"clientID,omitempty" xml:"clientID,omitempty"` + // The client key secret of the application. + // + // example: + // + // ClientSecret + ClientSecret *string `json:"clientSecret,omitempty" xml:"clientSecret,omitempty"` +} + +func (s GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters) String() string { + return tea.Prettify(s) +} + +func (s GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters) GoString() string { + return s.String() +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters) SetClientID(v string) *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters { + s.ClientID = &v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters) SetClientSecret(v string) *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters { + s.ClientSecret = &v + return s +} + +type GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters struct { + // The parameters that are configured for the request. + BodyParameters []*GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters `json:"bodyParameters,omitempty" xml:"bodyParameters,omitempty" type:"Repeated"` + // The parameters that are configured for the request header. + HeaderParameters []*GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters `json:"headerParameters,omitempty" xml:"headerParameters,omitempty" type:"Repeated"` + // The parameters that are configured for the request path. + QueryStringParameters []*GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters `json:"queryStringParameters,omitempty" xml:"queryStringParameters,omitempty" type:"Repeated"` +} + +func (s GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters) String() string { + return tea.Prettify(s) +} + +func (s GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters) GoString() string { + return s.String() +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters) SetBodyParameters(v []*GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters) *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters { + s.BodyParameters = v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters) SetHeaderParameters(v []*GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters) *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters { + s.HeaderParameters = v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters) SetQueryStringParameters(v []*GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters { + s.QueryStringParameters = v + return s +} + +type GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters struct { + // Indicates whether authentication is enabled. + // + // example: + // + // false + IsValueSecret *string `json:"isValueSecret,omitempty" xml:"isValueSecret,omitempty"` + // The key in the request body. + // + // example: + // + // name + Key *string `json:"key,omitempty" xml:"key,omitempty"` + // The value of the key in the request body. + // + // example: + // + // demo + Value *string `json:"value,omitempty" xml:"value,omitempty"` +} + +func (s GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters) String() string { + return tea.Prettify(s) +} + +func (s GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters) GoString() string { + return s.String() +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters) SetIsValueSecret(v string) *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters { + s.IsValueSecret = &v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters) SetKey(v string) *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters { + s.Key = &v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters) SetValue(v string) *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters { + s.Value = &v + return s +} + +type GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters struct { + // Indicates whether authentication is enabled. + // + // example: + // + // false + IsValueSecret *string `json:"isValueSecret,omitempty" xml:"isValueSecret,omitempty"` + // The key in the request header. + // + // example: + // + // name + Key *string `json:"key,omitempty" xml:"key,omitempty"` + // The value of the key in the request header. + // + // example: + // + // demo + Value *string `json:"value,omitempty" xml:"value,omitempty"` +} + +func (s GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters) String() string { + return tea.Prettify(s) +} + +func (s GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters) GoString() string { + return s.String() +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters) SetIsValueSecret(v string) *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters { + s.IsValueSecret = &v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters) SetKey(v string) *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters { + s.Key = &v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters) SetValue(v string) *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters { + s.Value = &v + return s +} + +type GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters struct { + // Indicates whether authentication is enabled. + // + // example: + // + // false + IsValueSecret *string `json:"isValueSecret,omitempty" xml:"isValueSecret,omitempty"` + // The key in the request path. + // + // example: + // + // name + Key *string `json:"key,omitempty" xml:"key,omitempty"` + // The value of the key in the request path. + // + // example: + // + // demo + Value *string `json:"value,omitempty" xml:"value,omitempty"` +} + +func (s GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) String() string { + return tea.Prettify(s) +} + +func (s GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) GoString() string { + return s.String() +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) SetIsValueSecret(v string) *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters { + s.IsValueSecret = &v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) SetKey(v string) *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters { + s.Key = &v + return s +} + +func (s *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) SetValue(v string) *GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters { + s.Value = &v + return s +} + +type GetConnectionResponseBodyConnectionsNetworkParameters struct { + // The network type. Valid values:PublicNetwork and PrivateNetwork. + // + // example: + // + // PublicNetwork + NetworkType *string `json:"networkType,omitempty" xml:"networkType,omitempty"` + // The security group ID. + // + // example: + // + // eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb + SecurityGroupId *string `json:"securityGroupId,omitempty" xml:"securityGroupId,omitempty"` + // The virtual private cloud (VPC) ID. + // + // example: + // + // eb-test/vpc-bp1symadadwnwgmqud + VpcId *string `json:"vpcId,omitempty" xml:"vpcId,omitempty"` + // The vSwitch ID. + // + // example: + // + // vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c + VswitcheId *string `json:"vswitcheId,omitempty" xml:"vswitcheId,omitempty"` +} + +func (s GetConnectionResponseBodyConnectionsNetworkParameters) String() string { + return tea.Prettify(s) +} + +func (s GetConnectionResponseBodyConnectionsNetworkParameters) GoString() string { + return s.String() +} + +func (s *GetConnectionResponseBodyConnectionsNetworkParameters) SetNetworkType(v string) *GetConnectionResponseBodyConnectionsNetworkParameters { + s.NetworkType = &v + return s +} + +func (s *GetConnectionResponseBodyConnectionsNetworkParameters) SetSecurityGroupId(v string) *GetConnectionResponseBodyConnectionsNetworkParameters { + s.SecurityGroupId = &v + return s +} + +func (s *GetConnectionResponseBodyConnectionsNetworkParameters) SetVpcId(v string) *GetConnectionResponseBodyConnectionsNetworkParameters { + s.VpcId = &v + return s +} + +func (s *GetConnectionResponseBodyConnectionsNetworkParameters) SetVswitcheId(v string) *GetConnectionResponseBodyConnectionsNetworkParameters { + s.VswitcheId = &v + return s +} + +type GetConnectionResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *GetConnectionResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s GetConnectionResponse) String() string { + return tea.Prettify(s) +} + +func (s GetConnectionResponse) GoString() string { + return s.String() +} + +func (s *GetConnectionResponse) SetHeaders(v map[string]*string) *GetConnectionResponse { + s.Headers = v + return s +} + +func (s *GetConnectionResponse) SetStatusCode(v int32) *GetConnectionResponse { + s.StatusCode = &v + return s +} + +func (s *GetConnectionResponse) SetBody(v *GetConnectionResponseBody) *GetConnectionResponse { + s.Body = v + return s +} + +type ListConnectionsRequest struct { + // The key word that you specify to query connections. Connections can be queried by prefixes. + // + // example: + // + // connection-name + ConnectionNamePrefix *string `json:"connectionNamePrefix,omitempty" xml:"connectionNamePrefix,omitempty"` + // The maximum number of entries to be returned in a single call. You can use this parameter and the NextToken parameter to implement paging. + // + // - Default value: 10. + // + // example: + // + // 10 + MaxResults *int32 `json:"maxResults,omitempty" xml:"maxResults,omitempty"` + // If you set the Limit parameter and excess return values exist, this parameter is returned. + // + // - Default value: 0. + // + // example: + // + // 0 + NextToken *string `json:"nextToken,omitempty" xml:"nextToken,omitempty"` +} + +func (s ListConnectionsRequest) String() string { + return tea.Prettify(s) +} + +func (s ListConnectionsRequest) GoString() string { + return s.String() +} + +func (s *ListConnectionsRequest) SetConnectionNamePrefix(v string) *ListConnectionsRequest { + s.ConnectionNamePrefix = &v + return s +} + +func (s *ListConnectionsRequest) SetMaxResults(v int32) *ListConnectionsRequest { + s.MaxResults = &v + return s +} + +func (s *ListConnectionsRequest) SetNextToken(v string) *ListConnectionsRequest { + s.NextToken = &v + return s +} + +type ListConnectionsResponseBody struct { + // The HTTP status code. The value Success indicates that the request is successful. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The value of the key in the request path. + Connections []*ListConnectionsResponseBodyConnections `json:"connections,omitempty" xml:"connections,omitempty" type:"Repeated"` + // The number of entries returned per page. + // + // example: + // + // 10 + MaxResults *int32 `json:"maxResults,omitempty" xml:"maxResults,omitempty"` + // If excess return values exist, this parameter is returned. + // + // example: + // + // 0 + NextToken *string `json:"nextToken,omitempty" xml:"nextToken,omitempty"` + // The total number of entries returned. + // + // example: + // + // 1 + Total *int `json:"total,omitempty" xml:"total,omitempty"` + // The message returned. + // + // example: + // + // success + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The ID of the request. This parameter is a common parameter. Each request has a unique ID. You can use the ID to troubleshoot issues. + // + // example: + // + // E3619976-8714-5D88-BBA2-6983D798A8BB + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s ListConnectionsResponseBody) String() string { + return tea.Prettify(s) +} + +func (s ListConnectionsResponseBody) GoString() string { + return s.String() +} + +func (s *ListConnectionsResponseBody) SetCode(v string) *ListConnectionsResponseBody { + s.Code = &v + return s +} + +func (s *ListConnectionsResponseBody) SetConnections(v []*ListConnectionsResponseBodyConnections) *ListConnectionsResponseBody { + s.Connections = v + return s +} + +func (s *ListConnectionsResponseBody) SetMaxResults(v int32) *ListConnectionsResponseBody { + s.MaxResults = &v + return s +} + +func (s *ListConnectionsResponseBody) SetNextToken(v string) *ListConnectionsResponseBody { + s.NextToken = &v + return s +} + +func (s *ListConnectionsResponseBody) SetTotal(v int) *ListConnectionsResponseBody { + s.Total = &v + return s +} + +func (s *ListConnectionsResponseBody) SetMessage(v string) *ListConnectionsResponseBody { + s.Message = &v + return s +} + +func (s *ListConnectionsResponseBody) SetRequestId(v string) *ListConnectionsResponseBody { + s.RequestId = &v + return s +} + +type ListConnectionsResponseBodyConnections struct { + // The parameters that are configured for authentication. + AuthParameters *ListConnectionsResponseBodyConnectionsAuthParameters `json:"authParameters,omitempty" xml:"authParameters,omitempty" type:"Struct"` + // The connection name. + // + // example: + // + // connection-name + ConnectionName *string `json:"connectionName,omitempty" xml:"connectionName,omitempty"` + // The connection description. + // + // example: + // + // The description of the connection. + Description *string `json:"description,omitempty" xml:"description,omitempty"` + // The time when the connection was created. + // + // example: + // + // 1592838994234 + GmtCreate *int64 `json:"gmtCreate,omitempty" xml:"gmtCreate,omitempty"` + // The connection ID. + // + // example: + // + // 1141093 + Id *int `json:"id,omitempty" xml:"id,omitempty"` + NetworkParameters *ListConnectionsResponseBodyConnectionsNetworkParameters `json:"networkParameters,omitempty" xml:"networkParameters,omitempty" type:"Struct"` +} + +func (s ListConnectionsResponseBodyConnections) String() string { + return tea.Prettify(s) +} + +func (s ListConnectionsResponseBodyConnections) GoString() string { + return s.String() +} + +func (s *ListConnectionsResponseBodyConnections) SetAuthParameters(v *ListConnectionsResponseBodyConnectionsAuthParameters) *ListConnectionsResponseBodyConnections { + s.AuthParameters = v + return s +} + +func (s *ListConnectionsResponseBodyConnections) SetConnectionName(v string) *ListConnectionsResponseBodyConnections { + s.ConnectionName = &v + return s +} + +func (s *ListConnectionsResponseBodyConnections) SetDescription(v string) *ListConnectionsResponseBodyConnections { + s.Description = &v + return s +} + +func (s *ListConnectionsResponseBodyConnections) SetGmtCreate(v int64) *ListConnectionsResponseBodyConnections { + s.GmtCreate = &v + return s +} + +func (s *ListConnectionsResponseBodyConnections) SetId(v int) *ListConnectionsResponseBodyConnections { + s.Id = &v + return s +} + +func (s *ListConnectionsResponseBodyConnections) SetNetworkParameters(v *ListConnectionsResponseBodyConnectionsNetworkParameters) *ListConnectionsResponseBodyConnections { + s.NetworkParameters = v + return s +} + +type ListConnectionsResponseBodyConnectionsAuthParameters struct { + // The parameters that are configured for API key authentication. + ApiKeyAuthParameters *ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters `json:"apiKeyAuthParameters,omitempty" xml:"apiKeyAuthParameters,omitempty" type:"Struct"` + // The authentication type. Valid values: + // + // + // - BASIC_AUTH: basic authentication. + // + // + // - API_KEY_AUTH: API key authentication. + // + // + // - OAUTH_AUTH: OAuth authentication. + // + // example: + // + // BASIC_AUTH + AuthorizationType *string `json:"authorizationType,omitempty" xml:"authorizationType,omitempty"` + // The parameters that are configured for basic authentication. + BasicAuthParameters *ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters `json:"basicAuthParameters,omitempty" xml:"basicAuthParameters,omitempty" type:"Struct"` + // The parameters that are configured for OAuth authentication. + OauthParameters *ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters `json:"oauthParameters,omitempty" xml:"oauthParameters,omitempty" type:"Struct"` +} + +func (s ListConnectionsResponseBodyConnectionsAuthParameters) String() string { + return tea.Prettify(s) +} + +func (s ListConnectionsResponseBodyConnectionsAuthParameters) GoString() string { + return s.String() +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParameters) SetApiKeyAuthParameters(v *ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters) *ListConnectionsResponseBodyConnectionsAuthParameters { + s.ApiKeyAuthParameters = v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParameters) SetAuthorizationType(v string) *ListConnectionsResponseBodyConnectionsAuthParameters { + s.AuthorizationType = &v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParameters) SetBasicAuthParameters(v *ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters) *ListConnectionsResponseBodyConnectionsAuthParameters { + s.BasicAuthParameters = v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParameters) SetOauthParameters(v *ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters) *ListConnectionsResponseBodyConnectionsAuthParameters { + s.OauthParameters = v + return s +} + +type ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters struct { + // The API key. + // + // example: + // + // Token + ApiKeyName *string `json:"apiKeyName,omitempty" xml:"apiKeyName,omitempty"` + // The value of the API key. + // + // example: + // + // asdkjnqkwejooa + ApiKeyValue *string `json:"apiKeyValue,omitempty" xml:"apiKeyValue,omitempty"` +} + +func (s ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters) String() string { + return tea.Prettify(s) +} + +func (s ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters) GoString() string { + return s.String() +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters) SetApiKeyName(v string) *ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters { + s.ApiKeyName = &v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters) SetApiKeyValue(v string) *ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters { + s.ApiKeyValue = &v + return s +} + +type ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters struct { + // The password for basic authentication. + // + // example: + // + // admin + Password *string `json:"password,omitempty" xml:"password,omitempty"` + // The username for basic authentication. + // + // example: + // + // admin + Username *string `json:"username,omitempty" xml:"username,omitempty"` +} + +func (s ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters) String() string { + return tea.Prettify(s) +} + +func (s ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters) GoString() string { + return s.String() +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters) SetPassword(v string) *ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters { + s.Password = &v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters) SetUsername(v string) *ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters { + s.Username = &v + return s +} + +type ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters struct { + // The endpoint that is used to obtain the OAuth token. + // + // example: + // + // http://localhost:8080/oauth/token + AuthorizationEndpoint *string `json:"authorizationEndpoint,omitempty" xml:"authorizationEndpoint,omitempty"` + // The parameters that are configured for the client. + ClientParameters *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters `json:"clientParameters,omitempty" xml:"clientParameters,omitempty" type:"Struct"` + // The HTTP request method. Valid values: + // + // - GET + // + // - POST + // + // - HEAD + // + // example: + // + // POST + HttpMethod *string `json:"httpMethod,omitempty" xml:"httpMethod,omitempty"` + // The request parameters for OAuth authentication. + OauthHttpParameters *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters `json:"oauthHttpParameters,omitempty" xml:"oauthHttpParameters,omitempty" type:"Struct"` +} + +func (s ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters) String() string { + return tea.Prettify(s) +} + +func (s ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters) GoString() string { + return s.String() +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters) SetAuthorizationEndpoint(v string) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters { + s.AuthorizationEndpoint = &v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters) SetClientParameters(v *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters { + s.ClientParameters = v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters) SetHttpMethod(v string) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters { + s.HttpMethod = &v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters) SetOauthHttpParameters(v *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters { + s.OauthHttpParameters = v + return s +} + +type ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters struct { + // The client ID. + // + // example: + // + // ClientID + ClientID *string `json:"clientID,omitempty" xml:"clientID,omitempty"` + // The client key secret of the application. + // + // example: + // + // ClientSecret + ClientSecret *string `json:"clientSecret,omitempty" xml:"clientSecret,omitempty"` +} + +func (s ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters) String() string { + return tea.Prettify(s) +} + +func (s ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters) GoString() string { + return s.String() +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters) SetClientID(v string) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters { + s.ClientID = &v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters) SetClientSecret(v string) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters { + s.ClientSecret = &v + return s +} + +type ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters struct { + // The parameters that are configured for the request. + BodyParameters []*ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters `json:"bodyParameters,omitempty" xml:"bodyParameters,omitempty" type:"Repeated"` + // The parameters that are configured for the request header. + HeaderParameters []*ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters `json:"headerParameters,omitempty" xml:"headerParameters,omitempty" type:"Repeated"` + // The parameters that are configured for the request path. + QueryStringParameters []*ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters `json:"queryStringParameters,omitempty" xml:"queryStringParameters,omitempty" type:"Repeated"` +} + +func (s ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters) String() string { + return tea.Prettify(s) +} + +func (s ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters) GoString() string { + return s.String() +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters) SetBodyParameters(v []*ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters { + s.BodyParameters = v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters) SetHeaderParameters(v []*ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters { + s.HeaderParameters = v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters) SetQueryStringParameters(v []*ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters { + s.QueryStringParameters = v + return s +} + +type ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters struct { + // Indicates whether authentication is enabled. + // + // example: + // + // false + IsValueSecret *string `json:"isValueSecret,omitempty" xml:"isValueSecret,omitempty"` + // The key in the request body. + // + // example: + // + // name + Key *string `json:"key,omitempty" xml:"key,omitempty"` + // The value of the key in the request body. + // + // example: + // + // demo + Value *string `json:"value,omitempty" xml:"value,omitempty"` +} + +func (s ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters) String() string { + return tea.Prettify(s) +} + +func (s ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters) GoString() string { + return s.String() +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters) SetIsValueSecret(v string) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters { + s.IsValueSecret = &v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters) SetKey(v string) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters { + s.Key = &v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters) SetValue(v string) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters { + s.Value = &v + return s +} + +type ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters struct { + // Indicates whether authentication is enabled. + // + // example: + // + // false + IsValueSecret *string `json:"isValueSecret,omitempty" xml:"isValueSecret,omitempty"` + // The key in the request header. + // + // example: + // + // name + Key *string `json:"key,omitempty" xml:"key,omitempty"` + // The value of the key in the request header. + // + // example: + // + // demo + Value *string `json:"value,omitempty" xml:"value,omitempty"` +} + +func (s ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters) String() string { + return tea.Prettify(s) +} + +func (s ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters) GoString() string { + return s.String() +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters) SetIsValueSecret(v string) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters { + s.IsValueSecret = &v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters) SetKey(v string) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters { + s.Key = &v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters) SetValue(v string) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters { + s.Value = &v + return s +} + +type ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters struct { + // Indicates whether authentication is enabled. + // + // example: + // + // false + IsValueSecret *string `json:"isValueSecret,omitempty" xml:"isValueSecret,omitempty"` + // The key in the request path. + // + // example: + // + // name + Key *string `json:"key,omitempty" xml:"key,omitempty"` + // The value of the key in the request path. + // + // example: + // + // demo + Value *string `json:"value,omitempty" xml:"value,omitempty"` +} + +func (s ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) String() string { + return tea.Prettify(s) +} + +func (s ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) GoString() string { + return s.String() +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) SetIsValueSecret(v string) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters { + s.IsValueSecret = &v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) SetKey(v string) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters { + s.Key = &v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters) SetValue(v string) *ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters { + s.Value = &v + return s +} + +type ListConnectionsResponseBodyConnectionsNetworkParameters struct { + // The network type. Valid values:PublicNetwork and PrivateNetwork. + // + // example: + // + // PublicNetwork + NetworkType *string `json:"networkType,omitempty" xml:"networkType,omitempty"` + // The security group ID. + // + // example: + // + // eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb + SecurityGroupId *string `json:"securityGroupId,omitempty" xml:"securityGroupId,omitempty"` + // The virtual private cloud (VPC) ID. + // + // example: + // + // eb-test/vpc-bp1symadadwnwgmqud + VpcId *string `json:"vpcId,omitempty" xml:"vpcId,omitempty"` + // The vSwitch ID. + // + // example: + // + // vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c + VswitcheId *string `json:"vswitcheId,omitempty" xml:"vswitcheId,omitempty"` +} + +func (s ListConnectionsResponseBodyConnectionsNetworkParameters) String() string { + return tea.Prettify(s) +} + +func (s ListConnectionsResponseBodyConnectionsNetworkParameters) GoString() string { + return s.String() +} + +func (s *ListConnectionsResponseBodyConnectionsNetworkParameters) SetNetworkType(v string) *ListConnectionsResponseBodyConnectionsNetworkParameters { + s.NetworkType = &v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsNetworkParameters) SetSecurityGroupId(v string) *ListConnectionsResponseBodyConnectionsNetworkParameters { + s.SecurityGroupId = &v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsNetworkParameters) SetVpcId(v string) *ListConnectionsResponseBodyConnectionsNetworkParameters { + s.VpcId = &v + return s +} + +func (s *ListConnectionsResponseBodyConnectionsNetworkParameters) SetVswitcheId(v string) *ListConnectionsResponseBodyConnectionsNetworkParameters { + s.VswitcheId = &v + return s +} + +type ListConnectionsResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *ListConnectionsResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s ListConnectionsResponse) String() string { + return tea.Prettify(s) +} + +func (s ListConnectionsResponse) GoString() string { + return s.String() +} + +func (s *ListConnectionsResponse) SetHeaders(v map[string]*string) *ListConnectionsResponse { + s.Headers = v + return s +} + +func (s *ListConnectionsResponse) SetStatusCode(v int32) *ListConnectionsResponse { + s.StatusCode = &v + return s +} + +func (s *ListConnectionsResponse) SetBody(v *ListConnectionsResponseBody) *ListConnectionsResponse { + s.Body = v + return s +} + +// enum AuthorizationTypeEnums : string { +// API_KEY_AUTH(name="API_KEY_AUTH", value="API_KEY_AUTH"), +// BASIC_AUTH(name="BASIC_AUTH", value="BASIC_AUTH"), +// OAUTH_AUTH(name="OAUTH_AUTH", value="OAUTH_AUTH"), +// } +// enum NetworkTypeEnum : string { +// PUBLIC_NETWORK(name="PUBLIC_NETWORK", value="PublicNetwork"), +// PRIVATE_NETWORK(name="PRIVATE_NETWORK", value="PrivateNetwork") +// } +type ListEnumsResponseResponseBody struct { + AuthorizationTypeEnums *string `json:"authorizationTypeEnums,omitempty" xml:"authorizationTypeEnums,omitempty"` + NetworkTypeEnums *string `json:"networkTypeEnums,omitempty" xml:"networkTypeEnums,omitempty"` + // The returned response code. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The returned message. + // + // example: + // + // success + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 8346BE8F-40F3-533D-A0B8-1359C31BD5BA + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s ListEnumsResponseResponseBody) String() string { + return tea.Prettify(s) +} + +func (s ListEnumsResponseResponseBody) GoString() string { + return s.String() +} + +func (s *ListEnumsResponseResponseBody) SetAuthorizationTypeEnums(v string) *ListEnumsResponseResponseBody { + s.AuthorizationTypeEnums = &v + return s +} + +func (s *ListEnumsResponseResponseBody) SetNetworkTypeEnums(v string) *ListEnumsResponseResponseBody { + s.NetworkTypeEnums = &v + return s +} + +func (s *ListEnumsResponseResponseBody) SetCode(v string) *ListEnumsResponseResponseBody { + s.Code = &v + return s +} + +func (s *ListEnumsResponseResponseBody) SetMessage(v string) *ListEnumsResponseResponseBody { + s.Message = &v + return s +} + +func (s *ListEnumsResponseResponseBody) SetRequestId(v string) *ListEnumsResponseResponseBody { + s.RequestId = &v + return s +} + +type ListEnumsResponseResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *UpdateConnectionResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s ListEnumsResponseResponse) String() string { + return tea.Prettify(s) +} + +func (s ListEnumsResponseResponse) GoString() string { + return s.String() +} + +func (s *ListEnumsResponseResponse) SetHeaders(v map[string]*string) *ListEnumsResponseResponse { + s.Headers = v + return s +} + +func (s *ListEnumsResponseResponse) SetStatusCode(v int32) *ListEnumsResponseResponse { + s.StatusCode = &v + return s +} + +func (s *ListEnumsResponseResponse) SetBody(v *UpdateConnectionResponseBody) *ListEnumsResponseResponse { + s.Body = v + return s +} + +// Description: +// +// EventData Controller apis: +// +// putEvents +type PutEventsRequest struct { + // The name of the event bus. + // + // This parameter is required. + // + // example: + // + // demo + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The content of the event. + // + // example: + // + // The description of the event. + Event *string `json:"event,omitempty" xml:"event,omitempty"` +} + +func (s PutEventsRequest) String() string { + return tea.Prettify(s) +} + +func (s PutEventsRequest) GoString() string { + return s.String() +} + +func (s *PutEventsRequest) SetEventBusName(v string) *PutEventsRequest { + s.EventBusName = &v + return s +} + +func (s *PutEventsRequest) SetEvent(v string) *PutEventsRequest { + s.Event = &v + return s +} + +type PutEventsResponseBody struct { + FailedEntryCount *int `json:"failedEntryCount,omitempty" xml:"failedEntryCount,omitempty"` + EntryList []*PutEventsResponseBodyEntryList `json:"entryList,omitempty" xml:"entryList,omitempty" type:"Repeated"` + // The status code returned. The status code 200 indicates that the request was successful. + // + // example: + // + // 200 + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The error message that is returned if the request failed. + // + // example: + // + // EventBusNotExist + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 580A938B-6107-586C-8EC7-F22EEBEDA9E6 + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s PutEventsResponseBody) String() string { + return tea.Prettify(s) +} + +func (s PutEventsResponseBody) GoString() string { + return s.String() +} + +func (s *PutEventsResponseBody) SetFailedEntryCount(v int) *PutEventsResponseBody { + s.FailedEntryCount = &v + return s +} + +func (s *PutEventsResponseBody) SetEntryList(v []*PutEventsResponseBodyEntryList) *PutEventsResponseBody { + s.EntryList = v + return s +} + +func (s *PutEventsResponseBody) SetCode(v string) *PutEventsResponseBody { + s.Code = &v + return s +} + +func (s *PutEventsResponseBody) SetMessage(v string) *PutEventsResponseBody { + s.Message = &v + return s +} + +func (s *PutEventsResponseBody) SetRequestId(v string) *PutEventsResponseBody { + s.RequestId = &v + return s +} + +type PutEventsResponseBodyEntryList struct { + // The event ID. + // + // example: + // + // a5747e4f-2af2-40b6-b262-d0140e995bf7 + EventId *string `json:"eventId,omitempty" xml:"eventId,omitempty"` + // The returned error code. + ErrorCode *string `json:"errorCode,omitempty" xml:"errorCode,omitempty"` + // The returned error message. + ErrorMessage *string `json:"errorMessage,omitempty" xml:"errorMessage,omitempty"` +} + +func (s PutEventsResponseBodyEntryList) String() string { + return tea.Prettify(s) +} + +func (s PutEventsResponseBodyEntryList) GoString() string { + return s.String() +} + +func (s *PutEventsResponseBodyEntryList) SetEventId(v string) *PutEventsResponseBodyEntryList { + s.EventId = &v + return s +} + +func (s *PutEventsResponseBodyEntryList) SetErrorCode(v string) *PutEventsResponseBodyEntryList { + s.ErrorCode = &v + return s +} + +func (s *PutEventsResponseBodyEntryList) SetErrorMessage(v string) *PutEventsResponseBodyEntryList { + s.ErrorMessage = &v + return s +} + +type PutEventsResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *PutEventsResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s PutEventsResponse) String() string { + return tea.Prettify(s) +} + +func (s PutEventsResponse) GoString() string { + return s.String() +} + +func (s *PutEventsResponse) SetHeaders(v map[string]*string) *PutEventsResponse { + s.Headers = v + return s +} + +func (s *PutEventsResponse) SetStatusCode(v int32) *PutEventsResponse { + s.StatusCode = &v + return s +} + +func (s *PutEventsResponse) SetBody(v *PutEventsResponseBody) *PutEventsResponse { + s.Body = v + return s +} + +// Description: +// +// EventRule Controller apis: +// +// createEventRule * +// +// getEventRule * +// +// deleteEventRule * +// +// updateEventRule * +// +// listEventRules * +// +// enableEventRule * +// +// disableEventRule * +type CreateEventRuleRequest struct { + // The name of the event bus with which the event source is associated. + // + // This parameter is required. + // + // example: + // + // my-event-bus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event rule. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.sourc + EventRuleName *string `json:"eventRuleName,omitempty" xml:"eventRuleName,omitempty"` + Description *string `json:"description,omitempty" xml:"description,omitempty"` + // The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + // + // You can specify up to five expressions in the map data structure in each field. + // + // example: + // + // {\"source\": [{\"prefix\": \"acs.\"}],\"type\": [{\"prefix\":\"oss:ObjectReplication\"}],\"subject\":[{\"prefix\":\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\", \"suffix\":\".txt\"}]} + FilterPattern *string `json:"filterPattern,omitempty" xml:"filterPattern,omitempty"` +} + +func (s CreateEventRuleRequest) String() string { + return tea.Prettify(s) +} + +func (s CreateEventRuleRequest) GoString() string { + return s.String() +} + +func (s *CreateEventRuleRequest) SetEventBusName(v string) *CreateEventRuleRequest { + s.EventBusName = &v + return s +} + +func (s *CreateEventRuleRequest) SetEventRuleName(v string) *CreateEventRuleRequest { + s.EventRuleName = &v + return s +} + +func (s *CreateEventRuleRequest) SetDescription(v string) *CreateEventRuleRequest { + s.Description = &v + return s +} + +func (s *CreateEventRuleRequest) SetFilterPattern(v string) *CreateEventRuleRequest { + s.FilterPattern = &v + return s +} + +type CreateEventRuleResponseBody struct { + // The returned response code. Valid values: + // + // - Success: The request is successful. + // + // - Other codes: The request failed. For more information about error codes, see Error codes. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The name of the event rule. + // + // example: + // + // myrabbitmq.sourc + EventRuleName *string `json:"eventRuleName,omitempty" xml:"eventRuleName,omitempty"` + // The returned error message. + // + // example: + // + // Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 2922208e-e1c6-43ee-bfd1-aca50263bc8a + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s CreateEventRuleResponseBody) String() string { + return tea.Prettify(s) +} + +func (s CreateEventRuleResponseBody) GoString() string { + return s.String() +} + +func (s *CreateEventRuleResponseBody) SetCode(v string) *CreateEventRuleResponseBody { + s.Code = &v + return s +} + +func (s *CreateEventRuleResponseBody) SetEventRuleName(v string) *CreateEventRuleResponseBody { + s.EventRuleName = &v + return s +} + +func (s *CreateEventRuleResponseBody) SetMessage(v string) *CreateEventRuleResponseBody { + s.Message = &v + return s +} + +func (s *CreateEventRuleResponseBody) SetRequestId(v string) *CreateEventRuleResponseBody { + s.RequestId = &v + return s +} + +type CreateEventRuleResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *CreateEventRuleResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s CreateEventRuleResponse) String() string { + return tea.Prettify(s) +} + +func (s CreateEventRuleResponse) GoString() string { + return s.String() +} + +func (s *CreateEventRuleResponse) SetHeaders(v map[string]*string) *CreateEventRuleResponse { + s.Headers = v + return s +} + +func (s *CreateEventRuleResponse) SetStatusCode(v int32) *CreateEventRuleResponse { + s.StatusCode = &v + return s +} + +func (s *CreateEventRuleResponse) SetBody(v *CreateEventRuleResponseBody) *CreateEventRuleResponse { + s.Body = v + return s +} + +type GetEventRuleRequest struct { + // The name of the event bus with which the event source is associated. + // + // This parameter is required. + // + // example: + // + // my-event-bus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event rule. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.sourc + EventRuleName *string `json:"eventRuleName,omitempty" xml:"eventRuleName,omitempty"` +} + +func (s GetEventRuleRequest) String() string { + return tea.Prettify(s) +} + +func (s GetEventRuleRequest) GoString() string { + return s.String() +} + +func (s *GetEventRuleRequest) SetEventBusName(v string) *GetEventRuleRequest { + s.EventBusName = &v + return s +} + +func (s *GetEventRuleRequest) SetEventRuleName(v string) *GetEventRuleRequest { + s.EventRuleName = &v + return s +} + +type GetEventRuleResponseBody struct { + // The returned response code. Valid values: + // + // - Success: The request is successful. + // + // - Other codes: The request failed. For more information about error codes, see Error codes. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The name of the event bus with which the event source is associated. + // + // This parameter is required. + // + // example: + // + // my-event-bus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event rule. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.sourc + EventRuleName *string `json:"eventRuleName,omitempty" xml:"eventRuleName,omitempty"` + Description *string `json:"description,omitempty" xml:"description,omitempty"` + // The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + // + // You can specify up to five expressions in the map data structure in each field. + // + // example: + // + // {\"source\": [{\"prefix\": \"acs.\"}],\"type\": [{\"prefix\":\"oss:ObjectReplication\"}],\"subject\":[{\"prefix\":\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\", \"suffix\":\".txt\"}]} + FilterPattern *string `json:"filterPattern,omitempty" xml:"filterPattern,omitempty"` + // The status of the event rule. Valid values: ENABLE (default): The event rule is enabled. DISABLE: The event rule is disabled. + // + // example: + // + // ENABLE + Status *string `json:"status,omitempty" xml:"status,omitempty"` + GmtCreate *string `json:"gmtCreate,omitempty" xml:"gmtCreate,omitempty"` + GmtModify *string `json:"gmtModify,omitempty" xml:"gmtModify,omitempty"` + EventTargets []*GetEventRuleResponseBodyEventTargets `json:"eventTargets,omitempty" xml:"eventTargets,omitempty" type:"Repeated"` + // The returned error message. + // + // example: + // + // Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 2922208e-e1c6-43ee-bfd1-aca50263bc8a + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s GetEventRuleResponseBody) String() string { + return tea.Prettify(s) +} + +func (s GetEventRuleResponseBody) GoString() string { + return s.String() +} + +func (s *GetEventRuleResponseBody) SetCode(v string) *GetEventRuleResponseBody { + s.Code = &v + return s +} + +func (s *GetEventRuleResponseBody) SetEventBusName(v string) *GetEventRuleResponseBody { + s.EventBusName = &v + return s +} + +func (s *GetEventRuleResponseBody) SetEventRuleName(v string) *GetEventRuleResponseBody { + s.EventRuleName = &v + return s +} + +func (s *GetEventRuleResponseBody) SetDescription(v string) *GetEventRuleResponseBody { + s.Description = &v + return s +} + +func (s *GetEventRuleResponseBody) SetFilterPattern(v string) *GetEventRuleResponseBody { + s.FilterPattern = &v + return s +} + +func (s *GetEventRuleResponseBody) SetStatus(v string) *GetEventRuleResponseBody { + s.Status = &v + return s +} + +func (s *GetEventRuleResponseBody) SetGmtCreate(v string) *GetEventRuleResponseBody { + s.GmtCreate = &v + return s +} + +func (s *GetEventRuleResponseBody) SetGmtModify(v string) *GetEventRuleResponseBody { + s.GmtModify = &v + return s +} + +func (s *GetEventRuleResponseBody) SetEventTargets(v []*GetEventRuleResponseBodyEventTargets) *GetEventRuleResponseBody { + s.EventTargets = v + return s +} + +func (s *GetEventRuleResponseBody) SetMessage(v string) *GetEventRuleResponseBody { + s.Message = &v + return s +} + +func (s *GetEventRuleResponseBody) SetRequestId(v string) *GetEventRuleResponseBody { + s.RequestId = &v + return s +} + +type GetEventRuleResponseBodyEventTargets struct { + EventTargetName *string `json:"eventTargetName,omitempty" xml:"eventTargetName,omitempty"` + ClassName *string `json:"className,omitempty" xml:"className,omitempty"` + Config map[string]interface{} `json:"config,omitempty" xml:"config,omitempty"` + RunOptions *GetEventRuleResponseBodyEventTargetsRunOptions `json:"runOptions,omitempty" xml:"runOptions,omitempty" type:"Struct"` +} + +func (s GetEventRuleResponseBodyEventTargets) String() string { + return tea.Prettify(s) +} + +func (s GetEventRuleResponseBodyEventTargets) GoString() string { + return s.String() +} + +func (s *GetEventRuleResponseBodyEventTargets) SetEventTargetName(v string) *GetEventRuleResponseBodyEventTargets { + s.EventTargetName = &v + return s +} + +func (s *GetEventRuleResponseBodyEventTargets) SetClassName(v string) *GetEventRuleResponseBodyEventTargets { + s.ClassName = &v + return s +} + +func (s *GetEventRuleResponseBodyEventTargets) SetConfig(v map[string]interface{}) *GetEventRuleResponseBodyEventTargets { + s.Config = v + return s +} + +func (s *GetEventRuleResponseBodyEventTargets) SetRunOptions(v *GetEventRuleResponseBodyEventTargetsRunOptions) *GetEventRuleResponseBodyEventTargets { + s.RunOptions = v + return s +} + +type GetEventRuleResponseBodyEventTargetsRunOptions struct { + ErrorsTolerance *string `json:"errorsTolerance,omitempty" xml:"errorsTolerance,omitempty"` + RetryStrategy *GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy `json:"retryStrategy,omitempty" xml:"retryStrategy,omitempty" type:"Struct"` + DeadLetterQueue *GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue `json:"deadLetterQueue,omitempty" xml:"deadLetterQueue,omitempty" type:"Struct"` +} + +func (s GetEventRuleResponseBodyEventTargetsRunOptions) String() string { + return tea.Prettify(s) +} + +func (s GetEventRuleResponseBodyEventTargetsRunOptions) GoString() string { + return s.String() +} + +func (s *GetEventRuleResponseBodyEventTargetsRunOptions) SetErrorsTolerance(v string) *GetEventRuleResponseBodyEventTargetsRunOptions { + s.ErrorsTolerance = &v + return s +} + +func (s *GetEventRuleResponseBodyEventTargetsRunOptions) SetRetryStrategy(v *GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy) *GetEventRuleResponseBodyEventTargetsRunOptions { + s.RetryStrategy = v + return s +} + +func (s *GetEventRuleResponseBodyEventTargetsRunOptions) SetDeadLetterQueue(v *GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue) *GetEventRuleResponseBodyEventTargetsRunOptions { + s.DeadLetterQueue = v + return s +} + +type GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy struct { + PushRetryStrategy *string `json:"pushRetryStrategy,omitempty" xml:"pushRetryStrategy,omitempty"` + MaximumEventAgeInSeconds *int32 `json:"maximumEventAgeInSeconds,omitempty" xml:"maximumEventAgeInSeconds,omitempty"` + MaximumRetryAttempts *int32 `json:"maximumRetryAttempts,omitempty" xml:"maximumRetryAttempts,omitempty"` +} + +func (s GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy) String() string { + return tea.Prettify(s) +} + +func (s GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy) GoString() string { + return s.String() +} + +func (s *GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy) SetPushRetryStrategy(v string) *GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy { + s.PushRetryStrategy = &v + return s +} + +func (s *GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy) SetMaximumEventAgeInSeconds(v int32) *GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy { + s.MaximumEventAgeInSeconds = &v + return s +} + +func (s *GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy) SetMaximumRetryAttempts(v int32) *GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy { + s.MaximumRetryAttempts = &v + return s +} + +type GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue struct { + Type *string `json:"type,omitempty" xml:"type,omitempty"` + Config map[string]interface{} `json:"config,omitempty" xml:"config,omitempty"` +} + +func (s GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue) String() string { + return tea.Prettify(s) +} + +func (s GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue) GoString() string { + return s.String() +} + +func (s *GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue) SetType(v string) *GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue { + s.Type = &v + return s +} + +func (s *GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue) SetConfig(v map[string]interface{}) *GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue { + s.Config = v + return s +} + +type GetEventRuleResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *GetEventRuleResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s GetEventRuleResponse) String() string { + return tea.Prettify(s) +} + +func (s GetEventRuleResponse) GoString() string { + return s.String() +} + +func (s *GetEventRuleResponse) SetHeaders(v map[string]*string) *GetEventRuleResponse { + s.Headers = v + return s +} + +func (s *GetEventRuleResponse) SetStatusCode(v int32) *GetEventRuleResponse { + s.StatusCode = &v + return s +} + +func (s *GetEventRuleResponse) SetBody(v *GetEventRuleResponseBody) *GetEventRuleResponse { + s.Body = v + return s +} + +type DeleteEventRuleRequest struct { + // The name of the event bus with which the event source is associated. + // + // This parameter is required. + // + // example: + // + // my-event-bus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event rule. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.sourc + EventRuleName *string `json:"eventRuleName,omitempty" xml:"eventRuleName,omitempty"` +} + +func (s DeleteEventRuleRequest) String() string { + return tea.Prettify(s) +} + +func (s DeleteEventRuleRequest) GoString() string { + return s.String() +} + +func (s *DeleteEventRuleRequest) SetEventBusName(v string) *DeleteEventRuleRequest { + s.EventBusName = &v + return s +} + +func (s *DeleteEventRuleRequest) SetEventRuleName(v string) *DeleteEventRuleRequest { + s.EventRuleName = &v + return s +} + +type DeleteEventRuleResponseBody struct { + // The returned response code. Valid values: + // + // - Success: The request is successful. + // + // - Other codes: The request failed. For more information about error codes, see Error codes. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The returned error message. + // + // example: + // + // Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 2922208e-e1c6-43ee-bfd1-aca50263bc8a + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s DeleteEventRuleResponseBody) String() string { + return tea.Prettify(s) +} + +func (s DeleteEventRuleResponseBody) GoString() string { + return s.String() +} + +func (s *DeleteEventRuleResponseBody) SetCode(v string) *DeleteEventRuleResponseBody { + s.Code = &v + return s +} + +func (s *DeleteEventRuleResponseBody) SetMessage(v string) *DeleteEventRuleResponseBody { + s.Message = &v + return s +} + +func (s *DeleteEventRuleResponseBody) SetRequestId(v string) *DeleteEventRuleResponseBody { + s.RequestId = &v + return s +} + +type DeleteEventRuleResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *DeleteEventRuleResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s DeleteEventRuleResponse) String() string { + return tea.Prettify(s) +} + +func (s DeleteEventRuleResponse) GoString() string { + return s.String() +} + +func (s *DeleteEventRuleResponse) SetHeaders(v map[string]*string) *DeleteEventRuleResponse { + s.Headers = v + return s +} + +func (s *DeleteEventRuleResponse) SetStatusCode(v int32) *DeleteEventRuleResponse { + s.StatusCode = &v + return s +} + +func (s *DeleteEventRuleResponse) SetBody(v *DeleteEventRuleResponseBody) *DeleteEventRuleResponse { + s.Body = v + return s +} + +type UpdateEventRuleRequest struct { + // The name of the event bus with which the event source is associated. + // + // This parameter is required. + // + // example: + // + // my-event-bus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event rule. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.sourc + EventRuleName *string `json:"eventRuleName,omitempty" xml:"eventRuleName,omitempty"` + Description *string `json:"description,omitempty" xml:"description,omitempty"` + // The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + // + // You can specify up to five expressions in the map data structure in each field. + // + // This parameter is required. + // + // example: + // + // {\"source\": [{\"prefix\": \"acs.\"}],\"type\": [{\"prefix\":\"oss:ObjectReplication\"}],\"subject\":[{\"prefix\":\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\", \"suffix\":\".txt\"}]} + FilterPattern *string `json:"filterPattern,omitempty" xml:"filterPattern,omitempty"` +} + +func (s UpdateEventRuleRequest) String() string { + return tea.Prettify(s) +} + +func (s UpdateEventRuleRequest) GoString() string { + return s.String() +} + +func (s *UpdateEventRuleRequest) SetEventBusName(v string) *UpdateEventRuleRequest { + s.EventBusName = &v + return s +} + +func (s *UpdateEventRuleRequest) SetEventRuleName(v string) *UpdateEventRuleRequest { + s.EventRuleName = &v + return s +} + +func (s *UpdateEventRuleRequest) SetDescription(v string) *UpdateEventRuleRequest { + s.Description = &v + return s +} + +func (s *UpdateEventRuleRequest) SetFilterPattern(v string) *UpdateEventRuleRequest { + s.FilterPattern = &v + return s +} + +type UpdateEventRuleResponseBody struct { + // The returned response code. Valid values: + // + // - Success: The request is successful. + // + // - Other codes: The request failed. For more information about error codes, see Error codes. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The returned error message. + // + // example: + // + // Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 2922208e-e1c6-43ee-bfd1-aca50263bc8a + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s UpdateEventRuleResponseBody) String() string { + return tea.Prettify(s) +} + +func (s UpdateEventRuleResponseBody) GoString() string { + return s.String() +} + +func (s *UpdateEventRuleResponseBody) SetCode(v string) *UpdateEventRuleResponseBody { + s.Code = &v + return s +} + +func (s *UpdateEventRuleResponseBody) SetMessage(v string) *UpdateEventRuleResponseBody { + s.Message = &v + return s +} + +func (s *UpdateEventRuleResponseBody) SetRequestId(v string) *UpdateEventRuleResponseBody { + s.RequestId = &v + return s +} + +type UpdateEventRuleResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *UpdateEventRuleResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s UpdateEventRuleResponse) String() string { + return tea.Prettify(s) +} + +func (s UpdateEventRuleResponse) GoString() string { + return s.String() +} + +func (s *UpdateEventRuleResponse) SetHeaders(v map[string]*string) *UpdateEventRuleResponse { + s.Headers = v + return s +} + +func (s *UpdateEventRuleResponse) SetStatusCode(v int32) *UpdateEventRuleResponse { + s.StatusCode = &v + return s +} + +func (s *UpdateEventRuleResponse) SetBody(v *UpdateEventRuleResponseBody) *UpdateEventRuleResponse { + s.Body = v + return s +} + +type ListEventRulesRequest struct { + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The number of entries returned per page. + // + // example: + // + // 10 + MaxResults *int32 `json:"maxResults,omitempty" xml:"maxResults,omitempty"` + // If excess return values exist, this parameter is returned. + // + // example: + // + // 0 + NextToken *string `json:"nextToken,omitempty" xml:"nextToken,omitempty"` +} + +func (s ListEventRulesRequest) String() string { + return tea.Prettify(s) +} + +func (s ListEventRulesRequest) GoString() string { + return s.String() +} + +func (s *ListEventRulesRequest) SetEventBusName(v string) *ListEventRulesRequest { + s.EventBusName = &v + return s +} + +func (s *ListEventRulesRequest) SetMaxResults(v int32) *ListEventRulesRequest { + s.MaxResults = &v + return s +} + +func (s *ListEventRulesRequest) SetNextToken(v string) *ListEventRulesRequest { + s.NextToken = &v + return s +} + +type ListEventRulesResponseBody struct { + EventRules []*ListEventRulesResponseBodyEventRules `json:"eventRules,omitempty" xml:"eventRules,omitempty" type:"Repeated"` + // The total number of entries. + // + // example: + // + // 2 + Total *int `json:"total,omitempty" xml:"total,omitempty"` + // The number of entries returned per page. + // + // example: + // + // 10 + MaxResults *int32 `json:"maxResults,omitempty" xml:"maxResults,omitempty"` + // If excess return values exist, this parameter is returned. + // + // example: + // + // 0 + NextToken *string `json:"nextToken,omitempty" xml:"nextToken,omitempty"` +} + +func (s ListEventRulesResponseBody) String() string { + return tea.Prettify(s) +} + +func (s ListEventRulesResponseBody) GoString() string { + return s.String() +} + +func (s *ListEventRulesResponseBody) SetEventRules(v []*ListEventRulesResponseBodyEventRules) *ListEventRulesResponseBody { + s.EventRules = v + return s +} + +func (s *ListEventRulesResponseBody) SetTotal(v int) *ListEventRulesResponseBody { + s.Total = &v + return s +} + +func (s *ListEventRulesResponseBody) SetMaxResults(v int32) *ListEventRulesResponseBody { + s.MaxResults = &v + return s +} + +func (s *ListEventRulesResponseBody) SetNextToken(v string) *ListEventRulesResponseBody { + s.NextToken = &v + return s +} + +type ListEventRulesResponseBodyEventRules struct { + // The name of the event bus with which the event source is associated. + // + // This parameter is required. + // + // example: + // + // my-event-bus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event rule. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.sourc + EventRuleName *string `json:"eventRuleName,omitempty" xml:"eventRuleName,omitempty"` + Description *string `json:"description,omitempty" xml:"description,omitempty"` + // The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + // + // You can specify up to five expressions in the map data structure in each field. + // + // example: + // + // {\"source\": [{\"prefix\": \"acs.\"}],\"type\": [{\"prefix\":\"oss:ObjectReplication\"}],\"subject\":[{\"prefix\":\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\", \"suffix\":\".txt\"}]} + FilterPattern *string `json:"filterPattern,omitempty" xml:"filterPattern,omitempty"` + // The status of the event rule. Valid values: ENABLE (default): The event rule is enabled. DISABLE: The event rule is disabled. + // + // example: + // + // ENABLE + Status *string `json:"status,omitempty" xml:"status,omitempty"` + GmtCreate *string `json:"gmtCreate,omitempty" xml:"gmtCreate,omitempty"` + GmtModify *string `json:"gmtModify,omitempty" xml:"gmtModify,omitempty"` +} + +func (s ListEventRulesResponseBodyEventRules) String() string { + return tea.Prettify(s) +} + +func (s ListEventRulesResponseBodyEventRules) GoString() string { + return s.String() +} + +func (s *ListEventRulesResponseBodyEventRules) SetEventBusName(v string) *ListEventRulesResponseBodyEventRules { + s.EventBusName = &v + return s +} + +func (s *ListEventRulesResponseBodyEventRules) SetEventRuleName(v string) *ListEventRulesResponseBodyEventRules { + s.EventRuleName = &v + return s +} + +func (s *ListEventRulesResponseBodyEventRules) SetDescription(v string) *ListEventRulesResponseBodyEventRules { + s.Description = &v + return s +} + +func (s *ListEventRulesResponseBodyEventRules) SetFilterPattern(v string) *ListEventRulesResponseBodyEventRules { + s.FilterPattern = &v + return s +} + +func (s *ListEventRulesResponseBodyEventRules) SetStatus(v string) *ListEventRulesResponseBodyEventRules { + s.Status = &v + return s +} + +func (s *ListEventRulesResponseBodyEventRules) SetGmtCreate(v string) *ListEventRulesResponseBodyEventRules { + s.GmtCreate = &v + return s +} + +func (s *ListEventRulesResponseBodyEventRules) SetGmtModify(v string) *ListEventRulesResponseBodyEventRules { + s.GmtModify = &v + return s +} + +type ListEventRulesResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *ListEventRulesResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s ListEventRulesResponse) String() string { + return tea.Prettify(s) +} + +func (s ListEventRulesResponse) GoString() string { + return s.String() +} + +func (s *ListEventRulesResponse) SetHeaders(v map[string]*string) *ListEventRulesResponse { + s.Headers = v + return s +} + +func (s *ListEventRulesResponse) SetStatusCode(v int32) *ListEventRulesResponse { + s.StatusCode = &v + return s +} + +func (s *ListEventRulesResponse) SetBody(v *ListEventRulesResponseBody) *ListEventRulesResponse { + s.Body = v + return s +} + +type EnableEventRuleRequest struct { + // The name of the event bus with which the event source is associated. + // + // This parameter is required. + // + // example: + // + // my-event-bus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event rule. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.sourc + EventRuleName *string `json:"eventRuleName,omitempty" xml:"eventRuleName,omitempty"` +} + +func (s EnableEventRuleRequest) String() string { + return tea.Prettify(s) +} + +func (s EnableEventRuleRequest) GoString() string { + return s.String() +} + +func (s *EnableEventRuleRequest) SetEventBusName(v string) *EnableEventRuleRequest { + s.EventBusName = &v + return s +} + +func (s *EnableEventRuleRequest) SetEventRuleName(v string) *EnableEventRuleRequest { + s.EventRuleName = &v + return s +} + +type EnableEventRuleResponseBody struct { + // The returned response code. Valid values: + // + // - Success: The request is successful. + // + // - Other codes: The request failed. For more information about error codes, see Error codes. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The returned error message. + // + // example: + // + // Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 2922208e-e1c6-43ee-bfd1-aca50263bc8a + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s EnableEventRuleResponseBody) String() string { + return tea.Prettify(s) +} + +func (s EnableEventRuleResponseBody) GoString() string { + return s.String() +} + +func (s *EnableEventRuleResponseBody) SetCode(v string) *EnableEventRuleResponseBody { + s.Code = &v + return s +} + +func (s *EnableEventRuleResponseBody) SetMessage(v string) *EnableEventRuleResponseBody { + s.Message = &v + return s +} + +func (s *EnableEventRuleResponseBody) SetRequestId(v string) *EnableEventRuleResponseBody { + s.RequestId = &v + return s +} + +type EnableEventRuleResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *EnableEventRuleResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s EnableEventRuleResponse) String() string { + return tea.Prettify(s) +} + +func (s EnableEventRuleResponse) GoString() string { + return s.String() +} + +func (s *EnableEventRuleResponse) SetHeaders(v map[string]*string) *EnableEventRuleResponse { + s.Headers = v + return s +} + +func (s *EnableEventRuleResponse) SetStatusCode(v int32) *EnableEventRuleResponse { + s.StatusCode = &v + return s +} + +func (s *EnableEventRuleResponse) SetBody(v *EnableEventRuleResponseBody) *EnableEventRuleResponse { + s.Body = v + return s +} + +type DisableEventRuleRequest struct { + // The name of the event bus with which the event source is associated. + // + // This parameter is required. + // + // example: + // + // my-event-bus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event rule. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.sourc + EventRuleName *string `json:"eventRuleName,omitempty" xml:"eventRuleName,omitempty"` +} + +func (s DisableEventRuleRequest) String() string { + return tea.Prettify(s) +} + +func (s DisableEventRuleRequest) GoString() string { + return s.String() +} + +func (s *DisableEventRuleRequest) SetEventBusName(v string) *DisableEventRuleRequest { + s.EventBusName = &v + return s +} + +func (s *DisableEventRuleRequest) SetEventRuleName(v string) *DisableEventRuleRequest { + s.EventRuleName = &v + return s +} + +type DisableEventRuleResponseBody struct { + // The returned response code. Valid values: + // + // - Success: The request is successful. + // + // - Other codes: The request failed. For more information about error codes, see Error codes. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The returned error message. + // + // example: + // + // Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 2922208e-e1c6-43ee-bfd1-aca50263bc8a + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s DisableEventRuleResponseBody) String() string { + return tea.Prettify(s) +} + +func (s DisableEventRuleResponseBody) GoString() string { + return s.String() +} + +func (s *DisableEventRuleResponseBody) SetCode(v string) *DisableEventRuleResponseBody { + s.Code = &v + return s +} + +func (s *DisableEventRuleResponseBody) SetMessage(v string) *DisableEventRuleResponseBody { + s.Message = &v + return s +} + +func (s *DisableEventRuleResponseBody) SetRequestId(v string) *DisableEventRuleResponseBody { + s.RequestId = &v + return s +} + +type DisableEventRuleResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *DisableEventRuleResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s DisableEventRuleResponse) String() string { + return tea.Prettify(s) +} + +func (s DisableEventRuleResponse) GoString() string { + return s.String() +} + +func (s *DisableEventRuleResponse) SetHeaders(v map[string]*string) *DisableEventRuleResponse { + s.Headers = v + return s +} + +func (s *DisableEventRuleResponse) SetStatusCode(v int32) *DisableEventRuleResponse { + s.StatusCode = &v + return s +} + +func (s *DisableEventRuleResponse) SetBody(v *DisableEventRuleResponseBody) *DisableEventRuleResponse { + s.Body = v + return s +} + +// Description: +// +// EventSource Controller apis: +// +// createEventSource * +// +// updateEventSource * +// +// deleteEventSource * +// +// getEventSource * +// +// listEventSources * +type CreateEventSourceRequest struct { + // The description of the event source. + Description *string `json:"description,omitempty" xml:"description,omitempty"` + // The name of the event bus with which the event source is associated. + // + // This parameter is required. + // + // example: + // + // my-event-bus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event source. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.sourc + EventSourceName *string `json:"eventSourceName,omitempty" xml:"eventSourceName,omitempty"` + ClassName *string `json:"className,omitempty" xml:"className,omitempty"` + Config map[string]interface{} `json:"config,omitempty" xml:"config,omitempty"` +} + +func (s CreateEventSourceRequest) String() string { + return tea.Prettify(s) +} + +func (s CreateEventSourceRequest) GoString() string { + return s.String() +} + +func (s *CreateEventSourceRequest) SetDescription(v string) *CreateEventSourceRequest { + s.Description = &v + return s +} + +func (s *CreateEventSourceRequest) SetEventBusName(v string) *CreateEventSourceRequest { + s.EventBusName = &v + return s +} + +func (s *CreateEventSourceRequest) SetEventSourceName(v string) *CreateEventSourceRequest { + s.EventSourceName = &v + return s +} + +func (s *CreateEventSourceRequest) SetClassName(v string) *CreateEventSourceRequest { + s.ClassName = &v + return s +} + +func (s *CreateEventSourceRequest) SetConfig(v map[string]interface{}) *CreateEventSourceRequest { + s.Config = v + return s +} + +type CreateEventSourceResponseBody struct { + // The returned response code. Valid values: + // + // - Success: The request is successful. + // + // - Other codes: The request failed. For more information about error codes, see Error codes. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The name of the event source. + // + // example: + // + // myrabbitmq.sourc + EventSourceName *string `json:"eventSourceName,omitempty" xml:"eventSourceName,omitempty"` + // The returned error message. + // + // example: + // + // Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 2922208e-e1c6-43ee-bfd1-aca50263bc8a + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s CreateEventSourceResponseBody) String() string { + return tea.Prettify(s) +} + +func (s CreateEventSourceResponseBody) GoString() string { + return s.String() +} + +func (s *CreateEventSourceResponseBody) SetCode(v string) *CreateEventSourceResponseBody { + s.Code = &v + return s +} + +func (s *CreateEventSourceResponseBody) SetEventSourceName(v string) *CreateEventSourceResponseBody { + s.EventSourceName = &v + return s +} + +func (s *CreateEventSourceResponseBody) SetMessage(v string) *CreateEventSourceResponseBody { + s.Message = &v + return s +} + +func (s *CreateEventSourceResponseBody) SetRequestId(v string) *CreateEventSourceResponseBody { + s.RequestId = &v + return s +} + +type CreateEventSourceResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *CreateEventSourceResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s CreateEventSourceResponse) String() string { + return tea.Prettify(s) +} + +func (s CreateEventSourceResponse) GoString() string { + return s.String() +} + +func (s *CreateEventSourceResponse) SetHeaders(v map[string]*string) *CreateEventSourceResponse { + s.Headers = v + return s +} + +func (s *CreateEventSourceResponse) SetStatusCode(v int32) *CreateEventSourceResponse { + s.StatusCode = &v + return s +} + +func (s *CreateEventSourceResponse) SetBody(v *CreateEventSourceResponseBody) *CreateEventSourceResponse { + s.Body = v + return s +} + +type UpdateEventSourceRequest struct { + // The name of the event bus with which the event source is associated. + // + // This parameter is required. + // + // example: + // + // my-event-bus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event source. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.sourc + EventSourceName *string `json:"eventSourceName,omitempty" xml:"eventSourceName,omitempty"` + // The description of the event source. + Description *string `json:"description,omitempty" xml:"description,omitempty"` + ClassName *string `json:"className,omitempty" xml:"className,omitempty"` + Status *int `json:"status,omitempty" xml:"status,omitempty"` + Config map[string]interface{} `json:"config,omitempty" xml:"config,omitempty"` +} + +func (s UpdateEventSourceRequest) String() string { + return tea.Prettify(s) +} + +func (s UpdateEventSourceRequest) GoString() string { + return s.String() +} + +func (s *UpdateEventSourceRequest) SetEventBusName(v string) *UpdateEventSourceRequest { + s.EventBusName = &v + return s +} + +func (s *UpdateEventSourceRequest) SetEventSourceName(v string) *UpdateEventSourceRequest { + s.EventSourceName = &v + return s +} + +func (s *UpdateEventSourceRequest) SetDescription(v string) *UpdateEventSourceRequest { + s.Description = &v + return s +} + +func (s *UpdateEventSourceRequest) SetClassName(v string) *UpdateEventSourceRequest { + s.ClassName = &v + return s +} + +func (s *UpdateEventSourceRequest) SetStatus(v int) *UpdateEventSourceRequest { + s.Status = &v + return s +} + +func (s *UpdateEventSourceRequest) SetConfig(v map[string]interface{}) *UpdateEventSourceRequest { + s.Config = v + return s +} + +type UpdateEventSourceResponseBody struct { + // The returned response code. Valid values: + // + // - Success: The request is successful. + // + // - Other codes: The request failed. For more information about error codes, see Error codes. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The returned error message. + // + // example: + // + // Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 2922208e-e1c6-43ee-bfd1-aca50263bc8a + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s UpdateEventSourceResponseBody) String() string { + return tea.Prettify(s) +} + +func (s UpdateEventSourceResponseBody) GoString() string { + return s.String() +} + +func (s *UpdateEventSourceResponseBody) SetCode(v string) *UpdateEventSourceResponseBody { + s.Code = &v + return s +} + +func (s *UpdateEventSourceResponseBody) SetMessage(v string) *UpdateEventSourceResponseBody { + s.Message = &v + return s +} + +func (s *UpdateEventSourceResponseBody) SetRequestId(v string) *UpdateEventSourceResponseBody { + s.RequestId = &v + return s +} + +type UpdateEventSourceResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *UpdateEventSourceResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s UpdateEventSourceResponse) String() string { + return tea.Prettify(s) +} + +func (s UpdateEventSourceResponse) GoString() string { + return s.String() +} + +func (s *UpdateEventSourceResponse) SetHeaders(v map[string]*string) *UpdateEventSourceResponse { + s.Headers = v + return s +} + +func (s *UpdateEventSourceResponse) SetStatusCode(v int32) *UpdateEventSourceResponse { + s.StatusCode = &v + return s +} + +func (s *UpdateEventSourceResponse) SetBody(v *UpdateEventSourceResponseBody) *UpdateEventSourceResponse { + s.Body = v + return s +} + +type DeleteEventSourceRequest struct { + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event source. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.source + EventSourceName *string `json:"eventSourceName,omitempty" xml:"eventSourceName,omitempty"` +} + +func (s DeleteEventSourceRequest) String() string { + return tea.Prettify(s) +} + +func (s DeleteEventSourceRequest) GoString() string { + return s.String() +} + +func (s *DeleteEventSourceRequest) SetEventBusName(v string) *DeleteEventSourceRequest { + s.EventBusName = &v + return s +} + +func (s *DeleteEventSourceRequest) SetEventSourceName(v string) *DeleteEventSourceRequest { + s.EventSourceName = &v + return s +} + +type DeleteEventSourceResponseBody struct { + // The returned response code. The value Success indicates that the request is successful. Other values indicate that the request failed. For more information about error codes, see Error codes. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The returned error message. + // + // example: + // + // Remote error. requestId: [78B66E68-E778-1F33-84BD-xxxx], error code: [EventSourceNotExist], message: [The event source in request is not exist! ] + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 5f80e9b3-98d5-4f51-8412-c758818a03e4 + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s DeleteEventSourceResponseBody) String() string { + return tea.Prettify(s) +} + +func (s DeleteEventSourceResponseBody) GoString() string { + return s.String() +} + +func (s *DeleteEventSourceResponseBody) SetCode(v string) *DeleteEventSourceResponseBody { + s.Code = &v + return s +} + +func (s *DeleteEventSourceResponseBody) SetMessage(v string) *DeleteEventSourceResponseBody { + s.Message = &v + return s +} + +func (s *DeleteEventSourceResponseBody) SetRequestId(v string) *DeleteEventSourceResponseBody { + s.RequestId = &v + return s +} + +type DeleteEventSourceResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *DeleteEventSourceResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s DeleteEventSourceResponse) String() string { + return tea.Prettify(s) +} + +func (s DeleteEventSourceResponse) GoString() string { + return s.String() +} + +func (s *DeleteEventSourceResponse) SetHeaders(v map[string]*string) *DeleteEventSourceResponse { + s.Headers = v + return s +} + +func (s *DeleteEventSourceResponse) SetStatusCode(v int32) *DeleteEventSourceResponse { + s.StatusCode = &v + return s +} + +func (s *DeleteEventSourceResponse) SetBody(v *DeleteEventSourceResponseBody) *DeleteEventSourceResponse { + s.Body = v + return s +} + +type GetEventSourceRequest struct { + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event source. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.source + EventSourceName *string `json:"eventSourceName,omitempty" xml:"eventSourceName,omitempty"` +} + +func (s GetEventSourceRequest) String() string { + return tea.Prettify(s) +} + +func (s GetEventSourceRequest) GoString() string { + return s.String() +} + +func (s *GetEventSourceRequest) SetEventBusName(v string) *GetEventSourceRequest { + s.EventBusName = &v + return s +} + +func (s *GetEventSourceRequest) SetEventSourceName(v string) *GetEventSourceRequest { + s.EventSourceName = &v + return s +} + +type GetEventSourceResponseBody struct { + // The name of the event bus with which the event source is associated. + // + // This parameter is required. + // + // example: + // + // my-event-bus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event source. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.sourc + EventSourceName *string `json:"eventSourceName,omitempty" xml:"eventSourceName,omitempty"` + // The description of the event source. + Description *string `json:"description,omitempty" xml:"description,omitempty"` + ClassName *string `json:"className,omitempty" xml:"className,omitempty"` + Config map[string]interface{} `json:"config,omitempty" xml:"config,omitempty"` +} + +func (s GetEventSourceResponseBody) String() string { + return tea.Prettify(s) +} + +func (s GetEventSourceResponseBody) GoString() string { + return s.String() +} + +func (s *GetEventSourceResponseBody) SetEventBusName(v string) *GetEventSourceResponseBody { + s.EventBusName = &v + return s +} + +func (s *GetEventSourceResponseBody) SetEventSourceName(v string) *GetEventSourceResponseBody { + s.EventSourceName = &v + return s +} + +func (s *GetEventSourceResponseBody) SetDescription(v string) *GetEventSourceResponseBody { + s.Description = &v + return s +} + +func (s *GetEventSourceResponseBody) SetClassName(v string) *GetEventSourceResponseBody { + s.ClassName = &v + return s +} + +func (s *GetEventSourceResponseBody) SetConfig(v map[string]interface{}) *GetEventSourceResponseBody { + s.Config = v + return s +} + +type GetEventSourceResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *GetEventSourceResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s GetEventSourceResponse) String() string { + return tea.Prettify(s) +} + +func (s GetEventSourceResponse) GoString() string { + return s.String() +} + +func (s *GetEventSourceResponse) SetHeaders(v map[string]*string) *GetEventSourceResponse { + s.Headers = v + return s +} + +func (s *GetEventSourceResponse) SetStatusCode(v int32) *GetEventSourceResponse { + s.StatusCode = &v + return s +} + +func (s *GetEventSourceResponse) SetBody(v *GetEventSourceResponseBody) *GetEventSourceResponse { + s.Body = v + return s +} + +type ListEventSourcesRequest struct { + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The type of the event source. + // + // This parameter is required. + // + // example: + // + // USER_DEFINED + EventSourceType *string `json:"eventSourceType,omitempty" xml:"eventSourceType,omitempty"` + // The number of entries returned per page. + // + // example: + // + // 10 + MaxResults *int32 `json:"maxResults,omitempty" xml:"maxResults,omitempty"` + // If excess return values exist, this parameter is returned. + // + // example: + // + // 0 + NextToken *string `json:"nextToken,omitempty" xml:"nextToken,omitempty"` +} + +func (s ListEventSourcesRequest) String() string { + return tea.Prettify(s) +} + +func (s ListEventSourcesRequest) GoString() string { + return s.String() +} + +func (s *ListEventSourcesRequest) SetEventBusName(v string) *ListEventSourcesRequest { + s.EventBusName = &v + return s +} + +func (s *ListEventSourcesRequest) SetEventSourceType(v string) *ListEventSourcesRequest { + s.EventSourceType = &v + return s +} + +func (s *ListEventSourcesRequest) SetMaxResults(v int32) *ListEventSourcesRequest { + s.MaxResults = &v + return s +} + +func (s *ListEventSourcesRequest) SetNextToken(v string) *ListEventSourcesRequest { + s.NextToken = &v + return s +} + +type ListEventSourcesResponseBody struct { + EventSources []*ListEventSourcesResponseBodyEventSources `json:"eventSources,omitempty" xml:"eventSources,omitempty" type:"Repeated"` + // The total number of entries. + // + // example: + // + // 2 + Total *int `json:"total,omitempty" xml:"total,omitempty"` + // The number of entries returned per page. + // + // example: + // + // 10 + MaxResults *int32 `json:"maxResults,omitempty" xml:"maxResults,omitempty"` + // If excess return values exist, this parameter is returned. + // + // example: + // + // 0 + NextToken *string `json:"nextToken,omitempty" xml:"nextToken,omitempty"` +} + +func (s ListEventSourcesResponseBody) String() string { + return tea.Prettify(s) +} + +func (s ListEventSourcesResponseBody) GoString() string { + return s.String() +} + +func (s *ListEventSourcesResponseBody) SetEventSources(v []*ListEventSourcesResponseBodyEventSources) *ListEventSourcesResponseBody { + s.EventSources = v + return s +} + +func (s *ListEventSourcesResponseBody) SetTotal(v int) *ListEventSourcesResponseBody { + s.Total = &v + return s +} + +func (s *ListEventSourcesResponseBody) SetMaxResults(v int32) *ListEventSourcesResponseBody { + s.MaxResults = &v + return s +} + +func (s *ListEventSourcesResponseBody) SetNextToken(v string) *ListEventSourcesResponseBody { + s.NextToken = &v + return s +} + +type ListEventSourcesResponseBodyEventSources struct { + // The name of the event bus. + // + // This parameter is required. + // + // example: + // + // demo + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // EventSource is required for querying default bus events. + // + // example: + // + // testEventSourceName + EventSourceName *string `json:"eventSourceName,omitempty" xml:"eventSourceName,omitempty"` + // The description of the event type. + // + // example: + // + // The description of the event type. + Description *string `json:"description,omitempty" xml:"description,omitempty"` + ClassName *string `json:"className,omitempty" xml:"className,omitempty"` + Config map[string]interface{} `json:"config,omitempty" xml:"config,omitempty"` + GmtCreate *string `json:"gmtCreate,omitempty" xml:"gmtCreate,omitempty"` + GmtModify *string `json:"gmtModify,omitempty" xml:"gmtModify,omitempty"` +} + +func (s ListEventSourcesResponseBodyEventSources) String() string { + return tea.Prettify(s) +} + +func (s ListEventSourcesResponseBodyEventSources) GoString() string { + return s.String() +} + +func (s *ListEventSourcesResponseBodyEventSources) SetEventBusName(v string) *ListEventSourcesResponseBodyEventSources { + s.EventBusName = &v + return s +} + +func (s *ListEventSourcesResponseBodyEventSources) SetEventSourceName(v string) *ListEventSourcesResponseBodyEventSources { + s.EventSourceName = &v + return s +} + +func (s *ListEventSourcesResponseBodyEventSources) SetDescription(v string) *ListEventSourcesResponseBodyEventSources { + s.Description = &v + return s +} + +func (s *ListEventSourcesResponseBodyEventSources) SetClassName(v string) *ListEventSourcesResponseBodyEventSources { + s.ClassName = &v + return s +} + +func (s *ListEventSourcesResponseBodyEventSources) SetConfig(v map[string]interface{}) *ListEventSourcesResponseBodyEventSources { + s.Config = v + return s +} + +func (s *ListEventSourcesResponseBodyEventSources) SetGmtCreate(v string) *ListEventSourcesResponseBodyEventSources { + s.GmtCreate = &v + return s +} + +func (s *ListEventSourcesResponseBodyEventSources) SetGmtModify(v string) *ListEventSourcesResponseBodyEventSources { + s.GmtModify = &v + return s +} + +type ListEventSourcesResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *ListEventSourcesResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s ListEventSourcesResponse) String() string { + return tea.Prettify(s) +} + +func (s ListEventSourcesResponse) GoString() string { + return s.String() +} + +func (s *ListEventSourcesResponse) SetHeaders(v map[string]*string) *ListEventSourcesResponse { + s.Headers = v + return s +} + +func (s *ListEventSourcesResponse) SetStatusCode(v int32) *ListEventSourcesResponse { + s.StatusCode = &v + return s +} + +func (s *ListEventSourcesResponse) SetBody(v *ListEventSourcesResponseBody) *ListEventSourcesResponse { + s.Body = v + return s +} + +// Description: +// +// EventTarget Controller apis: +// +// createEventTargets * +// +// updateEventTargets * +// +// deleteEventTargets * +// +// listEventTargets * +type EventTarget struct { + EventTargetName *string `json:"eventTargetName,omitempty" xml:"eventTargetName,omitempty"` + ClassName *string `json:"className,omitempty" xml:"className,omitempty"` + Config map[string]interface{} `json:"config,omitempty" xml:"config,omitempty"` + RunOptions *EventTargetRunOptions `json:"runOptions,omitempty" xml:"runOptions,omitempty" type:"Struct"` +} + +func (s EventTarget) String() string { + return tea.Prettify(s) +} + +func (s EventTarget) GoString() string { + return s.String() +} + +func (s *EventTarget) SetEventTargetName(v string) *EventTarget { + s.EventTargetName = &v + return s +} + +func (s *EventTarget) SetClassName(v string) *EventTarget { + s.ClassName = &v + return s +} + +func (s *EventTarget) SetConfig(v map[string]interface{}) *EventTarget { + s.Config = v + return s +} + +func (s *EventTarget) SetRunOptions(v *EventTargetRunOptions) *EventTarget { + s.RunOptions = v + return s +} + +type EventTargetRunOptions struct { + ErrorsTolerance *string `json:"errorsTolerance,omitempty" xml:"errorsTolerance,omitempty"` + RetryStrategy *EventTargetRunOptionsRetryStrategy `json:"retryStrategy,omitempty" xml:"retryStrategy,omitempty" type:"Struct"` + DeadLetterQueue *EventTargetRunOptionsDeadLetterQueue `json:"deadLetterQueue,omitempty" xml:"deadLetterQueue,omitempty" type:"Struct"` +} + +func (s EventTargetRunOptions) String() string { + return tea.Prettify(s) +} + +func (s EventTargetRunOptions) GoString() string { + return s.String() +} + +func (s *EventTargetRunOptions) SetErrorsTolerance(v string) *EventTargetRunOptions { + s.ErrorsTolerance = &v + return s +} + +func (s *EventTargetRunOptions) SetRetryStrategy(v *EventTargetRunOptionsRetryStrategy) *EventTargetRunOptions { + s.RetryStrategy = v + return s +} + +func (s *EventTargetRunOptions) SetDeadLetterQueue(v *EventTargetRunOptionsDeadLetterQueue) *EventTargetRunOptions { + s.DeadLetterQueue = v + return s +} + +type EventTargetRunOptionsRetryStrategy struct { + PushRetryStrategy *string `json:"pushRetryStrategy,omitempty" xml:"pushRetryStrategy,omitempty"` + MaximumEventAgeInSeconds *int32 `json:"maximumEventAgeInSeconds,omitempty" xml:"maximumEventAgeInSeconds,omitempty"` + MaximumRetryAttempts *int32 `json:"maximumRetryAttempts,omitempty" xml:"maximumRetryAttempts,omitempty"` +} + +func (s EventTargetRunOptionsRetryStrategy) String() string { + return tea.Prettify(s) +} + +func (s EventTargetRunOptionsRetryStrategy) GoString() string { + return s.String() +} + +func (s *EventTargetRunOptionsRetryStrategy) SetPushRetryStrategy(v string) *EventTargetRunOptionsRetryStrategy { + s.PushRetryStrategy = &v + return s +} + +func (s *EventTargetRunOptionsRetryStrategy) SetMaximumEventAgeInSeconds(v int32) *EventTargetRunOptionsRetryStrategy { + s.MaximumEventAgeInSeconds = &v + return s +} + +func (s *EventTargetRunOptionsRetryStrategy) SetMaximumRetryAttempts(v int32) *EventTargetRunOptionsRetryStrategy { + s.MaximumRetryAttempts = &v + return s +} + +type EventTargetRunOptionsDeadLetterQueue struct { + Type *string `json:"type,omitempty" xml:"type,omitempty"` + Config map[string]interface{} `json:"config,omitempty" xml:"config,omitempty"` +} + +func (s EventTargetRunOptionsDeadLetterQueue) String() string { + return tea.Prettify(s) +} + +func (s EventTargetRunOptionsDeadLetterQueue) GoString() string { + return s.String() +} + +func (s *EventTargetRunOptionsDeadLetterQueue) SetType(v string) *EventTargetRunOptionsDeadLetterQueue { + s.Type = &v + return s +} + +func (s *EventTargetRunOptionsDeadLetterQueue) SetConfig(v map[string]interface{}) *EventTargetRunOptionsDeadLetterQueue { + s.Config = v + return s +} + +type CreateEventTargetsRequest struct { + // The name of the event bus with which the event target is associated. + // + // This parameter is required. + // + // example: + // + // my-event-bus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event rule. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.sourc + EventRuleName *string `json:"eventRuleName,omitempty" xml:"eventRuleName,omitempty"` + EventTargets []*EventTarget `json:"eventTargets,omitempty" xml:"eventTargets,omitempty" type:"Repeated"` +} + +func (s CreateEventTargetsRequest) String() string { + return tea.Prettify(s) +} + +func (s CreateEventTargetsRequest) GoString() string { + return s.String() +} + +func (s *CreateEventTargetsRequest) SetEventBusName(v string) *CreateEventTargetsRequest { + s.EventBusName = &v + return s +} + +func (s *CreateEventTargetsRequest) SetEventRuleName(v string) *CreateEventTargetsRequest { + s.EventRuleName = &v + return s +} + +func (s *CreateEventTargetsRequest) SetEventTargets(v []*EventTarget) *CreateEventTargetsRequest { + s.EventTargets = v + return s +} + +type CreateEventTargetsResponseBody struct { + // The returned response code. Valid values: + // + // - Success: The request is successful. + // + // - Other codes: The request failed. For more information about error codes, see Error codes. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The returned error message. + // + // example: + // + // Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 2922208e-e1c6-43ee-bfd1-aca50263bc8a + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s CreateEventTargetsResponseBody) String() string { + return tea.Prettify(s) +} + +func (s CreateEventTargetsResponseBody) GoString() string { + return s.String() +} + +func (s *CreateEventTargetsResponseBody) SetCode(v string) *CreateEventTargetsResponseBody { + s.Code = &v + return s +} + +func (s *CreateEventTargetsResponseBody) SetMessage(v string) *CreateEventTargetsResponseBody { + s.Message = &v + return s +} + +func (s *CreateEventTargetsResponseBody) SetRequestId(v string) *CreateEventTargetsResponseBody { + s.RequestId = &v + return s +} + +type CreateEventTargetsResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *CreateEventTargetsResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s CreateEventTargetsResponse) String() string { + return tea.Prettify(s) +} + +func (s CreateEventTargetsResponse) GoString() string { + return s.String() +} + +func (s *CreateEventTargetsResponse) SetHeaders(v map[string]*string) *CreateEventTargetsResponse { + s.Headers = v + return s +} + +func (s *CreateEventTargetsResponse) SetStatusCode(v int32) *CreateEventTargetsResponse { + s.StatusCode = &v + return s +} + +func (s *CreateEventTargetsResponse) SetBody(v *CreateEventTargetsResponseBody) *CreateEventTargetsResponse { + s.Body = v + return s +} + +type UpdateEventTargetsRequest struct { + // The name of the event bus with which the event target is associated. + // + // This parameter is required. + // + // example: + // + // my-event-bus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event rule. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.sourc + EventRuleName *string `json:"eventRuleName,omitempty" xml:"eventRuleName,omitempty"` + EventTargets []*EventTarget `json:"eventTargets,omitempty" xml:"eventTargets,omitempty" type:"Repeated"` +} + +func (s UpdateEventTargetsRequest) String() string { + return tea.Prettify(s) +} + +func (s UpdateEventTargetsRequest) GoString() string { + return s.String() +} + +func (s *UpdateEventTargetsRequest) SetEventBusName(v string) *UpdateEventTargetsRequest { + s.EventBusName = &v + return s +} + +func (s *UpdateEventTargetsRequest) SetEventRuleName(v string) *UpdateEventTargetsRequest { + s.EventRuleName = &v + return s +} + +func (s *UpdateEventTargetsRequest) SetEventTargets(v []*EventTarget) *UpdateEventTargetsRequest { + s.EventTargets = v + return s +} + +type UpdateEventTargetsResponseBody struct { + // The returned response code. Valid values: + // + // - Success: The request is successful. + // + // - Other codes: The request failed. For more information about error codes, see Error codes. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The returned error message. + // + // example: + // + // Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 2922208e-e1c6-43ee-bfd1-aca50263bc8a + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s UpdateEventTargetsResponseBody) String() string { + return tea.Prettify(s) +} + +func (s UpdateEventTargetsResponseBody) GoString() string { + return s.String() +} + +func (s *UpdateEventTargetsResponseBody) SetCode(v string) *UpdateEventTargetsResponseBody { + s.Code = &v + return s +} + +func (s *UpdateEventTargetsResponseBody) SetMessage(v string) *UpdateEventTargetsResponseBody { + s.Message = &v + return s +} + +func (s *UpdateEventTargetsResponseBody) SetRequestId(v string) *UpdateEventTargetsResponseBody { + s.RequestId = &v + return s +} + +type UpdateEventTargetsResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *UpdateEventTargetsResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s UpdateEventTargetsResponse) String() string { + return tea.Prettify(s) +} + +func (s UpdateEventTargetsResponse) GoString() string { + return s.String() +} + +func (s *UpdateEventTargetsResponse) SetHeaders(v map[string]*string) *UpdateEventTargetsResponse { + s.Headers = v + return s +} + +func (s *UpdateEventTargetsResponse) SetStatusCode(v int32) *UpdateEventTargetsResponse { + s.StatusCode = &v + return s +} + +func (s *UpdateEventTargetsResponse) SetBody(v *UpdateEventTargetsResponseBody) *UpdateEventTargetsResponse { + s.Body = v + return s +} + +type DeleteEventTargetsRequest struct { + // The name of the event bus. + // + // example: + // + // MyEventBus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty" require:"true"` + // The name of the event rule. + // + // example: + // + // ramrolechange-mns + EventRuleName *string `json:"eventRuleName,omitempty" xml:"eventRuleName,omitempty" require:"true"` + // The names of the event targets that you want to delete. + EventTargetNames []*string `json:"eventTargetNames,omitempty" xml:"eventTargetNames,omitempty" type:"Repeated"` +} + +func (s DeleteEventTargetsRequest) String() string { + return tea.Prettify(s) +} + +func (s DeleteEventTargetsRequest) GoString() string { + return s.String() +} + +func (s *DeleteEventTargetsRequest) SetEventBusName(v string) *DeleteEventTargetsRequest { + s.EventBusName = &v + return s +} + +func (s *DeleteEventTargetsRequest) SetEventRuleName(v string) *DeleteEventTargetsRequest { + s.EventRuleName = &v + return s +} + +func (s *DeleteEventTargetsRequest) SetEventTargetNames(v []*string) *DeleteEventTargetsRequest { + s.EventTargetNames = v + return s +} + +type DeleteEventTargetsResponseBody struct { + // The returned response code. Valid values: + // + // - Success: The request is successful. + // + // - Other codes: The request failed. For more information about error codes, see Error codes. + // + // example: + // + // Success + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The returned error message. + // + // example: + // + // Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 2922208e-e1c6-43ee-bfd1-aca50263bc8a + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s DeleteEventTargetsResponseBody) String() string { + return tea.Prettify(s) +} + +func (s DeleteEventTargetsResponseBody) GoString() string { + return s.String() +} + +func (s *DeleteEventTargetsResponseBody) SetCode(v string) *DeleteEventTargetsResponseBody { + s.Code = &v + return s +} + +func (s *DeleteEventTargetsResponseBody) SetMessage(v string) *DeleteEventTargetsResponseBody { + s.Message = &v + return s +} + +func (s *DeleteEventTargetsResponseBody) SetRequestId(v string) *DeleteEventTargetsResponseBody { + s.RequestId = &v + return s +} + +type DeleteEventTargetsResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *DeleteEventTargetsResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s DeleteEventTargetsResponse) String() string { + return tea.Prettify(s) +} + +func (s DeleteEventTargetsResponse) GoString() string { + return s.String() +} + +func (s *DeleteEventTargetsResponse) SetHeaders(v map[string]*string) *DeleteEventTargetsResponse { + s.Headers = v + return s +} + +func (s *DeleteEventTargetsResponse) SetStatusCode(v int32) *DeleteEventTargetsResponse { + s.StatusCode = &v + return s +} + +func (s *DeleteEventTargetsResponse) SetBody(v *DeleteEventTargetsResponseBody) *DeleteEventTargetsResponse { + s.Body = v + return s +} + +type ListEventTargetsRequest struct { + // The name of the event bus with which the event target is associated. + // + // This parameter is required. + // + // example: + // + // my-event-bus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event rule. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.sourc + EventRuleName *string `json:"eventRuleName,omitempty" xml:"eventRuleName,omitempty"` +} + +func (s ListEventTargetsRequest) String() string { + return tea.Prettify(s) +} + +func (s ListEventTargetsRequest) GoString() string { + return s.String() +} + +func (s *ListEventTargetsRequest) SetEventBusName(v string) *ListEventTargetsRequest { + s.EventBusName = &v + return s +} + +func (s *ListEventTargetsRequest) SetEventRuleName(v string) *ListEventTargetsRequest { + s.EventRuleName = &v + return s +} + +type ListEventTargetsResponseBody struct { + // The name of the event bus with which the event target is associated. + // + // This parameter is required. + // + // example: + // + // my-event-bus + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // The name of the event rule. + // + // This parameter is required. + // + // example: + // + // myrabbitmq.sourc + EventRuleName *string `json:"eventRuleName,omitempty" xml:"eventRuleName,omitempty"` + EventTargets []*ListEventTargetsResponseBodyEventTargets `json:"eventTargets,omitempty" xml:"eventTargets,omitempty" type:"Repeated"` +} + +func (s ListEventTargetsResponseBody) String() string { + return tea.Prettify(s) +} + +func (s ListEventTargetsResponseBody) GoString() string { + return s.String() +} + +func (s *ListEventTargetsResponseBody) SetEventBusName(v string) *ListEventTargetsResponseBody { + s.EventBusName = &v + return s +} + +func (s *ListEventTargetsResponseBody) SetEventRuleName(v string) *ListEventTargetsResponseBody { + s.EventRuleName = &v + return s +} + +func (s *ListEventTargetsResponseBody) SetEventTargets(v []*ListEventTargetsResponseBodyEventTargets) *ListEventTargetsResponseBody { + s.EventTargets = v + return s +} + +type ListEventTargetsResponseBodyEventTargets struct { + EventTargetName *string `json:"eventTargetName,omitempty" xml:"eventTargetName,omitempty"` + ClassName *string `json:"className,omitempty" xml:"className,omitempty"` + Config map[string]interface{} `json:"config,omitempty" xml:"config,omitempty"` + RunOptions *ListEventTargetsResponseBodyEventTargetsRunOptions `json:"runOptions,omitempty" xml:"runOptions,omitempty" type:"Struct"` +} + +func (s ListEventTargetsResponseBodyEventTargets) String() string { + return tea.Prettify(s) +} + +func (s ListEventTargetsResponseBodyEventTargets) GoString() string { + return s.String() +} + +func (s *ListEventTargetsResponseBodyEventTargets) SetEventTargetName(v string) *ListEventTargetsResponseBodyEventTargets { + s.EventTargetName = &v + return s +} + +func (s *ListEventTargetsResponseBodyEventTargets) SetClassName(v string) *ListEventTargetsResponseBodyEventTargets { + s.ClassName = &v + return s +} + +func (s *ListEventTargetsResponseBodyEventTargets) SetConfig(v map[string]interface{}) *ListEventTargetsResponseBodyEventTargets { + s.Config = v + return s +} + +func (s *ListEventTargetsResponseBodyEventTargets) SetRunOptions(v *ListEventTargetsResponseBodyEventTargetsRunOptions) *ListEventTargetsResponseBodyEventTargets { + s.RunOptions = v + return s +} + +type ListEventTargetsResponseBodyEventTargetsRunOptions struct { + ErrorsTolerance *string `json:"errorsTolerance,omitempty" xml:"errorsTolerance,omitempty"` + RetryStrategy *ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy `json:"retryStrategy,omitempty" xml:"retryStrategy,omitempty" type:"Struct"` + DeadLetterQueue *ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue `json:"deadLetterQueue,omitempty" xml:"deadLetterQueue,omitempty" type:"Struct"` +} + +func (s ListEventTargetsResponseBodyEventTargetsRunOptions) String() string { + return tea.Prettify(s) +} + +func (s ListEventTargetsResponseBodyEventTargetsRunOptions) GoString() string { + return s.String() +} + +func (s *ListEventTargetsResponseBodyEventTargetsRunOptions) SetErrorsTolerance(v string) *ListEventTargetsResponseBodyEventTargetsRunOptions { + s.ErrorsTolerance = &v + return s +} + +func (s *ListEventTargetsResponseBodyEventTargetsRunOptions) SetRetryStrategy(v *ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy) *ListEventTargetsResponseBodyEventTargetsRunOptions { + s.RetryStrategy = v + return s +} + +func (s *ListEventTargetsResponseBodyEventTargetsRunOptions) SetDeadLetterQueue(v *ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue) *ListEventTargetsResponseBodyEventTargetsRunOptions { + s.DeadLetterQueue = v + return s +} + +type ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy struct { + PushRetryStrategy *string `json:"pushRetryStrategy,omitempty" xml:"pushRetryStrategy,omitempty"` + MaximumEventAgeInSeconds *int32 `json:"maximumEventAgeInSeconds,omitempty" xml:"maximumEventAgeInSeconds,omitempty"` + MaximumRetryAttempts *int32 `json:"maximumRetryAttempts,omitempty" xml:"maximumRetryAttempts,omitempty"` +} + +func (s ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy) String() string { + return tea.Prettify(s) +} + +func (s ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy) GoString() string { + return s.String() +} + +func (s *ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy) SetPushRetryStrategy(v string) *ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy { + s.PushRetryStrategy = &v + return s +} + +func (s *ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy) SetMaximumEventAgeInSeconds(v int32) *ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy { + s.MaximumEventAgeInSeconds = &v + return s +} + +func (s *ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy) SetMaximumRetryAttempts(v int32) *ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy { + s.MaximumRetryAttempts = &v + return s +} + +type ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue struct { + Type *string `json:"type,omitempty" xml:"type,omitempty"` + Config map[string]interface{} `json:"config,omitempty" xml:"config,omitempty"` +} + +func (s ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue) String() string { + return tea.Prettify(s) +} + +func (s ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue) GoString() string { + return s.String() +} + +func (s *ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue) SetType(v string) *ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue { + s.Type = &v + return s +} + +func (s *ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue) SetConfig(v map[string]interface{}) *ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue { + s.Config = v + return s +} + +type ListEventTargetsResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *ListEventTargetsResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s ListEventTargetsResponse) String() string { + return tea.Prettify(s) +} + +func (s ListEventTargetsResponse) GoString() string { + return s.String() +} + +func (s *ListEventTargetsResponse) SetHeaders(v map[string]*string) *ListEventTargetsResponse { + s.Headers = v + return s +} + +func (s *ListEventTargetsResponse) SetStatusCode(v int32) *ListEventTargetsResponse { + s.StatusCode = &v + return s +} + +func (s *ListEventTargetsResponse) SetBody(v *ListEventTargetsResponseBody) *ListEventTargetsResponse { + s.Body = v + return s +} + +// Description: +// +// EventType Controller apis: +// +// listEventTypes * +type ListEventTypesRequest struct { + // The name of the event bus. + // + // This parameter is required. + // + // example: + // + // demo + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // EventSource is required for querying default bus events. + // + // example: + // + // testEventSourceName + EventSourceName *string `json:"eventSourceName,omitempty" xml:"eventSourceName,omitempty"` + // The number of entries returned per page. + // + // example: + // + // 10 + MaxResults *int32 `json:"maxResults,omitempty" xml:"maxResults,omitempty"` + // If excess return values exist, this parameter is returned. + // + // example: + // + // 0 + NextToken *string `json:"nextToken,omitempty" xml:"nextToken,omitempty"` +} + +func (s ListEventTypesRequest) String() string { + return tea.Prettify(s) +} + +func (s ListEventTypesRequest) GoString() string { + return s.String() +} + +func (s *ListEventTypesRequest) SetEventBusName(v string) *ListEventTypesRequest { + s.EventBusName = &v + return s +} + +func (s *ListEventTypesRequest) SetEventSourceName(v string) *ListEventTypesRequest { + s.EventSourceName = &v + return s +} + +func (s *ListEventTypesRequest) SetMaxResults(v int32) *ListEventTypesRequest { + s.MaxResults = &v + return s +} + +func (s *ListEventTypesRequest) SetNextToken(v string) *ListEventTypesRequest { + s.NextToken = &v + return s +} + +type ListEventTypesResponseBody struct { + EventTypes []*ListEventTypesResponseBodyEventTypes `json:"eventTypes,omitempty" xml:"eventTypes,omitempty" type:"Repeated"` + // If excess return values exist, this parameter is returned. + // + // example: + // + // 10 + NextToken *string `json:"nextToken,omitempty" xml:"nextToken,omitempty"` + // The total number of entries. + // + // example: + // + // 2 + Total *int `json:"total,omitempty" xml:"total,omitempty"` + // If you set Limit and excess return values exist, this parameter is returned. + // + // example: + // + // 10 + MaxResults *int32 `json:"maxResults,omitempty" xml:"maxResults,omitempty"` + // The status code returned. The status code 200 indicates that the request was successful. + // + // example: + // + // 200 + Code *string `json:"code,omitempty" xml:"code,omitempty"` + // The error message that is returned if the request failed. + // + // example: + // + // EventBusNotExist + Message *string `json:"message,omitempty" xml:"message,omitempty"` + // The request ID. + // + // example: + // + // 580A938B-6107-586C-8EC7-F22EEBEDA9E6 + RequestId *string `json:"requestId,omitempty" xml:"requestId,omitempty"` +} + +func (s ListEventTypesResponseBody) String() string { + return tea.Prettify(s) +} + +func (s ListEventTypesResponseBody) GoString() string { + return s.String() +} + +func (s *ListEventTypesResponseBody) SetEventTypes(v []*ListEventTypesResponseBodyEventTypes) *ListEventTypesResponseBody { + s.EventTypes = v + return s +} + +func (s *ListEventTypesResponseBody) SetNextToken(v string) *ListEventTypesResponseBody { + s.NextToken = &v + return s +} + +func (s *ListEventTypesResponseBody) SetTotal(v int) *ListEventTypesResponseBody { + s.Total = &v + return s +} + +func (s *ListEventTypesResponseBody) SetMaxResults(v int32) *ListEventTypesResponseBody { + s.MaxResults = &v + return s +} + +func (s *ListEventTypesResponseBody) SetCode(v string) *ListEventTypesResponseBody { + s.Code = &v + return s +} + +func (s *ListEventTypesResponseBody) SetMessage(v string) *ListEventTypesResponseBody { + s.Message = &v + return s +} + +func (s *ListEventTypesResponseBody) SetRequestId(v string) *ListEventTypesResponseBody { + s.RequestId = &v + return s +} + +type ListEventTypesResponseBodyEventTypes struct { + // The name of the event bus. + // + // This parameter is required. + // + // example: + // + // demo + EventBusName *string `json:"eventBusName,omitempty" xml:"eventBusName,omitempty"` + // EventSource is required for querying default bus events. + // + // example: + // + // testEventSourceName + EventSourceName *string `json:"eventSourceName,omitempty" xml:"eventSourceName,omitempty"` + // The name of the event type. + EventTypeName *string `json:"eventTypeName,omitempty" xml:"eventTypeName,omitempty"` + // The description of the event type. + // + // example: + // + // The description of the event type. + Description *string `json:"description,omitempty" xml:"description,omitempty"` + GmtCreate *string `json:"gmtCreate,omitempty" xml:"gmtCreate,omitempty"` + GmtModify *string `json:"gmtModify,omitempty" xml:"gmtModify,omitempty"` +} + +func (s ListEventTypesResponseBodyEventTypes) String() string { + return tea.Prettify(s) +} + +func (s ListEventTypesResponseBodyEventTypes) GoString() string { + return s.String() +} + +func (s *ListEventTypesResponseBodyEventTypes) SetEventBusName(v string) *ListEventTypesResponseBodyEventTypes { + s.EventBusName = &v + return s +} + +func (s *ListEventTypesResponseBodyEventTypes) SetEventSourceName(v string) *ListEventTypesResponseBodyEventTypes { + s.EventSourceName = &v + return s +} + +func (s *ListEventTypesResponseBodyEventTypes) SetEventTypeName(v string) *ListEventTypesResponseBodyEventTypes { + s.EventTypeName = &v + return s +} + +func (s *ListEventTypesResponseBodyEventTypes) SetDescription(v string) *ListEventTypesResponseBodyEventTypes { + s.Description = &v + return s +} + +func (s *ListEventTypesResponseBodyEventTypes) SetGmtCreate(v string) *ListEventTypesResponseBodyEventTypes { + s.GmtCreate = &v + return s +} + +func (s *ListEventTypesResponseBodyEventTypes) SetGmtModify(v string) *ListEventTypesResponseBodyEventTypes { + s.GmtModify = &v + return s +} + +type ListEventTypesResponse struct { + Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"` + Body *ListEventTypesResponseBody `json:"body,omitempty" xml:"body,omitempty"` +} + +func (s ListEventTypesResponse) String() string { + return tea.Prettify(s) +} + +func (s ListEventTypesResponse) GoString() string { + return s.String() +} + +func (s *ListEventTypesResponse) SetHeaders(v map[string]*string) *ListEventTypesResponse { + s.Headers = v + return s +} + +func (s *ListEventTypesResponse) SetStatusCode(v int32) *ListEventTypesResponse { + s.StatusCode = &v + return s +} + +func (s *ListEventTypesResponse) SetBody(v *ListEventTypesResponseBody) *ListEventTypesResponse { + s.Body = v + return s +} + +type ClientInterface interface { + GetEndpoint (productId *string, regionId *string, endpointRule *string, network *string, suffix *string, endpointMap map[string]*string, endpoint *string) (_result *string, _err error) + CreateEventBusWithOptions (request *CreateEventBusRequest, runtime *util.RuntimeOptions) (_result *CreateEventBusResponse, _err error) + CreateEventBus (request *CreateEventBusRequest) (_result *CreateEventBusResponse, _err error) + GetEventBusWithOptions (request *GetEventBusRequest, runtime *util.RuntimeOptions) (_result *GetEventBusResponse, _err error) + GetEventBus (request *GetEventBusRequest) (_result *GetEventBusResponse, _err error) + ListEventBusesWithOptions (request *ListEventBusesRequest, runtime *util.RuntimeOptions) (_result *ListEventBusesResponse, _err error) + ListEventBuses (request *ListEventBusesRequest) (_result *ListEventBusesResponse, _err error) + DeleteEventBusWithOptions (request *DeleteEventBusRequest, runtime *util.RuntimeOptions) (_result *DeleteEventBusResponse, _err error) + DeleteEventBus (request *DeleteEventBusRequest) (_result *DeleteEventBusResponse, _err error) + CreateApiDestinationWithOptions (request *CreateApiDestinationRequest, runtime *util.RuntimeOptions) (_result *CreateApiDestinationResponse, _err error) + CreateApiDestination (request *CreateApiDestinationRequest) (_result *CreateApiDestinationResponse, _err error) + UpdateApiDestinationWithOptions (request *UpdateApiDestinationRequest, runtime *util.RuntimeOptions) (_result *UpdateApiDestinationResponse, _err error) + UpdateApiDestination (request *UpdateApiDestinationRequest) (_result *UpdateApiDestinationResponse, _err error) + GetApiDestinationWithOptions (request *GetApiDestinationRequest, runtime *util.RuntimeOptions) (_result *GetApiDestinationResponse, _err error) + GetApiDestination (request *GetApiDestinationRequest) (_result *GetApiDestinationResponse, _err error) + DeleteApiDestinationWithOptions (request *DeleteApiDestinationRequest, runtime *util.RuntimeOptions) (_result *DeleteApiDestinationResponse, _err error) + DeleteApiDestination (request *DeleteApiDestinationRequest) (_result *DeleteApiDestinationResponse, _err error) + ListApiDestinationsWithOptions (request *ListApiDestinationsRequest, runtime *util.RuntimeOptions) (_result *ListApiDestinationsResponse, _err error) + ListApiDestinations (request *ListApiDestinationsRequest) (_result *ListApiDestinationsResponse, _err error) + CreateConnectionWithOptions (request *CreateConnectionRequest, runtime *util.RuntimeOptions) (_result *CreateConnectionResponse, _err error) + CreateConnection (request *CreateConnectionRequest) (_result *CreateConnectionResponse, _err error) + DeleteConnectionWithOptions (request *DeleteConnectionRequest, runtime *util.RuntimeOptions) (_result *DeleteConnectionResponse, _err error) + DeleteConnection (request *DeleteConnectionRequest) (_result *DeleteConnectionResponse, _err error) + UpdateConnectionWithOptions (request *UpdateConnectionRequest, runtime *util.RuntimeOptions) (_result *UpdateConnectionResponse, _err error) + UpdateConnection (request *UpdateConnectionRequest) (_result *UpdateConnectionResponse, _err error) + GetConnectionWithOptions (request *GetConnectionRequest, runtime *util.RuntimeOptions) (_result *GetConnectionResponse, _err error) + GetConnection (request *GetConnectionRequest) (_result *GetConnectionResponse, _err error) + SelectOneConnectionWithOptions (request *GetConnectionRequest, runtime *util.RuntimeOptions) (_result *GetConnectionResponse, _err error) + SelectOneConnection (request *GetConnectionRequest) (_result *GetConnectionResponse, _err error) + ListConnectionsWithOptions (request *ListConnectionsRequest, runtime *util.RuntimeOptions) (_result *ListConnectionsResponse, _err error) + ListConnections (request *ListConnectionsRequest) (_result *ListConnectionsResponse, _err error) + ListEnumsResponse () (_result *ListEnumsResponseResponse, _err error) + PutEventsWithOptions (request *PutEventsRequest, runtime *util.RuntimeOptions) (_result *PutEventsResponse, _err error) + PutEvents (request *PutEventsRequest) (_result *PutEventsResponse, _err error) + CreateEventRuleWithOptions (request *CreateEventRuleRequest, runtime *util.RuntimeOptions) (_result *CreateEventRuleResponse, _err error) + CreateEventRule (request *CreateEventRuleRequest) (_result *CreateEventRuleResponse, _err error) + GetEventRuleWithOptions (request *GetEventRuleRequest, runtime *util.RuntimeOptions) (_result *GetEventRuleResponse, _err error) + GetEventRule (request *GetEventRuleRequest) (_result *GetEventRuleResponse, _err error) + DeleteEventRuleWithOptions (request *DeleteEventRuleRequest, runtime *util.RuntimeOptions) (_result *DeleteEventRuleResponse, _err error) + DeleteEventRule (request *DeleteEventRuleRequest) (_result *DeleteEventRuleResponse, _err error) + UpdateEventRuleWithOptions (request *UpdateEventRuleRequest, runtime *util.RuntimeOptions) (_result *UpdateEventRuleResponse, _err error) + UpdateEventRule (request *UpdateEventRuleRequest) (_result *UpdateEventRuleResponse, _err error) + ListEventRulesWithOptions (request *ListEventRulesRequest, runtime *util.RuntimeOptions) (_result *ListEventRulesResponse, _err error) + ListEventRules (request *ListEventRulesRequest) (_result *ListEventRulesResponse, _err error) + EnableEventRuleWithOptions (request *EnableEventRuleRequest, runtime *util.RuntimeOptions) (_result *EnableEventRuleResponse, _err error) + EnableEventRule (request *EnableEventRuleRequest) (_result *EnableEventRuleResponse, _err error) + DisableEventRuleWithOptions (request *DisableEventRuleRequest, runtime *util.RuntimeOptions) (_result *DisableEventRuleResponse, _err error) + DisableEventRule (request *DisableEventRuleRequest) (_result *DisableEventRuleResponse, _err error) + CreateEventSourceWithOptions (request *CreateEventSourceRequest, runtime *util.RuntimeOptions) (_result *CreateEventSourceResponse, _err error) + CreateEventSource (request *CreateEventSourceRequest) (_result *CreateEventSourceResponse, _err error) + UpdateEventSourceWithOptions (request *UpdateEventSourceRequest, runtime *util.RuntimeOptions) (_result *UpdateEventSourceResponse, _err error) + UpdateEventSource (request *UpdateEventSourceRequest) (_result *UpdateEventSourceResponse, _err error) + DeleteEventSourceWithOptions (request *DeleteEventSourceRequest, runtime *util.RuntimeOptions) (_result *DeleteEventSourceResponse, _err error) + DeleteEventSource (request *DeleteEventSourceRequest) (_result *DeleteEventSourceResponse, _err error) + GetEventSourceWithOptions (request *GetEventSourceRequest, runtime *util.RuntimeOptions) (_result *GetEventSourceResponse, _err error) + GetEventSource (request *GetEventSourceRequest) (_result *GetEventSourceResponse, _err error) + ListEventSourcesWithOptions (request *ListEventSourcesRequest, runtime *util.RuntimeOptions) (_result *ListEventSourcesResponse, _err error) + ListEventSources (request *ListEventSourcesRequest) (_result *ListEventSourcesResponse, _err error) + CreateEventTargetsWithOptions (request *CreateEventTargetsRequest, runtime *util.RuntimeOptions) (_result *CreateEventTargetsResponse, _err error) + CreateEventTargets (request *CreateEventTargetsRequest) (_result *CreateEventTargetsResponse, _err error) + UpdateEventTargetsWithOptions (request *UpdateEventTargetsRequest, runtime *util.RuntimeOptions) (_result *UpdateEventTargetsResponse, _err error) + UpdateEventTargets (request *UpdateEventTargetsRequest) (_result *UpdateEventTargetsResponse, _err error) + DeleteEventTargetsWithOptions (request *DeleteEventTargetsRequest, runtime *util.RuntimeOptions) (_result *DeleteEventTargetsResponse, _err error) + DeleteEventTargets (request *DeleteEventTargetsRequest) (_result *DeleteEventTargetsResponse, _err error) + ListEventTargetsWithOptions (request *ListEventTargetsRequest, runtime *util.RuntimeOptions) (_result *ListEventTargetsResponse, _err error) + ListEventTargets (request *ListEventTargetsRequest) (_result *ListEventTargetsResponse, _err error) + ListEventTypesWithOptions (request *ListEventTypesRequest, runtime *util.RuntimeOptions) (_result *ListEventTypesResponse, _err error) + ListEventTypes (request *ListEventTypesRequest) (_result *ListEventTypesResponse, _err error) +} + +type Client struct { + openapi.Client +} + +func NewClient(config *openapi.Config)(*Client, error) { + client := new(Client) + err := client.Init(config) + return client, err +} + +func (client *Client)Init(config *openapi.Config)(_err error) { + _err = client.Client.Init(config ) + if _err != nil { + return _err + } + client.EndpointRule = tea.String("") + _err = client.CheckConfig(config) + if _err != nil { + return _err + } + client.Endpoint, _err = client.GetEndpoint(tea.String("eventbridge"), client.RegionId, client.EndpointRule, client.Network, client.Suffix, client.EndpointMap, client.Endpoint) + if _err != nil { + return _err + } + + return nil +} + + + +func (client *Client) GetEndpoint (productId *string, regionId *string, endpointRule *string, network *string, suffix *string, endpointMap map[string]*string, endpoint *string) (_result *string, _err error) { + if !tea.BoolValue(util.Empty(endpoint)) { + _result = endpoint + return _result , _err + } + + if !tea.BoolValue(util.IsUnset(endpointMap)) && !tea.BoolValue(util.Empty(endpointMap[tea.StringValue(regionId)])) { + _result = endpointMap[tea.StringValue(regionId)] + return _result, _err + } + + result := tea.String("") + if !tea.BoolValue(util.Empty(network)) && !tea.BoolValue(util.EqualString(network, tea.String("public"))) { + network = tea.String("-" + tea.StringValue(network)) + } else { + network = tea.String("") + } + + if !tea.BoolValue(util.IsUnset(suffix)) { + suffix = tea.String("") + } else { + suffix = tea.String("-" + tea.StringValue(suffix)) + } + + if tea.BoolValue(util.EqualString(endpointRule, tea.String("regional"))) { + if tea.BoolValue(util.Empty(regionId)) { + _err = tea.NewSDKError(map[string]interface{}{ + "message": "RegionId is empty, please set a valid RegionId", + }) + return _result, _err + } + + result = tea.String(tea.StringValue(productId) + tea.StringValue(suffix) + tea.StringValue(network) + "." + tea.StringValue(regionId) + ".aliyuncs.com") + } else { + result = tea.String(tea.StringValue(productId) + tea.StringValue(suffix) + tea.StringValue(network) + ".aliyuncs.com") + } + + _result = result + return _result , _err + // return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix); +} + +// Summary: +// +// Creates an event bus. +// +// Description: +// +// You can call this API operation to create an event bus. +// +// @param request - CreateEventBusRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return CreateEventBusResponse +func (client *Client) CreateEventBusWithOptions (request *CreateEventBusRequest, runtime *util.RuntimeOptions) (_result *CreateEventBusResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.Description)) { + body["description"] = request.Description + } + + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("CreateEventBus"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/bus/createEventBus"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &CreateEventBusResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Creates an event bus. +// +// Description: +// +// You can call this API operation to create an event bus. +// +// @param request - CreateEventBusRequest +// +// @return CreateEventBusResponse +func (client *Client) CreateEventBus (request *CreateEventBusRequest) (_result *CreateEventBusResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &CreateEventBusResponse{} + _body, _err := client.CreateEventBusWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Queries the detailed information about an event bus. +// +// Description: +// +// You can call this API operation to query the detailed information about an event bus. +// +// @param request - GetEventBusRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return GetEventBusResponse +func (client *Client) GetEventBusWithOptions (request *GetEventBusRequest, runtime *util.RuntimeOptions) (_result *GetEventBusResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("GetEventBus"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/bus/getEventBus"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &GetEventBusResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Queries the detailed information about an event bus. +// +// Description: +// +// You can call this API operation to query the detailed information about an event bus. +// +// @param request - GetEventBusRequest +// +// @return GetEventBusResponse +func (client *Client) GetEventBus (request *GetEventBusRequest) (_result *GetEventBusResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &GetEventBusResponse{} + _body, _err := client.GetEventBusWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Queries all event buses. +// +// Description: +// +// You can call this API operation to query all event buses. +// +// @param request - ListEventBusesRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return ListEventBusesResponse +func (client *Client) ListEventBusesWithOptions (request *ListEventBusesRequest, runtime *util.RuntimeOptions) (_result *ListEventBusesResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.MaxResults)) { + body["maxResults"] = request.MaxResults + } + + if !tea.BoolValue(util.IsUnset(request.NextToken)) { + body["nextToken"] = request.NextToken + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("ListEventBuses"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/bus/listEventBuses"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &ListEventBusesResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Queries all event buses. +// +// Description: +// +// You can call this API operation to query all event buses. +// +// @param request - ListEventBusesRequest +// +// @return ListEventBusesResponse +func (client *Client) ListEventBuses (request *ListEventBusesRequest) (_result *ListEventBusesResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &ListEventBusesResponse{} + _body, _err := client.ListEventBusesWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Deletes an event bus. +// +// Description: +// +// You can call this API operation to delete an event bus. +// +// @param request - DeleteEventBusRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return DeleteEventBusResponse +func (client *Client) DeleteEventBusWithOptions (request *DeleteEventBusRequest, runtime *util.RuntimeOptions) (_result *DeleteEventBusResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("DeleteEventBus"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/bus/deleteEventBus"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &DeleteEventBusResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Deletes an event bus. +// +// Description: +// +// You can call this API operation to delete an event bus. +// +// @param request - DeleteEventBusRequest +// +// @return DeleteEventBusResponse +func (client *Client) DeleteEventBus (request *DeleteEventBusRequest) (_result *DeleteEventBusResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &DeleteEventBusResponse{} + _body, _err := client.DeleteEventBusWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Creates an API destination. +// +// Description: +// +// You can call this API operation to create an API destination. +// +// @param request - CreateApiDestinationRequest (tmpReq before) +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return CreateApiDestinationResponse +func (client *Client) CreateApiDestinationWithOptions (request *CreateApiDestinationRequest, runtime *util.RuntimeOptions) (_result *CreateApiDestinationResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.ApiDestinationName)) { + body["apiDestinationName"] = request.ApiDestinationName + } + + if !tea.BoolValue(util.IsUnset(request.ConnectionName)) { + body["connectionName"] = request.ConnectionName + } + + if !tea.BoolValue(util.IsUnset(request.Description)) { + body["description"] = request.Description + } + + if !tea.BoolValue(util.IsUnset(request.HttpApiParameters)) { + body["httpApiParameters"] = request.HttpApiParameters + } + + if !tea.BoolValue(util.IsUnset(request.InvocationRateLimitPerSecond)) { + body["invocationRateLimitPerSecond"] = request.InvocationRateLimitPerSecond + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("CreateApiDestination"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/api-destination/createApiDestination"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &CreateApiDestinationResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Creates an API destination. +// +// Description: +// +// You can call this API operation to create an API destination. +// +// @param request - CreateApiDestinationRequest +// +// @return CreateApiDestinationResponse +func (client *Client) CreateApiDestination (request *CreateApiDestinationRequest) (_result *CreateApiDestinationResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &CreateApiDestinationResponse{} + _body, _err := client.CreateApiDestinationWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Updates an API destination. +// +// Description: +// +// You can call this API operation to update an API destination. +// +// @param request - UpdateApiDestinationRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return UpdateApiDestinationResponse +func (client *Client) UpdateApiDestinationWithOptions (request *UpdateApiDestinationRequest, runtime *util.RuntimeOptions) (_result *UpdateApiDestinationResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.ApiDestinationName)) { + body["apiDestinationName"] = request.ApiDestinationName + } + + if !tea.BoolValue(util.IsUnset(request.ConnectionName)) { + body["connectionName"] = request.ConnectionName + } + + if !tea.BoolValue(util.IsUnset(request.Description)) { + body["description"] = request.Description + } + + if !tea.BoolValue(util.IsUnset(request.HttpApiParameters)) { + body["httpApiParameters"] = request.HttpApiParameters + } + + if !tea.BoolValue(util.IsUnset(request.InvocationRateLimitPerSecond)) { + body["invocationRateLimitPerSecond"] = request.InvocationRateLimitPerSecond + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("UpdateApiDestination"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/api-destination/updateApiDestination"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &UpdateApiDestinationResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Updates an API destination. +// +// Description: +// +// You can call this API operation to update an API destination. +// +// @param request - UpdateApiDestinationRequest +// +// @return UpdateApiDestinationResponse +func (client *Client) UpdateApiDestination (request *UpdateApiDestinationRequest) (_result *UpdateApiDestinationResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &UpdateApiDestinationResponse{} + _body, _err := client.UpdateApiDestinationWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Queries the information about an API destination. +// +// Description: +// +// You can call this API operation to query the information about an API destination. +// +// @param request - GetApiDestinationRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return GetApiDestinationResponse +func (client *Client) GetApiDestinationWithOptions (request *GetApiDestinationRequest, runtime *util.RuntimeOptions) (_result *GetApiDestinationResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.ApiDestinationName)) { + body["apiDestinationName"] = request.ApiDestinationName + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("GetApiDestination"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/api-destination/getApiDestination"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &GetApiDestinationResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Queries the information about an API destination. +// +// Description: +// +// You can call this API operation to query the information about an API destination. +// +// @param request - GetApiDestinationRequest +// +// @return GetApiDestinationResponse +func (client *Client) GetApiDestination (request *GetApiDestinationRequest) (_result *GetApiDestinationResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &GetApiDestinationResponse{} + _body, _err := client.GetApiDestinationWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Deletes an API destination. +// +// Description: +// +// You can call this API operation to delete an API destination. +// +// @param request - DeleteApiDestinationRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return DeleteApiDestinationResponse +func (client *Client) DeleteApiDestinationWithOptions (request *DeleteApiDestinationRequest, runtime *util.RuntimeOptions) (_result *DeleteApiDestinationResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.ApiDestinationName)) { + body["apiDestinationName"] = request.ApiDestinationName + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("DeleteApiDestination"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/api-destination/deleteApiDestination"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &DeleteApiDestinationResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Deletes an API destination. +// +// Description: +// +// You can call this API operation to delete an API destination. +// +// @param request - DeleteApiDestinationRequest +// +// @return DeleteApiDestinationResponse +func (client *Client) DeleteApiDestination (request *DeleteApiDestinationRequest) (_result *DeleteApiDestinationResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &DeleteApiDestinationResponse{} + _body, _err := client.DeleteApiDestinationWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Queries a list of API destinations. +// +// Description: +// +// You can use this API operation to query a list of API destinations. +// +// @param request - ListApiDestinationsRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return ListApiDestinationsResponse +func (client *Client) ListApiDestinationsWithOptions (request *ListApiDestinationsRequest, runtime *util.RuntimeOptions) (_result *ListApiDestinationsResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.ApiDestinationNamePrefix)) { + body["apiDestinationNamePrefix"] = request.ApiDestinationNamePrefix + } + + if !tea.BoolValue(util.IsUnset(request.ConnectionName)) { + body["connectionName"] = request.ConnectionName + } + + if !tea.BoolValue(util.IsUnset(request.MaxResults)) { + body["maxResults"] = request.MaxResults + } + + if !tea.BoolValue(util.IsUnset(request.NextToken)) { + body["nextToken"] = request.NextToken + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("ListApiDestinations"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/api-destination/listApiDestinations"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &ListApiDestinationsResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Queries a list of API destinations. +// +// Description: +// +// You can use this API operation to query a list of API destinations. +// +// @param request - ListApiDestinationsRequest +// +// @return ListApiDestinationsResponse +func (client *Client) ListApiDestinations (request *ListApiDestinationsRequest) (_result *ListApiDestinationsResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &ListApiDestinationsResponse{} + _body, _err := client.ListApiDestinationsWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Creates a connection. +// +// Description: +// +// You can call this API operation to create a connection. +// +// @param request - CreateConnectionRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return CreateConnectionResponse +func (client *Client) CreateConnectionWithOptions (request *CreateConnectionRequest, runtime *util.RuntimeOptions) (_result *CreateConnectionResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.AuthParameters)) { + body["authParameters"] = request.AuthParameters + } + + if !tea.BoolValue(util.IsUnset(request.ConnectionName)) { + body["connectionName"] = request.ConnectionName + } + + if !tea.BoolValue(util.IsUnset(request.Description)) { + body["description"] = request.Description + } + + if !tea.BoolValue(util.IsUnset(request.NetworkParameters)) { + body["networkParameters"] = request.NetworkParameters + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("CreateConnection"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/connection/createConnection"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &CreateConnectionResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Creates a connection. +// +// Description: +// +// You can call this API operation to create a connection. +// +// @param request - CreateConnectionRequest +// +// @return CreateConnectionResponse +func (client *Client) CreateConnection (request *CreateConnectionRequest) (_result *CreateConnectionResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &CreateConnectionResponse{} + _body, _err := client.CreateConnectionWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Deletes a connection. +// +// Description: +// +// You can call this API operation to delete a connection. +// +// @param request - DeleteConnectionRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return DeleteConnectionResponse +func (client *Client) DeleteConnectionWithOptions (request *DeleteConnectionRequest, runtime *util.RuntimeOptions) (_result *DeleteConnectionResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.ConnectionName)) { + body["connectionName"] = request.ConnectionName + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("DeleteConnection"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/connection/deleteConnection"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &DeleteConnectionResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Deletes a connection. +// +// Description: +// +// You can call this API operation to delete a connection. +// +// @param request - DeleteConnectionRequest +// +// @return DeleteConnectionResponse +func (client *Client) DeleteConnection (request *DeleteConnectionRequest) (_result *DeleteConnectionResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &DeleteConnectionResponse{} + _body, _err := client.DeleteConnectionWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Updates a connection. +// +// Description: +// +// You can call this API operation to update a connection. +// +// @param request - UpdateConnectionRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return UpdateConnectionResponse +func (client *Client) UpdateConnectionWithOptions (request *UpdateConnectionRequest, runtime *util.RuntimeOptions) (_result *UpdateConnectionResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.AuthParameters)) { + body["authParameters"] = request.AuthParameters + } + + if !tea.BoolValue(util.IsUnset(request.ConnectionName)) { + body["connectionName"] = request.ConnectionName + } + + if !tea.BoolValue(util.IsUnset(request.Description)) { + body["description"] = request.Description + } + + if !tea.BoolValue(util.IsUnset(request.NetworkParameters)) { + body["networkParameters"] = request.NetworkParameters + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("UpdateConnection"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/connection/updateConnection"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &UpdateConnectionResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Updates a connection. +// +// Description: +// +// You can call this API operation to update a connection. +// +// @param request - UpdateConnectionRequest +// +// @return UpdateConnectionResponse +func (client *Client) UpdateConnection (request *UpdateConnectionRequest) (_result *UpdateConnectionResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &UpdateConnectionResponse{} + _body, _err := client.UpdateConnectionWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Queries the configurations of a connection. +// +// Description: +// +// You can call this API operation to query the configurations of a connection. +// +// @param request - GetConnectionRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return GetConnectionResponse +func (client *Client) GetConnectionWithOptions (request *GetConnectionRequest, runtime *util.RuntimeOptions) (_result *GetConnectionResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.ConnectionName)) { + body["connectionName"] = request.ConnectionName + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("GetConnection"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/connection/getConnection"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &GetConnectionResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Queries the configurations of a connection. +// +// Description: +// +// You can call this API operation to query the configurations of a connection. +// +// @param request - GetConnectionRequest +// +// @return GetConnectionResponse +func (client *Client) GetConnection (request *GetConnectionRequest) (_result *GetConnectionResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &GetConnectionResponse{} + _body, _err := client.GetConnectionWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Queries the configurations of a connection. +// +// Description: +// +// You can call this API operation to query the configurations of a connection. +// +// @param request - GetConnectionRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return GetConnectionResponse +func (client *Client) SelectOneConnectionWithOptions (request *GetConnectionRequest, runtime *util.RuntimeOptions) (_result *GetConnectionResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.ConnectionName)) { + body["connectionName"] = request.ConnectionName + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("selectOneConnection"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/connection/selectOneConnection"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &GetConnectionResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Queries the configurations of a connection. +// +// Description: +// +// You can call this API operation to query the configurations of a connection. +// +// @param request - GetConnectionRequest +// +// @return GetConnectionResponse +func (client *Client) SelectOneConnection (request *GetConnectionRequest) (_result *GetConnectionResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &GetConnectionResponse{} + _body, _err := client.SelectOneConnectionWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Queries connections. +// +// Description: +// +// You can call this API operation to query connections. +// +// @param request - ListConnectionsRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return ListConnectionsResponse +func (client *Client) ListConnectionsWithOptions (request *ListConnectionsRequest, runtime *util.RuntimeOptions) (_result *ListConnectionsResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.ConnectionNamePrefix)) { + body["connectionNamePrefix"] = request.ConnectionNamePrefix + } + + if !tea.BoolValue(util.IsUnset(request.MaxResults)) { + body["maxResults"] = request.MaxResults + } + + if !tea.BoolValue(util.IsUnset(request.NextToken)) { + body["nextToken"] = request.NextToken + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("ListConnections"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/connection/listConnections"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &ListConnectionsResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// list connections. +// +// Description: +// +// You can call this API operation to list connections. +// +// @param request - ListConnectionsRequest +// +// @return ListConnectionsResponse +func (client *Client) ListConnections (request *ListConnectionsRequest) (_result *ListConnectionsResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &ListConnectionsResponse{} + _body, _err := client.ListConnectionsWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Updates a connection. +// +// Description: +// +// You can call this API operation to update a connection. +// +// @return ListEnumsResponseResponse +func (client *Client) ListEnumsResponse () (_result *ListEnumsResponseResponse, _err error) { + runtime := &util.RuntimeOptions{} + body := map[string]interface{}{} + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("listEnumsResponse"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/connection/listEnumsResponse"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &ListEnumsResponseResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Queries the content of an event. +// +// Description: +// +// You can call this API operation to query the content of an event. +// +// @param request - PutEventsRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return PutEventsResponse +func (client *Client) PutEventsWithOptions (request *PutEventsRequest, runtime *util.RuntimeOptions) (_result *PutEventsResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + headers := map[string]*string{ + "ce-specversion": tea.String("1.0"), + "ce-type": tea.String("com.github.pull_request.opened"), + "ce-source": tea.String("https://github.com/cloudevents/spec/pull"), + "ce-subject": tea.String("demo"), + "ce-id": tea.String("1234-1234-1234"), + "ce-datacontenttype": tea.String("application/json"), + "ce-time": tea.String("2024-07-01T17:31:00Z"), + "ce-eventbusname": tea.String("demo-bus"), + } + body := tea.String("{}") + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + headers["ce-eventbusname"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.Event)) { + body = request.Event + } + + req := &openapi.OpenApiRequest{ + Body: body, + Headers: headers, + } + params := &openapi.Params{ + Action: tea.String("putEvents"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/putEvents"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &PutEventsResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Queries the content of an event. +// +// Description: +// +// You can call this API operation to query the content of an event. +// +// @param request - PutEventsRequest +// +// @return PutEventsResponse +func (client *Client) PutEvents (request *PutEventsRequest) (_result *PutEventsResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &PutEventsResponse{} + _body, _err := client.PutEventsWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Creates an event rule. +// +// Description: +// +// You can call this operation to create an event rule. +// +// @param request - CreateEventRuleRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return CreateEventRuleResponse +func (client *Client) CreateEventRuleWithOptions (request *CreateEventRuleRequest, runtime *util.RuntimeOptions) (_result *CreateEventRuleResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.EventRuleName)) { + body["eventRuleName"] = request.EventRuleName + } + + if !tea.BoolValue(util.IsUnset(request.Description)) { + body["description"] = request.Description + } + + if !tea.BoolValue(util.IsUnset(request.FilterPattern)) { + body["filterPattern"] = request.FilterPattern + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("CreateEventRule"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/rule/createEventRule"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &CreateEventRuleResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Creates an event rule. +// +// Description: +// +// You can call this operation to create an event rule. +// +// @param request - CreateEventRuleRequest +// +// @return CreateEventRuleResponse +func (client *Client) CreateEventRule (request *CreateEventRuleRequest) (_result *CreateEventRuleResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &CreateEventRuleResponse{} + _body, _err := client.CreateEventRuleWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Gets an event rule. +// +// Description: +// +// You can call this operation to get an event rule. +// +// @param request - GetEventRuleRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return GetEventRuleResponse +func (client *Client) GetEventRuleWithOptions (request *GetEventRuleRequest, runtime *util.RuntimeOptions) (_result *GetEventRuleResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.EventRuleName)) { + body["eventRuleName"] = request.EventRuleName + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("GetEventRule"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/rule/getEventRule"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &GetEventRuleResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Gets an event rule. +// +// Description: +// +// You can call this operation to get an event rule. +// +// @param request - GetEventRuleRequest +// +// @return GetEventRuleResponse +func (client *Client) GetEventRule (request *GetEventRuleRequest) (_result *GetEventRuleResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &GetEventRuleResponse{} + _body, _err := client.GetEventRuleWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Deletes an event rule. +// +// Description: +// +// You can call this operation to delete an event rule. +// +// @param request - DeleteEventRuleRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return DeleteEventRuleResponse +func (client *Client) DeleteEventRuleWithOptions (request *DeleteEventRuleRequest, runtime *util.RuntimeOptions) (_result *DeleteEventRuleResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.EventRuleName)) { + body["eventRuleName"] = request.EventRuleName + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("DeleteEventRule"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/rule/deleteEventRule"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &DeleteEventRuleResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Deletes an event rule. +// +// Description: +// +// You can call this operation to delete an event rule. +// +// @param request - DeleteEventRuleRequest +// +// @return DeleteEventRuleResponse +func (client *Client) DeleteEventRule (request *DeleteEventRuleRequest) (_result *DeleteEventRuleResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &DeleteEventRuleResponse{} + _body, _err := client.DeleteEventRuleWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Updates an event rule. +// +// Description: +// +// You can call this operation to update an event rule. +// +// @param request - UpdateEventRuleRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return UpdateEventRuleResponse +func (client *Client) UpdateEventRuleWithOptions (request *UpdateEventRuleRequest, runtime *util.RuntimeOptions) (_result *UpdateEventRuleResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.EventRuleName)) { + body["eventRuleName"] = request.EventRuleName + } + + if !tea.BoolValue(util.IsUnset(request.Description)) { + body["description"] = request.Description + } + + if !tea.BoolValue(util.IsUnset(request.FilterPattern)) { + body["filterPattern"] = request.FilterPattern + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("UpdateEventRule"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/rule/updateEventRule"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &UpdateEventRuleResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Updates an event rule. +// +// Description: +// +// You can call this operation to update an event rule. +// +// @param request - UpdateEventRuleRequest +// +// @return UpdateEventRuleResponse +func (client *Client) UpdateEventRule (request *UpdateEventRuleRequest) (_result *UpdateEventRuleResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &UpdateEventRuleResponse{} + _body, _err := client.UpdateEventRuleWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Lists event rules. +// +// Description: +// +// You can call this operation to list event rules. +// +// @param request - ListEventRulesRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return ListEventRulesResponse +func (client *Client) ListEventRulesWithOptions (request *ListEventRulesRequest, runtime *util.RuntimeOptions) (_result *ListEventRulesResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.MaxResults)) { + body["maxResults"] = request.MaxResults + } + + if !tea.BoolValue(util.IsUnset(request.NextToken)) { + body["nextToken"] = request.NextToken + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("ListEventRules"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/rule/listEventRules"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &ListEventRulesResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Lists event rules. +// +// Description: +// +// You can call this operation to list event rules. +// +// @param request - ListEventRulesRequest +// +// @return ListEventRulesResponse +func (client *Client) ListEventRules (request *ListEventRulesRequest) (_result *ListEventRulesResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &ListEventRulesResponse{} + _body, _err := client.ListEventRulesWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Enables an event rule. +// +// Description: +// +// You can call this operation to enable an event rule. +// +// @param request - EnableEventRuleRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return EnableEventRuleResponse +func (client *Client) EnableEventRuleWithOptions (request *EnableEventRuleRequest, runtime *util.RuntimeOptions) (_result *EnableEventRuleResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.EventRuleName)) { + body["eventRuleName"] = request.EventRuleName + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("EnableEventRule"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/rule/enableEventRule"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &EnableEventRuleResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Enables an event rule. +// +// Description: +// +// You can call this operation to enable an event rule. +// +// @param request - EnableEventRuleRequest +// +// @return EnableEventRuleResponse +func (client *Client) EnableEventRule (request *EnableEventRuleRequest) (_result *EnableEventRuleResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &EnableEventRuleResponse{} + _body, _err := client.EnableEventRuleWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Disables an event rule. +// +// Description: +// +// You can call this operation to disable an event rule. +// +// @param request - DisableEventRuleRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return DisableEventRuleResponse +func (client *Client) DisableEventRuleWithOptions (request *DisableEventRuleRequest, runtime *util.RuntimeOptions) (_result *DisableEventRuleResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.EventRuleName)) { + body["eventRuleName"] = request.EventRuleName + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("DisableEventRule"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/rule/disableEventRule"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &DisableEventRuleResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Disables an event rule. +// +// Description: +// +// You can call this operation to disable an event rule. +// +// @param request - DisableEventRuleRequest +// +// @return DisableEventRuleResponse +func (client *Client) DisableEventRule (request *DisableEventRuleRequest) (_result *DisableEventRuleResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &DisableEventRuleResponse{} + _body, _err := client.DisableEventRuleWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Creates an event source. +// +// Description: +// +// You can call this operation to create an event source. +// +// @param request - CreateEventSourceRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return CreateEventSourceResponse +func (client *Client) CreateEventSourceWithOptions (request *CreateEventSourceRequest, runtime *util.RuntimeOptions) (_result *CreateEventSourceResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.Description)) { + body["description"] = request.Description + } + + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.EventSourceName)) { + body["eventSourceName"] = request.EventSourceName + } + + if !tea.BoolValue(util.IsUnset(request.ClassName)) { + body["className"] = request.ClassName + } + + if !tea.BoolValue(util.IsUnset(request.Config)) { + body["config"] = request.Config + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("CreateEventSource"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/source/createEventSource"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &CreateEventSourceResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Creates an event source. +// +// Description: +// +// You can call this operation to create an event source. +// +// @param request - CreateEventSourceRequest +// +// @return CreateEventSourceResponse +func (client *Client) CreateEventSource (request *CreateEventSourceRequest) (_result *CreateEventSourceResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &CreateEventSourceResponse{} + _body, _err := client.CreateEventSourceWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Updates an event source. +// +// Description: +// +// You can call this operation to update an event source. +// +// @param request - UpdateEventSourceRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return UpdateEventSourceResponse +func (client *Client) UpdateEventSourceWithOptions (request *UpdateEventSourceRequest, runtime *util.RuntimeOptions) (_result *UpdateEventSourceResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.EventSourceName)) { + body["eventSourceName"] = request.EventSourceName + } + + if !tea.BoolValue(util.IsUnset(request.Description)) { + body["description"] = request.Description + } + + if !tea.BoolValue(util.IsUnset(request.ClassName)) { + body["className"] = request.ClassName + } + + if !tea.BoolValue(util.IsUnset(request.Status)) { + body["status"] = request.Status + } + + if !tea.BoolValue(util.IsUnset(request.Config)) { + body["config"] = request.Config + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("UpdateEventSource"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/source/updateEventSource"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &UpdateEventSourceResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Updates an event source. +// +// Description: +// +// You can call this operation to update an event source. +// +// @param request - UpdateEventSourceRequest +// +// @return UpdateEventSourceResponse +func (client *Client) UpdateEventSource (request *UpdateEventSourceRequest) (_result *UpdateEventSourceResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &UpdateEventSourceResponse{} + _body, _err := client.UpdateEventSourceWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Deletes an event source. +// +// Description: +// +// You can call this API operation to delete an event source. +// +// @param request - DeleteEventSourceRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return DeleteEventSourceResponse +func (client *Client) DeleteEventSourceWithOptions (request *DeleteEventSourceRequest, runtime *util.RuntimeOptions) (_result *DeleteEventSourceResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.EventSourceName)) { + body["eventSourceName"] = request.EventSourceName + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("DeleteEventSource"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/source/deleteEventSource"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &DeleteEventSourceResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Deletes an event source. +// +// Description: +// +// You can call this API operation to delete an event source. +// +// @param request - DeleteEventSourceRequest +// +// @return DeleteEventSourceResponse +func (client *Client) DeleteEventSource (request *DeleteEventSourceRequest) (_result *DeleteEventSourceResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &DeleteEventSourceResponse{} + _body, _err := client.DeleteEventSourceWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Gets an event source. +// +// Description: +// +// You can call this API operation to get an event source. +// +// @param request - GetEventSourceRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return GetEventSourceResponse +func (client *Client) GetEventSourceWithOptions (request *GetEventSourceRequest, runtime *util.RuntimeOptions) (_result *GetEventSourceResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.EventSourceName)) { + body["eventSourceName"] = request.EventSourceName + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("GetEventSource"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/source/getEventSource"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &GetEventSourceResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Gets an event source. +// +// Description: +// +// You can call this API operation to get an event source. +// +// @param request - GetEventSourceRequest +// +// @return GetEventSourceResponse +func (client *Client) GetEventSource (request *GetEventSourceRequest) (_result *GetEventSourceResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &GetEventSourceResponse{} + _body, _err := client.GetEventSourceWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Lists event sources. +// +// Description: +// +// You can call this API operation to list event sources. +// +// @param request - ListEventSourcesRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return ListEventSourcesResponse +func (client *Client) ListEventSourcesWithOptions (request *ListEventSourcesRequest, runtime *util.RuntimeOptions) (_result *ListEventSourcesResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.EventSourceType)) { + body["eventSourceType"] = request.EventSourceType + } + + if !tea.BoolValue(util.IsUnset(request.MaxResults)) { + body["maxResults"] = request.MaxResults + } + + if !tea.BoolValue(util.IsUnset(request.NextToken)) { + body["nextToken"] = request.NextToken + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("ListEventSources"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/source/listEventSources"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &ListEventSourcesResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Lists event sources. +// +// Description: +// +// You can call this API operation to list event sources. +// +// @param request - ListEventSourcesRequest +// +// @return ListEventSourcesResponse +func (client *Client) ListEventSources (request *ListEventSourcesRequest) (_result *ListEventSourcesResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &ListEventSourcesResponse{} + _body, _err := client.ListEventSourcesWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Creates event targets. +// +// Description: +// +// You can call this operation to create event targets. +// +// @param request - CreateEventTargetsRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return CreateEventTargetsResponse +func (client *Client) CreateEventTargetsWithOptions (request *CreateEventTargetsRequest, runtime *util.RuntimeOptions) (_result *CreateEventTargetsResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.EventRuleName)) { + body["eventRuleName"] = request.EventRuleName + } + + if !tea.BoolValue(util.IsUnset(request.EventTargets)) { + body["eventTargets"] = request.EventTargets + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("CreateEventTargets"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/target/createEventTargets"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &CreateEventTargetsResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Creates event targets. +// +// Description: +// +// You can call this operation to create event targets. +// +// @param request - CreateEventTargetsRequest +// +// @return CreateEventTargetsResponse +func (client *Client) CreateEventTargets (request *CreateEventTargetsRequest) (_result *CreateEventTargetsResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &CreateEventTargetsResponse{} + _body, _err := client.CreateEventTargetsWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Updates event targets. +// +// Description: +// +// You can call this operation to update event targets. +// +// @param request - UpdateEventTargetsRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return UpdateEventTargetsResponse +func (client *Client) UpdateEventTargetsWithOptions (request *UpdateEventTargetsRequest, runtime *util.RuntimeOptions) (_result *UpdateEventTargetsResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.EventRuleName)) { + body["eventRuleName"] = request.EventRuleName + } + + if !tea.BoolValue(util.IsUnset(request.EventTargets)) { + body["eventTargets"] = request.EventTargets + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("UpdateEventTargets"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/target/updateEventTargets"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &UpdateEventTargetsResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Updates event targets. +// +// Description: +// +// You can call this operation to update event targets. +// +// @param request - UpdateEventTargetsRequest +// +// @return UpdateEventTargetsResponse +func (client *Client) UpdateEventTargets (request *UpdateEventTargetsRequest) (_result *UpdateEventTargetsResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &UpdateEventTargetsResponse{} + _body, _err := client.UpdateEventTargetsWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Deletes event targets. +// +// Description: +// +// You can call this operation to delete event targets. +// +// @param request - DeleteEventTargetsRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return DeleteEventTargetsResponse +func (client *Client) DeleteEventTargetsWithOptions (request *DeleteEventTargetsRequest, runtime *util.RuntimeOptions) (_result *DeleteEventTargetsResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.EventRuleName)) { + body["eventRuleName"] = request.EventRuleName + } + + if !tea.BoolValue(util.IsUnset(request.EventTargetNames)) { + body["eventTargetNames"] = request.EventTargetNames + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("DeleteEventTargets"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/target/deleteEventTargets"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &DeleteEventTargetsResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Deletes event targets. +// +// Description: +// +// You can call this operation to delete event targets. +// +// @param request - DeleteEventTargetsRequest +// +// @return DeleteEventTargetsResponse +func (client *Client) DeleteEventTargets (request *DeleteEventTargetsRequest) (_result *DeleteEventTargetsResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &DeleteEventTargetsResponse{} + _body, _err := client.DeleteEventTargetsWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Lists event targets. +// +// Description: +// +// You can call this operation to list event targets. +// +// @param request - ListEventTargetsRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return ListEventTargetsResponse +func (client *Client) ListEventTargetsWithOptions (request *ListEventTargetsRequest, runtime *util.RuntimeOptions) (_result *ListEventTargetsResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.EventRuleName)) { + body["eventRuleName"] = request.EventRuleName + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("ListEventTargets"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/target/listEventTargets"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &ListEventTargetsResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Lists event targets. +// +// Description: +// +// You can call this operation to list event targets. +// +// @param request - ListEventTargetsRequest +// +// @return ListEventTargetsResponse +func (client *Client) ListEventTargets (request *ListEventTargetsRequest) (_result *ListEventTargetsResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &ListEventTargetsResponse{} + _body, _err := client.ListEventTargetsWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + +// Summary: +// +// Queries all event buses. +// +// Description: +// +// You can call this API operation to query all event buses. +// +// @param request - ListEventTypesRequest +// +// @param runtime - runtime options for this request RuntimeOptions +// +// @return ListEventTypesResponse +func (client *Client) ListEventTypesWithOptions (request *ListEventTypesRequest, runtime *util.RuntimeOptions) (_result *ListEventTypesResponse, _err error) { + _err = util.ValidateModel(request) + if _err != nil { + return _result, _err + } + body := map[string]interface{}{} + if !tea.BoolValue(util.IsUnset(request.EventBusName)) { + body["eventBusName"] = request.EventBusName + } + + if !tea.BoolValue(util.IsUnset(request.EventSourceName)) { + body["eventSourceName"] = request.EventSourceName + } + + if !tea.BoolValue(util.IsUnset(request.MaxResults)) { + body["maxResults"] = request.MaxResults + } + + if !tea.BoolValue(util.IsUnset(request.NextToken)) { + body["nextToken"] = request.NextToken + } + + req := &openapi.OpenApiRequest{ + Body: util.ToJSONString(body), + } + params := &openapi.Params{ + Action: tea.String("listEventTypes"), + Version: tea.String("2024-07-01"), + Protocol: tea.String("HTTP"), + Pathname: tea.String("/type/listEventTypes"), + Method: tea.String("POST"), + AuthType: tea.String("Anonymous"), + Style: tea.String("RPC"), + ReqBodyType: tea.String("json"), + BodyType: tea.String("json"), + } + _result = &ListEventTypesResponse{} + _body, _err := client.CallApi(params, req, runtime) + if _err != nil { + return _result, _err + } + _err = tea.Convert(_body, &_result) + return _result, _err +} + +// Summary: +// +// Queries all event buses. +// +// Description: +// +// You can call this API operation to query all event buses. +// +// @param request - ListEventTypesRequest +// +// @return ListEventTypesResponse +func (client *Client) ListEventTypes (request *ListEventTypesRequest) (_result *ListEventTypesResponse, _err error) { + runtime := &util.RuntimeOptions{} + _result = &ListEventTypesResponse{} + _body, _err := client.ListEventTypesWithOptions(request, runtime) + if _err != nil { + return _result, _err + } + _result = _body + return _result, _err +} + diff --git a/sdk/generated/go/go.mod b/sdk/generated/go/go.mod new file mode 100644 index 00000000..6d690fd7 --- /dev/null +++ b/sdk/generated/go/go.mod @@ -0,0 +1,6 @@ +module github.com/org-apache-rocketmq/eventbridge-sdk + +require ( + github.com/alibabacloud-go/tea-utils/v2 v2.0.6 + github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.10 +) diff --git a/sdk/generated/java/pom.xml b/sdk/generated/java/pom.xml new file mode 100644 index 00000000..b3b6c8fc --- /dev/null +++ b/sdk/generated/java/pom.xml @@ -0,0 +1,117 @@ + + + 4.0.0 + org.apache.rocketmq.eventbridge + sdk + 0.0.0 + jar + sdk + Eventbridge (20240701) SDK for Java + + + + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + rocketmq + rocketmq + zjuludi@gmail.com + + + + + sonatype-nexus-snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + + + + + com.aliyun + tea-util + 0.2.23 + + + com.aliyun + tea-openapi + 0.3.6 + + + com.aliyun + openapiutil + 0.2.1 + + + com.aliyun + tea + 1.1.14 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 8 + 8 + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + true + + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.3 + true + + sonatype-nexus-staging + https://s01.oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + UTF-8 + none + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.1 + + + + \ No newline at end of file diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/Client.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/Client.java new file mode 100644 index 00000000..75743a03 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/Client.java @@ -0,0 +1,1975 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk; + +import com.aliyun.tea.*; +import org.apache.rocketmq.eventbridge.sdk.models.*; + +public class Client extends com.aliyun.teaopenapi.Client { + + public Client(com.aliyun.teaopenapi.models.Config config) throws Exception { + super(config); + this._endpointRule = ""; + this.checkConfig(config); + this._endpoint = this.getEndpoint("eventbridge", _regionId, _endpointRule, _network, _suffix, _endpointMap, _endpoint); + } + + + public String getEndpoint(String productId, String regionId, String endpointRule, String network, String suffix, java.util.Map endpointMap, String endpoint) throws Exception { + if (!com.aliyun.teautil.Common.empty(endpoint)) { + return endpoint; + } + + if (!com.aliyun.teautil.Common.isUnset(endpointMap) && !com.aliyun.teautil.Common.empty(endpointMap.get(regionId))) { + return endpointMap.get(regionId); + } + + String result = ""; + if (!com.aliyun.teautil.Common.empty(network) && !com.aliyun.teautil.Common.equalString(network, "public")) { + network = "-" + network + ""; + } else { + network = ""; + } + + if (!com.aliyun.teautil.Common.isUnset(suffix)) { + suffix = ""; + } else { + suffix = "-" + suffix + ""; + } + + if (com.aliyun.teautil.Common.equalString(endpointRule, "regional")) { + if (com.aliyun.teautil.Common.empty(regionId)) { + throw new TeaException(TeaConverter.buildMap( + new TeaPair("message", "RegionId is empty, please set a valid RegionId") + )); + } + + result = "" + productId + "" + suffix + "" + network + "." + regionId + ".aliyuncs.com"; + } else { + result = "" + productId + "" + suffix + "" + network + ".aliyuncs.com"; + } + + return result; + // return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix); + } + + /** + * description : + *

You can call this API operation to create an event bus.

+ * + * summary : + *

Creates an event bus.

+ * + * @param request CreateEventBusRequest + * @param runtime runtime options for this request RuntimeOptions + * @return CreateEventBusResponse + */ + public CreateEventBusResponse createEventBusWithOptions(CreateEventBusRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.description)) { + body.put("description", request.description); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "CreateEventBus"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/bus/createEventBus"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new CreateEventBusResponse()); + } + + /** + * description : + *

You can call this API operation to create an event bus.

+ * + * summary : + *

Creates an event bus.

+ * + * @param request CreateEventBusRequest + * @return CreateEventBusResponse + */ + public CreateEventBusResponse createEventBus(CreateEventBusRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.createEventBusWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to query the detailed information about an event bus.

+ * + * summary : + *

Queries the detailed information about an event bus.

+ * + * @param request GetEventBusRequest + * @param runtime runtime options for this request RuntimeOptions + * @return GetEventBusResponse + */ + public GetEventBusResponse getEventBusWithOptions(GetEventBusRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "GetEventBus"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/bus/getEventBus"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new GetEventBusResponse()); + } + + /** + * description : + *

You can call this API operation to query the detailed information about an event bus.

+ * + * summary : + *

Queries the detailed information about an event bus.

+ * + * @param request GetEventBusRequest + * @return GetEventBusResponse + */ + public GetEventBusResponse getEventBus(GetEventBusRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.getEventBusWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to query all event buses.

+ * + * summary : + *

Queries all event buses.

+ * + * @param request ListEventBusesRequest + * @param runtime runtime options for this request RuntimeOptions + * @return ListEventBusesResponse + */ + public ListEventBusesResponse listEventBusesWithOptions(ListEventBusesRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.maxResults)) { + body.put("maxResults", request.maxResults); + } + + if (!com.aliyun.teautil.Common.isUnset(request.nextToken)) { + body.put("nextToken", request.nextToken); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "ListEventBuses"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/bus/listEventBuses"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new ListEventBusesResponse()); + } + + /** + * description : + *

You can call this API operation to query all event buses.

+ * + * summary : + *

Queries all event buses.

+ * + * @param request ListEventBusesRequest + * @return ListEventBusesResponse + */ + public ListEventBusesResponse listEventBuses(ListEventBusesRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.listEventBusesWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to delete an event bus.

+ * + * summary : + *

Deletes an event bus.

+ * + * @param request DeleteEventBusRequest + * @param runtime runtime options for this request RuntimeOptions + * @return DeleteEventBusResponse + */ + public DeleteEventBusResponse deleteEventBusWithOptions(DeleteEventBusRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "DeleteEventBus"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/bus/deleteEventBus"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new DeleteEventBusResponse()); + } + + /** + * description : + *

You can call this API operation to delete an event bus.

+ * + * summary : + *

Deletes an event bus.

+ * + * @param request DeleteEventBusRequest + * @return DeleteEventBusResponse + */ + public DeleteEventBusResponse deleteEventBus(DeleteEventBusRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.deleteEventBusWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to create an API destination.

+ * + * summary : + *

Creates an API destination.

+ * + * @param request CreateApiDestinationRequest (tmpReq before) + * @param runtime runtime options for this request RuntimeOptions + * @return CreateApiDestinationResponse + */ + public CreateApiDestinationResponse createApiDestinationWithOptions(CreateApiDestinationRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.apiDestinationName)) { + body.put("apiDestinationName", request.apiDestinationName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.connectionName)) { + body.put("connectionName", request.connectionName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.description)) { + body.put("description", request.description); + } + + if (!com.aliyun.teautil.Common.isUnset(request.httpApiParameters)) { + body.put("httpApiParameters", request.httpApiParameters); + } + + if (!com.aliyun.teautil.Common.isUnset(request.invocationRateLimitPerSecond)) { + body.put("invocationRateLimitPerSecond", request.invocationRateLimitPerSecond); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "CreateApiDestination"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/api-destination/createApiDestination"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new CreateApiDestinationResponse()); + } + + /** + * description : + *

You can call this API operation to create an API destination.

+ * + * summary : + *

Creates an API destination.

+ * + * @param request CreateApiDestinationRequest + * @return CreateApiDestinationResponse + */ + public CreateApiDestinationResponse createApiDestination(CreateApiDestinationRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.createApiDestinationWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to update an API destination.

+ * + * summary : + *

Updates an API destination.

+ * + * @param request UpdateApiDestinationRequest + * @param runtime runtime options for this request RuntimeOptions + * @return UpdateApiDestinationResponse + */ + public UpdateApiDestinationResponse updateApiDestinationWithOptions(UpdateApiDestinationRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.apiDestinationName)) { + body.put("apiDestinationName", request.apiDestinationName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.connectionName)) { + body.put("connectionName", request.connectionName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.description)) { + body.put("description", request.description); + } + + if (!com.aliyun.teautil.Common.isUnset(request.httpApiParameters)) { + body.put("httpApiParameters", request.httpApiParameters); + } + + if (!com.aliyun.teautil.Common.isUnset(request.invocationRateLimitPerSecond)) { + body.put("invocationRateLimitPerSecond", request.invocationRateLimitPerSecond); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "UpdateApiDestination"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/api-destination/updateApiDestination"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new UpdateApiDestinationResponse()); + } + + /** + * description : + *

You can call this API operation to update an API destination.

+ * + * summary : + *

Updates an API destination.

+ * + * @param request UpdateApiDestinationRequest + * @return UpdateApiDestinationResponse + */ + public UpdateApiDestinationResponse updateApiDestination(UpdateApiDestinationRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.updateApiDestinationWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to query the information about an API destination.

+ * + * summary : + *

Queries the information about an API destination.

+ * + * @param request GetApiDestinationRequest + * @param runtime runtime options for this request RuntimeOptions + * @return GetApiDestinationResponse + */ + public GetApiDestinationResponse getApiDestinationWithOptions(GetApiDestinationRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.apiDestinationName)) { + body.put("apiDestinationName", request.apiDestinationName); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "GetApiDestination"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/api-destination/getApiDestination"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new GetApiDestinationResponse()); + } + + /** + * description : + *

You can call this API operation to query the information about an API destination.

+ * + * summary : + *

Queries the information about an API destination.

+ * + * @param request GetApiDestinationRequest + * @return GetApiDestinationResponse + */ + public GetApiDestinationResponse getApiDestination(GetApiDestinationRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.getApiDestinationWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to delete an API destination.

+ * + * summary : + *

Deletes an API destination.

+ * + * @param request DeleteApiDestinationRequest + * @param runtime runtime options for this request RuntimeOptions + * @return DeleteApiDestinationResponse + */ + public DeleteApiDestinationResponse deleteApiDestinationWithOptions(DeleteApiDestinationRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.apiDestinationName)) { + body.put("apiDestinationName", request.apiDestinationName); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "DeleteApiDestination"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/api-destination/deleteApiDestination"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new DeleteApiDestinationResponse()); + } + + /** + * description : + *

You can call this API operation to delete an API destination.

+ * + * summary : + *

Deletes an API destination.

+ * + * @param request DeleteApiDestinationRequest + * @return DeleteApiDestinationResponse + */ + public DeleteApiDestinationResponse deleteApiDestination(DeleteApiDestinationRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.deleteApiDestinationWithOptions(request, runtime); + } + + /** + * description : + *

You can use this API operation to query a list of API destinations.

+ * + * summary : + *

Queries a list of API destinations.

+ * + * @param request ListApiDestinationsRequest + * @param runtime runtime options for this request RuntimeOptions + * @return ListApiDestinationsResponse + */ + public ListApiDestinationsResponse listApiDestinationsWithOptions(ListApiDestinationsRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.apiDestinationNamePrefix)) { + body.put("apiDestinationNamePrefix", request.apiDestinationNamePrefix); + } + + if (!com.aliyun.teautil.Common.isUnset(request.connectionName)) { + body.put("connectionName", request.connectionName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.maxResults)) { + body.put("maxResults", request.maxResults); + } + + if (!com.aliyun.teautil.Common.isUnset(request.nextToken)) { + body.put("nextToken", request.nextToken); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "ListApiDestinations"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/api-destination/listApiDestinations"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new ListApiDestinationsResponse()); + } + + /** + * description : + *

You can use this API operation to query a list of API destinations.

+ * + * summary : + *

Queries a list of API destinations.

+ * + * @param request ListApiDestinationsRequest + * @return ListApiDestinationsResponse + */ + public ListApiDestinationsResponse listApiDestinations(ListApiDestinationsRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.listApiDestinationsWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to create a connection.

+ * + * summary : + *

Creates a connection.

+ * + * @param request CreateConnectionRequest + * @param runtime runtime options for this request RuntimeOptions + * @return CreateConnectionResponse + */ + public CreateConnectionResponse createConnectionWithOptions(CreateConnectionRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.authParameters)) { + body.put("authParameters", request.authParameters); + } + + if (!com.aliyun.teautil.Common.isUnset(request.connectionName)) { + body.put("connectionName", request.connectionName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.description)) { + body.put("description", request.description); + } + + if (!com.aliyun.teautil.Common.isUnset(request.networkParameters)) { + body.put("networkParameters", request.networkParameters); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "CreateConnection"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/connection/createConnection"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new CreateConnectionResponse()); + } + + /** + * description : + *

You can call this API operation to create a connection.

+ * + * summary : + *

Creates a connection.

+ * + * @param request CreateConnectionRequest + * @return CreateConnectionResponse + */ + public CreateConnectionResponse createConnection(CreateConnectionRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.createConnectionWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to delete a connection.

+ * + * summary : + *

Deletes a connection.

+ * + * @param request DeleteConnectionRequest + * @param runtime runtime options for this request RuntimeOptions + * @return DeleteConnectionResponse + */ + public DeleteConnectionResponse deleteConnectionWithOptions(DeleteConnectionRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.connectionName)) { + body.put("connectionName", request.connectionName); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "DeleteConnection"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/connection/deleteConnection"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new DeleteConnectionResponse()); + } + + /** + * description : + *

You can call this API operation to delete a connection.

+ * + * summary : + *

Deletes a connection.

+ * + * @param request DeleteConnectionRequest + * @return DeleteConnectionResponse + */ + public DeleteConnectionResponse deleteConnection(DeleteConnectionRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.deleteConnectionWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to update a connection.

+ * + * summary : + *

Updates a connection.

+ * + * @param request UpdateConnectionRequest + * @param runtime runtime options for this request RuntimeOptions + * @return UpdateConnectionResponse + */ + public UpdateConnectionResponse updateConnectionWithOptions(UpdateConnectionRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.authParameters)) { + body.put("authParameters", request.authParameters); + } + + if (!com.aliyun.teautil.Common.isUnset(request.connectionName)) { + body.put("connectionName", request.connectionName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.description)) { + body.put("description", request.description); + } + + if (!com.aliyun.teautil.Common.isUnset(request.networkParameters)) { + body.put("networkParameters", request.networkParameters); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "UpdateConnection"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/connection/updateConnection"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new UpdateConnectionResponse()); + } + + /** + * description : + *

You can call this API operation to update a connection.

+ * + * summary : + *

Updates a connection.

+ * + * @param request UpdateConnectionRequest + * @return UpdateConnectionResponse + */ + public UpdateConnectionResponse updateConnection(UpdateConnectionRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.updateConnectionWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to query the configurations of a connection.

+ * + * summary : + *

Queries the configurations of a connection.

+ * + * @param request GetConnectionRequest + * @param runtime runtime options for this request RuntimeOptions + * @return GetConnectionResponse + */ + public GetConnectionResponse getConnectionWithOptions(GetConnectionRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.connectionName)) { + body.put("connectionName", request.connectionName); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "GetConnection"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/connection/getConnection"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new GetConnectionResponse()); + } + + /** + * description : + *

You can call this API operation to query the configurations of a connection.

+ * + * summary : + *

Queries the configurations of a connection.

+ * + * @param request GetConnectionRequest + * @return GetConnectionResponse + */ + public GetConnectionResponse getConnection(GetConnectionRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.getConnectionWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to query the configurations of a connection.

+ * + * summary : + *

Queries the configurations of a connection.

+ * + * @param request GetConnectionRequest + * @param runtime runtime options for this request RuntimeOptions + * @return GetConnectionResponse + */ + public GetConnectionResponse selectOneConnectionWithOptions(GetConnectionRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.connectionName)) { + body.put("connectionName", request.connectionName); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "selectOneConnection"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/connection/selectOneConnection"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new GetConnectionResponse()); + } + + /** + * description : + *

You can call this API operation to query the configurations of a connection.

+ * + * summary : + *

Queries the configurations of a connection.

+ * + * @param request GetConnectionRequest + * @return GetConnectionResponse + */ + public GetConnectionResponse selectOneConnection(GetConnectionRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.selectOneConnectionWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to query connections.

+ * + * summary : + *

Queries connections.

+ * + * @param request ListConnectionsRequest + * @param runtime runtime options for this request RuntimeOptions + * @return ListConnectionsResponse + */ + public ListConnectionsResponse listConnectionsWithOptions(ListConnectionsRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.connectionNamePrefix)) { + body.put("connectionNamePrefix", request.connectionNamePrefix); + } + + if (!com.aliyun.teautil.Common.isUnset(request.maxResults)) { + body.put("maxResults", request.maxResults); + } + + if (!com.aliyun.teautil.Common.isUnset(request.nextToken)) { + body.put("nextToken", request.nextToken); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "ListConnections"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/connection/listConnections"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new ListConnectionsResponse()); + } + + /** + * description : + *

You can call this API operation to list connections.

+ * + * summary : + *

list connections.

+ * + * @param request ListConnectionsRequest + * @return ListConnectionsResponse + */ + public ListConnectionsResponse listConnections(ListConnectionsRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.listConnectionsWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to update a connection.

+ * + * summary : + *

Updates a connection.

+ * @return ListEnumsResponseResponse + */ + public ListEnumsResponseResponse listEnumsResponse() throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + java.util.Map body = new java.util.HashMap<>(); + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "listEnumsResponse"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/connection/listEnumsResponse"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new ListEnumsResponseResponse()); + } + + /** + * description : + *

You can call this API operation to query the content of an event.

+ * + * summary : + *

Queries the content of an event.

+ * + * @param request PutEventsRequest + * @param runtime runtime options for this request RuntimeOptions + * @return PutEventsResponse + */ + public PutEventsResponse putEventsWithOptions(PutEventsRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map headers = TeaConverter.buildMap( + new TeaPair("ce-specversion", "1.0"), + new TeaPair("ce-type", "com.github.pull_request.opened"), + new TeaPair("ce-source", "https://github.com/cloudevents/spec/pull"), + new TeaPair("ce-subject", "demo"), + new TeaPair("ce-id", "1234-1234-1234"), + new TeaPair("ce-datacontenttype", "application/json"), + new TeaPair("ce-time", "2024-07-01T17:31:00Z"), + new TeaPair("ce-eventbusname", "demo-bus") + ); + String body = "{}"; + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + headers.put("ce-eventbusname", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.event)) { + body = request.event; + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", body), + new TeaPair("headers", headers) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "putEvents"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/putEvents"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new PutEventsResponse()); + } + + /** + * description : + *

You can call this API operation to query the content of an event.

+ * + * summary : + *

Queries the content of an event.

+ * + * @param request PutEventsRequest + * @return PutEventsResponse + */ + public PutEventsResponse putEvents(PutEventsRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.putEventsWithOptions(request, runtime); + } + + /** + * description : + *

You can call this operation to create an event rule.

+ * + * summary : + *

Creates an event rule.

+ * + * @param request CreateEventRuleRequest + * @param runtime runtime options for this request RuntimeOptions + * @return CreateEventRuleResponse + */ + public CreateEventRuleResponse createEventRuleWithOptions(CreateEventRuleRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventRuleName)) { + body.put("eventRuleName", request.eventRuleName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.description)) { + body.put("description", request.description); + } + + if (!com.aliyun.teautil.Common.isUnset(request.filterPattern)) { + body.put("filterPattern", request.filterPattern); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "CreateEventRule"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/rule/createEventRule"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new CreateEventRuleResponse()); + } + + /** + * description : + *

You can call this operation to create an event rule.

+ * + * summary : + *

Creates an event rule.

+ * + * @param request CreateEventRuleRequest + * @return CreateEventRuleResponse + */ + public CreateEventRuleResponse createEventRule(CreateEventRuleRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.createEventRuleWithOptions(request, runtime); + } + + /** + * description : + *

You can call this operation to get an event rule.

+ * + * summary : + *

Gets an event rule.

+ * + * @param request GetEventRuleRequest + * @param runtime runtime options for this request RuntimeOptions + * @return GetEventRuleResponse + */ + public GetEventRuleResponse getEventRuleWithOptions(GetEventRuleRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventRuleName)) { + body.put("eventRuleName", request.eventRuleName); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "GetEventRule"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/rule/getEventRule"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new GetEventRuleResponse()); + } + + /** + * description : + *

You can call this operation to get an event rule.

+ * + * summary : + *

Gets an event rule.

+ * + * @param request GetEventRuleRequest + * @return GetEventRuleResponse + */ + public GetEventRuleResponse getEventRule(GetEventRuleRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.getEventRuleWithOptions(request, runtime); + } + + /** + * description : + *

You can call this operation to delete an event rule.

+ * + * summary : + *

Deletes an event rule.

+ * + * @param request DeleteEventRuleRequest + * @param runtime runtime options for this request RuntimeOptions + * @return DeleteEventRuleResponse + */ + public DeleteEventRuleResponse deleteEventRuleWithOptions(DeleteEventRuleRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventRuleName)) { + body.put("eventRuleName", request.eventRuleName); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "DeleteEventRule"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/rule/deleteEventRule"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new DeleteEventRuleResponse()); + } + + /** + * description : + *

You can call this operation to delete an event rule.

+ * + * summary : + *

Deletes an event rule.

+ * + * @param request DeleteEventRuleRequest + * @return DeleteEventRuleResponse + */ + public DeleteEventRuleResponse deleteEventRule(DeleteEventRuleRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.deleteEventRuleWithOptions(request, runtime); + } + + /** + * description : + *

You can call this operation to update an event rule.

+ * + * summary : + *

Updates an event rule.

+ * + * @param request UpdateEventRuleRequest + * @param runtime runtime options for this request RuntimeOptions + * @return UpdateEventRuleResponse + */ + public UpdateEventRuleResponse updateEventRuleWithOptions(UpdateEventRuleRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventRuleName)) { + body.put("eventRuleName", request.eventRuleName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.description)) { + body.put("description", request.description); + } + + if (!com.aliyun.teautil.Common.isUnset(request.filterPattern)) { + body.put("filterPattern", request.filterPattern); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "UpdateEventRule"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/rule/updateEventRule"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new UpdateEventRuleResponse()); + } + + /** + * description : + *

You can call this operation to update an event rule.

+ * + * summary : + *

Updates an event rule.

+ * + * @param request UpdateEventRuleRequest + * @return UpdateEventRuleResponse + */ + public UpdateEventRuleResponse updateEventRule(UpdateEventRuleRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.updateEventRuleWithOptions(request, runtime); + } + + /** + * description : + *

You can call this operation to list event rules.

+ * + * summary : + *

Lists event rules.

+ * + * @param request ListEventRulesRequest + * @param runtime runtime options for this request RuntimeOptions + * @return ListEventRulesResponse + */ + public ListEventRulesResponse listEventRulesWithOptions(ListEventRulesRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.maxResults)) { + body.put("maxResults", request.maxResults); + } + + if (!com.aliyun.teautil.Common.isUnset(request.nextToken)) { + body.put("nextToken", request.nextToken); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "ListEventRules"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/rule/listEventRules"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new ListEventRulesResponse()); + } + + /** + * description : + *

You can call this operation to list event rules.

+ * + * summary : + *

Lists event rules.

+ * + * @param request ListEventRulesRequest + * @return ListEventRulesResponse + */ + public ListEventRulesResponse listEventRules(ListEventRulesRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.listEventRulesWithOptions(request, runtime); + } + + /** + * description : + *

You can call this operation to enable an event rule.

+ * + * summary : + *

Enables an event rule.

+ * + * @param request EnableEventRuleRequest + * @param runtime runtime options for this request RuntimeOptions + * @return EnableEventRuleResponse + */ + public EnableEventRuleResponse enableEventRuleWithOptions(EnableEventRuleRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventRuleName)) { + body.put("eventRuleName", request.eventRuleName); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "EnableEventRule"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/rule/enableEventRule"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new EnableEventRuleResponse()); + } + + /** + * description : + *

You can call this operation to enable an event rule.

+ * + * summary : + *

Enables an event rule.

+ * + * @param request EnableEventRuleRequest + * @return EnableEventRuleResponse + */ + public EnableEventRuleResponse enableEventRule(EnableEventRuleRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.enableEventRuleWithOptions(request, runtime); + } + + /** + * description : + *

You can call this operation to disable an event rule.

+ * + * summary : + *

Disables an event rule.

+ * + * @param request DisableEventRuleRequest + * @param runtime runtime options for this request RuntimeOptions + * @return DisableEventRuleResponse + */ + public DisableEventRuleResponse disableEventRuleWithOptions(DisableEventRuleRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventRuleName)) { + body.put("eventRuleName", request.eventRuleName); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "DisableEventRule"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/rule/disableEventRule"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new DisableEventRuleResponse()); + } + + /** + * description : + *

You can call this operation to disable an event rule.

+ * + * summary : + *

Disables an event rule.

+ * + * @param request DisableEventRuleRequest + * @return DisableEventRuleResponse + */ + public DisableEventRuleResponse disableEventRule(DisableEventRuleRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.disableEventRuleWithOptions(request, runtime); + } + + /** + * description : + *

You can call this operation to create an event source.

+ * + * summary : + *

Creates an event source.

+ * + * @param request CreateEventSourceRequest + * @param runtime runtime options for this request RuntimeOptions + * @return CreateEventSourceResponse + */ + public CreateEventSourceResponse createEventSourceWithOptions(CreateEventSourceRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.description)) { + body.put("description", request.description); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventSourceName)) { + body.put("eventSourceName", request.eventSourceName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.className)) { + body.put("className", request.className); + } + + if (!com.aliyun.teautil.Common.isUnset(request.config)) { + body.put("config", request.config); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "CreateEventSource"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/source/createEventSource"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new CreateEventSourceResponse()); + } + + /** + * description : + *

You can call this operation to create an event source.

+ * + * summary : + *

Creates an event source.

+ * + * @param request CreateEventSourceRequest + * @return CreateEventSourceResponse + */ + public CreateEventSourceResponse createEventSource(CreateEventSourceRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.createEventSourceWithOptions(request, runtime); + } + + /** + * description : + *

You can call this operation to update an event source.

+ * + * summary : + *

Updates an event source.

+ * + * @param request UpdateEventSourceRequest + * @param runtime runtime options for this request RuntimeOptions + * @return UpdateEventSourceResponse + */ + public UpdateEventSourceResponse updateEventSourceWithOptions(UpdateEventSourceRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventSourceName)) { + body.put("eventSourceName", request.eventSourceName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.description)) { + body.put("description", request.description); + } + + if (!com.aliyun.teautil.Common.isUnset(request.className)) { + body.put("className", request.className); + } + + if (!com.aliyun.teautil.Common.isUnset(request.status)) { + body.put("status", request.status); + } + + if (!com.aliyun.teautil.Common.isUnset(request.config)) { + body.put("config", request.config); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "UpdateEventSource"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/source/updateEventSource"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new UpdateEventSourceResponse()); + } + + /** + * description : + *

You can call this operation to update an event source.

+ * + * summary : + *

Updates an event source.

+ * + * @param request UpdateEventSourceRequest + * @return UpdateEventSourceResponse + */ + public UpdateEventSourceResponse updateEventSource(UpdateEventSourceRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.updateEventSourceWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to delete an event source.

+ * + * summary : + *

Deletes an event source.

+ * + * @param request DeleteEventSourceRequest + * @param runtime runtime options for this request RuntimeOptions + * @return DeleteEventSourceResponse + */ + public DeleteEventSourceResponse deleteEventSourceWithOptions(DeleteEventSourceRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventSourceName)) { + body.put("eventSourceName", request.eventSourceName); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "DeleteEventSource"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/source/deleteEventSource"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new DeleteEventSourceResponse()); + } + + /** + * description : + *

You can call this API operation to delete an event source.

+ * + * summary : + *

Deletes an event source.

+ * + * @param request DeleteEventSourceRequest + * @return DeleteEventSourceResponse + */ + public DeleteEventSourceResponse deleteEventSource(DeleteEventSourceRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.deleteEventSourceWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to get an event source.

+ * + * summary : + *

Gets an event source.

+ * + * @param request GetEventSourceRequest + * @param runtime runtime options for this request RuntimeOptions + * @return GetEventSourceResponse + */ + public GetEventSourceResponse getEventSourceWithOptions(GetEventSourceRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventSourceName)) { + body.put("eventSourceName", request.eventSourceName); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "GetEventSource"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/source/getEventSource"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new GetEventSourceResponse()); + } + + /** + * description : + *

You can call this API operation to get an event source.

+ * + * summary : + *

Gets an event source.

+ * + * @param request GetEventSourceRequest + * @return GetEventSourceResponse + */ + public GetEventSourceResponse getEventSource(GetEventSourceRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.getEventSourceWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to list event sources.

+ * + * summary : + *

Lists event sources.

+ * + * @param request ListEventSourcesRequest + * @param runtime runtime options for this request RuntimeOptions + * @return ListEventSourcesResponse + */ + public ListEventSourcesResponse listEventSourcesWithOptions(ListEventSourcesRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventSourceType)) { + body.put("eventSourceType", request.eventSourceType); + } + + if (!com.aliyun.teautil.Common.isUnset(request.maxResults)) { + body.put("maxResults", request.maxResults); + } + + if (!com.aliyun.teautil.Common.isUnset(request.nextToken)) { + body.put("nextToken", request.nextToken); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "ListEventSources"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/source/listEventSources"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new ListEventSourcesResponse()); + } + + /** + * description : + *

You can call this API operation to list event sources.

+ * + * summary : + *

Lists event sources.

+ * + * @param request ListEventSourcesRequest + * @return ListEventSourcesResponse + */ + public ListEventSourcesResponse listEventSources(ListEventSourcesRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.listEventSourcesWithOptions(request, runtime); + } + + /** + * description : + *

You can call this operation to create event targets.

+ * + * summary : + *

Creates event targets.

+ * + * @param request CreateEventTargetsRequest + * @param runtime runtime options for this request RuntimeOptions + * @return CreateEventTargetsResponse + */ + public CreateEventTargetsResponse createEventTargetsWithOptions(CreateEventTargetsRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventRuleName)) { + body.put("eventRuleName", request.eventRuleName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventTargets)) { + body.put("eventTargets", request.eventTargets); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "CreateEventTargets"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/target/createEventTargets"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new CreateEventTargetsResponse()); + } + + /** + * description : + *

You can call this operation to create event targets.

+ * + * summary : + *

Creates event targets.

+ * + * @param request CreateEventTargetsRequest + * @return CreateEventTargetsResponse + */ + public CreateEventTargetsResponse createEventTargets(CreateEventTargetsRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.createEventTargetsWithOptions(request, runtime); + } + + /** + * description : + *

You can call this operation to update event targets.

+ * + * summary : + *

Updates event targets.

+ * + * @param request UpdateEventTargetsRequest + * @param runtime runtime options for this request RuntimeOptions + * @return UpdateEventTargetsResponse + */ + public UpdateEventTargetsResponse updateEventTargetsWithOptions(UpdateEventTargetsRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventRuleName)) { + body.put("eventRuleName", request.eventRuleName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventTargets)) { + body.put("eventTargets", request.eventTargets); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "UpdateEventTargets"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/target/updateEventTargets"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new UpdateEventTargetsResponse()); + } + + /** + * description : + *

You can call this operation to update event targets.

+ * + * summary : + *

Updates event targets.

+ * + * @param request UpdateEventTargetsRequest + * @return UpdateEventTargetsResponse + */ + public UpdateEventTargetsResponse updateEventTargets(UpdateEventTargetsRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.updateEventTargetsWithOptions(request, runtime); + } + + /** + * description : + *

You can call this operation to delete event targets.

+ * + * summary : + *

Deletes event targets.

+ * + * @param request DeleteEventTargetsRequest + * @param runtime runtime options for this request RuntimeOptions + * @return DeleteEventTargetsResponse + */ + public DeleteEventTargetsResponse deleteEventTargetsWithOptions(DeleteEventTargetsRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventRuleName)) { + body.put("eventRuleName", request.eventRuleName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventTargetNames)) { + body.put("eventTargetNames", request.eventTargetNames); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "DeleteEventTargets"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/target/deleteEventTargets"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new DeleteEventTargetsResponse()); + } + + /** + * description : + *

You can call this operation to delete event targets.

+ * + * summary : + *

Deletes event targets.

+ * + * @param request DeleteEventTargetsRequest + * @return DeleteEventTargetsResponse + */ + public DeleteEventTargetsResponse deleteEventTargets(DeleteEventTargetsRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.deleteEventTargetsWithOptions(request, runtime); + } + + /** + * description : + *

You can call this operation to list event targets.

+ * + * summary : + *

Lists event targets.

+ * + * @param request ListEventTargetsRequest + * @param runtime runtime options for this request RuntimeOptions + * @return ListEventTargetsResponse + */ + public ListEventTargetsResponse listEventTargetsWithOptions(ListEventTargetsRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventRuleName)) { + body.put("eventRuleName", request.eventRuleName); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "ListEventTargets"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/target/listEventTargets"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new ListEventTargetsResponse()); + } + + /** + * description : + *

You can call this operation to list event targets.

+ * + * summary : + *

Lists event targets.

+ * + * @param request ListEventTargetsRequest + * @return ListEventTargetsResponse + */ + public ListEventTargetsResponse listEventTargets(ListEventTargetsRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.listEventTargetsWithOptions(request, runtime); + } + + /** + * description : + *

You can call this API operation to query all event buses.

+ * + * summary : + *

Queries all event buses.

+ * + * @param request ListEventTypesRequest + * @param runtime runtime options for this request RuntimeOptions + * @return ListEventTypesResponse + */ + public ListEventTypesResponse listEventTypesWithOptions(ListEventTypesRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { + com.aliyun.teautil.Common.validateModel(request); + java.util.Map body = new java.util.HashMap<>(); + if (!com.aliyun.teautil.Common.isUnset(request.eventBusName)) { + body.put("eventBusName", request.eventBusName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.eventSourceName)) { + body.put("eventSourceName", request.eventSourceName); + } + + if (!com.aliyun.teautil.Common.isUnset(request.maxResults)) { + body.put("maxResults", request.maxResults); + } + + if (!com.aliyun.teautil.Common.isUnset(request.nextToken)) { + body.put("nextToken", request.nextToken); + } + + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( + new TeaPair("body", com.aliyun.teautil.Common.toJSONString(body)) + )); + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( + new TeaPair("action", "listEventTypes"), + new TeaPair("version", "2024-07-01"), + new TeaPair("protocol", "HTTP"), + new TeaPair("pathname", "/type/listEventTypes"), + new TeaPair("method", "POST"), + new TeaPair("authType", "Anonymous"), + new TeaPair("style", "RPC"), + new TeaPair("reqBodyType", "json"), + new TeaPair("bodyType", "json") + )); + return TeaModel.toModel(this.callApi(params, req, runtime), new ListEventTypesResponse()); + } + + /** + * description : + *

You can call this API operation to query all event buses.

+ * + * summary : + *

Queries all event buses.

+ * + * @param request ListEventTypesRequest + * @return ListEventTypesResponse + */ + public ListEventTypesResponse listEventTypes(ListEventTypesRequest request) throws Exception { + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); + return this.listEventTypesWithOptions(request, runtime); + } +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateApiDestinationRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateApiDestinationRequest.java new file mode 100644 index 00000000..0073fd90 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateApiDestinationRequest.java @@ -0,0 +1,234 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +/** + * description : + *

ApiDestination Controller apis: + * createApiDestination * + * updateApiDestination * + * getApiDestination * + * deleteApiDestination * + * listApiDestinations *

+ */ +public class CreateApiDestinationRequest extends TeaModel { + /** + *

The name of the API destination. The name must be 2 to 127 characters in length. This parameter is required.

+ * + * example: + *

api-destination-name

+ */ + @NameInMap("apiDestinationName") + public String apiDestinationName; + + /** + *

The name of the connection. The name must be 2 to 127 characters in length. Before you configure this parameter, you must call the CreateConnection operation to create a connection. Then, set this parameter to the name of the connection that you created. This parameter is required.

+ * + * example: + *

connection-name

+ */ + @NameInMap("connectionName") + public String connectionName; + + /** + *

The description of the API destination. The description can be up to 255 characters in length.

+ */ + @NameInMap("description") + public String description; + + /** + *

The parameters that are configured for the API destination. This parameter is required.

+ */ + @NameInMap("httpApiParameters") + public CreateApiDestinationRequestHttpApiParameters httpApiParameters; + + /** + *

TODO

+ */ + @NameInMap("invocationRateLimitPerSecond") + public Integer invocationRateLimitPerSecond; + + public static CreateApiDestinationRequest build(java.util.Map map) throws Exception { + CreateApiDestinationRequest self = new CreateApiDestinationRequest(); + return TeaModel.build(map, self); + } + + public CreateApiDestinationRequest setApiDestinationName(String apiDestinationName) { + this.apiDestinationName = apiDestinationName; + return this; + } + public String getApiDestinationName() { + return this.apiDestinationName; + } + + public CreateApiDestinationRequest setConnectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + public String getConnectionName() { + return this.connectionName; + } + + public CreateApiDestinationRequest setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public CreateApiDestinationRequest setHttpApiParameters(CreateApiDestinationRequestHttpApiParameters httpApiParameters) { + this.httpApiParameters = httpApiParameters; + return this; + } + public CreateApiDestinationRequestHttpApiParameters getHttpApiParameters() { + return this.httpApiParameters; + } + + public CreateApiDestinationRequest setInvocationRateLimitPerSecond(Integer invocationRateLimitPerSecond) { + this.invocationRateLimitPerSecond = invocationRateLimitPerSecond; + return this; + } + public Integer getInvocationRateLimitPerSecond() { + return this.invocationRateLimitPerSecond; + } + + public static class CreateApiDestinationRequestHttpApiParametersApiParameters extends TeaModel { + @NameInMap("name") + public String name; + + /** + *

The description of the API destination. The description can be up to 255 characters in length.

+ */ + @NameInMap("description") + public String description; + + @NameInMap("type") + public String type; + + @NameInMap("defaultValue") + public String defaultValue; + + @NameInMap("in") + public String in; + + public static CreateApiDestinationRequestHttpApiParametersApiParameters build(java.util.Map map) throws Exception { + CreateApiDestinationRequestHttpApiParametersApiParameters self = new CreateApiDestinationRequestHttpApiParametersApiParameters(); + return TeaModel.build(map, self); + } + + public CreateApiDestinationRequestHttpApiParametersApiParameters setName(String name) { + this.name = name; + return this; + } + public String getName() { + return this.name; + } + + public CreateApiDestinationRequestHttpApiParametersApiParameters setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public CreateApiDestinationRequestHttpApiParametersApiParameters setType(String type) { + this.type = type; + return this; + } + public String getType() { + return this.type; + } + + public CreateApiDestinationRequestHttpApiParametersApiParameters setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + return this; + } + public String getDefaultValue() { + return this.defaultValue; + } + + public CreateApiDestinationRequestHttpApiParametersApiParameters setIn(String in) { + this.in = in; + return this; + } + public String getIn() { + return this.in; + } + + } + + public static class CreateApiDestinationRequestHttpApiParameters extends TeaModel { + /** + *

The endpoint of the API destination. The endpoint can be up to 127 characters in length. This parameter is required.

+ * + * example: + *

http://127.0.0.1:8001/api

+ */ + @NameInMap("endpoint") + public String endpoint; + + /** + *

The HTTP request method. Valid values:

+ *
  *   GET 
+         * 
+         *   *   POST 
+         * 
+         *   *   HEAD 
+         * 
+         *   *   DELETE 
+         * 
+         *   *   PUT 
+         * 
+         *   *   PATCH 
+         * 
+         * 
+         *   This parameter is required.
+         * 
+ * + * example: + *

POST

+ */ + @NameInMap("method") + public String method; + + /** + *

TODO

+ */ + @NameInMap("apiParameters") + public java.util.List apiParameters; + + public static CreateApiDestinationRequestHttpApiParameters build(java.util.Map map) throws Exception { + CreateApiDestinationRequestHttpApiParameters self = new CreateApiDestinationRequestHttpApiParameters(); + return TeaModel.build(map, self); + } + + public CreateApiDestinationRequestHttpApiParameters setEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + public String getEndpoint() { + return this.endpoint; + } + + public CreateApiDestinationRequestHttpApiParameters setMethod(String method) { + this.method = method; + return this; + } + public String getMethod() { + return this.method; + } + + public CreateApiDestinationRequestHttpApiParameters setApiParameters(java.util.List apiParameters) { + this.apiParameters = apiParameters; + return this; + } + public java.util.List getApiParameters() { + return this.apiParameters; + } + + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateApiDestinationResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateApiDestinationResponse.java new file mode 100644 index 00000000..db992397 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateApiDestinationResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class CreateApiDestinationResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public CreateApiDestinationResponseBody body; + + public static CreateApiDestinationResponse build(java.util.Map map) throws Exception { + CreateApiDestinationResponse self = new CreateApiDestinationResponse(); + return TeaModel.build(map, self); + } + + public CreateApiDestinationResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public CreateApiDestinationResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public CreateApiDestinationResponse setBody(CreateApiDestinationResponseBody body) { + this.body = body; + return this; + } + public CreateApiDestinationResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateApiDestinationResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateApiDestinationResponseBody.java new file mode 100644 index 00000000..3da2b9de --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateApiDestinationResponseBody.java @@ -0,0 +1,80 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class CreateApiDestinationResponseBody extends TeaModel { + /** + *

The returned response code. The value Success indicates that the request is successful.

+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The name of the API destination.

+ * + * example: + *

ApiDestinationName

+ */ + @NameInMap("apiDestinationName") + public String apiDestinationName; + + /** + *

The returned message.

+ * + * example: + *

success

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

5DAF96FB-A4B6-548C-B999-0BFDCB2261B9

+ */ + @NameInMap("requestId") + public String requestId; + + public static CreateApiDestinationResponseBody build(java.util.Map map) throws Exception { + CreateApiDestinationResponseBody self = new CreateApiDestinationResponseBody(); + return TeaModel.build(map, self); + } + + public CreateApiDestinationResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public CreateApiDestinationResponseBody setApiDestinationName(String apiDestinationName) { + this.apiDestinationName = apiDestinationName; + return this; + } + public String getApiDestinationName() { + return this.apiDestinationName; + } + + public CreateApiDestinationResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public CreateApiDestinationResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateConnectionRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateConnectionRequest.java new file mode 100644 index 00000000..48f328a7 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateConnectionRequest.java @@ -0,0 +1,683 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +/** + * description : + *

Connection Controller apis: + * createConnection * + * deleteConnection * + * updateConnection * + * getConnection * + * selectOneConnection * + * listConnections * + * listEnumsResponse *

+ */ +public class CreateConnectionRequest extends TeaModel { + /** + *

The parameters that are configured for authentication.

+ */ + @NameInMap("authParameters") + public CreateConnectionRequestAuthParameters authParameters; + + /** + *

The name of the connection. The name must be 2 to 127 characters in length.

+ *
This parameter is required.
+     * 
+ * + * example: + *

connection-name

+ */ + @NameInMap("connectionName") + public String connectionName; + + /** + *

The description of the connection. The description can be up to 255 characters in length.

+ * + * example: + *

demo

+ */ + @NameInMap("description") + public String description; + + /** + *

The parameters that are configured for the network. This parameter is required.

+ */ + @NameInMap("networkParameters") + public CreateConnectionRequestNetworkParameters networkParameters; + + public static CreateConnectionRequest build(java.util.Map map) throws Exception { + CreateConnectionRequest self = new CreateConnectionRequest(); + return TeaModel.build(map, self); + } + + public CreateConnectionRequest setAuthParameters(CreateConnectionRequestAuthParameters authParameters) { + this.authParameters = authParameters; + return this; + } + public CreateConnectionRequestAuthParameters getAuthParameters() { + return this.authParameters; + } + + public CreateConnectionRequest setConnectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + public String getConnectionName() { + return this.connectionName; + } + + public CreateConnectionRequest setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public CreateConnectionRequest setNetworkParameters(CreateConnectionRequestNetworkParameters networkParameters) { + this.networkParameters = networkParameters; + return this; + } + public CreateConnectionRequestNetworkParameters getNetworkParameters() { + return this.networkParameters; + } + + public static class CreateConnectionRequestAuthParametersApiKeyAuthParameters extends TeaModel { + /** + *

The key of the API key.

+ * + * example: + *

Token

+ */ + @NameInMap("apiKeyName") + public String apiKeyName; + + /** + *

The value of the API key.

+ * + * example: + *

adkjnakddh****

+ */ + @NameInMap("apiKeyValue") + public String apiKeyValue; + + public static CreateConnectionRequestAuthParametersApiKeyAuthParameters build(java.util.Map map) throws Exception { + CreateConnectionRequestAuthParametersApiKeyAuthParameters self = new CreateConnectionRequestAuthParametersApiKeyAuthParameters(); + return TeaModel.build(map, self); + } + + public CreateConnectionRequestAuthParametersApiKeyAuthParameters setApiKeyName(String apiKeyName) { + this.apiKeyName = apiKeyName; + return this; + } + public String getApiKeyName() { + return this.apiKeyName; + } + + public CreateConnectionRequestAuthParametersApiKeyAuthParameters setApiKeyValue(String apiKeyValue) { + this.apiKeyValue = apiKeyValue; + return this; + } + public String getApiKeyValue() { + return this.apiKeyValue; + } + + } + + public static class CreateConnectionRequestAuthParametersBasicAuthParameters extends TeaModel { + /** + *

The password for basic authentication.

+ * + * example: + *
+ */ + @NameInMap("password") + public String password; + + /** + *

The username for basic authentication.

+ * + * example: + *

admin

+ */ + @NameInMap("username") + public String username; + + public static CreateConnectionRequestAuthParametersBasicAuthParameters build(java.util.Map map) throws Exception { + CreateConnectionRequestAuthParametersBasicAuthParameters self = new CreateConnectionRequestAuthParametersBasicAuthParameters(); + return TeaModel.build(map, self); + } + + public CreateConnectionRequestAuthParametersBasicAuthParameters setPassword(String password) { + this.password = password; + return this; + } + public String getPassword() { + return this.password; + } + + public CreateConnectionRequestAuthParametersBasicAuthParameters setUsername(String username) { + this.username = username; + return this; + } + public String getUsername() { + return this.username; + } + + } + + public static class CreateConnectionRequestAuthParametersOauthParametersClientParameters extends TeaModel { + /** + *

The client ID.

+ * + * example: + *

ClientID

+ */ + @NameInMap("clientID") + public String clientID; + + /** + *

The client key secret of the application.

+ * + * example: + *

ClientSecret

+ */ + @NameInMap("clientSecret") + public String clientSecret; + + public static CreateConnectionRequestAuthParametersOauthParametersClientParameters build(java.util.Map map) throws Exception { + CreateConnectionRequestAuthParametersOauthParametersClientParameters self = new CreateConnectionRequestAuthParametersOauthParametersClientParameters(); + return TeaModel.build(map, self); + } + + public CreateConnectionRequestAuthParametersOauthParametersClientParameters setClientID(String clientID) { + this.clientID = clientID; + return this; + } + public String getClientID() { + return this.clientID; + } + + public CreateConnectionRequestAuthParametersOauthParametersClientParameters setClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + public String getClientSecret() { + return this.clientSecret; + } + + } + + public static class CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters extends TeaModel { + /** + *

Indicates whether authentication is enabled.

+ * + * example: + *

false

+ */ + @NameInMap("isValueSecret") + public String isValueSecret; + + /** + *

The key in the request body.

+ * + * example: + *

name

+ */ + @NameInMap("key") + public String key; + + /** + *

The value of the key in the request body.

+ * + * example: + *

demo

+ */ + @NameInMap("value") + public String value; + + public static CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters build(java.util.Map map) throws Exception { + CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters self = new CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters(); + return TeaModel.build(map, self); + } + + public CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters setIsValueSecret(String isValueSecret) { + this.isValueSecret = isValueSecret; + return this; + } + public String getIsValueSecret() { + return this.isValueSecret; + } + + public CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters setKey(String key) { + this.key = key; + return this; + } + public String getKey() { + return this.key; + } + + public CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters setValue(String value) { + this.value = value; + return this; + } + public String getValue() { + return this.value; + } + + } + + public static class CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters extends TeaModel { + /** + *

Indicates whether authentication is enabled.

+ * + * example: + *

false

+ */ + @NameInMap("isValueSecret") + public String isValueSecret; + + /** + *

The key in the request header.

+ * + * example: + *

name

+ */ + @NameInMap("key") + public String key; + + /** + *

The value of the key in the request header.

+ * + * example: + *

demo

+ */ + @NameInMap("value") + public String value; + + public static CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters build(java.util.Map map) throws Exception { + CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters self = new CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters(); + return TeaModel.build(map, self); + } + + public CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters setIsValueSecret(String isValueSecret) { + this.isValueSecret = isValueSecret; + return this; + } + public String getIsValueSecret() { + return this.isValueSecret; + } + + public CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters setKey(String key) { + this.key = key; + return this; + } + public String getKey() { + return this.key; + } + + public CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters setValue(String value) { + this.value = value; + return this; + } + public String getValue() { + return this.value; + } + + } + + public static class CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters extends TeaModel { + /** + *

Indicates whether authentication is enabled.

+ * + * example: + *

false

+ */ + @NameInMap("isValueSecret") + public String isValueSecret; + + /** + *

The key in the request path.

+ * + * example: + *

name

+ */ + @NameInMap("key") + public String key; + + /** + *

The value of the key in the request path.

+ * + * example: + *

demo

+ */ + @NameInMap("value") + public String value; + + public static CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters build(java.util.Map map) throws Exception { + CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters self = new CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters(); + return TeaModel.build(map, self); + } + + public CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters setIsValueSecret(String isValueSecret) { + this.isValueSecret = isValueSecret; + return this; + } + public String getIsValueSecret() { + return this.isValueSecret; + } + + public CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters setKey(String key) { + this.key = key; + return this; + } + public String getKey() { + return this.key; + } + + public CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters setValue(String value) { + this.value = value; + return this; + } + public String getValue() { + return this.value; + } + + } + + public static class CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters extends TeaModel { + /** + *

The parameters that are configured for the request.

+ */ + @NameInMap("bodyParameters") + public java.util.List bodyParameters; + + /** + *

The parameters that are configured for the request header.

+ */ + @NameInMap("headerParameters") + public java.util.List headerParameters; + + /** + *

The parameters that are configured for the request path.

+ */ + @NameInMap("queryStringParameters") + public java.util.List queryStringParameters; + + public static CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters build(java.util.Map map) throws Exception { + CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters self = new CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters(); + return TeaModel.build(map, self); + } + + public CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters setBodyParameters(java.util.List bodyParameters) { + this.bodyParameters = bodyParameters; + return this; + } + public java.util.List getBodyParameters() { + return this.bodyParameters; + } + + public CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters setHeaderParameters(java.util.List headerParameters) { + this.headerParameters = headerParameters; + return this; + } + public java.util.List getHeaderParameters() { + return this.headerParameters; + } + + public CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters setQueryStringParameters(java.util.List queryStringParameters) { + this.queryStringParameters = queryStringParameters; + return this; + } + public java.util.List getQueryStringParameters() { + return this.queryStringParameters; + } + + } + + public static class CreateConnectionRequestAuthParametersOauthParameters extends TeaModel { + /** + *

The endpoint that is used to obtain the OAuth token.

+ * + * example: + *

http://localhost:8080/oauth/token

+ */ + @NameInMap("authorizationEndpoint") + public String authorizationEndpoint; + + /** + *

The parameters that are configured for the client.

+ */ + @NameInMap("clientParameters") + public CreateConnectionRequestAuthParametersOauthParametersClientParameters clientParameters; + + /** + *

The HTTP request method. Valid values:

+ *
    - GET
+         * 
+         *     - POST
+         * 
+         *     - HEAD
+         * 
+ * + * example: + *

POST

+ */ + @NameInMap("httpMethod") + public String httpMethod; + + /** + *

The request parameters for OAuth authentication.

+ */ + @NameInMap("oauthHttpParameters") + public CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters oauthHttpParameters; + + public static CreateConnectionRequestAuthParametersOauthParameters build(java.util.Map map) throws Exception { + CreateConnectionRequestAuthParametersOauthParameters self = new CreateConnectionRequestAuthParametersOauthParameters(); + return TeaModel.build(map, self); + } + + public CreateConnectionRequestAuthParametersOauthParameters setAuthorizationEndpoint(String authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + public String getAuthorizationEndpoint() { + return this.authorizationEndpoint; + } + + public CreateConnectionRequestAuthParametersOauthParameters setClientParameters(CreateConnectionRequestAuthParametersOauthParametersClientParameters clientParameters) { + this.clientParameters = clientParameters; + return this; + } + public CreateConnectionRequestAuthParametersOauthParametersClientParameters getClientParameters() { + return this.clientParameters; + } + + public CreateConnectionRequestAuthParametersOauthParameters setHttpMethod(String httpMethod) { + this.httpMethod = httpMethod; + return this; + } + public String getHttpMethod() { + return this.httpMethod; + } + + public CreateConnectionRequestAuthParametersOauthParameters setOauthHttpParameters(CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters oauthHttpParameters) { + this.oauthHttpParameters = oauthHttpParameters; + return this; + } + public CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters getOauthHttpParameters() { + return this.oauthHttpParameters; + } + + } + + public static class CreateConnectionRequestAuthParameters extends TeaModel { + /** + *

The parameters that are configured for API key authentication.

+ */ + @NameInMap("apiKeyAuthParameters") + public CreateConnectionRequestAuthParametersApiKeyAuthParameters apiKeyAuthParameters; + + /** + *

The authentication type. Valid values:

+ *
  BASIC_AUTH: basic authentication.
+         * 
+         *   Introduction: Basic authentication is a simple authentication scheme built into the HTTP protocol. When you use the HTTP protocol for communications, the authentication method that the HTTP server uses to authenticate user identities on the client is defined in the protocol. The request header is in the Authorization: Basic Base64-encoded string (Username:Password) format.
+         * 
+         *   1.  Username and Password are required
+         * 
+         *   API_KEY_AUTH: API key authentication.
+         * 
+         *   Introduction: The request header is in the Token: Token value format.
+         * 
+         *   *   ApiKeyName and ApiKeyValue are required.
+         * 
+         *   OAUTH_AUTH: OAuth authentication.
+         * 
+         *   Introduction: OAuth2.0 is an authentication mechanism. In normal cases, a system that does not use OAuth2.0 can access the resources of the server from the client. To ensure access security, access tokens are used to authenticate users in OAuth 2.0. The client must use an access token to access protected resources. This way, OAuth 2.0 protects resources from being accessed from malicious clients and improves system security.
+         * 
+         *   *   AuthorizationEndpoint, OAuthHttpParameters, and HttpMethod are required.
+         * 
+ * + * example: + *

BASIC_AUTH

+ */ + @NameInMap("authorizationType") + public String authorizationType; + + /** + *

The parameters that are configured for basic authentication.

+ */ + @NameInMap("basicAuthParameters") + public CreateConnectionRequestAuthParametersBasicAuthParameters basicAuthParameters; + + /** + *

The parameters that are configured for OAuth authentication.

+ */ + @NameInMap("oauthParameters") + public CreateConnectionRequestAuthParametersOauthParameters oauthParameters; + + public static CreateConnectionRequestAuthParameters build(java.util.Map map) throws Exception { + CreateConnectionRequestAuthParameters self = new CreateConnectionRequestAuthParameters(); + return TeaModel.build(map, self); + } + + public CreateConnectionRequestAuthParameters setApiKeyAuthParameters(CreateConnectionRequestAuthParametersApiKeyAuthParameters apiKeyAuthParameters) { + this.apiKeyAuthParameters = apiKeyAuthParameters; + return this; + } + public CreateConnectionRequestAuthParametersApiKeyAuthParameters getApiKeyAuthParameters() { + return this.apiKeyAuthParameters; + } + + public CreateConnectionRequestAuthParameters setAuthorizationType(String authorizationType) { + this.authorizationType = authorizationType; + return this; + } + public String getAuthorizationType() { + return this.authorizationType; + } + + public CreateConnectionRequestAuthParameters setBasicAuthParameters(CreateConnectionRequestAuthParametersBasicAuthParameters basicAuthParameters) { + this.basicAuthParameters = basicAuthParameters; + return this; + } + public CreateConnectionRequestAuthParametersBasicAuthParameters getBasicAuthParameters() { + return this.basicAuthParameters; + } + + public CreateConnectionRequestAuthParameters setOauthParameters(CreateConnectionRequestAuthParametersOauthParameters oauthParameters) { + this.oauthParameters = oauthParameters; + return this; + } + public CreateConnectionRequestAuthParametersOauthParameters getOauthParameters() { + return this.oauthParameters; + } + + } + + public static class CreateConnectionRequestNetworkParameters extends TeaModel { + /** + *

The network type. Valid values:

+ *
  PublicNetwork and PrivateNetwork.
+         * 
+         *   *   Note: If you set this parameter to PrivateNetwork, you must configure VpcId, VswitcheId, and SecurityGroupId.
+         * 
+         *   This parameter is required.
+         * 
+ * + * example: + *

PublicNetwork

+ */ + @NameInMap("networkType") + public String networkType; + + /** + *

The ID of the security group.

+ * + * example: + *

eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9****

+ */ + @NameInMap("securityGroupId") + public String securityGroupId; + + /** + *

The VPC. ID

+ * + * example: + *

eb-test/vpc-bp1symadadwnwg****

+ */ + @NameInMap("vpcId") + public String vpcId; + + /** + *

The vSwitch ID.

+ * + * example: + *

vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeq****

+ */ + @NameInMap("vswitcheId") + public String vswitcheId; + + public static CreateConnectionRequestNetworkParameters build(java.util.Map map) throws Exception { + CreateConnectionRequestNetworkParameters self = new CreateConnectionRequestNetworkParameters(); + return TeaModel.build(map, self); + } + + public CreateConnectionRequestNetworkParameters setNetworkType(String networkType) { + this.networkType = networkType; + return this; + } + public String getNetworkType() { + return this.networkType; + } + + public CreateConnectionRequestNetworkParameters setSecurityGroupId(String securityGroupId) { + this.securityGroupId = securityGroupId; + return this; + } + public String getSecurityGroupId() { + return this.securityGroupId; + } + + public CreateConnectionRequestNetworkParameters setVpcId(String vpcId) { + this.vpcId = vpcId; + return this; + } + public String getVpcId() { + return this.vpcId; + } + + public CreateConnectionRequestNetworkParameters setVswitcheId(String vswitcheId) { + this.vswitcheId = vswitcheId; + return this; + } + public String getVswitcheId() { + return this.vswitcheId; + } + + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateConnectionResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateConnectionResponse.java new file mode 100644 index 00000000..e212b174 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateConnectionResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class CreateConnectionResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public CreateConnectionResponseBody body; + + public static CreateConnectionResponse build(java.util.Map map) throws Exception { + CreateConnectionResponse self = new CreateConnectionResponse(); + return TeaModel.build(map, self); + } + + public CreateConnectionResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public CreateConnectionResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public CreateConnectionResponse setBody(CreateConnectionResponseBody body) { + this.body = body; + return this; + } + public CreateConnectionResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateConnectionResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateConnectionResponseBody.java new file mode 100644 index 00000000..f32e77e0 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateConnectionResponseBody.java @@ -0,0 +1,80 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class CreateConnectionResponseBody extends TeaModel { + /** + *

The returned response code. The value Success indicates that the request is successful.

+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The connection name.

+ * + * example: + *

connection-demo

+ */ + @NameInMap("connectionName") + public String connectionName; + + /** + *

The returned message. If the request is successful, success is returned. If the request failed, an error code is returned.

+ * + * example: + *

success

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

7DA60DED-CD36-5837-B848-C01A23D2****

+ */ + @NameInMap("requestId") + public String requestId; + + public static CreateConnectionResponseBody build(java.util.Map map) throws Exception { + CreateConnectionResponseBody self = new CreateConnectionResponseBody(); + return TeaModel.build(map, self); + } + + public CreateConnectionResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public CreateConnectionResponseBody setConnectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + public String getConnectionName() { + return this.connectionName; + } + + public CreateConnectionResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public CreateConnectionResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventBusRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventBusRequest.java new file mode 100644 index 00000000..9648e64a --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventBusRequest.java @@ -0,0 +1,54 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +/** + * description : + *

EventBus Controller apis: + * createEventBus * + * getEventBus * + * deleteEventBus * + * listEventBuses *

+ */ +public class CreateEventBusRequest extends TeaModel { + /** + *

The description of the event bus.

+ * + * example: + *

demo

+ */ + @NameInMap("description") + public String description; + + /** + *

The name of the event bus. This parameter is required.

+ * + * example: + *

MyEventBus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + public static CreateEventBusRequest build(java.util.Map map) throws Exception { + CreateEventBusRequest self = new CreateEventBusRequest(); + return TeaModel.build(map, self); + } + + public CreateEventBusRequest setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public CreateEventBusRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventBusResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventBusResponse.java new file mode 100644 index 00000000..1ba33e64 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventBusResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class CreateEventBusResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public CreateEventBusResponseBody body; + + public static CreateEventBusResponse build(java.util.Map map) throws Exception { + CreateEventBusResponse self = new CreateEventBusResponse(); + return TeaModel.build(map, self); + } + + public CreateEventBusResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public CreateEventBusResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public CreateEventBusResponse setBody(CreateEventBusResponseBody body) { + this.body = body; + return this; + } + public CreateEventBusResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventBusResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventBusResponseBody.java new file mode 100644 index 00000000..c3bbd3dd --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventBusResponseBody.java @@ -0,0 +1,97 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class CreateEventBusResponseBody extends TeaModel { + /** + *

The returned response code. The value Success indicates that the request is successful. Other values indicate that the request failed. For more information about error codes, see Error codes.

+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The name of the event bus. This parameter is required.

+ * + * example: + *

MyEventBus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The returned error message.

+ * + * example: + *

The event bus [xxxx] not existed!

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

A995F07C-E503-5881-9962-9CECA8566876

+ */ + @NameInMap("requestId") + public String requestId; + + /** + *

Indicates whether the request is successful. The value true indicates that the request is successful.

+ * + * example: + *

true

+ */ + @NameInMap("success") + public Boolean success; + + public static CreateEventBusResponseBody build(java.util.Map map) throws Exception { + CreateEventBusResponseBody self = new CreateEventBusResponseBody(); + return TeaModel.build(map, self); + } + + public CreateEventBusResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public CreateEventBusResponseBody setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public CreateEventBusResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public CreateEventBusResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + + public CreateEventBusResponseBody setSuccess(Boolean success) { + this.success = success; + return this; + } + public Boolean getSuccess() { + return this.success; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventRuleRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventRuleRequest.java new file mode 100644 index 00000000..0a48cfcc --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventRuleRequest.java @@ -0,0 +1,89 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +/** + * description : + *

EventRule Controller apis: + * createEventRule * + * getEventRule * + * deleteEventRule * + * updateEventRule * + * listEventRules * + * enableEventRule * + * disableEventRule *

+ */ +public class CreateEventRuleRequest extends TeaModel { + /** + *

The name of the event bus with which the event source is associated. + * This parameter is required.

+ * + * example: + *

my-event-bus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event rule. + * This parameter is required.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventRuleName") + public String eventRuleName; + + @NameInMap("description") + public String description; + + /** + *

The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field.

+ *
You can specify up to five expressions in the map data structure in each field.
+     * 
+ * + * example: + *

{"source": [{"prefix": "acs."}],"type": [{"prefix":"oss:ObjectReplication"}],"subject":[{"prefix":"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/", "suffix":".txt"}]}

+ */ + @NameInMap("filterPattern") + public String filterPattern; + + public static CreateEventRuleRequest build(java.util.Map map) throws Exception { + CreateEventRuleRequest self = new CreateEventRuleRequest(); + return TeaModel.build(map, self); + } + + public CreateEventRuleRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public CreateEventRuleRequest setEventRuleName(String eventRuleName) { + this.eventRuleName = eventRuleName; + return this; + } + public String getEventRuleName() { + return this.eventRuleName; + } + + public CreateEventRuleRequest setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public CreateEventRuleRequest setFilterPattern(String filterPattern) { + this.filterPattern = filterPattern; + return this; + } + public String getFilterPattern() { + return this.filterPattern; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventRuleResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventRuleResponse.java new file mode 100644 index 00000000..66fcdaac --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventRuleResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class CreateEventRuleResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public CreateEventRuleResponseBody body; + + public static CreateEventRuleResponse build(java.util.Map map) throws Exception { + CreateEventRuleResponse self = new CreateEventRuleResponse(); + return TeaModel.build(map, self); + } + + public CreateEventRuleResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public CreateEventRuleResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public CreateEventRuleResponse setBody(CreateEventRuleResponseBody body) { + this.body = body; + return this; + } + public CreateEventRuleResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventRuleResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventRuleResponseBody.java new file mode 100644 index 00000000..6095c2b7 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventRuleResponseBody.java @@ -0,0 +1,84 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class CreateEventRuleResponseBody extends TeaModel { + /** + *

The returned response code. Valid values:

+ *
*   Success: The request is successful.
+     * 
+     * *   Other codes: The request failed. For more information about error codes, see Error codes.
+     * 
+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The name of the event rule.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventRuleName") + public String eventRuleName; + + /** + *

The returned error message.

+ * + * example: + *

Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

2922208e-e1c6-43ee-bfd1-aca50263bc8a

+ */ + @NameInMap("requestId") + public String requestId; + + public static CreateEventRuleResponseBody build(java.util.Map map) throws Exception { + CreateEventRuleResponseBody self = new CreateEventRuleResponseBody(); + return TeaModel.build(map, self); + } + + public CreateEventRuleResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public CreateEventRuleResponseBody setEventRuleName(String eventRuleName) { + this.eventRuleName = eventRuleName; + return this; + } + public String getEventRuleName() { + return this.eventRuleName; + } + + public CreateEventRuleResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public CreateEventRuleResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventSourceRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventSourceRequest.java new file mode 100644 index 00000000..f5303a4b --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventSourceRequest.java @@ -0,0 +1,93 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +/** + * description : + *

EventSource Controller apis: + * createEventSource * + * updateEventSource * + * deleteEventSource * + * getEventSource * + * listEventSources *

+ */ +public class CreateEventSourceRequest extends TeaModel { + /** + *

The description of the event source.

+ */ + @NameInMap("description") + public String description; + + /** + *

The name of the event bus with which the event source is associated. + * This parameter is required.

+ * + * example: + *

my-event-bus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event source. + * This parameter is required.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventSourceName") + public String eventSourceName; + + @NameInMap("className") + public String className; + + @NameInMap("config") + public java.util.Map config; + + public static CreateEventSourceRequest build(java.util.Map map) throws Exception { + CreateEventSourceRequest self = new CreateEventSourceRequest(); + return TeaModel.build(map, self); + } + + public CreateEventSourceRequest setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public CreateEventSourceRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public CreateEventSourceRequest setEventSourceName(String eventSourceName) { + this.eventSourceName = eventSourceName; + return this; + } + public String getEventSourceName() { + return this.eventSourceName; + } + + public CreateEventSourceRequest setClassName(String className) { + this.className = className; + return this; + } + public String getClassName() { + return this.className; + } + + public CreateEventSourceRequest setConfig(java.util.Map config) { + this.config = config; + return this; + } + public java.util.Map getConfig() { + return this.config; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventSourceResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventSourceResponse.java new file mode 100644 index 00000000..b402b4fe --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventSourceResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class CreateEventSourceResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public CreateEventSourceResponseBody body; + + public static CreateEventSourceResponse build(java.util.Map map) throws Exception { + CreateEventSourceResponse self = new CreateEventSourceResponse(); + return TeaModel.build(map, self); + } + + public CreateEventSourceResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public CreateEventSourceResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public CreateEventSourceResponse setBody(CreateEventSourceResponseBody body) { + this.body = body; + return this; + } + public CreateEventSourceResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventSourceResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventSourceResponseBody.java new file mode 100644 index 00000000..42488c85 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventSourceResponseBody.java @@ -0,0 +1,84 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class CreateEventSourceResponseBody extends TeaModel { + /** + *

The returned response code. Valid values:

+ *
*   Success: The request is successful.
+     * 
+     * *   Other codes: The request failed. For more information about error codes, see Error codes.
+     * 
+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The name of the event source.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventSourceName") + public String eventSourceName; + + /** + *

The returned error message.

+ * + * example: + *

Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

2922208e-e1c6-43ee-bfd1-aca50263bc8a

+ */ + @NameInMap("requestId") + public String requestId; + + public static CreateEventSourceResponseBody build(java.util.Map map) throws Exception { + CreateEventSourceResponseBody self = new CreateEventSourceResponseBody(); + return TeaModel.build(map, self); + } + + public CreateEventSourceResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public CreateEventSourceResponseBody setEventSourceName(String eventSourceName) { + this.eventSourceName = eventSourceName; + return this; + } + public String getEventSourceName() { + return this.eventSourceName; + } + + public CreateEventSourceResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public CreateEventSourceResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventTargetsRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventTargetsRequest.java new file mode 100644 index 00000000..7b4705aa --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventTargetsRequest.java @@ -0,0 +1,59 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class CreateEventTargetsRequest extends TeaModel { + /** + *

The name of the event bus with which the event target is associated. + * This parameter is required.

+ * + * example: + *

my-event-bus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event rule. + * This parameter is required.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventRuleName") + public String eventRuleName; + + @NameInMap("eventTargets") + public java.util.List eventTargets; + + public static CreateEventTargetsRequest build(java.util.Map map) throws Exception { + CreateEventTargetsRequest self = new CreateEventTargetsRequest(); + return TeaModel.build(map, self); + } + + public CreateEventTargetsRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public CreateEventTargetsRequest setEventRuleName(String eventRuleName) { + this.eventRuleName = eventRuleName; + return this; + } + public String getEventRuleName() { + return this.eventRuleName; + } + + public CreateEventTargetsRequest setEventTargets(java.util.List eventTargets) { + this.eventTargets = eventTargets; + return this; + } + public java.util.List getEventTargets() { + return this.eventTargets; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventTargetsResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventTargetsResponse.java new file mode 100644 index 00000000..bbfa25c0 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventTargetsResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class CreateEventTargetsResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public CreateEventTargetsResponseBody body; + + public static CreateEventTargetsResponse build(java.util.Map map) throws Exception { + CreateEventTargetsResponse self = new CreateEventTargetsResponse(); + return TeaModel.build(map, self); + } + + public CreateEventTargetsResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public CreateEventTargetsResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public CreateEventTargetsResponse setBody(CreateEventTargetsResponseBody body) { + this.body = body; + return this; + } + public CreateEventTargetsResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventTargetsResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventTargetsResponseBody.java new file mode 100644 index 00000000..729697da --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/CreateEventTargetsResponseBody.java @@ -0,0 +1,67 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class CreateEventTargetsResponseBody extends TeaModel { + /** + *

The returned response code. Valid values:

+ *
*   Success: The request is successful.
+     * 
+     * *   Other codes: The request failed. For more information about error codes, see Error codes.
+     * 
+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The returned error message.

+ * + * example: + *

Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

2922208e-e1c6-43ee-bfd1-aca50263bc8a

+ */ + @NameInMap("requestId") + public String requestId; + + public static CreateEventTargetsResponseBody build(java.util.Map map) throws Exception { + CreateEventTargetsResponseBody self = new CreateEventTargetsResponseBody(); + return TeaModel.build(map, self); + } + + public CreateEventTargetsResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public CreateEventTargetsResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public CreateEventTargetsResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteApiDestinationRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteApiDestinationRequest.java new file mode 100644 index 00000000..9b0813da --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteApiDestinationRequest.java @@ -0,0 +1,29 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteApiDestinationRequest extends TeaModel { + /** + *

The name of the API destination. This parameter is required.

+ * + * example: + *

ApiDestinationName

+ */ + @NameInMap("apiDestinationName") + public String apiDestinationName; + + public static DeleteApiDestinationRequest build(java.util.Map map) throws Exception { + DeleteApiDestinationRequest self = new DeleteApiDestinationRequest(); + return TeaModel.build(map, self); + } + + public DeleteApiDestinationRequest setApiDestinationName(String apiDestinationName) { + this.apiDestinationName = apiDestinationName; + return this; + } + public String getApiDestinationName() { + return this.apiDestinationName; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteApiDestinationResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteApiDestinationResponse.java new file mode 100644 index 00000000..73e643fa --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteApiDestinationResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteApiDestinationResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public DeleteApiDestinationResponseBody body; + + public static DeleteApiDestinationResponse build(java.util.Map map) throws Exception { + DeleteApiDestinationResponse self = new DeleteApiDestinationResponse(); + return TeaModel.build(map, self); + } + + public DeleteApiDestinationResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public DeleteApiDestinationResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public DeleteApiDestinationResponse setBody(DeleteApiDestinationResponseBody body) { + this.body = body; + return this; + } + public DeleteApiDestinationResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteApiDestinationResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteApiDestinationResponseBody.java new file mode 100644 index 00000000..10a78cf3 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteApiDestinationResponseBody.java @@ -0,0 +1,63 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteApiDestinationResponseBody extends TeaModel { + /** + *

The returned response code. The value Success indicates that the request is successful.

+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The returned message. If the request is successful, success is returned. If the request failed, an error code is returned.

+ * + * example: + *

success

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

382E6272-8E9C-5681-AC96-A8AF0BFAC1A5

+ */ + @NameInMap("requestId") + public String requestId; + + public static DeleteApiDestinationResponseBody build(java.util.Map map) throws Exception { + DeleteApiDestinationResponseBody self = new DeleteApiDestinationResponseBody(); + return TeaModel.build(map, self); + } + + public DeleteApiDestinationResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public DeleteApiDestinationResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public DeleteApiDestinationResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteConnectionRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteConnectionRequest.java new file mode 100644 index 00000000..af8f456c --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteConnectionRequest.java @@ -0,0 +1,29 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteConnectionRequest extends TeaModel { + /** + *

The name of the connection that you want to delete. This parameter is required.

+ * + * example: + *

connection-name

+ */ + @NameInMap("connectionName") + public String connectionName; + + public static DeleteConnectionRequest build(java.util.Map map) throws Exception { + DeleteConnectionRequest self = new DeleteConnectionRequest(); + return TeaModel.build(map, self); + } + + public DeleteConnectionRequest setConnectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + public String getConnectionName() { + return this.connectionName; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteConnectionResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteConnectionResponse.java new file mode 100644 index 00000000..8c4631c5 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteConnectionResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteConnectionResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public DeleteConnectionResponseBody body; + + public static DeleteConnectionResponse build(java.util.Map map) throws Exception { + DeleteConnectionResponse self = new DeleteConnectionResponse(); + return TeaModel.build(map, self); + } + + public DeleteConnectionResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public DeleteConnectionResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public DeleteConnectionResponse setBody(DeleteConnectionResponseBody body) { + this.body = body; + return this; + } + public DeleteConnectionResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteConnectionResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteConnectionResponseBody.java new file mode 100644 index 00000000..d3e19581 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteConnectionResponseBody.java @@ -0,0 +1,63 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteConnectionResponseBody extends TeaModel { + /** + *

The returned response code. The value Success indicates that the request is successful.

+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The returned message. If the request is successful, success is returned. If the request failed, an error code is returned.

+ * + * example: + *

success

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

8EF25E37-1750-5D7A-BA56-F8AE081A69C8

+ */ + @NameInMap("requestId") + public String requestId; + + public static DeleteConnectionResponseBody build(java.util.Map map) throws Exception { + DeleteConnectionResponseBody self = new DeleteConnectionResponseBody(); + return TeaModel.build(map, self); + } + + public DeleteConnectionResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public DeleteConnectionResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public DeleteConnectionResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventBusRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventBusRequest.java new file mode 100644 index 00000000..da7b66dc --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventBusRequest.java @@ -0,0 +1,29 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteEventBusRequest extends TeaModel { + /** + *

The name of the event bus. This parameter is required.

+ * + * example: + *

MyEventBus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + public static DeleteEventBusRequest build(java.util.Map map) throws Exception { + DeleteEventBusRequest self = new DeleteEventBusRequest(); + return TeaModel.build(map, self); + } + + public DeleteEventBusRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventBusResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventBusResponse.java new file mode 100644 index 00000000..86e7615b --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventBusResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteEventBusResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public DeleteEventBusResponseBody body; + + public static DeleteEventBusResponse build(java.util.Map map) throws Exception { + DeleteEventBusResponse self = new DeleteEventBusResponse(); + return TeaModel.build(map, self); + } + + public DeleteEventBusResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public DeleteEventBusResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public DeleteEventBusResponse setBody(DeleteEventBusResponseBody body) { + this.body = body; + return this; + } + public DeleteEventBusResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventBusResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventBusResponseBody.java new file mode 100644 index 00000000..40362c2f --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventBusResponseBody.java @@ -0,0 +1,63 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteEventBusResponseBody extends TeaModel { + /** + *

The returned HTTP status code. The HTTP status code 200 indicates that the request is successful.

+ * + * example: + *

200

+ */ + @NameInMap("code") + public String code; + + /** + *

The returned error message.

+ * + * example: + *

EventBusNotExist

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

C229E140-1A5C-5D55-8904-CFC5BA4CAA98

+ */ + @NameInMap("requestId") + public String requestId; + + public static DeleteEventBusResponseBody build(java.util.Map map) throws Exception { + DeleteEventBusResponseBody self = new DeleteEventBusResponseBody(); + return TeaModel.build(map, self); + } + + public DeleteEventBusResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public DeleteEventBusResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public DeleteEventBusResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventRuleRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventRuleRequest.java new file mode 100644 index 00000000..99efaf14 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventRuleRequest.java @@ -0,0 +1,48 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteEventRuleRequest extends TeaModel { + /** + *

The name of the event bus with which the event source is associated. + * This parameter is required.

+ * + * example: + *

my-event-bus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event rule. + * This parameter is required.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventRuleName") + public String eventRuleName; + + public static DeleteEventRuleRequest build(java.util.Map map) throws Exception { + DeleteEventRuleRequest self = new DeleteEventRuleRequest(); + return TeaModel.build(map, self); + } + + public DeleteEventRuleRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public DeleteEventRuleRequest setEventRuleName(String eventRuleName) { + this.eventRuleName = eventRuleName; + return this; + } + public String getEventRuleName() { + return this.eventRuleName; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventRuleResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventRuleResponse.java new file mode 100644 index 00000000..495f3e1c --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventRuleResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteEventRuleResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public DeleteEventRuleResponseBody body; + + public static DeleteEventRuleResponse build(java.util.Map map) throws Exception { + DeleteEventRuleResponse self = new DeleteEventRuleResponse(); + return TeaModel.build(map, self); + } + + public DeleteEventRuleResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public DeleteEventRuleResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public DeleteEventRuleResponse setBody(DeleteEventRuleResponseBody body) { + this.body = body; + return this; + } + public DeleteEventRuleResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventRuleResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventRuleResponseBody.java new file mode 100644 index 00000000..1d4cd688 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventRuleResponseBody.java @@ -0,0 +1,67 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteEventRuleResponseBody extends TeaModel { + /** + *

The returned response code. Valid values:

+ *
*   Success: The request is successful.
+     * 
+     * *   Other codes: The request failed. For more information about error codes, see Error codes.
+     * 
+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The returned error message.

+ * + * example: + *

Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

2922208e-e1c6-43ee-bfd1-aca50263bc8a

+ */ + @NameInMap("requestId") + public String requestId; + + public static DeleteEventRuleResponseBody build(java.util.Map map) throws Exception { + DeleteEventRuleResponseBody self = new DeleteEventRuleResponseBody(); + return TeaModel.build(map, self); + } + + public DeleteEventRuleResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public DeleteEventRuleResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public DeleteEventRuleResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventSourceRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventSourceRequest.java new file mode 100644 index 00000000..65b8b4b6 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventSourceRequest.java @@ -0,0 +1,41 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteEventSourceRequest extends TeaModel { + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event source. + * This parameter is required.

+ * + * example: + *

myrabbitmq.source

+ */ + @NameInMap("eventSourceName") + public String eventSourceName; + + public static DeleteEventSourceRequest build(java.util.Map map) throws Exception { + DeleteEventSourceRequest self = new DeleteEventSourceRequest(); + return TeaModel.build(map, self); + } + + public DeleteEventSourceRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public DeleteEventSourceRequest setEventSourceName(String eventSourceName) { + this.eventSourceName = eventSourceName; + return this; + } + public String getEventSourceName() { + return this.eventSourceName; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventSourceResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventSourceResponse.java new file mode 100644 index 00000000..e3c483e4 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventSourceResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteEventSourceResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public DeleteEventSourceResponseBody body; + + public static DeleteEventSourceResponse build(java.util.Map map) throws Exception { + DeleteEventSourceResponse self = new DeleteEventSourceResponse(); + return TeaModel.build(map, self); + } + + public DeleteEventSourceResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public DeleteEventSourceResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public DeleteEventSourceResponse setBody(DeleteEventSourceResponseBody body) { + this.body = body; + return this; + } + public DeleteEventSourceResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventSourceResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventSourceResponseBody.java new file mode 100644 index 00000000..62ad3923 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventSourceResponseBody.java @@ -0,0 +1,63 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteEventSourceResponseBody extends TeaModel { + /** + *

The returned response code. The value Success indicates that the request is successful. Other values indicate that the request failed. For more information about error codes, see Error codes.

+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The returned error message.

+ * + * example: + *

Remote error. requestId: [78B66E68-E778-1F33-84BD-xxxx], error code: [EventSourceNotExist], message: [The event source in request is not exist! ]

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

5f80e9b3-98d5-4f51-8412-c758818a03e4

+ */ + @NameInMap("requestId") + public String requestId; + + public static DeleteEventSourceResponseBody build(java.util.Map map) throws Exception { + DeleteEventSourceResponseBody self = new DeleteEventSourceResponseBody(); + return TeaModel.build(map, self); + } + + public DeleteEventSourceResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public DeleteEventSourceResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public DeleteEventSourceResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventTargetsRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventTargetsRequest.java new file mode 100644 index 00000000..35eb40e7 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventTargetsRequest.java @@ -0,0 +1,62 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteEventTargetsRequest extends TeaModel { + /** + *

The name of the event bus.

+ * + * example: + *

MyEventBus

+ */ + @NameInMap("eventBusName") + @Validation(required = true) + public String eventBusName; + + /** + *

The name of the event rule.

+ * + * example: + *

ramrolechange-mns

+ */ + @NameInMap("eventRuleName") + @Validation(required = true) + public String eventRuleName; + + /** + *

The names of the event targets that you want to delete.

+ */ + @NameInMap("eventTargetNames") + public java.util.List eventTargetNames; + + public static DeleteEventTargetsRequest build(java.util.Map map) throws Exception { + DeleteEventTargetsRequest self = new DeleteEventTargetsRequest(); + return TeaModel.build(map, self); + } + + public DeleteEventTargetsRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public DeleteEventTargetsRequest setEventRuleName(String eventRuleName) { + this.eventRuleName = eventRuleName; + return this; + } + public String getEventRuleName() { + return this.eventRuleName; + } + + public DeleteEventTargetsRequest setEventTargetNames(java.util.List eventTargetNames) { + this.eventTargetNames = eventTargetNames; + return this; + } + public java.util.List getEventTargetNames() { + return this.eventTargetNames; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventTargetsResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventTargetsResponse.java new file mode 100644 index 00000000..43c68c8c --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventTargetsResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteEventTargetsResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public DeleteEventTargetsResponseBody body; + + public static DeleteEventTargetsResponse build(java.util.Map map) throws Exception { + DeleteEventTargetsResponse self = new DeleteEventTargetsResponse(); + return TeaModel.build(map, self); + } + + public DeleteEventTargetsResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public DeleteEventTargetsResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public DeleteEventTargetsResponse setBody(DeleteEventTargetsResponseBody body) { + this.body = body; + return this; + } + public DeleteEventTargetsResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventTargetsResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventTargetsResponseBody.java new file mode 100644 index 00000000..a607e6b5 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DeleteEventTargetsResponseBody.java @@ -0,0 +1,67 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DeleteEventTargetsResponseBody extends TeaModel { + /** + *

The returned response code. Valid values:

+ *
*   Success: The request is successful.
+     * 
+     * *   Other codes: The request failed. For more information about error codes, see Error codes.
+     * 
+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The returned error message.

+ * + * example: + *

Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

2922208e-e1c6-43ee-bfd1-aca50263bc8a

+ */ + @NameInMap("requestId") + public String requestId; + + public static DeleteEventTargetsResponseBody build(java.util.Map map) throws Exception { + DeleteEventTargetsResponseBody self = new DeleteEventTargetsResponseBody(); + return TeaModel.build(map, self); + } + + public DeleteEventTargetsResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public DeleteEventTargetsResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public DeleteEventTargetsResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DisableEventRuleRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DisableEventRuleRequest.java new file mode 100644 index 00000000..968e28c7 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DisableEventRuleRequest.java @@ -0,0 +1,48 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DisableEventRuleRequest extends TeaModel { + /** + *

The name of the event bus with which the event source is associated. + * This parameter is required.

+ * + * example: + *

my-event-bus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event rule. + * This parameter is required.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventRuleName") + public String eventRuleName; + + public static DisableEventRuleRequest build(java.util.Map map) throws Exception { + DisableEventRuleRequest self = new DisableEventRuleRequest(); + return TeaModel.build(map, self); + } + + public DisableEventRuleRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public DisableEventRuleRequest setEventRuleName(String eventRuleName) { + this.eventRuleName = eventRuleName; + return this; + } + public String getEventRuleName() { + return this.eventRuleName; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DisableEventRuleResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DisableEventRuleResponse.java new file mode 100644 index 00000000..3e678521 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DisableEventRuleResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DisableEventRuleResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public DisableEventRuleResponseBody body; + + public static DisableEventRuleResponse build(java.util.Map map) throws Exception { + DisableEventRuleResponse self = new DisableEventRuleResponse(); + return TeaModel.build(map, self); + } + + public DisableEventRuleResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public DisableEventRuleResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public DisableEventRuleResponse setBody(DisableEventRuleResponseBody body) { + this.body = body; + return this; + } + public DisableEventRuleResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DisableEventRuleResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DisableEventRuleResponseBody.java new file mode 100644 index 00000000..92036e03 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/DisableEventRuleResponseBody.java @@ -0,0 +1,67 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class DisableEventRuleResponseBody extends TeaModel { + /** + *

The returned response code. Valid values:

+ *
*   Success: The request is successful.
+     * 
+     * *   Other codes: The request failed. For more information about error codes, see Error codes.
+     * 
+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The returned error message.

+ * + * example: + *

Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

2922208e-e1c6-43ee-bfd1-aca50263bc8a

+ */ + @NameInMap("requestId") + public String requestId; + + public static DisableEventRuleResponseBody build(java.util.Map map) throws Exception { + DisableEventRuleResponseBody self = new DisableEventRuleResponseBody(); + return TeaModel.build(map, self); + } + + public DisableEventRuleResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public DisableEventRuleResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public DisableEventRuleResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/EnableEventRuleRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/EnableEventRuleRequest.java new file mode 100644 index 00000000..b2319093 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/EnableEventRuleRequest.java @@ -0,0 +1,48 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class EnableEventRuleRequest extends TeaModel { + /** + *

The name of the event bus with which the event source is associated. + * This parameter is required.

+ * + * example: + *

my-event-bus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event rule. + * This parameter is required.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventRuleName") + public String eventRuleName; + + public static EnableEventRuleRequest build(java.util.Map map) throws Exception { + EnableEventRuleRequest self = new EnableEventRuleRequest(); + return TeaModel.build(map, self); + } + + public EnableEventRuleRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public EnableEventRuleRequest setEventRuleName(String eventRuleName) { + this.eventRuleName = eventRuleName; + return this; + } + public String getEventRuleName() { + return this.eventRuleName; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/EnableEventRuleResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/EnableEventRuleResponse.java new file mode 100644 index 00000000..b4c496d5 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/EnableEventRuleResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class EnableEventRuleResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public EnableEventRuleResponseBody body; + + public static EnableEventRuleResponse build(java.util.Map map) throws Exception { + EnableEventRuleResponse self = new EnableEventRuleResponse(); + return TeaModel.build(map, self); + } + + public EnableEventRuleResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public EnableEventRuleResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public EnableEventRuleResponse setBody(EnableEventRuleResponseBody body) { + this.body = body; + return this; + } + public EnableEventRuleResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/EnableEventRuleResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/EnableEventRuleResponseBody.java new file mode 100644 index 00000000..bb70edb6 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/EnableEventRuleResponseBody.java @@ -0,0 +1,67 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class EnableEventRuleResponseBody extends TeaModel { + /** + *

The returned response code. Valid values:

+ *
*   Success: The request is successful.
+     * 
+     * *   Other codes: The request failed. For more information about error codes, see Error codes.
+     * 
+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The returned error message.

+ * + * example: + *

Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

2922208e-e1c6-43ee-bfd1-aca50263bc8a

+ */ + @NameInMap("requestId") + public String requestId; + + public static EnableEventRuleResponseBody build(java.util.Map map) throws Exception { + EnableEventRuleResponseBody self = new EnableEventRuleResponseBody(); + return TeaModel.build(map, self); + } + + public EnableEventRuleResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public EnableEventRuleResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public EnableEventRuleResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/EventTarget.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/EventTarget.java new file mode 100644 index 00000000..894d848b --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/EventTarget.java @@ -0,0 +1,176 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +/** + * description : + *

EventTarget Controller apis: + * createEventTargets * + * updateEventTargets * + * deleteEventTargets * + * listEventTargets *

+ */ +public class EventTarget extends TeaModel { + @NameInMap("eventTargetName") + public String eventTargetName; + + @NameInMap("className") + public String className; + + @NameInMap("config") + public java.util.Map config; + + @NameInMap("runOptions") + public EventTargetRunOptions runOptions; + + public static EventTarget build(java.util.Map map) throws Exception { + EventTarget self = new EventTarget(); + return TeaModel.build(map, self); + } + + public EventTarget setEventTargetName(String eventTargetName) { + this.eventTargetName = eventTargetName; + return this; + } + public String getEventTargetName() { + return this.eventTargetName; + } + + public EventTarget setClassName(String className) { + this.className = className; + return this; + } + public String getClassName() { + return this.className; + } + + public EventTarget setConfig(java.util.Map config) { + this.config = config; + return this; + } + public java.util.Map getConfig() { + return this.config; + } + + public EventTarget setRunOptions(EventTargetRunOptions runOptions) { + this.runOptions = runOptions; + return this; + } + public EventTargetRunOptions getRunOptions() { + return this.runOptions; + } + + public static class EventTargetRunOptionsRetryStrategy extends TeaModel { + @NameInMap("pushRetryStrategy") + public String pushRetryStrategy; + + @NameInMap("maximumEventAgeInSeconds") + public Integer maximumEventAgeInSeconds; + + @NameInMap("maximumRetryAttempts") + public Integer maximumRetryAttempts; + + public static EventTargetRunOptionsRetryStrategy build(java.util.Map map) throws Exception { + EventTargetRunOptionsRetryStrategy self = new EventTargetRunOptionsRetryStrategy(); + return TeaModel.build(map, self); + } + + public EventTargetRunOptionsRetryStrategy setPushRetryStrategy(String pushRetryStrategy) { + this.pushRetryStrategy = pushRetryStrategy; + return this; + } + public String getPushRetryStrategy() { + return this.pushRetryStrategy; + } + + public EventTargetRunOptionsRetryStrategy setMaximumEventAgeInSeconds(Integer maximumEventAgeInSeconds) { + this.maximumEventAgeInSeconds = maximumEventAgeInSeconds; + return this; + } + public Integer getMaximumEventAgeInSeconds() { + return this.maximumEventAgeInSeconds; + } + + public EventTargetRunOptionsRetryStrategy setMaximumRetryAttempts(Integer maximumRetryAttempts) { + this.maximumRetryAttempts = maximumRetryAttempts; + return this; + } + public Integer getMaximumRetryAttempts() { + return this.maximumRetryAttempts; + } + + } + + public static class EventTargetRunOptionsDeadLetterQueue extends TeaModel { + @NameInMap("type") + public String type; + + @NameInMap("config") + public java.util.Map config; + + public static EventTargetRunOptionsDeadLetterQueue build(java.util.Map map) throws Exception { + EventTargetRunOptionsDeadLetterQueue self = new EventTargetRunOptionsDeadLetterQueue(); + return TeaModel.build(map, self); + } + + public EventTargetRunOptionsDeadLetterQueue setType(String type) { + this.type = type; + return this; + } + public String getType() { + return this.type; + } + + public EventTargetRunOptionsDeadLetterQueue setConfig(java.util.Map config) { + this.config = config; + return this; + } + public java.util.Map getConfig() { + return this.config; + } + + } + + public static class EventTargetRunOptions extends TeaModel { + @NameInMap("errorsTolerance") + public String errorsTolerance; + + @NameInMap("retryStrategy") + public EventTargetRunOptionsRetryStrategy retryStrategy; + + @NameInMap("deadLetterQueue") + public EventTargetRunOptionsDeadLetterQueue deadLetterQueue; + + public static EventTargetRunOptions build(java.util.Map map) throws Exception { + EventTargetRunOptions self = new EventTargetRunOptions(); + return TeaModel.build(map, self); + } + + public EventTargetRunOptions setErrorsTolerance(String errorsTolerance) { + this.errorsTolerance = errorsTolerance; + return this; + } + public String getErrorsTolerance() { + return this.errorsTolerance; + } + + public EventTargetRunOptions setRetryStrategy(EventTargetRunOptionsRetryStrategy retryStrategy) { + this.retryStrategy = retryStrategy; + return this; + } + public EventTargetRunOptionsRetryStrategy getRetryStrategy() { + return this.retryStrategy; + } + + public EventTargetRunOptions setDeadLetterQueue(EventTargetRunOptionsDeadLetterQueue deadLetterQueue) { + this.deadLetterQueue = deadLetterQueue; + return this; + } + public EventTargetRunOptionsDeadLetterQueue getDeadLetterQueue() { + return this.deadLetterQueue; + } + + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetApiDestinationRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetApiDestinationRequest.java new file mode 100644 index 00000000..91f9ffc5 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetApiDestinationRequest.java @@ -0,0 +1,29 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class GetApiDestinationRequest extends TeaModel { + /** + *

The name of the API destination. This parameter is required.

+ * + * example: + *

api-destination-name

+ */ + @NameInMap("apiDestinationName") + public String apiDestinationName; + + public static GetApiDestinationRequest build(java.util.Map map) throws Exception { + GetApiDestinationRequest self = new GetApiDestinationRequest(); + return TeaModel.build(map, self); + } + + public GetApiDestinationRequest setApiDestinationName(String apiDestinationName) { + this.apiDestinationName = apiDestinationName; + return this; + } + public String getApiDestinationName() { + return this.apiDestinationName; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetApiDestinationResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetApiDestinationResponse.java new file mode 100644 index 00000000..4253ad1f --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetApiDestinationResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class GetApiDestinationResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public GetApiDestinationResponseBody body; + + public static GetApiDestinationResponse build(java.util.Map map) throws Exception { + GetApiDestinationResponse self = new GetApiDestinationResponse(); + return TeaModel.build(map, self); + } + + public GetApiDestinationResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public GetApiDestinationResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public GetApiDestinationResponse setBody(GetApiDestinationResponseBody body) { + this.body = body; + return this; + } + public GetApiDestinationResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetApiDestinationResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetApiDestinationResponseBody.java new file mode 100644 index 00000000..71a79bbe --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetApiDestinationResponseBody.java @@ -0,0 +1,295 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class GetApiDestinationResponseBody extends TeaModel { + /** + *

The returned response code. The value Success indicates that the request is successful.

+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The name of the API destination.

+ * + * example: + *

api-destination-2

+ */ + @NameInMap("apiDestinationName") + public String apiDestinationName; + + /** + *

The connection name.

+ * + * example: + *

connection-name

+ */ + @NameInMap("connectionName") + public String connectionName; + + /** + *

The description of the connection.

+ * + * example: + *

demo

+ */ + @NameInMap("description") + public String description; + + /** + *

The time when the API destination was created.

+ * + * example: + *

1665223213000

+ */ + @NameInMap("gmtCreate") + public Long gmtCreate; + + /** + *

The request parameters that are configured for the API destination.

+ */ + @NameInMap("httpApiParameters") + public GetApiDestinationResponseBodyHttpApiParameters httpApiParameters; + + /** + *

TODO

+ */ + @NameInMap("invocationRateLimitPerSecond") + public Integer invocationRateLimitPerSecond; + + /** + *

The returned message. If the request is successful, success is returned. If the request failed, an error code is returned.

+ * + * example: + *

success

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

B896B484-F16D-59DE-9E23-DD0E5C361108

+ */ + @NameInMap("requestId") + public String requestId; + + public static GetApiDestinationResponseBody build(java.util.Map map) throws Exception { + GetApiDestinationResponseBody self = new GetApiDestinationResponseBody(); + return TeaModel.build(map, self); + } + + public GetApiDestinationResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public GetApiDestinationResponseBody setApiDestinationName(String apiDestinationName) { + this.apiDestinationName = apiDestinationName; + return this; + } + public String getApiDestinationName() { + return this.apiDestinationName; + } + + public GetApiDestinationResponseBody setConnectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + public String getConnectionName() { + return this.connectionName; + } + + public GetApiDestinationResponseBody setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public GetApiDestinationResponseBody setGmtCreate(Long gmtCreate) { + this.gmtCreate = gmtCreate; + return this; + } + public Long getGmtCreate() { + return this.gmtCreate; + } + + public GetApiDestinationResponseBody setHttpApiParameters(GetApiDestinationResponseBodyHttpApiParameters httpApiParameters) { + this.httpApiParameters = httpApiParameters; + return this; + } + public GetApiDestinationResponseBodyHttpApiParameters getHttpApiParameters() { + return this.httpApiParameters; + } + + public GetApiDestinationResponseBody setInvocationRateLimitPerSecond(Integer invocationRateLimitPerSecond) { + this.invocationRateLimitPerSecond = invocationRateLimitPerSecond; + return this; + } + public Integer getInvocationRateLimitPerSecond() { + return this.invocationRateLimitPerSecond; + } + + public GetApiDestinationResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public GetApiDestinationResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + + public static class GetApiDestinationResponseBodyHttpApiParametersApiParameters extends TeaModel { + @NameInMap("name") + public String name; + + /** + *

The description of the API destination. The description can be up to 255 characters in length.

+ */ + @NameInMap("description") + public String description; + + @NameInMap("type") + public String type; + + @NameInMap("defaultValue") + public String defaultValue; + + @NameInMap("in") + public String in; + + public static GetApiDestinationResponseBodyHttpApiParametersApiParameters build(java.util.Map map) throws Exception { + GetApiDestinationResponseBodyHttpApiParametersApiParameters self = new GetApiDestinationResponseBodyHttpApiParametersApiParameters(); + return TeaModel.build(map, self); + } + + public GetApiDestinationResponseBodyHttpApiParametersApiParameters setName(String name) { + this.name = name; + return this; + } + public String getName() { + return this.name; + } + + public GetApiDestinationResponseBodyHttpApiParametersApiParameters setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public GetApiDestinationResponseBodyHttpApiParametersApiParameters setType(String type) { + this.type = type; + return this; + } + public String getType() { + return this.type; + } + + public GetApiDestinationResponseBodyHttpApiParametersApiParameters setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + return this; + } + public String getDefaultValue() { + return this.defaultValue; + } + + public GetApiDestinationResponseBodyHttpApiParametersApiParameters setIn(String in) { + this.in = in; + return this; + } + public String getIn() { + return this.in; + } + + } + + public static class GetApiDestinationResponseBodyHttpApiParameters extends TeaModel { + /** + *

The endpoint of the API destination.

+ * + * example: + *

http://127.0.0.1:8001/api

+ */ + @NameInMap("endpoint") + public String endpoint; + + /** + *

The HTTP request method. Valid values:

+ *
  - POST
+         * 
+         *   - GET
+         * 
+         *   - DELETE
+         * 
+         *   - PUT
+         * 
+         *   - HEAD
+         * 
+         *   - TRACE
+         * 
+         *   - PATCH
+         * 
+ * + * example: + *

POST

+ */ + @NameInMap("method") + public String method; + + /** + *

TODO

+ */ + @NameInMap("apiParameters") + public java.util.List apiParameters; + + public static GetApiDestinationResponseBodyHttpApiParameters build(java.util.Map map) throws Exception { + GetApiDestinationResponseBodyHttpApiParameters self = new GetApiDestinationResponseBodyHttpApiParameters(); + return TeaModel.build(map, self); + } + + public GetApiDestinationResponseBodyHttpApiParameters setEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + public String getEndpoint() { + return this.endpoint; + } + + public GetApiDestinationResponseBodyHttpApiParameters setMethod(String method) { + this.method = method; + return this; + } + public String getMethod() { + return this.method; + } + + public GetApiDestinationResponseBodyHttpApiParameters setApiParameters(java.util.List apiParameters) { + this.apiParameters = apiParameters; + return this; + } + public java.util.List getApiParameters() { + return this.apiParameters; + } + + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetConnectionRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetConnectionRequest.java new file mode 100644 index 00000000..ead48f15 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetConnectionRequest.java @@ -0,0 +1,29 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class GetConnectionRequest extends TeaModel { + /** + *

The connection name. This parameter is required.

+ * + * example: + *

connection-name

+ */ + @NameInMap("connectionName") + public String connectionName; + + public static GetConnectionRequest build(java.util.Map map) throws Exception { + GetConnectionRequest self = new GetConnectionRequest(); + return TeaModel.build(map, self); + } + + public GetConnectionRequest setConnectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + public String getConnectionName() { + return this.connectionName; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetConnectionResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetConnectionResponse.java new file mode 100644 index 00000000..131ea440 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetConnectionResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class GetConnectionResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public GetConnectionResponseBody body; + + public static GetConnectionResponse build(java.util.Map map) throws Exception { + GetConnectionResponse self = new GetConnectionResponse(); + return TeaModel.build(map, self); + } + + public GetConnectionResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public GetConnectionResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public GetConnectionResponse setBody(GetConnectionResponseBody body) { + this.body = body; + return this; + } + public GetConnectionResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetConnectionResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetConnectionResponseBody.java new file mode 100644 index 00000000..00b7ab62 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetConnectionResponseBody.java @@ -0,0 +1,758 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class GetConnectionResponseBody extends TeaModel { + /** + *

The returned response code. The value Success indicates that the request is successful.

+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The value of the key in the request path.

+ */ + @NameInMap("connections") + public java.util.List connections; + + /** + *

The returned message.

+ * + * example: + *

success

+ */ + @NameInMap("message") + public String message; + + /** + *

The returned request ID.

+ * + * example: + *

34AD682D-5B91-5773-8132-AA38C130****

+ */ + @NameInMap("requestId") + public String requestId; + + public static GetConnectionResponseBody build(java.util.Map map) throws Exception { + GetConnectionResponseBody self = new GetConnectionResponseBody(); + return TeaModel.build(map, self); + } + + public GetConnectionResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public GetConnectionResponseBody setConnections(java.util.List connections) { + this.connections = connections; + return this; + } + public java.util.List getConnections() { + return this.connections; + } + + public GetConnectionResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public GetConnectionResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + + public static class GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters extends TeaModel { + /** + *

The API key.

+ * + * example: + *

Token

+ */ + @NameInMap("apiKeyName") + public String apiKeyName; + + /** + *

The value of the API key.

+ * + * example: + *

asdkjnqkwejooa

+ */ + @NameInMap("apiKeyValue") + public String apiKeyValue; + + public static GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters build(java.util.Map map) throws Exception { + GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters self = new GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters(); + return TeaModel.build(map, self); + } + + public GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters setApiKeyName(String apiKeyName) { + this.apiKeyName = apiKeyName; + return this; + } + public String getApiKeyName() { + return this.apiKeyName; + } + + public GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters setApiKeyValue(String apiKeyValue) { + this.apiKeyValue = apiKeyValue; + return this; + } + public String getApiKeyValue() { + return this.apiKeyValue; + } + + } + + public static class GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters extends TeaModel { + /** + *

The password for basic authentication.

+ * + * example: + *

admin

+ */ + @NameInMap("password") + public String password; + + /** + *

The username for basic authentication.

+ * + * example: + *

admin

+ */ + @NameInMap("username") + public String username; + + public static GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters build(java.util.Map map) throws Exception { + GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters self = new GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters(); + return TeaModel.build(map, self); + } + + public GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters setPassword(String password) { + this.password = password; + return this; + } + public String getPassword() { + return this.password; + } + + public GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters setUsername(String username) { + this.username = username; + return this; + } + public String getUsername() { + return this.username; + } + + } + + public static class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters extends TeaModel { + /** + *

The client ID.

+ * + * example: + *

ClientID

+ */ + @NameInMap("clientID") + public String clientID; + + /** + *

The client key secret of the application.

+ * + * example: + *

ClientSecret

+ */ + @NameInMap("clientSecret") + public String clientSecret; + + public static GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters build(java.util.Map map) throws Exception { + GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters self = new GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters(); + return TeaModel.build(map, self); + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters setClientID(String clientID) { + this.clientID = clientID; + return this; + } + public String getClientID() { + return this.clientID; + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters setClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + public String getClientSecret() { + return this.clientSecret; + } + + } + + public static class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters extends TeaModel { + /** + *

Indicates whether authentication is enabled.

+ * + * example: + *

false

+ */ + @NameInMap("isValueSecret") + public String isValueSecret; + + /** + *

The key in the request body.

+ * + * example: + *

name

+ */ + @NameInMap("key") + public String key; + + /** + *

The value of the key in the request body.

+ * + * example: + *

demo

+ */ + @NameInMap("value") + public String value; + + public static GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters build(java.util.Map map) throws Exception { + GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters self = new GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters(); + return TeaModel.build(map, self); + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters setIsValueSecret(String isValueSecret) { + this.isValueSecret = isValueSecret; + return this; + } + public String getIsValueSecret() { + return this.isValueSecret; + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters setKey(String key) { + this.key = key; + return this; + } + public String getKey() { + return this.key; + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters setValue(String value) { + this.value = value; + return this; + } + public String getValue() { + return this.value; + } + + } + + public static class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters extends TeaModel { + /** + *

Indicates whether authentication is enabled.

+ * + * example: + *

false

+ */ + @NameInMap("isValueSecret") + public String isValueSecret; + + /** + *

The key in the request header.

+ * + * example: + *

name

+ */ + @NameInMap("key") + public String key; + + /** + *

The value of the key in the request header.

+ * + * example: + *

demo

+ */ + @NameInMap("value") + public String value; + + public static GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters build(java.util.Map map) throws Exception { + GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters self = new GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters(); + return TeaModel.build(map, self); + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters setIsValueSecret(String isValueSecret) { + this.isValueSecret = isValueSecret; + return this; + } + public String getIsValueSecret() { + return this.isValueSecret; + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters setKey(String key) { + this.key = key; + return this; + } + public String getKey() { + return this.key; + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters setValue(String value) { + this.value = value; + return this; + } + public String getValue() { + return this.value; + } + + } + + public static class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters extends TeaModel { + /** + *

Indicates whether authentication is enabled.

+ * + * example: + *

false

+ */ + @NameInMap("isValueSecret") + public String isValueSecret; + + /** + *

The key in the request path.

+ * + * example: + *

name

+ */ + @NameInMap("key") + public String key; + + /** + *

The value of the key in the request path.

+ * + * example: + *

demo

+ */ + @NameInMap("value") + public String value; + + public static GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters build(java.util.Map map) throws Exception { + GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters self = new GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters(); + return TeaModel.build(map, self); + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters setIsValueSecret(String isValueSecret) { + this.isValueSecret = isValueSecret; + return this; + } + public String getIsValueSecret() { + return this.isValueSecret; + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters setKey(String key) { + this.key = key; + return this; + } + public String getKey() { + return this.key; + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters setValue(String value) { + this.value = value; + return this; + } + public String getValue() { + return this.value; + } + + } + + public static class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters extends TeaModel { + /** + *

The parameters that are configured for the request.

+ */ + @NameInMap("bodyParameters") + public java.util.List bodyParameters; + + /** + *

The parameters that are configured for the request header.

+ */ + @NameInMap("headerParameters") + public java.util.List headerParameters; + + /** + *

The parameters that are configured for the request path.

+ */ + @NameInMap("queryStringParameters") + public java.util.List queryStringParameters; + + public static GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters build(java.util.Map map) throws Exception { + GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters self = new GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters(); + return TeaModel.build(map, self); + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters setBodyParameters(java.util.List bodyParameters) { + this.bodyParameters = bodyParameters; + return this; + } + public java.util.List getBodyParameters() { + return this.bodyParameters; + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters setHeaderParameters(java.util.List headerParameters) { + this.headerParameters = headerParameters; + return this; + } + public java.util.List getHeaderParameters() { + return this.headerParameters; + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters setQueryStringParameters(java.util.List queryStringParameters) { + this.queryStringParameters = queryStringParameters; + return this; + } + public java.util.List getQueryStringParameters() { + return this.queryStringParameters; + } + + } + + public static class GetConnectionResponseBodyConnectionsAuthParametersOauthParameters extends TeaModel { + /** + *

The endpoint that is used to obtain the OAuth token.

+ * + * example: + *

http://localhost:8080/oauth/token

+ */ + @NameInMap("authorizationEndpoint") + public String authorizationEndpoint; + + /** + *

The parameters that are configured for the client.

+ */ + @NameInMap("clientParameters") + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters clientParameters; + + /** + *

The HTTP request method. Valid values:

+ *
        - GET
+         * 
+         *         - POST
+         * 
+         *         - HEAD
+         * 
+ * + * example: + *

POST

+ */ + @NameInMap("httpMethod") + public String httpMethod; + + /** + *

The request parameters for OAuth authentication.

+ */ + @NameInMap("oauthHttpParameters") + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters oauthHttpParameters; + + public static GetConnectionResponseBodyConnectionsAuthParametersOauthParameters build(java.util.Map map) throws Exception { + GetConnectionResponseBodyConnectionsAuthParametersOauthParameters self = new GetConnectionResponseBodyConnectionsAuthParametersOauthParameters(); + return TeaModel.build(map, self); + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParameters setAuthorizationEndpoint(String authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + public String getAuthorizationEndpoint() { + return this.authorizationEndpoint; + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParameters setClientParameters(GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters clientParameters) { + this.clientParameters = clientParameters; + return this; + } + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters getClientParameters() { + return this.clientParameters; + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParameters setHttpMethod(String httpMethod) { + this.httpMethod = httpMethod; + return this; + } + public String getHttpMethod() { + return this.httpMethod; + } + + public GetConnectionResponseBodyConnectionsAuthParametersOauthParameters setOauthHttpParameters(GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters oauthHttpParameters) { + this.oauthHttpParameters = oauthHttpParameters; + return this; + } + public GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters getOauthHttpParameters() { + return this.oauthHttpParameters; + } + + } + + public static class GetConnectionResponseBodyConnectionsAuthParameters extends TeaModel { + /** + *

The parameters that are configured for API key authentication.

+ */ + @NameInMap("apiKeyAuthParameters") + public GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters apiKeyAuthParameters; + + /** + *

The authentication type. Valid values:

+ *
      - BASIC_AUTH: basic authentication.
+         * 
+         * 
+         *       - API_KEY_AUTH: API key authentication.
+         * 
+         * 
+         *       - OAUTH_AUTH: OAuth authentication.
+         * 
+ * + * example: + *

BASIC_AUTH

+ */ + @NameInMap("authorizationType") + public String authorizationType; + + /** + *

The parameters that are configured for basic authentication.

+ */ + @NameInMap("basicAuthParameters") + public GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters basicAuthParameters; + + /** + *

The parameters that are configured for OAuth authentication.

+ */ + @NameInMap("oauthParameters") + public GetConnectionResponseBodyConnectionsAuthParametersOauthParameters oauthParameters; + + public static GetConnectionResponseBodyConnectionsAuthParameters build(java.util.Map map) throws Exception { + GetConnectionResponseBodyConnectionsAuthParameters self = new GetConnectionResponseBodyConnectionsAuthParameters(); + return TeaModel.build(map, self); + } + + public GetConnectionResponseBodyConnectionsAuthParameters setApiKeyAuthParameters(GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters apiKeyAuthParameters) { + this.apiKeyAuthParameters = apiKeyAuthParameters; + return this; + } + public GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters getApiKeyAuthParameters() { + return this.apiKeyAuthParameters; + } + + public GetConnectionResponseBodyConnectionsAuthParameters setAuthorizationType(String authorizationType) { + this.authorizationType = authorizationType; + return this; + } + public String getAuthorizationType() { + return this.authorizationType; + } + + public GetConnectionResponseBodyConnectionsAuthParameters setBasicAuthParameters(GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters basicAuthParameters) { + this.basicAuthParameters = basicAuthParameters; + return this; + } + public GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters getBasicAuthParameters() { + return this.basicAuthParameters; + } + + public GetConnectionResponseBodyConnectionsAuthParameters setOauthParameters(GetConnectionResponseBodyConnectionsAuthParametersOauthParameters oauthParameters) { + this.oauthParameters = oauthParameters; + return this; + } + public GetConnectionResponseBodyConnectionsAuthParametersOauthParameters getOauthParameters() { + return this.oauthParameters; + } + + } + + public static class GetConnectionResponseBodyConnectionsNetworkParameters extends TeaModel { + /** + *

The network type. Valid values:PublicNetwork and PrivateNetwork.

+ * + * example: + *

PublicNetwork

+ */ + @NameInMap("networkType") + public String networkType; + + /** + *

The security group ID.

+ * + * example: + *

eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb

+ */ + @NameInMap("securityGroupId") + public String securityGroupId; + + /** + *

The virtual private cloud (VPC) ID.

+ * + * example: + *

eb-test/vpc-bp1symadadwnwgmqud

+ */ + @NameInMap("vpcId") + public String vpcId; + + /** + *

The vSwitch ID.

+ * + * example: + *

vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c

+ */ + @NameInMap("vswitcheId") + public String vswitcheId; + + public static GetConnectionResponseBodyConnectionsNetworkParameters build(java.util.Map map) throws Exception { + GetConnectionResponseBodyConnectionsNetworkParameters self = new GetConnectionResponseBodyConnectionsNetworkParameters(); + return TeaModel.build(map, self); + } + + public GetConnectionResponseBodyConnectionsNetworkParameters setNetworkType(String networkType) { + this.networkType = networkType; + return this; + } + public String getNetworkType() { + return this.networkType; + } + + public GetConnectionResponseBodyConnectionsNetworkParameters setSecurityGroupId(String securityGroupId) { + this.securityGroupId = securityGroupId; + return this; + } + public String getSecurityGroupId() { + return this.securityGroupId; + } + + public GetConnectionResponseBodyConnectionsNetworkParameters setVpcId(String vpcId) { + this.vpcId = vpcId; + return this; + } + public String getVpcId() { + return this.vpcId; + } + + public GetConnectionResponseBodyConnectionsNetworkParameters setVswitcheId(String vswitcheId) { + this.vswitcheId = vswitcheId; + return this; + } + public String getVswitcheId() { + return this.vswitcheId; + } + + } + + public static class GetConnectionResponseBodyConnections extends TeaModel { + /** + *

The parameters that are configured for authentication.

+ */ + @NameInMap("authParameters") + public GetConnectionResponseBodyConnectionsAuthParameters authParameters; + + /** + *

The connection name.

+ * + * example: + *

connection-name

+ */ + @NameInMap("connectionName") + public String connectionName; + + /** + *

The connection description.

+ * + * example: + *

The description of the connection.

+ */ + @NameInMap("description") + public String description; + + /** + *

The time when the connection was created.

+ * + * example: + *

1592838994234

+ */ + @NameInMap("gmtCreate") + public Long gmtCreate; + + /** + *

The connection ID.

+ * + * example: + *

1141093

+ */ + @NameInMap("id") + public Integer id; + + @NameInMap("networkParameters") + public GetConnectionResponseBodyConnectionsNetworkParameters networkParameters; + + public static GetConnectionResponseBodyConnections build(java.util.Map map) throws Exception { + GetConnectionResponseBodyConnections self = new GetConnectionResponseBodyConnections(); + return TeaModel.build(map, self); + } + + public GetConnectionResponseBodyConnections setAuthParameters(GetConnectionResponseBodyConnectionsAuthParameters authParameters) { + this.authParameters = authParameters; + return this; + } + public GetConnectionResponseBodyConnectionsAuthParameters getAuthParameters() { + return this.authParameters; + } + + public GetConnectionResponseBodyConnections setConnectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + public String getConnectionName() { + return this.connectionName; + } + + public GetConnectionResponseBodyConnections setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public GetConnectionResponseBodyConnections setGmtCreate(Long gmtCreate) { + this.gmtCreate = gmtCreate; + return this; + } + public Long getGmtCreate() { + return this.gmtCreate; + } + + public GetConnectionResponseBodyConnections setId(Integer id) { + this.id = id; + return this; + } + public Integer getId() { + return this.id; + } + + public GetConnectionResponseBodyConnections setNetworkParameters(GetConnectionResponseBodyConnectionsNetworkParameters networkParameters) { + this.networkParameters = networkParameters; + return this; + } + public GetConnectionResponseBodyConnectionsNetworkParameters getNetworkParameters() { + return this.networkParameters; + } + + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventBusRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventBusRequest.java new file mode 100644 index 00000000..7ac9d719 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventBusRequest.java @@ -0,0 +1,29 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class GetEventBusRequest extends TeaModel { + /** + *

The name of the event bus. This parameter is required.

+ * + * example: + *

MyEventBus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + public static GetEventBusRequest build(java.util.Map map) throws Exception { + GetEventBusRequest self = new GetEventBusRequest(); + return TeaModel.build(map, self); + } + + public GetEventBusRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventBusResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventBusResponse.java new file mode 100644 index 00000000..0fe40fc5 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventBusResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class GetEventBusResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public GetEventBusResponseBody body; + + public static GetEventBusResponse build(java.util.Map map) throws Exception { + GetEventBusResponse self = new GetEventBusResponse(); + return TeaModel.build(map, self); + } + + public GetEventBusResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public GetEventBusResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public GetEventBusResponse setBody(GetEventBusResponseBody body) { + this.body = body; + return this; + } + public GetEventBusResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventBusResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventBusResponseBody.java new file mode 100644 index 00000000..3a75d0ce --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventBusResponseBody.java @@ -0,0 +1,114 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class GetEventBusResponseBody extends TeaModel { + /** + *

The response code. The value Success indicates that the request is successful.

+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The timestamp that indicates when the event bus was created.

+ * + * example: + *

1641781825000

+ */ + @NameInMap("createTimestamp") + public Long createTimestamp; + + /** + *

The description of the event bus.

+ * + * example: + *

demo

+ */ + @NameInMap("description") + public String description; + + /** + *

The name of the event bus.

+ * + * example: + *

MyEventBus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The error message that is returned if the request failed.

+ * + * example: + *

EventBusNotExist

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

d5bfc188-4452-4ba7-b73a-a9005e522439

+ */ + @NameInMap("requestId") + public String requestId; + + public static GetEventBusResponseBody build(java.util.Map map) throws Exception { + GetEventBusResponseBody self = new GetEventBusResponseBody(); + return TeaModel.build(map, self); + } + + public GetEventBusResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public GetEventBusResponseBody setCreateTimestamp(Long createTimestamp) { + this.createTimestamp = createTimestamp; + return this; + } + public Long getCreateTimestamp() { + return this.createTimestamp; + } + + public GetEventBusResponseBody setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public GetEventBusResponseBody setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public GetEventBusResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public GetEventBusResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventRuleRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventRuleRequest.java new file mode 100644 index 00000000..a2b4e9f8 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventRuleRequest.java @@ -0,0 +1,48 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class GetEventRuleRequest extends TeaModel { + /** + *

The name of the event bus with which the event source is associated. + * This parameter is required.

+ * + * example: + *

my-event-bus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event rule. + * This parameter is required.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventRuleName") + public String eventRuleName; + + public static GetEventRuleRequest build(java.util.Map map) throws Exception { + GetEventRuleRequest self = new GetEventRuleRequest(); + return TeaModel.build(map, self); + } + + public GetEventRuleRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public GetEventRuleRequest setEventRuleName(String eventRuleName) { + this.eventRuleName = eventRuleName; + return this; + } + public String getEventRuleName() { + return this.eventRuleName; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventRuleResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventRuleResponse.java new file mode 100644 index 00000000..3c40b12a --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventRuleResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class GetEventRuleResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public GetEventRuleResponseBody body; + + public static GetEventRuleResponse build(java.util.Map map) throws Exception { + GetEventRuleResponse self = new GetEventRuleResponse(); + return TeaModel.build(map, self); + } + + public GetEventRuleResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public GetEventRuleResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public GetEventRuleResponse setBody(GetEventRuleResponseBody body) { + this.body = body; + return this; + } + public GetEventRuleResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventRuleResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventRuleResponseBody.java new file mode 100644 index 00000000..f953a4ad --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventRuleResponseBody.java @@ -0,0 +1,347 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class GetEventRuleResponseBody extends TeaModel { + /** + *

The returned response code. Valid values:

+ *
*   Success: The request is successful.
+     * 
+     * *   Other codes: The request failed. For more information about error codes, see Error codes.
+     * 
+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The name of the event bus with which the event source is associated. + * This parameter is required.

+ * + * example: + *

my-event-bus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event rule. + * This parameter is required.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventRuleName") + public String eventRuleName; + + @NameInMap("description") + public String description; + + /** + *

The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field.

+ *
You can specify up to five expressions in the map data structure in each field.
+     * 
+ * + * example: + *

{"source": [{"prefix": "acs."}],"type": [{"prefix":"oss:ObjectReplication"}],"subject":[{"prefix":"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/", "suffix":".txt"}]}

+ */ + @NameInMap("filterPattern") + public String filterPattern; + + /** + *

The status of the event rule. Valid values: ENABLE (default): The event rule is enabled. DISABLE: The event rule is disabled.

+ * + * example: + *

ENABLE

+ */ + @NameInMap("status") + public String status; + + @NameInMap("gmtCreate") + public String gmtCreate; + + @NameInMap("gmtModify") + public String gmtModify; + + @NameInMap("eventTargets") + public java.util.List eventTargets; + + /** + *

The returned error message.

+ * + * example: + *

Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

2922208e-e1c6-43ee-bfd1-aca50263bc8a

+ */ + @NameInMap("requestId") + public String requestId; + + public static GetEventRuleResponseBody build(java.util.Map map) throws Exception { + GetEventRuleResponseBody self = new GetEventRuleResponseBody(); + return TeaModel.build(map, self); + } + + public GetEventRuleResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public GetEventRuleResponseBody setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public GetEventRuleResponseBody setEventRuleName(String eventRuleName) { + this.eventRuleName = eventRuleName; + return this; + } + public String getEventRuleName() { + return this.eventRuleName; + } + + public GetEventRuleResponseBody setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public GetEventRuleResponseBody setFilterPattern(String filterPattern) { + this.filterPattern = filterPattern; + return this; + } + public String getFilterPattern() { + return this.filterPattern; + } + + public GetEventRuleResponseBody setStatus(String status) { + this.status = status; + return this; + } + public String getStatus() { + return this.status; + } + + public GetEventRuleResponseBody setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + return this; + } + public String getGmtCreate() { + return this.gmtCreate; + } + + public GetEventRuleResponseBody setGmtModify(String gmtModify) { + this.gmtModify = gmtModify; + return this; + } + public String getGmtModify() { + return this.gmtModify; + } + + public GetEventRuleResponseBody setEventTargets(java.util.List eventTargets) { + this.eventTargets = eventTargets; + return this; + } + public java.util.List getEventTargets() { + return this.eventTargets; + } + + public GetEventRuleResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public GetEventRuleResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + + public static class GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy extends TeaModel { + @NameInMap("pushRetryStrategy") + public String pushRetryStrategy; + + @NameInMap("maximumEventAgeInSeconds") + public Integer maximumEventAgeInSeconds; + + @NameInMap("maximumRetryAttempts") + public Integer maximumRetryAttempts; + + public static GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy build(java.util.Map map) throws Exception { + GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy self = new GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy(); + return TeaModel.build(map, self); + } + + public GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy setPushRetryStrategy(String pushRetryStrategy) { + this.pushRetryStrategy = pushRetryStrategy; + return this; + } + public String getPushRetryStrategy() { + return this.pushRetryStrategy; + } + + public GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy setMaximumEventAgeInSeconds(Integer maximumEventAgeInSeconds) { + this.maximumEventAgeInSeconds = maximumEventAgeInSeconds; + return this; + } + public Integer getMaximumEventAgeInSeconds() { + return this.maximumEventAgeInSeconds; + } + + public GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy setMaximumRetryAttempts(Integer maximumRetryAttempts) { + this.maximumRetryAttempts = maximumRetryAttempts; + return this; + } + public Integer getMaximumRetryAttempts() { + return this.maximumRetryAttempts; + } + + } + + public static class GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue extends TeaModel { + @NameInMap("type") + public String type; + + @NameInMap("config") + public java.util.Map config; + + public static GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue build(java.util.Map map) throws Exception { + GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue self = new GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue(); + return TeaModel.build(map, self); + } + + public GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue setType(String type) { + this.type = type; + return this; + } + public String getType() { + return this.type; + } + + public GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue setConfig(java.util.Map config) { + this.config = config; + return this; + } + public java.util.Map getConfig() { + return this.config; + } + + } + + public static class GetEventRuleResponseBodyEventTargetsRunOptions extends TeaModel { + @NameInMap("errorsTolerance") + public String errorsTolerance; + + @NameInMap("retryStrategy") + public GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy retryStrategy; + + @NameInMap("deadLetterQueue") + public GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue deadLetterQueue; + + public static GetEventRuleResponseBodyEventTargetsRunOptions build(java.util.Map map) throws Exception { + GetEventRuleResponseBodyEventTargetsRunOptions self = new GetEventRuleResponseBodyEventTargetsRunOptions(); + return TeaModel.build(map, self); + } + + public GetEventRuleResponseBodyEventTargetsRunOptions setErrorsTolerance(String errorsTolerance) { + this.errorsTolerance = errorsTolerance; + return this; + } + public String getErrorsTolerance() { + return this.errorsTolerance; + } + + public GetEventRuleResponseBodyEventTargetsRunOptions setRetryStrategy(GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy retryStrategy) { + this.retryStrategy = retryStrategy; + return this; + } + public GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy getRetryStrategy() { + return this.retryStrategy; + } + + public GetEventRuleResponseBodyEventTargetsRunOptions setDeadLetterQueue(GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue deadLetterQueue) { + this.deadLetterQueue = deadLetterQueue; + return this; + } + public GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue getDeadLetterQueue() { + return this.deadLetterQueue; + } + + } + + public static class GetEventRuleResponseBodyEventTargets extends TeaModel { + @NameInMap("eventTargetName") + public String eventTargetName; + + @NameInMap("className") + public String className; + + @NameInMap("config") + public java.util.Map config; + + @NameInMap("runOptions") + public GetEventRuleResponseBodyEventTargetsRunOptions runOptions; + + public static GetEventRuleResponseBodyEventTargets build(java.util.Map map) throws Exception { + GetEventRuleResponseBodyEventTargets self = new GetEventRuleResponseBodyEventTargets(); + return TeaModel.build(map, self); + } + + public GetEventRuleResponseBodyEventTargets setEventTargetName(String eventTargetName) { + this.eventTargetName = eventTargetName; + return this; + } + public String getEventTargetName() { + return this.eventTargetName; + } + + public GetEventRuleResponseBodyEventTargets setClassName(String className) { + this.className = className; + return this; + } + public String getClassName() { + return this.className; + } + + public GetEventRuleResponseBodyEventTargets setConfig(java.util.Map config) { + this.config = config; + return this; + } + public java.util.Map getConfig() { + return this.config; + } + + public GetEventRuleResponseBodyEventTargets setRunOptions(GetEventRuleResponseBodyEventTargetsRunOptions runOptions) { + this.runOptions = runOptions; + return this; + } + public GetEventRuleResponseBodyEventTargetsRunOptions getRunOptions() { + return this.runOptions; + } + + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventSourceRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventSourceRequest.java new file mode 100644 index 00000000..310634f3 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventSourceRequest.java @@ -0,0 +1,41 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class GetEventSourceRequest extends TeaModel { + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event source. + * This parameter is required.

+ * + * example: + *

myrabbitmq.source

+ */ + @NameInMap("eventSourceName") + public String eventSourceName; + + public static GetEventSourceRequest build(java.util.Map map) throws Exception { + GetEventSourceRequest self = new GetEventSourceRequest(); + return TeaModel.build(map, self); + } + + public GetEventSourceRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public GetEventSourceRequest setEventSourceName(String eventSourceName) { + this.eventSourceName = eventSourceName; + return this; + } + public String getEventSourceName() { + return this.eventSourceName; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventSourceResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventSourceResponse.java new file mode 100644 index 00000000..6427aafa --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventSourceResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class GetEventSourceResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public GetEventSourceResponseBody body; + + public static GetEventSourceResponse build(java.util.Map map) throws Exception { + GetEventSourceResponse self = new GetEventSourceResponse(); + return TeaModel.build(map, self); + } + + public GetEventSourceResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public GetEventSourceResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public GetEventSourceResponse setBody(GetEventSourceResponseBody body) { + this.body = body; + return this; + } + public GetEventSourceResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventSourceResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventSourceResponseBody.java new file mode 100644 index 00000000..e93942b7 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/GetEventSourceResponseBody.java @@ -0,0 +1,84 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class GetEventSourceResponseBody extends TeaModel { + /** + *

The name of the event bus with which the event source is associated. + * This parameter is required.

+ * + * example: + *

my-event-bus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event source. + * This parameter is required.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventSourceName") + public String eventSourceName; + + /** + *

The description of the event source.

+ */ + @NameInMap("description") + public String description; + + @NameInMap("className") + public String className; + + @NameInMap("config") + public java.util.Map config; + + public static GetEventSourceResponseBody build(java.util.Map map) throws Exception { + GetEventSourceResponseBody self = new GetEventSourceResponseBody(); + return TeaModel.build(map, self); + } + + public GetEventSourceResponseBody setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public GetEventSourceResponseBody setEventSourceName(String eventSourceName) { + this.eventSourceName = eventSourceName; + return this; + } + public String getEventSourceName() { + return this.eventSourceName; + } + + public GetEventSourceResponseBody setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public GetEventSourceResponseBody setClassName(String className) { + this.className = className; + return this; + } + public String getClassName() { + return this.className; + } + + public GetEventSourceResponseBody setConfig(java.util.Map config) { + this.config = config; + return this; + } + public java.util.Map getConfig() { + return this.config; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListApiDestinationsRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListApiDestinationsRequest.java new file mode 100644 index 00000000..f95810e2 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListApiDestinationsRequest.java @@ -0,0 +1,84 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListApiDestinationsRequest extends TeaModel { + /** + *

The prefix of the API destination name.

+ * + * example: + *

api-demo

+ */ + @NameInMap("apiDestinationNamePrefix") + public String apiDestinationNamePrefix; + + /** + *

The connection name.

+ * + * example: + *

connection-name

+ */ + @NameInMap("connectionName") + public String connectionName; + + /** + *

The maximum number of entries to be returned in a call. You can use this parameter and NextToken to implement paging.

+ *
*   Default value: 10.
+     * 
+ * + * example: + *

10

+ */ + @NameInMap("maxResults") + public Integer maxResults; + + /** + *

If you set Limit and excess return values exist, this parameter is returned.

+ *
*   Default value: 0.
+     * 
+ * + * example: + *

0

+ */ + @NameInMap("nextToken") + public String nextToken; + + public static ListApiDestinationsRequest build(java.util.Map map) throws Exception { + ListApiDestinationsRequest self = new ListApiDestinationsRequest(); + return TeaModel.build(map, self); + } + + public ListApiDestinationsRequest setApiDestinationNamePrefix(String apiDestinationNamePrefix) { + this.apiDestinationNamePrefix = apiDestinationNamePrefix; + return this; + } + public String getApiDestinationNamePrefix() { + return this.apiDestinationNamePrefix; + } + + public ListApiDestinationsRequest setConnectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + public String getConnectionName() { + return this.connectionName; + } + + public ListApiDestinationsRequest setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + public Integer getMaxResults() { + return this.maxResults; + } + + public ListApiDestinationsRequest setNextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + public String getNextToken() { + return this.nextToken; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListApiDestinationsResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListApiDestinationsResponse.java new file mode 100644 index 00000000..36fb8187 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListApiDestinationsResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListApiDestinationsResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public ListApiDestinationsResponseBody body; + + public static ListApiDestinationsResponse build(java.util.Map map) throws Exception { + ListApiDestinationsResponse self = new ListApiDestinationsResponse(); + return TeaModel.build(map, self); + } + + public ListApiDestinationsResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public ListApiDestinationsResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public ListApiDestinationsResponse setBody(ListApiDestinationsResponseBody body) { + this.body = body; + return this; + } + public ListApiDestinationsResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListApiDestinationsResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListApiDestinationsResponseBody.java new file mode 100644 index 00000000..4681b236 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListApiDestinationsResponseBody.java @@ -0,0 +1,368 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListApiDestinationsResponseBody extends TeaModel { + /** + *

The returned response code. The value Success indicates that the request is successful.

+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The API destinations.

+ */ + @NameInMap("apiDestinations") + public java.util.List apiDestinations; + + /** + *

The maximum number of entries returned per page.

+ * + * example: + *

10

+ */ + @NameInMap("maxResults") + public Integer maxResults; + + /** + *

If excess return values exist, this parameter is returned.

+ * + * example: + *

1

+ */ + @NameInMap("nextToken") + public String nextToken; + + /** + *

The total number of entries returned.

+ * + * example: + *

2

+ */ + @NameInMap("total") + public Integer total; + + /** + *

The returned message. If the request is successful, success is returned. If the request failed, an error code is returned.

+ * + * example: + *

success

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

96D7C0AB-DCE5-5E82-96B8-4725E1706BB1

+ */ + @NameInMap("requestId") + public String requestId; + + public static ListApiDestinationsResponseBody build(java.util.Map map) throws Exception { + ListApiDestinationsResponseBody self = new ListApiDestinationsResponseBody(); + return TeaModel.build(map, self); + } + + public ListApiDestinationsResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public ListApiDestinationsResponseBody setApiDestinations(java.util.List apiDestinations) { + this.apiDestinations = apiDestinations; + return this; + } + public java.util.List getApiDestinations() { + return this.apiDestinations; + } + + public ListApiDestinationsResponseBody setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + public Integer getMaxResults() { + return this.maxResults; + } + + public ListApiDestinationsResponseBody setNextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + public String getNextToken() { + return this.nextToken; + } + + public ListApiDestinationsResponseBody setTotal(Integer total) { + this.total = total; + return this; + } + public Integer getTotal() { + return this.total; + } + + public ListApiDestinationsResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public ListApiDestinationsResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + + public static class ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters extends TeaModel { + @NameInMap("name") + public String name; + + /** + *

The description of the API destination. The description can be up to 255 characters in length.

+ */ + @NameInMap("description") + public String description; + + @NameInMap("type") + public String type; + + @NameInMap("defaultValue") + public String defaultValue; + + @NameInMap("in") + public String in; + + public static ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters build(java.util.Map map) throws Exception { + ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters self = new ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters(); + return TeaModel.build(map, self); + } + + public ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters setName(String name) { + this.name = name; + return this; + } + public String getName() { + return this.name; + } + + public ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters setType(String type) { + this.type = type; + return this; + } + public String getType() { + return this.type; + } + + public ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + return this; + } + public String getDefaultValue() { + return this.defaultValue; + } + + public ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters setIn(String in) { + this.in = in; + return this; + } + public String getIn() { + return this.in; + } + + } + + public static class ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters extends TeaModel { + /** + *

The endpoint of the API destination.

+ * + * example: + *

http://127.0.0.1:8001/api

+ */ + @NameInMap("endpoint") + public String endpoint; + + /** + *

The HTTP request method. Valid values:

+ *
      - POST
+         * 
+         *       - GET
+         * 
+         *       - DELETE
+         * 
+         *       - PUT
+         * 
+         *       - HEAD
+         * 
+         *       - TRACE
+         * 
+         *       - PATCH
+         * 
+ * + * example: + *

POST

+ */ + @NameInMap("method") + public String method; + + /** + *

TODO

+ */ + @NameInMap("apiParameters") + public java.util.List apiParameters; + + public static ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters build(java.util.Map map) throws Exception { + ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters self = new ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters(); + return TeaModel.build(map, self); + } + + public ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters setEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + public String getEndpoint() { + return this.endpoint; + } + + public ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters setMethod(String method) { + this.method = method; + return this; + } + public String getMethod() { + return this.method; + } + + public ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters setApiParameters(java.util.List apiParameters) { + this.apiParameters = apiParameters; + return this; + } + public java.util.List getApiParameters() { + return this.apiParameters; + } + + } + + public static class ListApiDestinationsResponseBodyApiDestinations extends TeaModel { + /** + *

The name of the API destination.

+ * + * example: + *

api-destination-2

+ */ + @NameInMap("apiDestinationName") + public String apiDestinationName; + + /** + *

The connection name.

+ * + * example: + *

connection-name

+ */ + @NameInMap("connectionName") + public String connectionName; + + /** + *

The description of the connection.

+ * + * example: + *

demo

+ */ + @NameInMap("description") + public String description; + + /** + *

The time when the API destination was created.

+ * + * example: + *

1665223213000

+ */ + @NameInMap("gmtCreate") + public Long gmtCreate; + + /** + *

The request parameters that are configured for the API destination.

+ */ + @NameInMap("httpApiParameters") + public ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters httpApiParameters; + + /** + *

TODO

+ */ + @NameInMap("invocationRateLimitPerSecond") + public Integer invocationRateLimitPerSecond; + + public static ListApiDestinationsResponseBodyApiDestinations build(java.util.Map map) throws Exception { + ListApiDestinationsResponseBodyApiDestinations self = new ListApiDestinationsResponseBodyApiDestinations(); + return TeaModel.build(map, self); + } + + public ListApiDestinationsResponseBodyApiDestinations setApiDestinationName(String apiDestinationName) { + this.apiDestinationName = apiDestinationName; + return this; + } + public String getApiDestinationName() { + return this.apiDestinationName; + } + + public ListApiDestinationsResponseBodyApiDestinations setConnectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + public String getConnectionName() { + return this.connectionName; + } + + public ListApiDestinationsResponseBodyApiDestinations setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public ListApiDestinationsResponseBodyApiDestinations setGmtCreate(Long gmtCreate) { + this.gmtCreate = gmtCreate; + return this; + } + public Long getGmtCreate() { + return this.gmtCreate; + } + + public ListApiDestinationsResponseBodyApiDestinations setHttpApiParameters(ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters httpApiParameters) { + this.httpApiParameters = httpApiParameters; + return this; + } + public ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters getHttpApiParameters() { + return this.httpApiParameters; + } + + public ListApiDestinationsResponseBodyApiDestinations setInvocationRateLimitPerSecond(Integer invocationRateLimitPerSecond) { + this.invocationRateLimitPerSecond = invocationRateLimitPerSecond; + return this; + } + public Integer getInvocationRateLimitPerSecond() { + return this.invocationRateLimitPerSecond; + } + + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListConnectionsRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListConnectionsRequest.java new file mode 100644 index 00000000..2f37845f --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListConnectionsRequest.java @@ -0,0 +1,67 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListConnectionsRequest extends TeaModel { + /** + *

The key word that you specify to query connections. Connections can be queried by prefixes.

+ * + * example: + *

connection-name

+ */ + @NameInMap("connectionNamePrefix") + public String connectionNamePrefix; + + /** + *

The maximum number of entries to be returned in a single call. You can use this parameter and the NextToken parameter to implement paging.

+ *
*   Default value: 10.
+     * 
+ * + * example: + *

10

+ */ + @NameInMap("maxResults") + public Integer maxResults; + + /** + *

If you set the Limit parameter and excess return values exist, this parameter is returned.

+ *
*   Default value: 0.
+     * 
+ * + * example: + *

0

+ */ + @NameInMap("nextToken") + public String nextToken; + + public static ListConnectionsRequest build(java.util.Map map) throws Exception { + ListConnectionsRequest self = new ListConnectionsRequest(); + return TeaModel.build(map, self); + } + + public ListConnectionsRequest setConnectionNamePrefix(String connectionNamePrefix) { + this.connectionNamePrefix = connectionNamePrefix; + return this; + } + public String getConnectionNamePrefix() { + return this.connectionNamePrefix; + } + + public ListConnectionsRequest setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + public Integer getMaxResults() { + return this.maxResults; + } + + public ListConnectionsRequest setNextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + public String getNextToken() { + return this.nextToken; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListConnectionsResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListConnectionsResponse.java new file mode 100644 index 00000000..1517c922 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListConnectionsResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListConnectionsResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public ListConnectionsResponseBody body; + + public static ListConnectionsResponse build(java.util.Map map) throws Exception { + ListConnectionsResponse self = new ListConnectionsResponse(); + return TeaModel.build(map, self); + } + + public ListConnectionsResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public ListConnectionsResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public ListConnectionsResponse setBody(ListConnectionsResponseBody body) { + this.body = body; + return this; + } + public ListConnectionsResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListConnectionsResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListConnectionsResponseBody.java new file mode 100644 index 00000000..9f7a653d --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListConnectionsResponseBody.java @@ -0,0 +1,809 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListConnectionsResponseBody extends TeaModel { + /** + *

The HTTP status code. The value Success indicates that the request is successful.

+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The value of the key in the request path.

+ */ + @NameInMap("connections") + public java.util.List connections; + + /** + *

The number of entries returned per page.

+ * + * example: + *

10

+ */ + @NameInMap("maxResults") + public Integer maxResults; + + /** + *

If excess return values exist, this parameter is returned.

+ * + * example: + *

0

+ */ + @NameInMap("nextToken") + public String nextToken; + + /** + *

The total number of entries returned.

+ * + * example: + *

1

+ */ + @NameInMap("total") + public Integer total; + + /** + *

The message returned.

+ * + * example: + *

success

+ */ + @NameInMap("message") + public String message; + + /** + *

The ID of the request. This parameter is a common parameter. Each request has a unique ID. You can use the ID to troubleshoot issues.

+ * + * example: + *

E3619976-8714-5D88-BBA2-6983D798A8BB

+ */ + @NameInMap("requestId") + public String requestId; + + public static ListConnectionsResponseBody build(java.util.Map map) throws Exception { + ListConnectionsResponseBody self = new ListConnectionsResponseBody(); + return TeaModel.build(map, self); + } + + public ListConnectionsResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public ListConnectionsResponseBody setConnections(java.util.List connections) { + this.connections = connections; + return this; + } + public java.util.List getConnections() { + return this.connections; + } + + public ListConnectionsResponseBody setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + public Integer getMaxResults() { + return this.maxResults; + } + + public ListConnectionsResponseBody setNextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + public String getNextToken() { + return this.nextToken; + } + + public ListConnectionsResponseBody setTotal(Integer total) { + this.total = total; + return this; + } + public Integer getTotal() { + return this.total; + } + + public ListConnectionsResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public ListConnectionsResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + + public static class ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters extends TeaModel { + /** + *

The API key.

+ * + * example: + *

Token

+ */ + @NameInMap("apiKeyName") + public String apiKeyName; + + /** + *

The value of the API key.

+ * + * example: + *

asdkjnqkwejooa

+ */ + @NameInMap("apiKeyValue") + public String apiKeyValue; + + public static ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters build(java.util.Map map) throws Exception { + ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters self = new ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters(); + return TeaModel.build(map, self); + } + + public ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters setApiKeyName(String apiKeyName) { + this.apiKeyName = apiKeyName; + return this; + } + public String getApiKeyName() { + return this.apiKeyName; + } + + public ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters setApiKeyValue(String apiKeyValue) { + this.apiKeyValue = apiKeyValue; + return this; + } + public String getApiKeyValue() { + return this.apiKeyValue; + } + + } + + public static class ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters extends TeaModel { + /** + *

The password for basic authentication.

+ * + * example: + *

admin

+ */ + @NameInMap("password") + public String password; + + /** + *

The username for basic authentication.

+ * + * example: + *

admin

+ */ + @NameInMap("username") + public String username; + + public static ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters build(java.util.Map map) throws Exception { + ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters self = new ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters(); + return TeaModel.build(map, self); + } + + public ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters setPassword(String password) { + this.password = password; + return this; + } + public String getPassword() { + return this.password; + } + + public ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters setUsername(String username) { + this.username = username; + return this; + } + public String getUsername() { + return this.username; + } + + } + + public static class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters extends TeaModel { + /** + *

The client ID.

+ * + * example: + *

ClientID

+ */ + @NameInMap("clientID") + public String clientID; + + /** + *

The client key secret of the application.

+ * + * example: + *

ClientSecret

+ */ + @NameInMap("clientSecret") + public String clientSecret; + + public static ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters build(java.util.Map map) throws Exception { + ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters self = new ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters(); + return TeaModel.build(map, self); + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters setClientID(String clientID) { + this.clientID = clientID; + return this; + } + public String getClientID() { + return this.clientID; + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters setClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + public String getClientSecret() { + return this.clientSecret; + } + + } + + public static class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters extends TeaModel { + /** + *

Indicates whether authentication is enabled.

+ * + * example: + *

false

+ */ + @NameInMap("isValueSecret") + public String isValueSecret; + + /** + *

The key in the request body.

+ * + * example: + *

name

+ */ + @NameInMap("key") + public String key; + + /** + *

The value of the key in the request body.

+ * + * example: + *

demo

+ */ + @NameInMap("value") + public String value; + + public static ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters build(java.util.Map map) throws Exception { + ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters self = new ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters(); + return TeaModel.build(map, self); + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters setIsValueSecret(String isValueSecret) { + this.isValueSecret = isValueSecret; + return this; + } + public String getIsValueSecret() { + return this.isValueSecret; + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters setKey(String key) { + this.key = key; + return this; + } + public String getKey() { + return this.key; + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters setValue(String value) { + this.value = value; + return this; + } + public String getValue() { + return this.value; + } + + } + + public static class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters extends TeaModel { + /** + *

Indicates whether authentication is enabled.

+ * + * example: + *

false

+ */ + @NameInMap("isValueSecret") + public String isValueSecret; + + /** + *

The key in the request header.

+ * + * example: + *

name

+ */ + @NameInMap("key") + public String key; + + /** + *

The value of the key in the request header.

+ * + * example: + *

demo

+ */ + @NameInMap("value") + public String value; + + public static ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters build(java.util.Map map) throws Exception { + ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters self = new ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters(); + return TeaModel.build(map, self); + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters setIsValueSecret(String isValueSecret) { + this.isValueSecret = isValueSecret; + return this; + } + public String getIsValueSecret() { + return this.isValueSecret; + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters setKey(String key) { + this.key = key; + return this; + } + public String getKey() { + return this.key; + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters setValue(String value) { + this.value = value; + return this; + } + public String getValue() { + return this.value; + } + + } + + public static class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters extends TeaModel { + /** + *

Indicates whether authentication is enabled.

+ * + * example: + *

false

+ */ + @NameInMap("isValueSecret") + public String isValueSecret; + + /** + *

The key in the request path.

+ * + * example: + *

name

+ */ + @NameInMap("key") + public String key; + + /** + *

The value of the key in the request path.

+ * + * example: + *

demo

+ */ + @NameInMap("value") + public String value; + + public static ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters build(java.util.Map map) throws Exception { + ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters self = new ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters(); + return TeaModel.build(map, self); + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters setIsValueSecret(String isValueSecret) { + this.isValueSecret = isValueSecret; + return this; + } + public String getIsValueSecret() { + return this.isValueSecret; + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters setKey(String key) { + this.key = key; + return this; + } + public String getKey() { + return this.key; + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters setValue(String value) { + this.value = value; + return this; + } + public String getValue() { + return this.value; + } + + } + + public static class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters extends TeaModel { + /** + *

The parameters that are configured for the request.

+ */ + @NameInMap("bodyParameters") + public java.util.List bodyParameters; + + /** + *

The parameters that are configured for the request header.

+ */ + @NameInMap("headerParameters") + public java.util.List headerParameters; + + /** + *

The parameters that are configured for the request path.

+ */ + @NameInMap("queryStringParameters") + public java.util.List queryStringParameters; + + public static ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters build(java.util.Map map) throws Exception { + ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters self = new ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters(); + return TeaModel.build(map, self); + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters setBodyParameters(java.util.List bodyParameters) { + this.bodyParameters = bodyParameters; + return this; + } + public java.util.List getBodyParameters() { + return this.bodyParameters; + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters setHeaderParameters(java.util.List headerParameters) { + this.headerParameters = headerParameters; + return this; + } + public java.util.List getHeaderParameters() { + return this.headerParameters; + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters setQueryStringParameters(java.util.List queryStringParameters) { + this.queryStringParameters = queryStringParameters; + return this; + } + public java.util.List getQueryStringParameters() { + return this.queryStringParameters; + } + + } + + public static class ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters extends TeaModel { + /** + *

The endpoint that is used to obtain the OAuth token.

+ * + * example: + *

http://localhost:8080/oauth/token

+ */ + @NameInMap("authorizationEndpoint") + public String authorizationEndpoint; + + /** + *

The parameters that are configured for the client.

+ */ + @NameInMap("clientParameters") + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters clientParameters; + + /** + *

The HTTP request method. Valid values:

+ *
        - GET
+         * 
+         *         - POST
+         * 
+         *         - HEAD
+         * 
+ * + * example: + *

POST

+ */ + @NameInMap("httpMethod") + public String httpMethod; + + /** + *

The request parameters for OAuth authentication.

+ */ + @NameInMap("oauthHttpParameters") + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters oauthHttpParameters; + + public static ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters build(java.util.Map map) throws Exception { + ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters self = new ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters(); + return TeaModel.build(map, self); + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters setAuthorizationEndpoint(String authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + public String getAuthorizationEndpoint() { + return this.authorizationEndpoint; + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters setClientParameters(ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters clientParameters) { + this.clientParameters = clientParameters; + return this; + } + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters getClientParameters() { + return this.clientParameters; + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters setHttpMethod(String httpMethod) { + this.httpMethod = httpMethod; + return this; + } + public String getHttpMethod() { + return this.httpMethod; + } + + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters setOauthHttpParameters(ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters oauthHttpParameters) { + this.oauthHttpParameters = oauthHttpParameters; + return this; + } + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters getOauthHttpParameters() { + return this.oauthHttpParameters; + } + + } + + public static class ListConnectionsResponseBodyConnectionsAuthParameters extends TeaModel { + /** + *

The parameters that are configured for API key authentication.

+ */ + @NameInMap("apiKeyAuthParameters") + public ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters apiKeyAuthParameters; + + /** + *

The authentication type. Valid values:

+ *
      - BASIC_AUTH: basic authentication.
+         * 
+         * 
+         *       - API_KEY_AUTH: API key authentication.
+         * 
+         * 
+         *       - OAUTH_AUTH: OAuth authentication.
+         * 
+ * + * example: + *

BASIC_AUTH

+ */ + @NameInMap("authorizationType") + public String authorizationType; + + /** + *

The parameters that are configured for basic authentication.

+ */ + @NameInMap("basicAuthParameters") + public ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters basicAuthParameters; + + /** + *

The parameters that are configured for OAuth authentication.

+ */ + @NameInMap("oauthParameters") + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters oauthParameters; + + public static ListConnectionsResponseBodyConnectionsAuthParameters build(java.util.Map map) throws Exception { + ListConnectionsResponseBodyConnectionsAuthParameters self = new ListConnectionsResponseBodyConnectionsAuthParameters(); + return TeaModel.build(map, self); + } + + public ListConnectionsResponseBodyConnectionsAuthParameters setApiKeyAuthParameters(ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters apiKeyAuthParameters) { + this.apiKeyAuthParameters = apiKeyAuthParameters; + return this; + } + public ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters getApiKeyAuthParameters() { + return this.apiKeyAuthParameters; + } + + public ListConnectionsResponseBodyConnectionsAuthParameters setAuthorizationType(String authorizationType) { + this.authorizationType = authorizationType; + return this; + } + public String getAuthorizationType() { + return this.authorizationType; + } + + public ListConnectionsResponseBodyConnectionsAuthParameters setBasicAuthParameters(ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters basicAuthParameters) { + this.basicAuthParameters = basicAuthParameters; + return this; + } + public ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters getBasicAuthParameters() { + return this.basicAuthParameters; + } + + public ListConnectionsResponseBodyConnectionsAuthParameters setOauthParameters(ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters oauthParameters) { + this.oauthParameters = oauthParameters; + return this; + } + public ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters getOauthParameters() { + return this.oauthParameters; + } + + } + + public static class ListConnectionsResponseBodyConnectionsNetworkParameters extends TeaModel { + /** + *

The network type. Valid values:PublicNetwork and PrivateNetwork.

+ * + * example: + *

PublicNetwork

+ */ + @NameInMap("networkType") + public String networkType; + + /** + *

The security group ID.

+ * + * example: + *

eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb

+ */ + @NameInMap("securityGroupId") + public String securityGroupId; + + /** + *

The virtual private cloud (VPC) ID.

+ * + * example: + *

eb-test/vpc-bp1symadadwnwgmqud

+ */ + @NameInMap("vpcId") + public String vpcId; + + /** + *

The vSwitch ID.

+ * + * example: + *

vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c

+ */ + @NameInMap("vswitcheId") + public String vswitcheId; + + public static ListConnectionsResponseBodyConnectionsNetworkParameters build(java.util.Map map) throws Exception { + ListConnectionsResponseBodyConnectionsNetworkParameters self = new ListConnectionsResponseBodyConnectionsNetworkParameters(); + return TeaModel.build(map, self); + } + + public ListConnectionsResponseBodyConnectionsNetworkParameters setNetworkType(String networkType) { + this.networkType = networkType; + return this; + } + public String getNetworkType() { + return this.networkType; + } + + public ListConnectionsResponseBodyConnectionsNetworkParameters setSecurityGroupId(String securityGroupId) { + this.securityGroupId = securityGroupId; + return this; + } + public String getSecurityGroupId() { + return this.securityGroupId; + } + + public ListConnectionsResponseBodyConnectionsNetworkParameters setVpcId(String vpcId) { + this.vpcId = vpcId; + return this; + } + public String getVpcId() { + return this.vpcId; + } + + public ListConnectionsResponseBodyConnectionsNetworkParameters setVswitcheId(String vswitcheId) { + this.vswitcheId = vswitcheId; + return this; + } + public String getVswitcheId() { + return this.vswitcheId; + } + + } + + public static class ListConnectionsResponseBodyConnections extends TeaModel { + /** + *

The parameters that are configured for authentication.

+ */ + @NameInMap("authParameters") + public ListConnectionsResponseBodyConnectionsAuthParameters authParameters; + + /** + *

The connection name.

+ * + * example: + *

connection-name

+ */ + @NameInMap("connectionName") + public String connectionName; + + /** + *

The connection description.

+ * + * example: + *

The description of the connection.

+ */ + @NameInMap("description") + public String description; + + /** + *

The time when the connection was created.

+ * + * example: + *

1592838994234

+ */ + @NameInMap("gmtCreate") + public Long gmtCreate; + + /** + *

The connection ID.

+ * + * example: + *

1141093

+ */ + @NameInMap("id") + public Integer id; + + @NameInMap("networkParameters") + public ListConnectionsResponseBodyConnectionsNetworkParameters networkParameters; + + public static ListConnectionsResponseBodyConnections build(java.util.Map map) throws Exception { + ListConnectionsResponseBodyConnections self = new ListConnectionsResponseBodyConnections(); + return TeaModel.build(map, self); + } + + public ListConnectionsResponseBodyConnections setAuthParameters(ListConnectionsResponseBodyConnectionsAuthParameters authParameters) { + this.authParameters = authParameters; + return this; + } + public ListConnectionsResponseBodyConnectionsAuthParameters getAuthParameters() { + return this.authParameters; + } + + public ListConnectionsResponseBodyConnections setConnectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + public String getConnectionName() { + return this.connectionName; + } + + public ListConnectionsResponseBodyConnections setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public ListConnectionsResponseBodyConnections setGmtCreate(Long gmtCreate) { + this.gmtCreate = gmtCreate; + return this; + } + public Long getGmtCreate() { + return this.gmtCreate; + } + + public ListConnectionsResponseBodyConnections setId(Integer id) { + this.id = id; + return this; + } + public Integer getId() { + return this.id; + } + + public ListConnectionsResponseBodyConnections setNetworkParameters(ListConnectionsResponseBodyConnectionsNetworkParameters networkParameters) { + this.networkParameters = networkParameters; + return this; + } + public ListConnectionsResponseBodyConnectionsNetworkParameters getNetworkParameters() { + return this.networkParameters; + } + + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEnumsResponseResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEnumsResponseResponse.java new file mode 100644 index 00000000..0afd2943 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEnumsResponseResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListEnumsResponseResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public UpdateConnectionResponseBody body; + + public static ListEnumsResponseResponse build(java.util.Map map) throws Exception { + ListEnumsResponseResponse self = new ListEnumsResponseResponse(); + return TeaModel.build(map, self); + } + + public ListEnumsResponseResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public ListEnumsResponseResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public ListEnumsResponseResponse setBody(UpdateConnectionResponseBody body) { + this.body = body; + return this; + } + public UpdateConnectionResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEnumsResponseResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEnumsResponseResponseBody.java new file mode 100644 index 00000000..cbdf71dd --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEnumsResponseResponseBody.java @@ -0,0 +1,85 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListEnumsResponseResponseBody extends TeaModel { + @NameInMap("authorizationTypeEnums") + public String authorizationTypeEnums; + + @NameInMap("networkTypeEnums") + public String networkTypeEnums; + + /** + *

The returned response code.

+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The returned message.

+ * + * example: + *

success

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

8346BE8F-40F3-533D-A0B8-1359C31BD5BA

+ */ + @NameInMap("requestId") + public String requestId; + + public static ListEnumsResponseResponseBody build(java.util.Map map) throws Exception { + ListEnumsResponseResponseBody self = new ListEnumsResponseResponseBody(); + return TeaModel.build(map, self); + } + + public ListEnumsResponseResponseBody setAuthorizationTypeEnums(String authorizationTypeEnums) { + this.authorizationTypeEnums = authorizationTypeEnums; + return this; + } + public String getAuthorizationTypeEnums() { + return this.authorizationTypeEnums; + } + + public ListEnumsResponseResponseBody setNetworkTypeEnums(String networkTypeEnums) { + this.networkTypeEnums = networkTypeEnums; + return this; + } + public String getNetworkTypeEnums() { + return this.networkTypeEnums; + } + + public ListEnumsResponseResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public ListEnumsResponseResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public ListEnumsResponseResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventBusesRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventBusesRequest.java new file mode 100644 index 00000000..c655dd46 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventBusesRequest.java @@ -0,0 +1,46 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListEventBusesRequest extends TeaModel { + /** + *

The maximum number of entries to be returned in a call. You can use this parameter and NextToken to implement paging. Note: Up to 100 entries can be returned in a call.

+ * + * example: + *

10

+ */ + @NameInMap("maxResults") + public Integer maxResults; + + /** + *

If you set Limit and excess return values exist, this parameter is returned.

+ * + * example: + *

10

+ */ + @NameInMap("nextToken") + public String nextToken; + + public static ListEventBusesRequest build(java.util.Map map) throws Exception { + ListEventBusesRequest self = new ListEventBusesRequest(); + return TeaModel.build(map, self); + } + + public ListEventBusesRequest setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + public Integer getMaxResults() { + return this.maxResults; + } + + public ListEventBusesRequest setNextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + public String getNextToken() { + return this.nextToken; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventBusesResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventBusesResponse.java new file mode 100644 index 00000000..8262c4b3 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventBusesResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListEventBusesResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public ListEventBusesResponseBody body; + + public static ListEventBusesResponse build(java.util.Map map) throws Exception { + ListEventBusesResponse self = new ListEventBusesResponse(); + return TeaModel.build(map, self); + } + + public ListEventBusesResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public ListEventBusesResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public ListEventBusesResponse setBody(ListEventBusesResponseBody body) { + this.body = body; + return this; + } + public ListEventBusesResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventBusesResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventBusesResponseBody.java new file mode 100644 index 00000000..79dd8f4c --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventBusesResponseBody.java @@ -0,0 +1,170 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListEventBusesResponseBody extends TeaModel { + /** + *

The returned HTTP status code. The HTTP status code 200 indicates that the request is successful.

+ * + * example: + *

200

+ */ + @NameInMap("code") + public String code; + + /** + *

The timestamp that indicates when the event bus was created.

+ */ + @NameInMap("eventBuses") + public java.util.List eventBuses; + + /** + *

The returned error message.

+ * + * example: + *

InvalidArgument

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

D1DCF64A-3F2C-5323-ADCB-3F4DF30FAD2D

+ */ + @NameInMap("requestId") + public String requestId; + + /** + *

If excess return values exist, this parameter is returned.

+ * + * example: + *

10

+ */ + @NameInMap("nextToken") + public String nextToken; + + /** + *

The total number of entries.

+ * + * example: + *

2

+ */ + @NameInMap("total") + public Integer total; + + /** + *

If you set Limit and excess return values exist, this parameter is returned.

+ * + * example: + *

10

+ */ + @NameInMap("maxResults") + public Integer maxResults; + + public static ListEventBusesResponseBody build(java.util.Map map) throws Exception { + ListEventBusesResponseBody self = new ListEventBusesResponseBody(); + return TeaModel.build(map, self); + } + + public ListEventBusesResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public ListEventBusesResponseBody setEventBuses(java.util.List eventBuses) { + this.eventBuses = eventBuses; + return this; + } + public java.util.List getEventBuses() { + return this.eventBuses; + } + + public ListEventBusesResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public ListEventBusesResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + + public ListEventBusesResponseBody setNextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + public String getNextToken() { + return this.nextToken; + } + + public ListEventBusesResponseBody setTotal(Integer total) { + this.total = total; + return this; + } + public Integer getTotal() { + return this.total; + } + + public ListEventBusesResponseBody setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + public Integer getMaxResults() { + return this.maxResults; + } + + public static class ListEventBusesResponseBodyEventBuses extends TeaModel { + /** + *

The description of the queried event bus.

+ * + * example: + *

bus_description

+ */ + @NameInMap("description") + public String description; + + /** + *

The name of the queried event bus.

+ * + * example: + *

default

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + public static ListEventBusesResponseBodyEventBuses build(java.util.Map map) throws Exception { + ListEventBusesResponseBodyEventBuses self = new ListEventBusesResponseBodyEventBuses(); + return TeaModel.build(map, self); + } + + public ListEventBusesResponseBodyEventBuses setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public ListEventBusesResponseBodyEventBuses setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventRulesRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventRulesRequest.java new file mode 100644 index 00000000..907cc344 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventRulesRequest.java @@ -0,0 +1,57 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListEventRulesRequest extends TeaModel { + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The number of entries returned per page.

+ * + * example: + *

10

+ */ + @NameInMap("maxResults") + public Integer maxResults; + + /** + *

If excess return values exist, this parameter is returned.

+ * + * example: + *

0

+ */ + @NameInMap("nextToken") + public String nextToken; + + public static ListEventRulesRequest build(java.util.Map map) throws Exception { + ListEventRulesRequest self = new ListEventRulesRequest(); + return TeaModel.build(map, self); + } + + public ListEventRulesRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public ListEventRulesRequest setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + public Integer getMaxResults() { + return this.maxResults; + } + + public ListEventRulesRequest setNextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + public String getNextToken() { + return this.nextToken; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventRulesResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventRulesResponse.java new file mode 100644 index 00000000..524d0d56 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventRulesResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListEventRulesResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public ListEventRulesResponseBody body; + + public static ListEventRulesResponse build(java.util.Map map) throws Exception { + ListEventRulesResponse self = new ListEventRulesResponse(); + return TeaModel.build(map, self); + } + + public ListEventRulesResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public ListEventRulesResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public ListEventRulesResponse setBody(ListEventRulesResponseBody body) { + this.body = body; + return this; + } + public ListEventRulesResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventRulesResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventRulesResponseBody.java new file mode 100644 index 00000000..ceac2f98 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventRulesResponseBody.java @@ -0,0 +1,187 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListEventRulesResponseBody extends TeaModel { + @NameInMap("eventRules") + public java.util.List eventRules; + + /** + *

The total number of entries.

+ * + * example: + *

2

+ */ + @NameInMap("total") + public Integer total; + + /** + *

The number of entries returned per page.

+ * + * example: + *

10

+ */ + @NameInMap("maxResults") + public Integer maxResults; + + /** + *

If excess return values exist, this parameter is returned.

+ * + * example: + *

0

+ */ + @NameInMap("nextToken") + public String nextToken; + + public static ListEventRulesResponseBody build(java.util.Map map) throws Exception { + ListEventRulesResponseBody self = new ListEventRulesResponseBody(); + return TeaModel.build(map, self); + } + + public ListEventRulesResponseBody setEventRules(java.util.List eventRules) { + this.eventRules = eventRules; + return this; + } + public java.util.List getEventRules() { + return this.eventRules; + } + + public ListEventRulesResponseBody setTotal(Integer total) { + this.total = total; + return this; + } + public Integer getTotal() { + return this.total; + } + + public ListEventRulesResponseBody setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + public Integer getMaxResults() { + return this.maxResults; + } + + public ListEventRulesResponseBody setNextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + public String getNextToken() { + return this.nextToken; + } + + public static class ListEventRulesResponseBodyEventRules extends TeaModel { + /** + *

The name of the event bus with which the event source is associated. + * This parameter is required.

+ * + * example: + *

my-event-bus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event rule. + * This parameter is required.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventRuleName") + public String eventRuleName; + + @NameInMap("description") + public String description; + + /** + *

The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field.

+ *
    You can specify up to five expressions in the map data structure in each field.
+         * 
+ * + * example: + *

{"source": [{"prefix": "acs."}],"type": [{"prefix":"oss:ObjectReplication"}],"subject":[{"prefix":"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/", "suffix":".txt"}]}

+ */ + @NameInMap("filterPattern") + public String filterPattern; + + /** + *

The status of the event rule. Valid values: ENABLE (default): The event rule is enabled. DISABLE: The event rule is disabled.

+ * + * example: + *

ENABLE

+ */ + @NameInMap("status") + public String status; + + @NameInMap("gmtCreate") + public String gmtCreate; + + @NameInMap("gmtModify") + public String gmtModify; + + public static ListEventRulesResponseBodyEventRules build(java.util.Map map) throws Exception { + ListEventRulesResponseBodyEventRules self = new ListEventRulesResponseBodyEventRules(); + return TeaModel.build(map, self); + } + + public ListEventRulesResponseBodyEventRules setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public ListEventRulesResponseBodyEventRules setEventRuleName(String eventRuleName) { + this.eventRuleName = eventRuleName; + return this; + } + public String getEventRuleName() { + return this.eventRuleName; + } + + public ListEventRulesResponseBodyEventRules setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public ListEventRulesResponseBodyEventRules setFilterPattern(String filterPattern) { + this.filterPattern = filterPattern; + return this; + } + public String getFilterPattern() { + return this.filterPattern; + } + + public ListEventRulesResponseBodyEventRules setStatus(String status) { + this.status = status; + return this; + } + public String getStatus() { + return this.status; + } + + public ListEventRulesResponseBodyEventRules setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + return this; + } + public String getGmtCreate() { + return this.gmtCreate; + } + + public ListEventRulesResponseBodyEventRules setGmtModify(String gmtModify) { + this.gmtModify = gmtModify; + return this; + } + public String getGmtModify() { + return this.gmtModify; + } + + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventSourcesRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventSourcesRequest.java new file mode 100644 index 00000000..086e2d47 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventSourcesRequest.java @@ -0,0 +1,75 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListEventSourcesRequest extends TeaModel { + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The type of the event source. + * This parameter is required.

+ * + * example: + *

USER_DEFINED

+ */ + @NameInMap("eventSourceType") + public String eventSourceType; + + /** + *

The number of entries returned per page.

+ * + * example: + *

10

+ */ + @NameInMap("maxResults") + public Integer maxResults; + + /** + *

If excess return values exist, this parameter is returned.

+ * + * example: + *

0

+ */ + @NameInMap("nextToken") + public String nextToken; + + public static ListEventSourcesRequest build(java.util.Map map) throws Exception { + ListEventSourcesRequest self = new ListEventSourcesRequest(); + return TeaModel.build(map, self); + } + + public ListEventSourcesRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public ListEventSourcesRequest setEventSourceType(String eventSourceType) { + this.eventSourceType = eventSourceType; + return this; + } + public String getEventSourceType() { + return this.eventSourceType; + } + + public ListEventSourcesRequest setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + public Integer getMaxResults() { + return this.maxResults; + } + + public ListEventSourcesRequest setNextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + public String getNextToken() { + return this.nextToken; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventSourcesResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventSourcesResponse.java new file mode 100644 index 00000000..c111a5e0 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventSourcesResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListEventSourcesResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public ListEventSourcesResponseBody body; + + public static ListEventSourcesResponse build(java.util.Map map) throws Exception { + ListEventSourcesResponse self = new ListEventSourcesResponse(); + return TeaModel.build(map, self); + } + + public ListEventSourcesResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public ListEventSourcesResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public ListEventSourcesResponse setBody(ListEventSourcesResponseBody body) { + this.body = body; + return this; + } + public ListEventSourcesResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventSourcesResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventSourcesResponseBody.java new file mode 100644 index 00000000..6ef78d31 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventSourcesResponseBody.java @@ -0,0 +1,178 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListEventSourcesResponseBody extends TeaModel { + @NameInMap("eventSources") + public java.util.List eventSources; + + /** + *

The total number of entries.

+ * + * example: + *

2

+ */ + @NameInMap("total") + public Integer total; + + /** + *

The number of entries returned per page.

+ * + * example: + *

10

+ */ + @NameInMap("maxResults") + public Integer maxResults; + + /** + *

If excess return values exist, this parameter is returned.

+ * + * example: + *

0

+ */ + @NameInMap("nextToken") + public String nextToken; + + public static ListEventSourcesResponseBody build(java.util.Map map) throws Exception { + ListEventSourcesResponseBody self = new ListEventSourcesResponseBody(); + return TeaModel.build(map, self); + } + + public ListEventSourcesResponseBody setEventSources(java.util.List eventSources) { + this.eventSources = eventSources; + return this; + } + public java.util.List getEventSources() { + return this.eventSources; + } + + public ListEventSourcesResponseBody setTotal(Integer total) { + this.total = total; + return this; + } + public Integer getTotal() { + return this.total; + } + + public ListEventSourcesResponseBody setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + public Integer getMaxResults() { + return this.maxResults; + } + + public ListEventSourcesResponseBody setNextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + public String getNextToken() { + return this.nextToken; + } + + public static class ListEventSourcesResponseBodyEventSources extends TeaModel { + /** + *

The name of the event bus. + * This parameter is required.

+ * + * example: + *

demo

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

EventSource is required for querying default bus events.

+ * + * example: + *

testEventSourceName

+ */ + @NameInMap("eventSourceName") + public String eventSourceName; + + /** + *

The description of the event type.

+ * + * example: + *

The description of the event type.

+ */ + @NameInMap("description") + public String description; + + @NameInMap("className") + public String className; + + @NameInMap("config") + public java.util.Map config; + + @NameInMap("gmtCreate") + public String gmtCreate; + + @NameInMap("gmtModify") + public String gmtModify; + + public static ListEventSourcesResponseBodyEventSources build(java.util.Map map) throws Exception { + ListEventSourcesResponseBodyEventSources self = new ListEventSourcesResponseBodyEventSources(); + return TeaModel.build(map, self); + } + + public ListEventSourcesResponseBodyEventSources setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public ListEventSourcesResponseBodyEventSources setEventSourceName(String eventSourceName) { + this.eventSourceName = eventSourceName; + return this; + } + public String getEventSourceName() { + return this.eventSourceName; + } + + public ListEventSourcesResponseBodyEventSources setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public ListEventSourcesResponseBodyEventSources setClassName(String className) { + this.className = className; + return this; + } + public String getClassName() { + return this.className; + } + + public ListEventSourcesResponseBodyEventSources setConfig(java.util.Map config) { + this.config = config; + return this; + } + public java.util.Map getConfig() { + return this.config; + } + + public ListEventSourcesResponseBodyEventSources setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + return this; + } + public String getGmtCreate() { + return this.gmtCreate; + } + + public ListEventSourcesResponseBodyEventSources setGmtModify(String gmtModify) { + this.gmtModify = gmtModify; + return this; + } + public String getGmtModify() { + return this.gmtModify; + } + + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTargetsRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTargetsRequest.java new file mode 100644 index 00000000..4af2f47e --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTargetsRequest.java @@ -0,0 +1,48 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListEventTargetsRequest extends TeaModel { + /** + *

The name of the event bus with which the event target is associated. + * This parameter is required.

+ * + * example: + *

my-event-bus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event rule. + * This parameter is required.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventRuleName") + public String eventRuleName; + + public static ListEventTargetsRequest build(java.util.Map map) throws Exception { + ListEventTargetsRequest self = new ListEventTargetsRequest(); + return TeaModel.build(map, self); + } + + public ListEventTargetsRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public ListEventTargetsRequest setEventRuleName(String eventRuleName) { + this.eventRuleName = eventRuleName; + return this; + } + public String getEventRuleName() { + return this.eventRuleName; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTargetsResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTargetsResponse.java new file mode 100644 index 00000000..7945a44a --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTargetsResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListEventTargetsResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public ListEventTargetsResponseBody body; + + public static ListEventTargetsResponse build(java.util.Map map) throws Exception { + ListEventTargetsResponse self = new ListEventTargetsResponse(); + return TeaModel.build(map, self); + } + + public ListEventTargetsResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public ListEventTargetsResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public ListEventTargetsResponse setBody(ListEventTargetsResponseBody body) { + this.body = body; + return this; + } + public ListEventTargetsResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTargetsResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTargetsResponseBody.java new file mode 100644 index 00000000..7eecbe97 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTargetsResponseBody.java @@ -0,0 +1,223 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListEventTargetsResponseBody extends TeaModel { + /** + *

The name of the event bus with which the event target is associated. + * This parameter is required.

+ * + * example: + *

my-event-bus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event rule. + * This parameter is required.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventRuleName") + public String eventRuleName; + + @NameInMap("eventTargets") + public java.util.List eventTargets; + + public static ListEventTargetsResponseBody build(java.util.Map map) throws Exception { + ListEventTargetsResponseBody self = new ListEventTargetsResponseBody(); + return TeaModel.build(map, self); + } + + public ListEventTargetsResponseBody setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public ListEventTargetsResponseBody setEventRuleName(String eventRuleName) { + this.eventRuleName = eventRuleName; + return this; + } + public String getEventRuleName() { + return this.eventRuleName; + } + + public ListEventTargetsResponseBody setEventTargets(java.util.List eventTargets) { + this.eventTargets = eventTargets; + return this; + } + public java.util.List getEventTargets() { + return this.eventTargets; + } + + public static class ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy extends TeaModel { + @NameInMap("pushRetryStrategy") + public String pushRetryStrategy; + + @NameInMap("maximumEventAgeInSeconds") + public Integer maximumEventAgeInSeconds; + + @NameInMap("maximumRetryAttempts") + public Integer maximumRetryAttempts; + + public static ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy build(java.util.Map map) throws Exception { + ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy self = new ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy(); + return TeaModel.build(map, self); + } + + public ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy setPushRetryStrategy(String pushRetryStrategy) { + this.pushRetryStrategy = pushRetryStrategy; + return this; + } + public String getPushRetryStrategy() { + return this.pushRetryStrategy; + } + + public ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy setMaximumEventAgeInSeconds(Integer maximumEventAgeInSeconds) { + this.maximumEventAgeInSeconds = maximumEventAgeInSeconds; + return this; + } + public Integer getMaximumEventAgeInSeconds() { + return this.maximumEventAgeInSeconds; + } + + public ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy setMaximumRetryAttempts(Integer maximumRetryAttempts) { + this.maximumRetryAttempts = maximumRetryAttempts; + return this; + } + public Integer getMaximumRetryAttempts() { + return this.maximumRetryAttempts; + } + + } + + public static class ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue extends TeaModel { + @NameInMap("type") + public String type; + + @NameInMap("config") + public java.util.Map config; + + public static ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue build(java.util.Map map) throws Exception { + ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue self = new ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue(); + return TeaModel.build(map, self); + } + + public ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue setType(String type) { + this.type = type; + return this; + } + public String getType() { + return this.type; + } + + public ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue setConfig(java.util.Map config) { + this.config = config; + return this; + } + public java.util.Map getConfig() { + return this.config; + } + + } + + public static class ListEventTargetsResponseBodyEventTargetsRunOptions extends TeaModel { + @NameInMap("errorsTolerance") + public String errorsTolerance; + + @NameInMap("retryStrategy") + public ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy retryStrategy; + + @NameInMap("deadLetterQueue") + public ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue deadLetterQueue; + + public static ListEventTargetsResponseBodyEventTargetsRunOptions build(java.util.Map map) throws Exception { + ListEventTargetsResponseBodyEventTargetsRunOptions self = new ListEventTargetsResponseBodyEventTargetsRunOptions(); + return TeaModel.build(map, self); + } + + public ListEventTargetsResponseBodyEventTargetsRunOptions setErrorsTolerance(String errorsTolerance) { + this.errorsTolerance = errorsTolerance; + return this; + } + public String getErrorsTolerance() { + return this.errorsTolerance; + } + + public ListEventTargetsResponseBodyEventTargetsRunOptions setRetryStrategy(ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy retryStrategy) { + this.retryStrategy = retryStrategy; + return this; + } + public ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy getRetryStrategy() { + return this.retryStrategy; + } + + public ListEventTargetsResponseBodyEventTargetsRunOptions setDeadLetterQueue(ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue deadLetterQueue) { + this.deadLetterQueue = deadLetterQueue; + return this; + } + public ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue getDeadLetterQueue() { + return this.deadLetterQueue; + } + + } + + public static class ListEventTargetsResponseBodyEventTargets extends TeaModel { + @NameInMap("eventTargetName") + public String eventTargetName; + + @NameInMap("className") + public String className; + + @NameInMap("config") + public java.util.Map config; + + @NameInMap("runOptions") + public ListEventTargetsResponseBodyEventTargetsRunOptions runOptions; + + public static ListEventTargetsResponseBodyEventTargets build(java.util.Map map) throws Exception { + ListEventTargetsResponseBodyEventTargets self = new ListEventTargetsResponseBodyEventTargets(); + return TeaModel.build(map, self); + } + + public ListEventTargetsResponseBodyEventTargets setEventTargetName(String eventTargetName) { + this.eventTargetName = eventTargetName; + return this; + } + public String getEventTargetName() { + return this.eventTargetName; + } + + public ListEventTargetsResponseBodyEventTargets setClassName(String className) { + this.className = className; + return this; + } + public String getClassName() { + return this.className; + } + + public ListEventTargetsResponseBodyEventTargets setConfig(java.util.Map config) { + this.config = config; + return this; + } + public java.util.Map getConfig() { + return this.config; + } + + public ListEventTargetsResponseBodyEventTargets setRunOptions(ListEventTargetsResponseBodyEventTargetsRunOptions runOptions) { + this.runOptions = runOptions; + return this; + } + public ListEventTargetsResponseBodyEventTargetsRunOptions getRunOptions() { + return this.runOptions; + } + + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTypesRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTypesRequest.java new file mode 100644 index 00000000..11e7ab2f --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTypesRequest.java @@ -0,0 +1,86 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +/** + * description : + *

EventType Controller apis: + * listEventTypes *

+ */ +public class ListEventTypesRequest extends TeaModel { + /** + *

The name of the event bus. + * This parameter is required.

+ * + * example: + *

demo

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

EventSource is required for querying default bus events.

+ * + * example: + *

testEventSourceName

+ */ + @NameInMap("eventSourceName") + public String eventSourceName; + + /** + *

The number of entries returned per page.

+ * + * example: + *

10

+ */ + @NameInMap("maxResults") + public Integer maxResults; + + /** + *

If excess return values exist, this parameter is returned.

+ * + * example: + *

0

+ */ + @NameInMap("nextToken") + public String nextToken; + + public static ListEventTypesRequest build(java.util.Map map) throws Exception { + ListEventTypesRequest self = new ListEventTypesRequest(); + return TeaModel.build(map, self); + } + + public ListEventTypesRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public ListEventTypesRequest setEventSourceName(String eventSourceName) { + this.eventSourceName = eventSourceName; + return this; + } + public String getEventSourceName() { + return this.eventSourceName; + } + + public ListEventTypesRequest setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + public Integer getMaxResults() { + return this.maxResults; + } + + public ListEventTypesRequest setNextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + public String getNextToken() { + return this.nextToken; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTypesResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTypesResponse.java new file mode 100644 index 00000000..97333b5b --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTypesResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListEventTypesResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public ListEventTypesResponseBody body; + + public static ListEventTypesResponse build(java.util.Map map) throws Exception { + ListEventTypesResponse self = new ListEventTypesResponse(); + return TeaModel.build(map, self); + } + + public ListEventTypesResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public ListEventTypesResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public ListEventTypesResponse setBody(ListEventTypesResponseBody body) { + this.body = body; + return this; + } + public ListEventTypesResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTypesResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTypesResponseBody.java new file mode 100644 index 00000000..26e53818 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/ListEventTypesResponseBody.java @@ -0,0 +1,221 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class ListEventTypesResponseBody extends TeaModel { + @NameInMap("eventTypes") + public java.util.List eventTypes; + + /** + *

If excess return values exist, this parameter is returned.

+ * + * example: + *

10

+ */ + @NameInMap("nextToken") + public String nextToken; + + /** + *

The total number of entries.

+ * + * example: + *

2

+ */ + @NameInMap("total") + public Integer total; + + /** + *

If you set Limit and excess return values exist, this parameter is returned.

+ * + * example: + *

10

+ */ + @NameInMap("maxResults") + public Integer maxResults; + + /** + *

The status code returned. The status code 200 indicates that the request was successful.

+ * + * example: + *

200

+ */ + @NameInMap("code") + public String code; + + /** + *

The error message that is returned if the request failed.

+ * + * example: + *

EventBusNotExist

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

580A938B-6107-586C-8EC7-F22EEBEDA9E6

+ */ + @NameInMap("requestId") + public String requestId; + + public static ListEventTypesResponseBody build(java.util.Map map) throws Exception { + ListEventTypesResponseBody self = new ListEventTypesResponseBody(); + return TeaModel.build(map, self); + } + + public ListEventTypesResponseBody setEventTypes(java.util.List eventTypes) { + this.eventTypes = eventTypes; + return this; + } + public java.util.List getEventTypes() { + return this.eventTypes; + } + + public ListEventTypesResponseBody setNextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + public String getNextToken() { + return this.nextToken; + } + + public ListEventTypesResponseBody setTotal(Integer total) { + this.total = total; + return this; + } + public Integer getTotal() { + return this.total; + } + + public ListEventTypesResponseBody setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + public Integer getMaxResults() { + return this.maxResults; + } + + public ListEventTypesResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public ListEventTypesResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public ListEventTypesResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + + public static class ListEventTypesResponseBodyEventTypes extends TeaModel { + /** + *

The name of the event bus. + * This parameter is required.

+ * + * example: + *

demo

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

EventSource is required for querying default bus events.

+ * + * example: + *

testEventSourceName

+ */ + @NameInMap("eventSourceName") + public String eventSourceName; + + /** + *

The name of the event type.

+ */ + @NameInMap("eventTypeName") + public String eventTypeName; + + /** + *

The description of the event type.

+ * + * example: + *

The description of the event type.

+ */ + @NameInMap("description") + public String description; + + @NameInMap("gmtCreate") + public String gmtCreate; + + @NameInMap("gmtModify") + public String gmtModify; + + public static ListEventTypesResponseBodyEventTypes build(java.util.Map map) throws Exception { + ListEventTypesResponseBodyEventTypes self = new ListEventTypesResponseBodyEventTypes(); + return TeaModel.build(map, self); + } + + public ListEventTypesResponseBodyEventTypes setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public ListEventTypesResponseBodyEventTypes setEventSourceName(String eventSourceName) { + this.eventSourceName = eventSourceName; + return this; + } + public String getEventSourceName() { + return this.eventSourceName; + } + + public ListEventTypesResponseBodyEventTypes setEventTypeName(String eventTypeName) { + this.eventTypeName = eventTypeName; + return this; + } + public String getEventTypeName() { + return this.eventTypeName; + } + + public ListEventTypesResponseBodyEventTypes setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public ListEventTypesResponseBodyEventTypes setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + return this; + } + public String getGmtCreate() { + return this.gmtCreate; + } + + public ListEventTypesResponseBodyEventTypes setGmtModify(String gmtModify) { + this.gmtModify = gmtModify; + return this; + } + public String getGmtModify() { + return this.gmtModify; + } + + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/PutEventsRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/PutEventsRequest.java new file mode 100644 index 00000000..d2f0f4e5 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/PutEventsRequest.java @@ -0,0 +1,52 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +/** + * description : + *

EventData Controller apis: + * putEvents

+ */ +public class PutEventsRequest extends TeaModel { + /** + *

The name of the event bus. + * This parameter is required.

+ * + * example: + *

demo

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The content of the event.

+ * + * example: + *

The description of the event.

+ */ + @NameInMap("event") + public String event; + + public static PutEventsRequest build(java.util.Map map) throws Exception { + PutEventsRequest self = new PutEventsRequest(); + return TeaModel.build(map, self); + } + + public PutEventsRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public PutEventsRequest setEvent(String event) { + this.event = event; + return this; + } + public String getEvent() { + return this.event; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/PutEventsResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/PutEventsResponse.java new file mode 100644 index 00000000..6dc53a6f --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/PutEventsResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class PutEventsResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public PutEventsResponseBody body; + + public static PutEventsResponse build(java.util.Map map) throws Exception { + PutEventsResponse self = new PutEventsResponse(); + return TeaModel.build(map, self); + } + + public PutEventsResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public PutEventsResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public PutEventsResponse setBody(PutEventsResponseBody body) { + this.body = body; + return this; + } + public PutEventsResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/PutEventsResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/PutEventsResponseBody.java new file mode 100644 index 00000000..6af978b4 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/PutEventsResponseBody.java @@ -0,0 +1,138 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class PutEventsResponseBody extends TeaModel { + @NameInMap("failedEntryCount") + public Integer failedEntryCount; + + @NameInMap("entryList") + public java.util.List entryList; + + /** + *

The status code returned. The status code 200 indicates that the request was successful.

+ * + * example: + *

200

+ */ + @NameInMap("code") + public String code; + + /** + *

The error message that is returned if the request failed.

+ * + * example: + *

EventBusNotExist

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

580A938B-6107-586C-8EC7-F22EEBEDA9E6

+ */ + @NameInMap("requestId") + public String requestId; + + public static PutEventsResponseBody build(java.util.Map map) throws Exception { + PutEventsResponseBody self = new PutEventsResponseBody(); + return TeaModel.build(map, self); + } + + public PutEventsResponseBody setFailedEntryCount(Integer failedEntryCount) { + this.failedEntryCount = failedEntryCount; + return this; + } + public Integer getFailedEntryCount() { + return this.failedEntryCount; + } + + public PutEventsResponseBody setEntryList(java.util.List entryList) { + this.entryList = entryList; + return this; + } + public java.util.List getEntryList() { + return this.entryList; + } + + public PutEventsResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public PutEventsResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public PutEventsResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + + public static class PutEventsResponseBodyEntryList extends TeaModel { + /** + *

The event ID.

+ * + * example: + *

a5747e4f-2af2-40b6-b262-d0140e995bf7

+ */ + @NameInMap("eventId") + public String eventId; + + /** + *

The returned error code.

+ */ + @NameInMap("errorCode") + public String errorCode; + + /** + *

The returned error message.

+ */ + @NameInMap("errorMessage") + public String errorMessage; + + public static PutEventsResponseBodyEntryList build(java.util.Map map) throws Exception { + PutEventsResponseBodyEntryList self = new PutEventsResponseBodyEntryList(); + return TeaModel.build(map, self); + } + + public PutEventsResponseBodyEntryList setEventId(String eventId) { + this.eventId = eventId; + return this; + } + public String getEventId() { + return this.eventId; + } + + public PutEventsResponseBodyEntryList setErrorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + public String getErrorCode() { + return this.errorCode; + } + + public PutEventsResponseBodyEntryList setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + public String getErrorMessage() { + return this.errorMessage; + } + + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateApiDestinationRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateApiDestinationRequest.java new file mode 100644 index 00000000..3ed7ab07 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateApiDestinationRequest.java @@ -0,0 +1,225 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class UpdateApiDestinationRequest extends TeaModel { + /** + *

The name of the API destination. The name must be 2 to 127 characters in length. This parameter is required.

+ * + * example: + *

api-destination-name

+ */ + @NameInMap("apiDestinationName") + public String apiDestinationName; + + /** + *

The name of the connection. The name must be 2 to 127 characters in length. Before you configure this parameter, you must call the CreateConnection operation to create a connection. Then, set this parameter to the name of the connection that you created. This parameter is required.

+ * + * example: + *

connection-name

+ */ + @NameInMap("connectionName") + public String connectionName; + + /** + *

The description of the API destination. The description can be up to 255 characters in length.

+ */ + @NameInMap("description") + public String description; + + /** + *

The parameters that are configured for the API destination. This parameter is required.

+ */ + @NameInMap("httpApiParameters") + public UpdateApiDestinationRequestHttpApiParameters httpApiParameters; + + /** + *

TODO

+ */ + @NameInMap("invocationRateLimitPerSecond") + public Integer invocationRateLimitPerSecond; + + public static UpdateApiDestinationRequest build(java.util.Map map) throws Exception { + UpdateApiDestinationRequest self = new UpdateApiDestinationRequest(); + return TeaModel.build(map, self); + } + + public UpdateApiDestinationRequest setApiDestinationName(String apiDestinationName) { + this.apiDestinationName = apiDestinationName; + return this; + } + public String getApiDestinationName() { + return this.apiDestinationName; + } + + public UpdateApiDestinationRequest setConnectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + public String getConnectionName() { + return this.connectionName; + } + + public UpdateApiDestinationRequest setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public UpdateApiDestinationRequest setHttpApiParameters(UpdateApiDestinationRequestHttpApiParameters httpApiParameters) { + this.httpApiParameters = httpApiParameters; + return this; + } + public UpdateApiDestinationRequestHttpApiParameters getHttpApiParameters() { + return this.httpApiParameters; + } + + public UpdateApiDestinationRequest setInvocationRateLimitPerSecond(Integer invocationRateLimitPerSecond) { + this.invocationRateLimitPerSecond = invocationRateLimitPerSecond; + return this; + } + public Integer getInvocationRateLimitPerSecond() { + return this.invocationRateLimitPerSecond; + } + + public static class UpdateApiDestinationRequestHttpApiParametersApiParameters extends TeaModel { + @NameInMap("name") + public String name; + + /** + *

The description of the API destination. The description can be up to 255 characters in length.

+ */ + @NameInMap("description") + public String description; + + @NameInMap("type") + public String type; + + @NameInMap("defaultValue") + public String defaultValue; + + @NameInMap("in") + public String in; + + public static UpdateApiDestinationRequestHttpApiParametersApiParameters build(java.util.Map map) throws Exception { + UpdateApiDestinationRequestHttpApiParametersApiParameters self = new UpdateApiDestinationRequestHttpApiParametersApiParameters(); + return TeaModel.build(map, self); + } + + public UpdateApiDestinationRequestHttpApiParametersApiParameters setName(String name) { + this.name = name; + return this; + } + public String getName() { + return this.name; + } + + public UpdateApiDestinationRequestHttpApiParametersApiParameters setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public UpdateApiDestinationRequestHttpApiParametersApiParameters setType(String type) { + this.type = type; + return this; + } + public String getType() { + return this.type; + } + + public UpdateApiDestinationRequestHttpApiParametersApiParameters setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + return this; + } + public String getDefaultValue() { + return this.defaultValue; + } + + public UpdateApiDestinationRequestHttpApiParametersApiParameters setIn(String in) { + this.in = in; + return this; + } + public String getIn() { + return this.in; + } + + } + + public static class UpdateApiDestinationRequestHttpApiParameters extends TeaModel { + /** + *

The endpoint of the API destination. The endpoint can be up to 127 characters in length. This parameter is required.

+ * + * example: + *

http://127.0.0.1:8001/api

+ */ + @NameInMap("endpoint") + public String endpoint; + + /** + *

The HTTP request method. Valid values:

+ *
  *   GET 
+         * 
+         *   *   POST 
+         * 
+         *   *   HEAD 
+         * 
+         *   *   DELETE 
+         * 
+         *   *   PUT 
+         * 
+         *   *   PATCH 
+         * 
+         * 
+         *   This parameter is required.
+         * 
+ * + * example: + *

POST

+ */ + @NameInMap("method") + public String method; + + /** + *

TODO

+ */ + @NameInMap("apiParameters") + public java.util.List apiParameters; + + public static UpdateApiDestinationRequestHttpApiParameters build(java.util.Map map) throws Exception { + UpdateApiDestinationRequestHttpApiParameters self = new UpdateApiDestinationRequestHttpApiParameters(); + return TeaModel.build(map, self); + } + + public UpdateApiDestinationRequestHttpApiParameters setEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + public String getEndpoint() { + return this.endpoint; + } + + public UpdateApiDestinationRequestHttpApiParameters setMethod(String method) { + this.method = method; + return this; + } + public String getMethod() { + return this.method; + } + + public UpdateApiDestinationRequestHttpApiParameters setApiParameters(java.util.List apiParameters) { + this.apiParameters = apiParameters; + return this; + } + public java.util.List getApiParameters() { + return this.apiParameters; + } + + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateApiDestinationResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateApiDestinationResponse.java new file mode 100644 index 00000000..27e4b71d --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateApiDestinationResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class UpdateApiDestinationResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public UpdateApiDestinationResponseBody body; + + public static UpdateApiDestinationResponse build(java.util.Map map) throws Exception { + UpdateApiDestinationResponse self = new UpdateApiDestinationResponse(); + return TeaModel.build(map, self); + } + + public UpdateApiDestinationResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public UpdateApiDestinationResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public UpdateApiDestinationResponse setBody(UpdateApiDestinationResponseBody body) { + this.body = body; + return this; + } + public UpdateApiDestinationResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateApiDestinationResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateApiDestinationResponseBody.java new file mode 100644 index 00000000..62d3e5ea --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateApiDestinationResponseBody.java @@ -0,0 +1,63 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class UpdateApiDestinationResponseBody extends TeaModel { + /** + *

The returned response code. The value Success indicates that the request is successful.

+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The returned message.

+ * + * example: + *

success

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

5DAF96FB-A4B6-548C-B999-0BFDCB2261B9

+ */ + @NameInMap("requestId") + public String requestId; + + public static UpdateApiDestinationResponseBody build(java.util.Map map) throws Exception { + UpdateApiDestinationResponseBody self = new UpdateApiDestinationResponseBody(); + return TeaModel.build(map, self); + } + + public UpdateApiDestinationResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public UpdateApiDestinationResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public UpdateApiDestinationResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateConnectionRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateConnectionRequest.java new file mode 100644 index 00000000..a8c1c54a --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateConnectionRequest.java @@ -0,0 +1,672 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class UpdateConnectionRequest extends TeaModel { + /** + *

The parameters that are configured for authentication.

+ */ + @NameInMap("authParameters") + public UpdateConnectionRequestAuthParameters authParameters; + + /** + *

The name of the connection. The name must be 2 to 127 characters in length.

+ *
This parameter is required.
+     * 
+ * + * example: + *

connection-name

+ */ + @NameInMap("connectionName") + public String connectionName; + + /** + *

The description of the connection. The description can be up to 255 characters in length.

+ * + * example: + *

demo

+ */ + @NameInMap("description") + public String description; + + /** + *

The parameters that are configured for the network. This parameter is required.

+ */ + @NameInMap("networkParameters") + public UpdateConnectionRequestNetworkParameters networkParameters; + + public static UpdateConnectionRequest build(java.util.Map map) throws Exception { + UpdateConnectionRequest self = new UpdateConnectionRequest(); + return TeaModel.build(map, self); + } + + public UpdateConnectionRequest setAuthParameters(UpdateConnectionRequestAuthParameters authParameters) { + this.authParameters = authParameters; + return this; + } + public UpdateConnectionRequestAuthParameters getAuthParameters() { + return this.authParameters; + } + + public UpdateConnectionRequest setConnectionName(String connectionName) { + this.connectionName = connectionName; + return this; + } + public String getConnectionName() { + return this.connectionName; + } + + public UpdateConnectionRequest setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public UpdateConnectionRequest setNetworkParameters(UpdateConnectionRequestNetworkParameters networkParameters) { + this.networkParameters = networkParameters; + return this; + } + public UpdateConnectionRequestNetworkParameters getNetworkParameters() { + return this.networkParameters; + } + + public static class UpdateConnectionRequestAuthParametersApiKeyAuthParameters extends TeaModel { + /** + *

The key of the API key.

+ * + * example: + *

Token

+ */ + @NameInMap("apiKeyName") + public String apiKeyName; + + /** + *

The value of the API key.

+ * + * example: + *

adkjnakddh****

+ */ + @NameInMap("apiKeyValue") + public String apiKeyValue; + + public static UpdateConnectionRequestAuthParametersApiKeyAuthParameters build(java.util.Map map) throws Exception { + UpdateConnectionRequestAuthParametersApiKeyAuthParameters self = new UpdateConnectionRequestAuthParametersApiKeyAuthParameters(); + return TeaModel.build(map, self); + } + + public UpdateConnectionRequestAuthParametersApiKeyAuthParameters setApiKeyName(String apiKeyName) { + this.apiKeyName = apiKeyName; + return this; + } + public String getApiKeyName() { + return this.apiKeyName; + } + + public UpdateConnectionRequestAuthParametersApiKeyAuthParameters setApiKeyValue(String apiKeyValue) { + this.apiKeyValue = apiKeyValue; + return this; + } + public String getApiKeyValue() { + return this.apiKeyValue; + } + + } + + public static class UpdateConnectionRequestAuthParametersBasicAuthParameters extends TeaModel { + /** + *

The password for basic authentication.

+ * + * example: + *
+ */ + @NameInMap("password") + public String password; + + /** + *

The username for basic authentication.

+ * + * example: + *

admin

+ */ + @NameInMap("username") + public String username; + + public static UpdateConnectionRequestAuthParametersBasicAuthParameters build(java.util.Map map) throws Exception { + UpdateConnectionRequestAuthParametersBasicAuthParameters self = new UpdateConnectionRequestAuthParametersBasicAuthParameters(); + return TeaModel.build(map, self); + } + + public UpdateConnectionRequestAuthParametersBasicAuthParameters setPassword(String password) { + this.password = password; + return this; + } + public String getPassword() { + return this.password; + } + + public UpdateConnectionRequestAuthParametersBasicAuthParameters setUsername(String username) { + this.username = username; + return this; + } + public String getUsername() { + return this.username; + } + + } + + public static class UpdateConnectionRequestAuthParametersOauthParametersClientParameters extends TeaModel { + /** + *

The client ID.

+ * + * example: + *

ClientID

+ */ + @NameInMap("clientID") + public String clientID; + + /** + *

The client key secret of the application.

+ * + * example: + *

ClientSecret

+ */ + @NameInMap("clientSecret") + public String clientSecret; + + public static UpdateConnectionRequestAuthParametersOauthParametersClientParameters build(java.util.Map map) throws Exception { + UpdateConnectionRequestAuthParametersOauthParametersClientParameters self = new UpdateConnectionRequestAuthParametersOauthParametersClientParameters(); + return TeaModel.build(map, self); + } + + public UpdateConnectionRequestAuthParametersOauthParametersClientParameters setClientID(String clientID) { + this.clientID = clientID; + return this; + } + public String getClientID() { + return this.clientID; + } + + public UpdateConnectionRequestAuthParametersOauthParametersClientParameters setClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + public String getClientSecret() { + return this.clientSecret; + } + + } + + public static class UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters extends TeaModel { + /** + *

Indicates whether authentication is enabled.

+ * + * example: + *

false

+ */ + @NameInMap("isValueSecret") + public String isValueSecret; + + /** + *

The key in the request body.

+ * + * example: + *

name

+ */ + @NameInMap("key") + public String key; + + /** + *

The value of the key in the request body.

+ * + * example: + *

demo

+ */ + @NameInMap("value") + public String value; + + public static UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters build(java.util.Map map) throws Exception { + UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters self = new UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters(); + return TeaModel.build(map, self); + } + + public UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters setIsValueSecret(String isValueSecret) { + this.isValueSecret = isValueSecret; + return this; + } + public String getIsValueSecret() { + return this.isValueSecret; + } + + public UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters setKey(String key) { + this.key = key; + return this; + } + public String getKey() { + return this.key; + } + + public UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters setValue(String value) { + this.value = value; + return this; + } + public String getValue() { + return this.value; + } + + } + + public static class UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters extends TeaModel { + /** + *

Indicates whether authentication is enabled.

+ * + * example: + *

false

+ */ + @NameInMap("isValueSecret") + public String isValueSecret; + + /** + *

The key in the request header.

+ * + * example: + *

name

+ */ + @NameInMap("key") + public String key; + + /** + *

The value of the key in the request header.

+ * + * example: + *

demo

+ */ + @NameInMap("value") + public String value; + + public static UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters build(java.util.Map map) throws Exception { + UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters self = new UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters(); + return TeaModel.build(map, self); + } + + public UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters setIsValueSecret(String isValueSecret) { + this.isValueSecret = isValueSecret; + return this; + } + public String getIsValueSecret() { + return this.isValueSecret; + } + + public UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters setKey(String key) { + this.key = key; + return this; + } + public String getKey() { + return this.key; + } + + public UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters setValue(String value) { + this.value = value; + return this; + } + public String getValue() { + return this.value; + } + + } + + public static class UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters extends TeaModel { + /** + *

Indicates whether authentication is enabled.

+ * + * example: + *

false

+ */ + @NameInMap("isValueSecret") + public String isValueSecret; + + /** + *

The key in the request path.

+ * + * example: + *

name

+ */ + @NameInMap("key") + public String key; + + /** + *

The value of the key in the request path.

+ * + * example: + *

demo

+ */ + @NameInMap("value") + public String value; + + public static UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters build(java.util.Map map) throws Exception { + UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters self = new UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters(); + return TeaModel.build(map, self); + } + + public UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters setIsValueSecret(String isValueSecret) { + this.isValueSecret = isValueSecret; + return this; + } + public String getIsValueSecret() { + return this.isValueSecret; + } + + public UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters setKey(String key) { + this.key = key; + return this; + } + public String getKey() { + return this.key; + } + + public UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters setValue(String value) { + this.value = value; + return this; + } + public String getValue() { + return this.value; + } + + } + + public static class UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters extends TeaModel { + /** + *

The parameters that are configured for the request.

+ */ + @NameInMap("bodyParameters") + public java.util.List bodyParameters; + + /** + *

The parameters that are configured for the request header.

+ */ + @NameInMap("headerParameters") + public java.util.List headerParameters; + + /** + *

The parameters that are configured for the request path.

+ */ + @NameInMap("queryStringParameters") + public java.util.List queryStringParameters; + + public static UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters build(java.util.Map map) throws Exception { + UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters self = new UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters(); + return TeaModel.build(map, self); + } + + public UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters setBodyParameters(java.util.List bodyParameters) { + this.bodyParameters = bodyParameters; + return this; + } + public java.util.List getBodyParameters() { + return this.bodyParameters; + } + + public UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters setHeaderParameters(java.util.List headerParameters) { + this.headerParameters = headerParameters; + return this; + } + public java.util.List getHeaderParameters() { + return this.headerParameters; + } + + public UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters setQueryStringParameters(java.util.List queryStringParameters) { + this.queryStringParameters = queryStringParameters; + return this; + } + public java.util.List getQueryStringParameters() { + return this.queryStringParameters; + } + + } + + public static class UpdateConnectionRequestAuthParametersOauthParameters extends TeaModel { + /** + *

The endpoint that is used to obtain the OAuth token.

+ * + * example: + *

http://localhost:8080/oauth/token

+ */ + @NameInMap("authorizationEndpoint") + public String authorizationEndpoint; + + /** + *

The parameters that are configured for the client.

+ */ + @NameInMap("clientParameters") + public UpdateConnectionRequestAuthParametersOauthParametersClientParameters clientParameters; + + /** + *

The HTTP request method. Valid values:

+ *
    - GET
+         * 
+         *     - POST
+         * 
+         *     - HEAD
+         * 
+ * + * example: + *

POST

+ */ + @NameInMap("httpMethod") + public String httpMethod; + + /** + *

The request parameters for OAuth authentication.

+ */ + @NameInMap("oauthHttpParameters") + public UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters oauthHttpParameters; + + public static UpdateConnectionRequestAuthParametersOauthParameters build(java.util.Map map) throws Exception { + UpdateConnectionRequestAuthParametersOauthParameters self = new UpdateConnectionRequestAuthParametersOauthParameters(); + return TeaModel.build(map, self); + } + + public UpdateConnectionRequestAuthParametersOauthParameters setAuthorizationEndpoint(String authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + public String getAuthorizationEndpoint() { + return this.authorizationEndpoint; + } + + public UpdateConnectionRequestAuthParametersOauthParameters setClientParameters(UpdateConnectionRequestAuthParametersOauthParametersClientParameters clientParameters) { + this.clientParameters = clientParameters; + return this; + } + public UpdateConnectionRequestAuthParametersOauthParametersClientParameters getClientParameters() { + return this.clientParameters; + } + + public UpdateConnectionRequestAuthParametersOauthParameters setHttpMethod(String httpMethod) { + this.httpMethod = httpMethod; + return this; + } + public String getHttpMethod() { + return this.httpMethod; + } + + public UpdateConnectionRequestAuthParametersOauthParameters setOauthHttpParameters(UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters oauthHttpParameters) { + this.oauthHttpParameters = oauthHttpParameters; + return this; + } + public UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters getOauthHttpParameters() { + return this.oauthHttpParameters; + } + + } + + public static class UpdateConnectionRequestAuthParameters extends TeaModel { + /** + *

The parameters that are configured for API key authentication.

+ */ + @NameInMap("apiKeyAuthParameters") + public UpdateConnectionRequestAuthParametersApiKeyAuthParameters apiKeyAuthParameters; + + /** + *

The authentication type. Valid values:

+ *
  BASIC_AUTH: basic authentication.
+         * 
+         *   Introduction: Basic authentication is a simple authentication scheme built into the HTTP protocol. When you use the HTTP protocol for communications, the authentication method that the HTTP server uses to authenticate user identities on the client is defined in the protocol. The request header is in the Authorization: Basic Base64-encoded string (Username:Password) format.
+         * 
+         *   1.  Username and Password are required
+         * 
+         *   API_KEY_AUTH: API key authentication.
+         * 
+         *   Introduction: The request header is in the Token: Token value format.
+         * 
+         *   *   ApiKeyName and ApiKeyValue are required.
+         * 
+         *   OAUTH_AUTH: OAuth authentication.
+         * 
+         *   Introduction: OAuth2.0 is an authentication mechanism. In normal cases, a system that does not use OAuth2.0 can access the resources of the server from the client. To ensure access security, access tokens are used to authenticate users in OAuth 2.0. The client must use an access token to access protected resources. This way, OAuth 2.0 protects resources from being accessed from malicious clients and improves system security.
+         * 
+         *   *   AuthorizationEndpoint, OAuthHttpParameters, and HttpMethod are required.
+         * 
+ * + * example: + *

BASIC_AUTH

+ */ + @NameInMap("authorizationType") + public String authorizationType; + + /** + *

The parameters that are configured for basic authentication.

+ */ + @NameInMap("basicAuthParameters") + public UpdateConnectionRequestAuthParametersBasicAuthParameters basicAuthParameters; + + /** + *

The parameters that are configured for OAuth authentication.

+ */ + @NameInMap("oauthParameters") + public UpdateConnectionRequestAuthParametersOauthParameters oauthParameters; + + public static UpdateConnectionRequestAuthParameters build(java.util.Map map) throws Exception { + UpdateConnectionRequestAuthParameters self = new UpdateConnectionRequestAuthParameters(); + return TeaModel.build(map, self); + } + + public UpdateConnectionRequestAuthParameters setApiKeyAuthParameters(UpdateConnectionRequestAuthParametersApiKeyAuthParameters apiKeyAuthParameters) { + this.apiKeyAuthParameters = apiKeyAuthParameters; + return this; + } + public UpdateConnectionRequestAuthParametersApiKeyAuthParameters getApiKeyAuthParameters() { + return this.apiKeyAuthParameters; + } + + public UpdateConnectionRequestAuthParameters setAuthorizationType(String authorizationType) { + this.authorizationType = authorizationType; + return this; + } + public String getAuthorizationType() { + return this.authorizationType; + } + + public UpdateConnectionRequestAuthParameters setBasicAuthParameters(UpdateConnectionRequestAuthParametersBasicAuthParameters basicAuthParameters) { + this.basicAuthParameters = basicAuthParameters; + return this; + } + public UpdateConnectionRequestAuthParametersBasicAuthParameters getBasicAuthParameters() { + return this.basicAuthParameters; + } + + public UpdateConnectionRequestAuthParameters setOauthParameters(UpdateConnectionRequestAuthParametersOauthParameters oauthParameters) { + this.oauthParameters = oauthParameters; + return this; + } + public UpdateConnectionRequestAuthParametersOauthParameters getOauthParameters() { + return this.oauthParameters; + } + + } + + public static class UpdateConnectionRequestNetworkParameters extends TeaModel { + /** + *

The network type. Valid values:

+ *
  PublicNetwork and PrivateNetwork.
+         * 
+         *   *   Note: If you set this parameter to PrivateNetwork, you must configure VpcId, VswitcheId, and SecurityGroupId.
+         * 
+         *   This parameter is required.
+         * 
+ * + * example: + *

PublicNetwork

+ */ + @NameInMap("networkType") + public String networkType; + + /** + *

The ID of the security group.

+ * + * example: + *

eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9****

+ */ + @NameInMap("securityGroupId") + public String securityGroupId; + + /** + *

The VPC. ID

+ * + * example: + *

eb-test/vpc-bp1symadadwnwg****

+ */ + @NameInMap("vpcId") + public String vpcId; + + /** + *

The vSwitch ID.

+ * + * example: + *

vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeq****

+ */ + @NameInMap("vswitcheId") + public String vswitcheId; + + public static UpdateConnectionRequestNetworkParameters build(java.util.Map map) throws Exception { + UpdateConnectionRequestNetworkParameters self = new UpdateConnectionRequestNetworkParameters(); + return TeaModel.build(map, self); + } + + public UpdateConnectionRequestNetworkParameters setNetworkType(String networkType) { + this.networkType = networkType; + return this; + } + public String getNetworkType() { + return this.networkType; + } + + public UpdateConnectionRequestNetworkParameters setSecurityGroupId(String securityGroupId) { + this.securityGroupId = securityGroupId; + return this; + } + public String getSecurityGroupId() { + return this.securityGroupId; + } + + public UpdateConnectionRequestNetworkParameters setVpcId(String vpcId) { + this.vpcId = vpcId; + return this; + } + public String getVpcId() { + return this.vpcId; + } + + public UpdateConnectionRequestNetworkParameters setVswitcheId(String vswitcheId) { + this.vswitcheId = vswitcheId; + return this; + } + public String getVswitcheId() { + return this.vswitcheId; + } + + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateConnectionResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateConnectionResponse.java new file mode 100644 index 00000000..c8d34c72 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateConnectionResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class UpdateConnectionResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public UpdateConnectionResponseBody body; + + public static UpdateConnectionResponse build(java.util.Map map) throws Exception { + UpdateConnectionResponse self = new UpdateConnectionResponse(); + return TeaModel.build(map, self); + } + + public UpdateConnectionResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public UpdateConnectionResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public UpdateConnectionResponse setBody(UpdateConnectionResponseBody body) { + this.body = body; + return this; + } + public UpdateConnectionResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateConnectionResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateConnectionResponseBody.java new file mode 100644 index 00000000..5663d7a8 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateConnectionResponseBody.java @@ -0,0 +1,63 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class UpdateConnectionResponseBody extends TeaModel { + /** + *

The returned response code.

+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The returned message.

+ * + * example: + *

success

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

8346BE8F-40F3-533D-A0B8-1359C31BD5BA

+ */ + @NameInMap("requestId") + public String requestId; + + public static UpdateConnectionResponseBody build(java.util.Map map) throws Exception { + UpdateConnectionResponseBody self = new UpdateConnectionResponseBody(); + return TeaModel.build(map, self); + } + + public UpdateConnectionResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public UpdateConnectionResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public UpdateConnectionResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventRuleRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventRuleRequest.java new file mode 100644 index 00000000..46a03a30 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventRuleRequest.java @@ -0,0 +1,79 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class UpdateEventRuleRequest extends TeaModel { + /** + *

The name of the event bus with which the event source is associated. + * This parameter is required.

+ * + * example: + *

my-event-bus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event rule. + * This parameter is required.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventRuleName") + public String eventRuleName; + + @NameInMap("description") + public String description; + + /** + *

The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field.

+ *
You can specify up to five expressions in the map data structure in each field.
+     * 
+ *

This parameter is required.

+ * + * example: + *

{"source": [{"prefix": "acs."}],"type": [{"prefix":"oss:ObjectReplication"}],"subject":[{"prefix":"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/", "suffix":".txt"}]}

+ */ + @NameInMap("filterPattern") + public String filterPattern; + + public static UpdateEventRuleRequest build(java.util.Map map) throws Exception { + UpdateEventRuleRequest self = new UpdateEventRuleRequest(); + return TeaModel.build(map, self); + } + + public UpdateEventRuleRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public UpdateEventRuleRequest setEventRuleName(String eventRuleName) { + this.eventRuleName = eventRuleName; + return this; + } + public String getEventRuleName() { + return this.eventRuleName; + } + + public UpdateEventRuleRequest setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public UpdateEventRuleRequest setFilterPattern(String filterPattern) { + this.filterPattern = filterPattern; + return this; + } + public String getFilterPattern() { + return this.filterPattern; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventRuleResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventRuleResponse.java new file mode 100644 index 00000000..c52c2ab0 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventRuleResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class UpdateEventRuleResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public UpdateEventRuleResponseBody body; + + public static UpdateEventRuleResponse build(java.util.Map map) throws Exception { + UpdateEventRuleResponse self = new UpdateEventRuleResponse(); + return TeaModel.build(map, self); + } + + public UpdateEventRuleResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public UpdateEventRuleResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public UpdateEventRuleResponse setBody(UpdateEventRuleResponseBody body) { + this.body = body; + return this; + } + public UpdateEventRuleResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventRuleResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventRuleResponseBody.java new file mode 100644 index 00000000..45e354e7 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventRuleResponseBody.java @@ -0,0 +1,67 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class UpdateEventRuleResponseBody extends TeaModel { + /** + *

The returned response code. Valid values:

+ *
*   Success: The request is successful.
+     * 
+     * *   Other codes: The request failed. For more information about error codes, see Error codes.
+     * 
+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The returned error message.

+ * + * example: + *

Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

2922208e-e1c6-43ee-bfd1-aca50263bc8a

+ */ + @NameInMap("requestId") + public String requestId; + + public static UpdateEventRuleResponseBody build(java.util.Map map) throws Exception { + UpdateEventRuleResponseBody self = new UpdateEventRuleResponseBody(); + return TeaModel.build(map, self); + } + + public UpdateEventRuleResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public UpdateEventRuleResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public UpdateEventRuleResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventSourceRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventSourceRequest.java new file mode 100644 index 00000000..99714d26 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventSourceRequest.java @@ -0,0 +1,95 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class UpdateEventSourceRequest extends TeaModel { + /** + *

The name of the event bus with which the event source is associated. + * This parameter is required.

+ * + * example: + *

my-event-bus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event source. + * This parameter is required.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventSourceName") + public String eventSourceName; + + /** + *

The description of the event source.

+ */ + @NameInMap("description") + public String description; + + @NameInMap("className") + public String className; + + @NameInMap("status") + public Integer status; + + @NameInMap("config") + public java.util.Map config; + + public static UpdateEventSourceRequest build(java.util.Map map) throws Exception { + UpdateEventSourceRequest self = new UpdateEventSourceRequest(); + return TeaModel.build(map, self); + } + + public UpdateEventSourceRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public UpdateEventSourceRequest setEventSourceName(String eventSourceName) { + this.eventSourceName = eventSourceName; + return this; + } + public String getEventSourceName() { + return this.eventSourceName; + } + + public UpdateEventSourceRequest setDescription(String description) { + this.description = description; + return this; + } + public String getDescription() { + return this.description; + } + + public UpdateEventSourceRequest setClassName(String className) { + this.className = className; + return this; + } + public String getClassName() { + return this.className; + } + + public UpdateEventSourceRequest setStatus(Integer status) { + this.status = status; + return this; + } + public Integer getStatus() { + return this.status; + } + + public UpdateEventSourceRequest setConfig(java.util.Map config) { + this.config = config; + return this; + } + public java.util.Map getConfig() { + return this.config; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventSourceResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventSourceResponse.java new file mode 100644 index 00000000..6aaf6212 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventSourceResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class UpdateEventSourceResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public UpdateEventSourceResponseBody body; + + public static UpdateEventSourceResponse build(java.util.Map map) throws Exception { + UpdateEventSourceResponse self = new UpdateEventSourceResponse(); + return TeaModel.build(map, self); + } + + public UpdateEventSourceResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public UpdateEventSourceResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public UpdateEventSourceResponse setBody(UpdateEventSourceResponseBody body) { + this.body = body; + return this; + } + public UpdateEventSourceResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventSourceResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventSourceResponseBody.java new file mode 100644 index 00000000..c2d36f54 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventSourceResponseBody.java @@ -0,0 +1,67 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class UpdateEventSourceResponseBody extends TeaModel { + /** + *

The returned response code. Valid values:

+ *
*   Success: The request is successful.
+     * 
+     * *   Other codes: The request failed. For more information about error codes, see Error codes.
+     * 
+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The returned error message.

+ * + * example: + *

Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

2922208e-e1c6-43ee-bfd1-aca50263bc8a

+ */ + @NameInMap("requestId") + public String requestId; + + public static UpdateEventSourceResponseBody build(java.util.Map map) throws Exception { + UpdateEventSourceResponseBody self = new UpdateEventSourceResponseBody(); + return TeaModel.build(map, self); + } + + public UpdateEventSourceResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public UpdateEventSourceResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public UpdateEventSourceResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventTargetsRequest.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventTargetsRequest.java new file mode 100644 index 00000000..0a850482 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventTargetsRequest.java @@ -0,0 +1,59 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class UpdateEventTargetsRequest extends TeaModel { + /** + *

The name of the event bus with which the event target is associated. + * This parameter is required.

+ * + * example: + *

my-event-bus

+ */ + @NameInMap("eventBusName") + public String eventBusName; + + /** + *

The name of the event rule. + * This parameter is required.

+ * + * example: + *

myrabbitmq.sourc

+ */ + @NameInMap("eventRuleName") + public String eventRuleName; + + @NameInMap("eventTargets") + public java.util.List eventTargets; + + public static UpdateEventTargetsRequest build(java.util.Map map) throws Exception { + UpdateEventTargetsRequest self = new UpdateEventTargetsRequest(); + return TeaModel.build(map, self); + } + + public UpdateEventTargetsRequest setEventBusName(String eventBusName) { + this.eventBusName = eventBusName; + return this; + } + public String getEventBusName() { + return this.eventBusName; + } + + public UpdateEventTargetsRequest setEventRuleName(String eventRuleName) { + this.eventRuleName = eventRuleName; + return this; + } + public String getEventRuleName() { + return this.eventRuleName; + } + + public UpdateEventTargetsRequest setEventTargets(java.util.List eventTargets) { + this.eventTargets = eventTargets; + return this; + } + public java.util.List getEventTargets() { + return this.eventTargets; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventTargetsResponse.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventTargetsResponse.java new file mode 100644 index 00000000..09d9c1c4 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventTargetsResponse.java @@ -0,0 +1,45 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class UpdateEventTargetsResponse extends TeaModel { + @NameInMap("headers") + public java.util.Map headers; + + @NameInMap("statusCode") + public Integer statusCode; + + @NameInMap("body") + public UpdateEventTargetsResponseBody body; + + public static UpdateEventTargetsResponse build(java.util.Map map) throws Exception { + UpdateEventTargetsResponse self = new UpdateEventTargetsResponse(); + return TeaModel.build(map, self); + } + + public UpdateEventTargetsResponse setHeaders(java.util.Map headers) { + this.headers = headers; + return this; + } + public java.util.Map getHeaders() { + return this.headers; + } + + public UpdateEventTargetsResponse setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + public Integer getStatusCode() { + return this.statusCode; + } + + public UpdateEventTargetsResponse setBody(UpdateEventTargetsResponseBody body) { + this.body = body; + return this; + } + public UpdateEventTargetsResponseBody getBody() { + return this.body; + } + +} diff --git a/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventTargetsResponseBody.java b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventTargetsResponseBody.java new file mode 100644 index 00000000..b37abef7 --- /dev/null +++ b/sdk/generated/java/src/main/java/org/apache/rocketmq/eventbridge/sdk/models/UpdateEventTargetsResponseBody.java @@ -0,0 +1,67 @@ +// This file is auto-generated, don't edit it. Thanks. +package org.apache.rocketmq.eventbridge.sdk.models; + +import com.aliyun.tea.*; + +public class UpdateEventTargetsResponseBody extends TeaModel { + /** + *

The returned response code. Valid values:

+ *
*   Success: The request is successful.
+     * 
+     * *   Other codes: The request failed. For more information about error codes, see Error codes.
+     * 
+ * + * example: + *

Success

+ */ + @NameInMap("code") + public String code; + + /** + *

The returned error message.

+ * + * example: + *

Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \r\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]

+ */ + @NameInMap("message") + public String message; + + /** + *

The request ID.

+ * + * example: + *

2922208e-e1c6-43ee-bfd1-aca50263bc8a

+ */ + @NameInMap("requestId") + public String requestId; + + public static UpdateEventTargetsResponseBody build(java.util.Map map) throws Exception { + UpdateEventTargetsResponseBody self = new UpdateEventTargetsResponseBody(); + return TeaModel.build(map, self); + } + + public UpdateEventTargetsResponseBody setCode(String code) { + this.code = code; + return this; + } + public String getCode() { + return this.code; + } + + public UpdateEventTargetsResponseBody setMessage(String message) { + this.message = message; + return this; + } + public String getMessage() { + return this.message; + } + + public UpdateEventTargetsResponseBody setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + public String getRequestId() { + return this.requestId; + } + +} diff --git a/sdk/generated/php/.gitignore b/sdk/generated/php/.gitignore new file mode 100644 index 00000000..89c7aa58 --- /dev/null +++ b/sdk/generated/php/.gitignore @@ -0,0 +1,15 @@ +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +composer.lock + +.vscode/ +.idea +.DS_Store + +cache/ +*.cache +runtime/ +.php_cs.cache diff --git a/sdk/generated/php/.php_cs.dist b/sdk/generated/php/.php_cs.dist new file mode 100644 index 00000000..8617ec2f --- /dev/null +++ b/sdk/generated/php/.php_cs.dist @@ -0,0 +1,65 @@ +setRiskyAllowed(true) + ->setIndent(' ') + ->setRules([ + '@PSR2' => true, + '@PhpCsFixer' => true, + '@Symfony:risky' => true, + 'concat_space' => ['spacing' => 'one'], + 'array_syntax' => ['syntax' => 'short'], + 'array_indentation' => true, + 'combine_consecutive_unsets' => true, + 'method_separation' => true, + 'single_quote' => true, + 'declare_equal_normalize' => true, + 'function_typehint_space' => true, + 'hash_to_slash_comment' => true, + 'include' => true, + 'lowercase_cast' => true, + 'no_multiline_whitespace_before_semicolons' => true, + 'no_leading_import_slash' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_spaces_around_offset' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unused_imports' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'object_operator_without_whitespace' => true, + 'single_blank_line_before_namespace' => true, + 'single_class_element_per_statement' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline_array' => true, + 'trim_array_spaces' => true, + 'unary_operator_spaces' => true, + 'whitespace_after_comma_in_array' => true, + 'no_extra_consecutive_blank_lines' => [ + 'curly_brace_block', + 'extra', + 'parenthesis_brace_block', + 'square_brace_block', + 'throw', + 'use', + ], + 'binary_operator_spaces' => [ + 'align_double_arrow' => true, + 'align_equals' => true, + ], + 'braces' => [ + 'allow_single_line_closure' => true, + ], + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('vendor') + ->exclude('tests') + ->in(__DIR__) + ); diff --git a/sdk/generated/php/LICENSE b/sdk/generated/php/LICENSE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/sdk/generated/php/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/sdk/generated/php/autoload.php b/sdk/generated/php/autoload.php new file mode 100644 index 00000000..960ff7d3 --- /dev/null +++ b/sdk/generated/php/autoload.php @@ -0,0 +1,15 @@ +5.5", + "alibabacloud/tea-utils": "^0.2.21", + "alibabacloud/darabonba-openapi": "^0.2.12" + }, + "autoload": { + "psr-4": { + "RocketMQ\\Eventbridge\\SDK\\": "src" + } + }, + "scripts": { + "fixer": "php-cs-fixer fix ./" + }, + "config": { + "sort-packages": true, + "preferred-install": "dist", + "optimize-autoloader": true + }, + "prefer-stable": true +} \ No newline at end of file diff --git a/sdk/generated/php/src/Models/CreateApiDestinationRequest.php b/sdk/generated/php/src/Models/CreateApiDestinationRequest.php new file mode 100644 index 00000000..b65593be --- /dev/null +++ b/sdk/generated/php/src/Models/CreateApiDestinationRequest.php @@ -0,0 +1,101 @@ + 'apiDestinationName', + 'connectionName' => 'connectionName', + 'description' => 'description', + 'httpApiParameters' => 'httpApiParameters', + 'invocationRateLimitPerSecond' => 'invocationRateLimitPerSecond', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->apiDestinationName) { + $res['apiDestinationName'] = $this->apiDestinationName; + } + if (null !== $this->connectionName) { + $res['connectionName'] = $this->connectionName; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->httpApiParameters) { + $res['httpApiParameters'] = null !== $this->httpApiParameters ? $this->httpApiParameters->toMap() : null; + } + if (null !== $this->invocationRateLimitPerSecond) { + $res['invocationRateLimitPerSecond'] = $this->invocationRateLimitPerSecond; + } + return $res; + } + /** + * @param array $map + * @return CreateApiDestinationRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['apiDestinationName'])){ + $model->apiDestinationName = $map['apiDestinationName']; + } + if(isset($map['connectionName'])){ + $model->connectionName = $map['connectionName']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['httpApiParameters'])){ + $model->httpApiParameters = httpApiParameters::fromMap($map['httpApiParameters']); + } + if(isset($map['invocationRateLimitPerSecond'])){ + $model->invocationRateLimitPerSecond = $map['invocationRateLimitPerSecond']; + } + return $model; + } + /** + * @description The name of the API destination. The name must be 2 to 127 characters in length. This parameter is required. + * @example api-destination-name + * @var string + */ + public $apiDestinationName; + + /** + * @description The name of the connection. The name must be 2 to 127 characters in length. Before you configure this parameter, you must call the CreateConnection operation to create a connection. Then, set this parameter to the name of the connection that you created. This parameter is required. + * @example connection-name + * @var string + */ + public $connectionName; + + /** + * @description The description of the API destination. The description can be up to 255 characters in length. + * @var string + */ + public $description; + + /** + * @description The parameters that are configured for the API destination. This parameter is required. + * @var httpApiParameters + */ + public $httpApiParameters; + + /** + * @description TODO + * @var int + */ + public $invocationRateLimitPerSecond; + +} diff --git a/sdk/generated/php/src/Models/CreateApiDestinationRequest/httpApiParameters.php b/sdk/generated/php/src/Models/CreateApiDestinationRequest/httpApiParameters.php new file mode 100644 index 00000000..36eff19a --- /dev/null +++ b/sdk/generated/php/src/Models/CreateApiDestinationRequest/httpApiParameters.php @@ -0,0 +1,95 @@ + 'endpoint', + 'method' => 'method', + 'apiParameters' => 'apiParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->endpoint) { + $res['endpoint'] = $this->endpoint; + } + if (null !== $this->method) { + $res['method'] = $this->method; + } + if (null !== $this->apiParameters) { + $res['apiParameters'] = []; + if(null !== $this->apiParameters && is_array($this->apiParameters)){ + $n = 0; + foreach($this->apiParameters as $item){ + $res['apiParameters'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + return $res; + } + /** + * @param array $map + * @return httpApiParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['endpoint'])){ + $model->endpoint = $map['endpoint']; + } + if(isset($map['method'])){ + $model->method = $map['method']; + } + if(isset($map['apiParameters'])){ + if(!empty($map['apiParameters'])){ + $model->apiParameters = []; + $n = 0; + foreach($map['apiParameters'] as $item) { + $model->apiParameters[$n++] = null !== $item ? apiParameters::fromMap($item) : $item; + } + } + } + return $model; + } + /** + * @description The endpoint of the API destination. The endpoint can be up to 127 characters in length. This parameter is required. + * @example http://127.0.0.1:8001/api + * @var string + */ + public $endpoint; + + /** + * @description The HTTP request method. Valid values: + + + * GET + + * POST + + * HEAD + + * DELETE + + * PUT + + * PATCH + + + This parameter is required. + * @example POST + * @var string + */ + public $method; + + /** + * @description TODO + * @var apiParameters[] + */ + public $apiParameters; + +} diff --git a/sdk/generated/php/src/Models/CreateApiDestinationRequest/httpApiParameters/apiParameters.php b/sdk/generated/php/src/Models/CreateApiDestinationRequest/httpApiParameters/apiParameters.php new file mode 100644 index 00000000..874f8480 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateApiDestinationRequest/httpApiParameters/apiParameters.php @@ -0,0 +1,85 @@ + 'name', + 'description' => 'description', + 'type' => 'type', + 'defaultValue' => 'defaultValue', + 'in' => 'in', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->name) { + $res['name'] = $this->name; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->type) { + $res['type'] = $this->type; + } + if (null !== $this->defaultValue) { + $res['defaultValue'] = $this->defaultValue; + } + if (null !== $this->in) { + $res['in'] = $this->in; + } + return $res; + } + /** + * @param array $map + * @return apiParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['name'])){ + $model->name = $map['name']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['type'])){ + $model->type = $map['type']; + } + if(isset($map['defaultValue'])){ + $model->defaultValue = $map['defaultValue']; + } + if(isset($map['in'])){ + $model->in = $map['in']; + } + return $model; + } + /** + * @var string + */ + public $name; + + /** + * @description The description of the API destination. The description can be up to 255 characters in length. + * @var string + */ + public $description; + + /** + * @var string + */ + public $type; + + /** + * @var string + */ + public $defaultValue; + + /** + * @var string + */ + public $in; + +} diff --git a/sdk/generated/php/src/Models/CreateApiDestinationResponse.php b/sdk/generated/php/src/Models/CreateApiDestinationResponse.php new file mode 100644 index 00000000..85212c2a --- /dev/null +++ b/sdk/generated/php/src/Models/CreateApiDestinationResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return CreateApiDestinationResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = CreateApiDestinationResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var CreateApiDestinationResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/CreateApiDestinationResponseBody.php b/sdk/generated/php/src/Models/CreateApiDestinationResponseBody.php new file mode 100644 index 00000000..5e20b1b1 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateApiDestinationResponseBody.php @@ -0,0 +1,80 @@ + 'code', + 'apiDestinationName' => 'apiDestinationName', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->apiDestinationName) { + $res['apiDestinationName'] = $this->apiDestinationName; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return CreateApiDestinationResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['apiDestinationName'])){ + $model->apiDestinationName = $map['apiDestinationName']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. The value Success indicates that the request is successful. + * @example Success + * @var string + */ + public $code; + + /** + * @description The name of the API destination. + * @example ApiDestinationName + * @var string + */ + public $apiDestinationName; + + /** + * @description The returned message. + * @example success + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 5DAF96FB-A4B6-548C-B999-0BFDCB2261B9 + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/CreateConnectionRequest.php b/sdk/generated/php/src/Models/CreateConnectionRequest.php new file mode 100644 index 00000000..bf9e3b2a --- /dev/null +++ b/sdk/generated/php/src/Models/CreateConnectionRequest.php @@ -0,0 +1,93 @@ + 'authParameters', + 'connectionName' => 'connectionName', + 'description' => 'description', + 'networkParameters' => 'networkParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->authParameters) { + $res['authParameters'] = null !== $this->authParameters ? $this->authParameters->toMap() : null; + } + if (null !== $this->connectionName) { + $res['connectionName'] = $this->connectionName; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->networkParameters) { + $res['networkParameters'] = null !== $this->networkParameters ? $this->networkParameters->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return CreateConnectionRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['authParameters'])){ + $model->authParameters = authParameters::fromMap($map['authParameters']); + } + if(isset($map['connectionName'])){ + $model->connectionName = $map['connectionName']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['networkParameters'])){ + $model->networkParameters = networkParameters::fromMap($map['networkParameters']); + } + return $model; + } + /** + * @description The parameters that are configured for authentication. + * @var authParameters + */ + public $authParameters; + + /** + * @description The name of the connection. The name must be 2 to 127 characters in length. + + This parameter is required. + * @example connection-name + * @var string + */ + public $connectionName; + + /** + * @description The description of the connection. The description can be up to 255 characters in length. + * @example demo + * @var string + */ + public $description; + + /** + * @description The parameters that are configured for the network. This parameter is required. + * @var networkParameters + */ + public $networkParameters; + +} diff --git a/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters.php b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters.php new file mode 100644 index 00000000..d6520296 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters.php @@ -0,0 +1,99 @@ + 'apiKeyAuthParameters', + 'authorizationType' => 'authorizationType', + 'basicAuthParameters' => 'basicAuthParameters', + 'oauthParameters' => 'oauthParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->apiKeyAuthParameters) { + $res['apiKeyAuthParameters'] = null !== $this->apiKeyAuthParameters ? $this->apiKeyAuthParameters->toMap() : null; + } + if (null !== $this->authorizationType) { + $res['authorizationType'] = $this->authorizationType; + } + if (null !== $this->basicAuthParameters) { + $res['basicAuthParameters'] = null !== $this->basicAuthParameters ? $this->basicAuthParameters->toMap() : null; + } + if (null !== $this->oauthParameters) { + $res['oauthParameters'] = null !== $this->oauthParameters ? $this->oauthParameters->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return authParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['apiKeyAuthParameters'])){ + $model->apiKeyAuthParameters = apiKeyAuthParameters::fromMap($map['apiKeyAuthParameters']); + } + if(isset($map['authorizationType'])){ + $model->authorizationType = $map['authorizationType']; + } + if(isset($map['basicAuthParameters'])){ + $model->basicAuthParameters = basicAuthParameters::fromMap($map['basicAuthParameters']); + } + if(isset($map['oauthParameters'])){ + $model->oauthParameters = oauthParameters::fromMap($map['oauthParameters']); + } + return $model; + } + /** + * @description The parameters that are configured for API key authentication. + * @var apiKeyAuthParameters + */ + public $apiKeyAuthParameters; + + /** + * @description The authentication type. Valid values: + + BASIC_AUTH: basic authentication. + + Introduction: Basic authentication is a simple authentication scheme built into the HTTP protocol. When you use the HTTP protocol for communications, the authentication method that the HTTP server uses to authenticate user identities on the client is defined in the protocol. The request header is in the Authorization: Basic Base64-encoded string (Username:Password) format. + + 1. Username and Password are required + + API_KEY_AUTH: API key authentication. + + Introduction: The request header is in the Token: Token value format. + + * ApiKeyName and ApiKeyValue are required. + + OAUTH_AUTH: OAuth authentication. + + Introduction: OAuth2.0 is an authentication mechanism. In normal cases, a system that does not use OAuth2.0 can access the resources of the server from the client. To ensure access security, access tokens are used to authenticate users in OAuth 2.0. The client must use an access token to access protected resources. This way, OAuth 2.0 protects resources from being accessed from malicious clients and improves system security. + + * AuthorizationEndpoint, OAuthHttpParameters, and HttpMethod are required. + * @example BASIC_AUTH + * @var string + */ + public $authorizationType; + + /** + * @description The parameters that are configured for basic authentication. + * @var basicAuthParameters + */ + public $basicAuthParameters; + + /** + * @description The parameters that are configured for OAuth authentication. + * @var oauthParameters + */ + public $oauthParameters; + +} diff --git a/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/apiKeyAuthParameters.php b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/apiKeyAuthParameters.php new file mode 100644 index 00000000..1fa8f245 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/apiKeyAuthParameters.php @@ -0,0 +1,52 @@ + 'apiKeyName', + 'apiKeyValue' => 'apiKeyValue', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->apiKeyName) { + $res['apiKeyName'] = $this->apiKeyName; + } + if (null !== $this->apiKeyValue) { + $res['apiKeyValue'] = $this->apiKeyValue; + } + return $res; + } + /** + * @param array $map + * @return apiKeyAuthParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['apiKeyName'])){ + $model->apiKeyName = $map['apiKeyName']; + } + if(isset($map['apiKeyValue'])){ + $model->apiKeyValue = $map['apiKeyValue']; + } + return $model; + } + /** + * @description The key of the API key. + * @example Token + * @var string + */ + public $apiKeyName; + + /** + * @description The value of the API key. + * @example adkjnakddh**** + * @var string + */ + public $apiKeyValue; + +} diff --git a/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/basicAuthParameters.php b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/basicAuthParameters.php new file mode 100644 index 00000000..3daf9d19 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/basicAuthParameters.php @@ -0,0 +1,52 @@ + 'password', + 'username' => 'username', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->password) { + $res['password'] = $this->password; + } + if (null !== $this->username) { + $res['username'] = $this->username; + } + return $res; + } + /** + * @param array $map + * @return basicAuthParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['password'])){ + $model->password = $map['password']; + } + if(isset($map['username'])){ + $model->username = $map['username']; + } + return $model; + } + /** + * @description The password for basic authentication. + * @example ******* + * @var string + */ + public $password; + + /** + * @description The username for basic authentication. + * @example admin + * @var string + */ + public $username; + +} diff --git a/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters.php b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters.php new file mode 100644 index 00000000..928b9408 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters.php @@ -0,0 +1,87 @@ + 'authorizationEndpoint', + 'clientParameters' => 'clientParameters', + 'httpMethod' => 'httpMethod', + 'oauthHttpParameters' => 'oauthHttpParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->authorizationEndpoint) { + $res['authorizationEndpoint'] = $this->authorizationEndpoint; + } + if (null !== $this->clientParameters) { + $res['clientParameters'] = null !== $this->clientParameters ? $this->clientParameters->toMap() : null; + } + if (null !== $this->httpMethod) { + $res['httpMethod'] = $this->httpMethod; + } + if (null !== $this->oauthHttpParameters) { + $res['oauthHttpParameters'] = null !== $this->oauthHttpParameters ? $this->oauthHttpParameters->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return oauthParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['authorizationEndpoint'])){ + $model->authorizationEndpoint = $map['authorizationEndpoint']; + } + if(isset($map['clientParameters'])){ + $model->clientParameters = clientParameters::fromMap($map['clientParameters']); + } + if(isset($map['httpMethod'])){ + $model->httpMethod = $map['httpMethod']; + } + if(isset($map['oauthHttpParameters'])){ + $model->oauthHttpParameters = oauthHttpParameters::fromMap($map['oauthHttpParameters']); + } + return $model; + } + /** + * @description The endpoint that is used to obtain the OAuth token. + * @example http://localhost:8080/oauth/token + * @var string + */ + public $authorizationEndpoint; + + /** + * @description The parameters that are configured for the client. + * @var clientParameters + */ + public $clientParameters; + + /** + * @description The HTTP request method. Valid values: + + - GET + + - POST + + - HEAD + * @example POST + * @var string + */ + public $httpMethod; + + /** + * @description The request parameters for OAuth authentication. + * @var oauthHttpParameters + */ + public $oauthHttpParameters; + +} diff --git a/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/clientParameters.php b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/clientParameters.php new file mode 100644 index 00000000..b35902f7 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/clientParameters.php @@ -0,0 +1,52 @@ + 'clientID', + 'clientSecret' => 'clientSecret', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->clientID) { + $res['clientID'] = $this->clientID; + } + if (null !== $this->clientSecret) { + $res['clientSecret'] = $this->clientSecret; + } + return $res; + } + /** + * @param array $map + * @return clientParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['clientID'])){ + $model->clientID = $map['clientID']; + } + if(isset($map['clientSecret'])){ + $model->clientSecret = $map['clientSecret']; + } + return $model; + } + /** + * @description The client ID. + * @example ClientID + * @var string + */ + public $clientID; + + /** + * @description The client key secret of the application. + * @example ClientSecret + * @var string + */ + public $clientSecret; + +} diff --git a/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters.php b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters.php new file mode 100644 index 00000000..26dae21f --- /dev/null +++ b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters.php @@ -0,0 +1,103 @@ + 'bodyParameters', + 'headerParameters' => 'headerParameters', + 'queryStringParameters' => 'queryStringParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->bodyParameters) { + $res['bodyParameters'] = []; + if(null !== $this->bodyParameters && is_array($this->bodyParameters)){ + $n = 0; + foreach($this->bodyParameters as $item){ + $res['bodyParameters'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->headerParameters) { + $res['headerParameters'] = []; + if(null !== $this->headerParameters && is_array($this->headerParameters)){ + $n = 0; + foreach($this->headerParameters as $item){ + $res['headerParameters'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->queryStringParameters) { + $res['queryStringParameters'] = []; + if(null !== $this->queryStringParameters && is_array($this->queryStringParameters)){ + $n = 0; + foreach($this->queryStringParameters as $item){ + $res['queryStringParameters'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + return $res; + } + /** + * @param array $map + * @return oauthHttpParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['bodyParameters'])){ + if(!empty($map['bodyParameters'])){ + $model->bodyParameters = []; + $n = 0; + foreach($map['bodyParameters'] as $item) { + $model->bodyParameters[$n++] = null !== $item ? bodyParameters::fromMap($item) : $item; + } + } + } + if(isset($map['headerParameters'])){ + if(!empty($map['headerParameters'])){ + $model->headerParameters = []; + $n = 0; + foreach($map['headerParameters'] as $item) { + $model->headerParameters[$n++] = null !== $item ? headerParameters::fromMap($item) : $item; + } + } + } + if(isset($map['queryStringParameters'])){ + if(!empty($map['queryStringParameters'])){ + $model->queryStringParameters = []; + $n = 0; + foreach($map['queryStringParameters'] as $item) { + $model->queryStringParameters[$n++] = null !== $item ? queryStringParameters::fromMap($item) : $item; + } + } + } + return $model; + } + /** + * @description The parameters that are configured for the request. + * @var bodyParameters[] + */ + public $bodyParameters; + + /** + * @description The parameters that are configured for the request header. + * @var headerParameters[] + */ + public $headerParameters; + + /** + * @description The parameters that are configured for the request path. + * @var queryStringParameters[] + */ + public $queryStringParameters; + +} diff --git a/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/bodyParameters.php b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/bodyParameters.php new file mode 100644 index 00000000..3636af8f --- /dev/null +++ b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/bodyParameters.php @@ -0,0 +1,66 @@ + 'isValueSecret', + 'key' => 'key', + 'value' => 'value', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->isValueSecret) { + $res['isValueSecret'] = $this->isValueSecret; + } + if (null !== $this->key) { + $res['key'] = $this->key; + } + if (null !== $this->value) { + $res['value'] = $this->value; + } + return $res; + } + /** + * @param array $map + * @return bodyParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['isValueSecret'])){ + $model->isValueSecret = $map['isValueSecret']; + } + if(isset($map['key'])){ + $model->key = $map['key']; + } + if(isset($map['value'])){ + $model->value = $map['value']; + } + return $model; + } + /** + * @description Indicates whether authentication is enabled. + * @example false + * @var string + */ + public $isValueSecret; + + /** + * @description The key in the request body. + * @example name + * @var string + */ + public $key; + + /** + * @description The value of the key in the request body. + * @example demo + * @var string + */ + public $value; + +} diff --git a/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/headerParameters.php b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/headerParameters.php new file mode 100644 index 00000000..ba47b6d6 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/headerParameters.php @@ -0,0 +1,66 @@ + 'isValueSecret', + 'key' => 'key', + 'value' => 'value', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->isValueSecret) { + $res['isValueSecret'] = $this->isValueSecret; + } + if (null !== $this->key) { + $res['key'] = $this->key; + } + if (null !== $this->value) { + $res['value'] = $this->value; + } + return $res; + } + /** + * @param array $map + * @return headerParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['isValueSecret'])){ + $model->isValueSecret = $map['isValueSecret']; + } + if(isset($map['key'])){ + $model->key = $map['key']; + } + if(isset($map['value'])){ + $model->value = $map['value']; + } + return $model; + } + /** + * @description Indicates whether authentication is enabled. + * @example false + * @var string + */ + public $isValueSecret; + + /** + * @description The key in the request header. + * @example name + * @var string + */ + public $key; + + /** + * @description The value of the key in the request header. + * @example demo + * @var string + */ + public $value; + +} diff --git a/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/queryStringParameters.php b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/queryStringParameters.php new file mode 100644 index 00000000..39491840 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/queryStringParameters.php @@ -0,0 +1,66 @@ + 'isValueSecret', + 'key' => 'key', + 'value' => 'value', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->isValueSecret) { + $res['isValueSecret'] = $this->isValueSecret; + } + if (null !== $this->key) { + $res['key'] = $this->key; + } + if (null !== $this->value) { + $res['value'] = $this->value; + } + return $res; + } + /** + * @param array $map + * @return queryStringParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['isValueSecret'])){ + $model->isValueSecret = $map['isValueSecret']; + } + if(isset($map['key'])){ + $model->key = $map['key']; + } + if(isset($map['value'])){ + $model->value = $map['value']; + } + return $model; + } + /** + * @description Indicates whether authentication is enabled. + * @example false + * @var string + */ + public $isValueSecret; + + /** + * @description The key in the request path. + * @example name + * @var string + */ + public $key; + + /** + * @description The value of the key in the request path. + * @example demo + * @var string + */ + public $value; + +} diff --git a/sdk/generated/php/src/Models/CreateConnectionRequest/networkParameters.php b/sdk/generated/php/src/Models/CreateConnectionRequest/networkParameters.php new file mode 100644 index 00000000..3a8abe2c --- /dev/null +++ b/sdk/generated/php/src/Models/CreateConnectionRequest/networkParameters.php @@ -0,0 +1,86 @@ + 'networkType', + 'securityGroupId' => 'securityGroupId', + 'vpcId' => 'vpcId', + 'vswitcheId' => 'vswitcheId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->networkType) { + $res['networkType'] = $this->networkType; + } + if (null !== $this->securityGroupId) { + $res['securityGroupId'] = $this->securityGroupId; + } + if (null !== $this->vpcId) { + $res['vpcId'] = $this->vpcId; + } + if (null !== $this->vswitcheId) { + $res['vswitcheId'] = $this->vswitcheId; + } + return $res; + } + /** + * @param array $map + * @return networkParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['networkType'])){ + $model->networkType = $map['networkType']; + } + if(isset($map['securityGroupId'])){ + $model->securityGroupId = $map['securityGroupId']; + } + if(isset($map['vpcId'])){ + $model->vpcId = $map['vpcId']; + } + if(isset($map['vswitcheId'])){ + $model->vswitcheId = $map['vswitcheId']; + } + return $model; + } + /** + * @description The network type. Valid values: + + PublicNetwork and PrivateNetwork. + + * Note: If you set this parameter to PrivateNetwork, you must configure VpcId, VswitcheId, and SecurityGroupId. + + This parameter is required. + * @example PublicNetwork + * @var string + */ + public $networkType; + + /** + * @description The ID of the security group. + * @example eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9**** + * @var string + */ + public $securityGroupId; + + /** + * @description The VPC. ID + * @example eb-test/vpc-bp1symadadwnwg**** + * @var string + */ + public $vpcId; + + /** + * @description The vSwitch ID. + * @example vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeq**** + * @var string + */ + public $vswitcheId; + +} diff --git a/sdk/generated/php/src/Models/CreateConnectionResponse.php b/sdk/generated/php/src/Models/CreateConnectionResponse.php new file mode 100644 index 00000000..17c7f2ee --- /dev/null +++ b/sdk/generated/php/src/Models/CreateConnectionResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return CreateConnectionResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = CreateConnectionResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var CreateConnectionResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/CreateConnectionResponseBody.php b/sdk/generated/php/src/Models/CreateConnectionResponseBody.php new file mode 100644 index 00000000..c3328581 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateConnectionResponseBody.php @@ -0,0 +1,80 @@ + 'code', + 'connectionName' => 'connectionName', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->connectionName) { + $res['connectionName'] = $this->connectionName; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return CreateConnectionResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['connectionName'])){ + $model->connectionName = $map['connectionName']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. The value Success indicates that the request is successful. + * @example Success + * @var string + */ + public $code; + + /** + * @description The connection name. + * @example connection-demo + * @var string + */ + public $connectionName; + + /** + * @description The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + * @example success + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 7DA60DED-CD36-5837-B848-C01A23D2**** + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/CreateEventBusRequest.php b/sdk/generated/php/src/Models/CreateEventBusRequest.php new file mode 100644 index 00000000..f285209a --- /dev/null +++ b/sdk/generated/php/src/Models/CreateEventBusRequest.php @@ -0,0 +1,59 @@ + 'description', + 'eventBusName' => 'eventBusName', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + return $res; + } + /** + * @param array $map + * @return CreateEventBusRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + return $model; + } + /** + * @description The description of the event bus. + * @example demo + * @var string + */ + public $description; + + /** + * @description The name of the event bus. This parameter is required. + * @example MyEventBus + * @var string + */ + public $eventBusName; + +} diff --git a/sdk/generated/php/src/Models/CreateEventBusResponse.php b/sdk/generated/php/src/Models/CreateEventBusResponse.php new file mode 100644 index 00000000..d8864111 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateEventBusResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return CreateEventBusResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = CreateEventBusResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var CreateEventBusResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/CreateEventBusResponseBody.php b/sdk/generated/php/src/Models/CreateEventBusResponseBody.php new file mode 100644 index 00000000..41092b76 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateEventBusResponseBody.php @@ -0,0 +1,94 @@ + 'code', + 'eventBusName' => 'eventBusName', + 'message' => 'message', + 'requestId' => 'requestId', + 'success' => 'success', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + if (null !== $this->success) { + $res['success'] = $this->success; + } + return $res; + } + /** + * @param array $map + * @return CreateEventBusResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + if(isset($map['success'])){ + $model->success = $map['success']; + } + return $model; + } + /** + * @description The returned response code. The value Success indicates that the request is successful. Other values indicate that the request failed. For more information about error codes, see Error codes. + * @example Success + * @var string + */ + public $code; + + /** + * @description The name of the event bus. This parameter is required. + * @example MyEventBus + * @var string + */ + public $eventBusName; + + /** + * @description The returned error message. + * @example The event bus [xxxx] not existed! + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example A995F07C-E503-5881-9962-9CECA8566876 + * @var string + */ + public $requestId; + + /** + * @description Indicates whether the request is successful. The value true indicates that the request is successful. + * @example true + * @var bool + */ + public $success; + +} diff --git a/sdk/generated/php/src/Models/CreateEventRuleRequest.php b/sdk/generated/php/src/Models/CreateEventRuleRequest.php new file mode 100644 index 00000000..25c0afdc --- /dev/null +++ b/sdk/generated/php/src/Models/CreateEventRuleRequest.php @@ -0,0 +1,92 @@ + 'eventBusName', + 'eventRuleName' => 'eventRuleName', + 'description' => 'description', + 'filterPattern' => 'filterPattern', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventRuleName) { + $res['eventRuleName'] = $this->eventRuleName; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->filterPattern) { + $res['filterPattern'] = $this->filterPattern; + } + return $res; + } + /** + * @param array $map + * @return CreateEventRuleRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventRuleName'])){ + $model->eventRuleName = $map['eventRuleName']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['filterPattern'])){ + $model->filterPattern = $map['filterPattern']; + } + return $model; + } + /** + * @description The name of the event bus with which the event source is associated. +This parameter is required. + * @example my-event-bus + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event rule. +This parameter is required. + * @example myrabbitmq.sourc + * @var string + */ + public $eventRuleName; + + /** + * @var string + */ + public $description; + + /** + * @description The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + + You can specify up to five expressions in the map data structure in each field. + * @example {\"source\": [{\"prefix\": \"acs.\"}],\"type\": [{\"prefix\":\"oss:ObjectReplication\"}],\"subject\":[{\"prefix\":\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\", \"suffix\":\".txt\"}]} + * @var string + */ + public $filterPattern; + +} diff --git a/sdk/generated/php/src/Models/CreateEventRuleResponse.php b/sdk/generated/php/src/Models/CreateEventRuleResponse.php new file mode 100644 index 00000000..4c3731c6 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateEventRuleResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return CreateEventRuleResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = CreateEventRuleResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var CreateEventRuleResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/CreateEventRuleResponseBody.php b/sdk/generated/php/src/Models/CreateEventRuleResponseBody.php new file mode 100644 index 00000000..a27cb359 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateEventRuleResponseBody.php @@ -0,0 +1,84 @@ + 'code', + 'eventRuleName' => 'eventRuleName', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->eventRuleName) { + $res['eventRuleName'] = $this->eventRuleName; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return CreateEventRuleResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['eventRuleName'])){ + $model->eventRuleName = $map['eventRuleName']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. Valid values: + + * Success: The request is successful. + + * Other codes: The request failed. For more information about error codes, see Error codes. + * @example Success + * @var string + */ + public $code; + + /** + * @description The name of the event rule. + * @example myrabbitmq.sourc + * @var string + */ + public $eventRuleName; + + /** + * @description The returned error message. + * @example Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 2922208e-e1c6-43ee-bfd1-aca50263bc8a + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/CreateEventSourceRequest.php b/sdk/generated/php/src/Models/CreateEventSourceRequest.php new file mode 100644 index 00000000..3f4bdaf8 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateEventSourceRequest.php @@ -0,0 +1,99 @@ + 'description', + 'eventBusName' => 'eventBusName', + 'eventSourceName' => 'eventSourceName', + 'className' => 'className', + 'config' => 'config', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventSourceName) { + $res['eventSourceName'] = $this->eventSourceName; + } + if (null !== $this->className) { + $res['className'] = $this->className; + } + if (null !== $this->config) { + $res['config'] = $this->config; + } + return $res; + } + /** + * @param array $map + * @return CreateEventSourceRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventSourceName'])){ + $model->eventSourceName = $map['eventSourceName']; + } + if(isset($map['className'])){ + $model->className = $map['className']; + } + if(isset($map['config'])){ + $model->config = $map['config']; + } + return $model; + } + /** + * @description The description of the event source. + * @var string + */ + public $description; + + /** + * @description The name of the event bus with which the event source is associated. +This parameter is required. + * @example my-event-bus + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event source. +This parameter is required. + * @example myrabbitmq.sourc + * @var string + */ + public $eventSourceName; + + /** + * @var string + */ + public $className; + + /** + * @var mixed[] + */ + public $config; + +} diff --git a/sdk/generated/php/src/Models/CreateEventSourceResponse.php b/sdk/generated/php/src/Models/CreateEventSourceResponse.php new file mode 100644 index 00000000..593ccc19 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateEventSourceResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return CreateEventSourceResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = CreateEventSourceResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var CreateEventSourceResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/CreateEventSourceResponseBody.php b/sdk/generated/php/src/Models/CreateEventSourceResponseBody.php new file mode 100644 index 00000000..720d6df7 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateEventSourceResponseBody.php @@ -0,0 +1,84 @@ + 'code', + 'eventSourceName' => 'eventSourceName', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->eventSourceName) { + $res['eventSourceName'] = $this->eventSourceName; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return CreateEventSourceResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['eventSourceName'])){ + $model->eventSourceName = $map['eventSourceName']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. Valid values: + + * Success: The request is successful. + + * Other codes: The request failed. For more information about error codes, see Error codes. + * @example Success + * @var string + */ + public $code; + + /** + * @description The name of the event source. + * @example myrabbitmq.sourc + * @var string + */ + public $eventSourceName; + + /** + * @description The returned error message. + * @example Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 2922208e-e1c6-43ee-bfd1-aca50263bc8a + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/CreateEventTargetsRequest.php b/sdk/generated/php/src/Models/CreateEventTargetsRequest.php new file mode 100644 index 00000000..798e15bc --- /dev/null +++ b/sdk/generated/php/src/Models/CreateEventTargetsRequest.php @@ -0,0 +1,80 @@ + 'eventBusName', + 'eventRuleName' => 'eventRuleName', + 'eventTargets' => 'eventTargets', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventRuleName) { + $res['eventRuleName'] = $this->eventRuleName; + } + if (null !== $this->eventTargets) { + $res['eventTargets'] = []; + if(null !== $this->eventTargets && is_array($this->eventTargets)){ + $n = 0; + foreach($this->eventTargets as $item){ + $res['eventTargets'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + return $res; + } + /** + * @param array $map + * @return CreateEventTargetsRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventRuleName'])){ + $model->eventRuleName = $map['eventRuleName']; + } + if(isset($map['eventTargets'])){ + if(!empty($map['eventTargets'])){ + $model->eventTargets = []; + $n = 0; + foreach($map['eventTargets'] as $item) { + $model->eventTargets[$n++] = null !== $item ? EventTarget::fromMap($item) : $item; + } + } + } + return $model; + } + /** + * @description The name of the event bus with which the event target is associated. +This parameter is required. + * @example my-event-bus + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event rule. +This parameter is required. + * @example myrabbitmq.sourc + * @var string + */ + public $eventRuleName; + + /** + * @var EventTarget[] + */ + public $eventTargets; + +} diff --git a/sdk/generated/php/src/Models/CreateEventTargetsResponse.php b/sdk/generated/php/src/Models/CreateEventTargetsResponse.php new file mode 100644 index 00000000..1c7ab9c8 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateEventTargetsResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return CreateEventTargetsResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = CreateEventTargetsResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var CreateEventTargetsResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/CreateEventTargetsResponseBody.php b/sdk/generated/php/src/Models/CreateEventTargetsResponseBody.php new file mode 100644 index 00000000..6ab6a8f2 --- /dev/null +++ b/sdk/generated/php/src/Models/CreateEventTargetsResponseBody.php @@ -0,0 +1,70 @@ + 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return CreateEventTargetsResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. Valid values: + + * Success: The request is successful. + + * Other codes: The request failed. For more information about error codes, see Error codes. + * @example Success + * @var string + */ + public $code; + + /** + * @description The returned error message. + * @example Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 2922208e-e1c6-43ee-bfd1-aca50263bc8a + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/DeleteApiDestinationRequest.php b/sdk/generated/php/src/Models/DeleteApiDestinationRequest.php new file mode 100644 index 00000000..325c64d2 --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteApiDestinationRequest.php @@ -0,0 +1,38 @@ + 'apiDestinationName', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->apiDestinationName) { + $res['apiDestinationName'] = $this->apiDestinationName; + } + return $res; + } + /** + * @param array $map + * @return DeleteApiDestinationRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['apiDestinationName'])){ + $model->apiDestinationName = $map['apiDestinationName']; + } + return $model; + } + /** + * @description The name of the API destination. This parameter is required. + * @example ApiDestinationName + * @var string + */ + public $apiDestinationName; + +} diff --git a/sdk/generated/php/src/Models/DeleteApiDestinationResponse.php b/sdk/generated/php/src/Models/DeleteApiDestinationResponse.php new file mode 100644 index 00000000..3ed759a0 --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteApiDestinationResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return DeleteApiDestinationResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = DeleteApiDestinationResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var DeleteApiDestinationResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/DeleteApiDestinationResponseBody.php b/sdk/generated/php/src/Models/DeleteApiDestinationResponseBody.php new file mode 100644 index 00000000..a6bb6721 --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteApiDestinationResponseBody.php @@ -0,0 +1,66 @@ + 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return DeleteApiDestinationResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. The value Success indicates that the request is successful. + * @example Success + * @var string + */ + public $code; + + /** + * @description The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + * @example success + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 382E6272-8E9C-5681-AC96-A8AF0BFAC1A5 + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/DeleteConnectionRequest.php b/sdk/generated/php/src/Models/DeleteConnectionRequest.php new file mode 100644 index 00000000..cfd79b7c --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteConnectionRequest.php @@ -0,0 +1,38 @@ + 'connectionName', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->connectionName) { + $res['connectionName'] = $this->connectionName; + } + return $res; + } + /** + * @param array $map + * @return DeleteConnectionRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['connectionName'])){ + $model->connectionName = $map['connectionName']; + } + return $model; + } + /** + * @description The name of the connection that you want to delete. This parameter is required. + * @example connection-name + * @var string + */ + public $connectionName; + +} diff --git a/sdk/generated/php/src/Models/DeleteConnectionResponse.php b/sdk/generated/php/src/Models/DeleteConnectionResponse.php new file mode 100644 index 00000000..7ee62d2a --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteConnectionResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return DeleteConnectionResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = DeleteConnectionResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var DeleteConnectionResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/DeleteConnectionResponseBody.php b/sdk/generated/php/src/Models/DeleteConnectionResponseBody.php new file mode 100644 index 00000000..678bf6b9 --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteConnectionResponseBody.php @@ -0,0 +1,66 @@ + 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return DeleteConnectionResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. The value Success indicates that the request is successful. + * @example Success + * @var string + */ + public $code; + + /** + * @description The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + * @example success + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 8EF25E37-1750-5D7A-BA56-F8AE081A69C8 + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/DeleteEventBusRequest.php b/sdk/generated/php/src/Models/DeleteEventBusRequest.php new file mode 100644 index 00000000..c9a40901 --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteEventBusRequest.php @@ -0,0 +1,38 @@ + 'eventBusName', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + return $res; + } + /** + * @param array $map + * @return DeleteEventBusRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + return $model; + } + /** + * @description The name of the event bus. This parameter is required. + * @example MyEventBus + * @var string + */ + public $eventBusName; + +} diff --git a/sdk/generated/php/src/Models/DeleteEventBusResponse.php b/sdk/generated/php/src/Models/DeleteEventBusResponse.php new file mode 100644 index 00000000..dd9a0d8e --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteEventBusResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return DeleteEventBusResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = DeleteEventBusResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var DeleteEventBusResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/DeleteEventBusResponseBody.php b/sdk/generated/php/src/Models/DeleteEventBusResponseBody.php new file mode 100644 index 00000000..ab84d3af --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteEventBusResponseBody.php @@ -0,0 +1,66 @@ + 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return DeleteEventBusResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned HTTP status code. The HTTP status code 200 indicates that the request is successful. + * @example 200 + * @var string + */ + public $code; + + /** + * @description The returned error message. + * @example EventBusNotExist + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example C229E140-1A5C-5D55-8904-CFC5BA4CAA98 + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/DeleteEventRuleRequest.php b/sdk/generated/php/src/Models/DeleteEventRuleRequest.php new file mode 100644 index 00000000..0da92a7f --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteEventRuleRequest.php @@ -0,0 +1,54 @@ + 'eventBusName', + 'eventRuleName' => 'eventRuleName', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventRuleName) { + $res['eventRuleName'] = $this->eventRuleName; + } + return $res; + } + /** + * @param array $map + * @return DeleteEventRuleRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventRuleName'])){ + $model->eventRuleName = $map['eventRuleName']; + } + return $model; + } + /** + * @description The name of the event bus with which the event source is associated. +This parameter is required. + * @example my-event-bus + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event rule. +This parameter is required. + * @example myrabbitmq.sourc + * @var string + */ + public $eventRuleName; + +} diff --git a/sdk/generated/php/src/Models/DeleteEventRuleResponse.php b/sdk/generated/php/src/Models/DeleteEventRuleResponse.php new file mode 100644 index 00000000..5b242a54 --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteEventRuleResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return DeleteEventRuleResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = DeleteEventRuleResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var DeleteEventRuleResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/DeleteEventRuleResponseBody.php b/sdk/generated/php/src/Models/DeleteEventRuleResponseBody.php new file mode 100644 index 00000000..e212d4dc --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteEventRuleResponseBody.php @@ -0,0 +1,70 @@ + 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return DeleteEventRuleResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. Valid values: + + * Success: The request is successful. + + * Other codes: The request failed. For more information about error codes, see Error codes. + * @example Success + * @var string + */ + public $code; + + /** + * @description The returned error message. + * @example Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 2922208e-e1c6-43ee-bfd1-aca50263bc8a + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/DeleteEventSourceRequest.php b/sdk/generated/php/src/Models/DeleteEventSourceRequest.php new file mode 100644 index 00000000..335b25cd --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteEventSourceRequest.php @@ -0,0 +1,51 @@ + 'eventBusName', + 'eventSourceName' => 'eventSourceName', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventSourceName) { + $res['eventSourceName'] = $this->eventSourceName; + } + return $res; + } + /** + * @param array $map + * @return DeleteEventSourceRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventSourceName'])){ + $model->eventSourceName = $map['eventSourceName']; + } + return $model; + } + /** + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event source. +This parameter is required. + * @example myrabbitmq.source + * @var string + */ + public $eventSourceName; + +} diff --git a/sdk/generated/php/src/Models/DeleteEventSourceResponse.php b/sdk/generated/php/src/Models/DeleteEventSourceResponse.php new file mode 100644 index 00000000..9dc3045f --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteEventSourceResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return DeleteEventSourceResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = DeleteEventSourceResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var DeleteEventSourceResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/DeleteEventSourceResponseBody.php b/sdk/generated/php/src/Models/DeleteEventSourceResponseBody.php new file mode 100644 index 00000000..0b6a6f6a --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteEventSourceResponseBody.php @@ -0,0 +1,66 @@ + 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return DeleteEventSourceResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. The value Success indicates that the request is successful. Other values indicate that the request failed. For more information about error codes, see Error codes. + * @example Success + * @var string + */ + public $code; + + /** + * @description The returned error message. + * @example Remote error. requestId: [78B66E68-E778-1F33-84BD-xxxx], error code: [EventSourceNotExist], message: [The event source in request is not exist! ] + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 5f80e9b3-98d5-4f51-8412-c758818a03e4 + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/DeleteEventTargetsRequest.php b/sdk/generated/php/src/Models/DeleteEventTargetsRequest.php new file mode 100644 index 00000000..da1651db --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteEventTargetsRequest.php @@ -0,0 +1,70 @@ + 'eventBusName', + 'eventRuleName' => 'eventRuleName', + 'eventTargetNames' => 'eventTargetNames', + ]; + public function validate() { + Model::validateRequired('eventBusName', $this->eventBusName, true); + Model::validateRequired('eventRuleName', $this->eventRuleName, true); + } + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventRuleName) { + $res['eventRuleName'] = $this->eventRuleName; + } + if (null !== $this->eventTargetNames) { + $res['eventTargetNames'] = $this->eventTargetNames; + } + return $res; + } + /** + * @param array $map + * @return DeleteEventTargetsRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventRuleName'])){ + $model->eventRuleName = $map['eventRuleName']; + } + if(isset($map['eventTargetNames'])){ + if(!empty($map['eventTargetNames'])){ + $model->eventTargetNames = $map['eventTargetNames']; + } + } + return $model; + } + /** + * @description The name of the event bus. + * @example MyEventBus + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event rule. + * @example ramrolechange-mns + * @var string + */ + public $eventRuleName; + + /** + * @description The names of the event targets that you want to delete. + * @var string[] + */ + public $eventTargetNames; + +} diff --git a/sdk/generated/php/src/Models/DeleteEventTargetsResponse.php b/sdk/generated/php/src/Models/DeleteEventTargetsResponse.php new file mode 100644 index 00000000..802199d1 --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteEventTargetsResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return DeleteEventTargetsResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = DeleteEventTargetsResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var DeleteEventTargetsResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/DeleteEventTargetsResponseBody.php b/sdk/generated/php/src/Models/DeleteEventTargetsResponseBody.php new file mode 100644 index 00000000..d71863c3 --- /dev/null +++ b/sdk/generated/php/src/Models/DeleteEventTargetsResponseBody.php @@ -0,0 +1,70 @@ + 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return DeleteEventTargetsResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. Valid values: + + * Success: The request is successful. + + * Other codes: The request failed. For more information about error codes, see Error codes. + * @example Success + * @var string + */ + public $code; + + /** + * @description The returned error message. + * @example Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 2922208e-e1c6-43ee-bfd1-aca50263bc8a + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/DisableEventRuleRequest.php b/sdk/generated/php/src/Models/DisableEventRuleRequest.php new file mode 100644 index 00000000..1d875974 --- /dev/null +++ b/sdk/generated/php/src/Models/DisableEventRuleRequest.php @@ -0,0 +1,54 @@ + 'eventBusName', + 'eventRuleName' => 'eventRuleName', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventRuleName) { + $res['eventRuleName'] = $this->eventRuleName; + } + return $res; + } + /** + * @param array $map + * @return DisableEventRuleRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventRuleName'])){ + $model->eventRuleName = $map['eventRuleName']; + } + return $model; + } + /** + * @description The name of the event bus with which the event source is associated. +This parameter is required. + * @example my-event-bus + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event rule. +This parameter is required. + * @example myrabbitmq.sourc + * @var string + */ + public $eventRuleName; + +} diff --git a/sdk/generated/php/src/Models/DisableEventRuleResponse.php b/sdk/generated/php/src/Models/DisableEventRuleResponse.php new file mode 100644 index 00000000..76980326 --- /dev/null +++ b/sdk/generated/php/src/Models/DisableEventRuleResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return DisableEventRuleResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = DisableEventRuleResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var DisableEventRuleResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/DisableEventRuleResponseBody.php b/sdk/generated/php/src/Models/DisableEventRuleResponseBody.php new file mode 100644 index 00000000..e9aedbbc --- /dev/null +++ b/sdk/generated/php/src/Models/DisableEventRuleResponseBody.php @@ -0,0 +1,70 @@ + 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return DisableEventRuleResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. Valid values: + + * Success: The request is successful. + + * Other codes: The request failed. For more information about error codes, see Error codes. + * @example Success + * @var string + */ + public $code; + + /** + * @description The returned error message. + * @example Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 2922208e-e1c6-43ee-bfd1-aca50263bc8a + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/EnableEventRuleRequest.php b/sdk/generated/php/src/Models/EnableEventRuleRequest.php new file mode 100644 index 00000000..7f6cf7f4 --- /dev/null +++ b/sdk/generated/php/src/Models/EnableEventRuleRequest.php @@ -0,0 +1,54 @@ + 'eventBusName', + 'eventRuleName' => 'eventRuleName', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventRuleName) { + $res['eventRuleName'] = $this->eventRuleName; + } + return $res; + } + /** + * @param array $map + * @return EnableEventRuleRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventRuleName'])){ + $model->eventRuleName = $map['eventRuleName']; + } + return $model; + } + /** + * @description The name of the event bus with which the event source is associated. +This parameter is required. + * @example my-event-bus + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event rule. +This parameter is required. + * @example myrabbitmq.sourc + * @var string + */ + public $eventRuleName; + +} diff --git a/sdk/generated/php/src/Models/EnableEventRuleResponse.php b/sdk/generated/php/src/Models/EnableEventRuleResponse.php new file mode 100644 index 00000000..0b56df6f --- /dev/null +++ b/sdk/generated/php/src/Models/EnableEventRuleResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return EnableEventRuleResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = EnableEventRuleResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var EnableEventRuleResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/EnableEventRuleResponseBody.php b/sdk/generated/php/src/Models/EnableEventRuleResponseBody.php new file mode 100644 index 00000000..3927f43c --- /dev/null +++ b/sdk/generated/php/src/Models/EnableEventRuleResponseBody.php @@ -0,0 +1,70 @@ + 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return EnableEventRuleResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. Valid values: + + * Success: The request is successful. + + * Other codes: The request failed. For more information about error codes, see Error codes. + * @example Success + * @var string + */ + public $code; + + /** + * @description The returned error message. + * @example Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 2922208e-e1c6-43ee-bfd1-aca50263bc8a + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/EventTarget.php b/sdk/generated/php/src/Models/EventTarget.php new file mode 100644 index 00000000..379dff7a --- /dev/null +++ b/sdk/generated/php/src/Models/EventTarget.php @@ -0,0 +1,81 @@ + 'eventTargetName', + 'className' => 'className', + 'config' => 'config', + 'runOptions' => 'runOptions', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventTargetName) { + $res['eventTargetName'] = $this->eventTargetName; + } + if (null !== $this->className) { + $res['className'] = $this->className; + } + if (null !== $this->config) { + $res['config'] = $this->config; + } + if (null !== $this->runOptions) { + $res['runOptions'] = null !== $this->runOptions ? $this->runOptions->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return EventTarget + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventTargetName'])){ + $model->eventTargetName = $map['eventTargetName']; + } + if(isset($map['className'])){ + $model->className = $map['className']; + } + if(isset($map['config'])){ + $model->config = $map['config']; + } + if(isset($map['runOptions'])){ + $model->runOptions = runOptions::fromMap($map['runOptions']); + } + return $model; + } + /** + * @var string + */ + public $eventTargetName; + + /** + * @var string + */ + public $className; + + /** + * @var mixed[] + */ + public $config; + + /** + * @var runOptions + */ + public $runOptions; + +} diff --git a/sdk/generated/php/src/Models/EventTarget/runOptions.php b/sdk/generated/php/src/Models/EventTarget/runOptions.php new file mode 100644 index 00000000..9cff515e --- /dev/null +++ b/sdk/generated/php/src/Models/EventTarget/runOptions.php @@ -0,0 +1,63 @@ + 'errorsTolerance', + 'retryStrategy' => 'retryStrategy', + 'deadLetterQueue' => 'deadLetterQueue', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->errorsTolerance) { + $res['errorsTolerance'] = $this->errorsTolerance; + } + if (null !== $this->retryStrategy) { + $res['retryStrategy'] = null !== $this->retryStrategy ? $this->retryStrategy->toMap() : null; + } + if (null !== $this->deadLetterQueue) { + $res['deadLetterQueue'] = null !== $this->deadLetterQueue ? $this->deadLetterQueue->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return runOptions + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['errorsTolerance'])){ + $model->errorsTolerance = $map['errorsTolerance']; + } + if(isset($map['retryStrategy'])){ + $model->retryStrategy = retryStrategy::fromMap($map['retryStrategy']); + } + if(isset($map['deadLetterQueue'])){ + $model->deadLetterQueue = deadLetterQueue::fromMap($map['deadLetterQueue']); + } + return $model; + } + /** + * @var string + */ + public $errorsTolerance; + + /** + * @var retryStrategy + */ + public $retryStrategy; + + /** + * @var deadLetterQueue + */ + public $deadLetterQueue; + +} diff --git a/sdk/generated/php/src/Models/EventTarget/runOptions/deadLetterQueue.php b/sdk/generated/php/src/Models/EventTarget/runOptions/deadLetterQueue.php new file mode 100644 index 00000000..125a29ce --- /dev/null +++ b/sdk/generated/php/src/Models/EventTarget/runOptions/deadLetterQueue.php @@ -0,0 +1,48 @@ + 'type', + 'config' => 'config', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->type) { + $res['type'] = $this->type; + } + if (null !== $this->config) { + $res['config'] = $this->config; + } + return $res; + } + /** + * @param array $map + * @return deadLetterQueue + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['type'])){ + $model->type = $map['type']; + } + if(isset($map['config'])){ + $model->config = $map['config']; + } + return $model; + } + /** + * @var string + */ + public $type; + + /** + * @var mixed[] + */ + public $config; + +} diff --git a/sdk/generated/php/src/Models/EventTarget/runOptions/retryStrategy.php b/sdk/generated/php/src/Models/EventTarget/runOptions/retryStrategy.php new file mode 100644 index 00000000..fc5949e2 --- /dev/null +++ b/sdk/generated/php/src/Models/EventTarget/runOptions/retryStrategy.php @@ -0,0 +1,60 @@ + 'pushRetryStrategy', + 'maximumEventAgeInSeconds' => 'maximumEventAgeInSeconds', + 'maximumRetryAttempts' => 'maximumRetryAttempts', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->pushRetryStrategy) { + $res['pushRetryStrategy'] = $this->pushRetryStrategy; + } + if (null !== $this->maximumEventAgeInSeconds) { + $res['maximumEventAgeInSeconds'] = $this->maximumEventAgeInSeconds; + } + if (null !== $this->maximumRetryAttempts) { + $res['maximumRetryAttempts'] = $this->maximumRetryAttempts; + } + return $res; + } + /** + * @param array $map + * @return retryStrategy + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['pushRetryStrategy'])){ + $model->pushRetryStrategy = $map['pushRetryStrategy']; + } + if(isset($map['maximumEventAgeInSeconds'])){ + $model->maximumEventAgeInSeconds = $map['maximumEventAgeInSeconds']; + } + if(isset($map['maximumRetryAttempts'])){ + $model->maximumRetryAttempts = $map['maximumRetryAttempts']; + } + return $model; + } + /** + * @var string + */ + public $pushRetryStrategy; + + /** + * @var int + */ + public $maximumEventAgeInSeconds; + + /** + * @var int + */ + public $maximumRetryAttempts; + +} diff --git a/sdk/generated/php/src/Models/GetApiDestinationRequest.php b/sdk/generated/php/src/Models/GetApiDestinationRequest.php new file mode 100644 index 00000000..16ca9d6e --- /dev/null +++ b/sdk/generated/php/src/Models/GetApiDestinationRequest.php @@ -0,0 +1,38 @@ + 'apiDestinationName', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->apiDestinationName) { + $res['apiDestinationName'] = $this->apiDestinationName; + } + return $res; + } + /** + * @param array $map + * @return GetApiDestinationRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['apiDestinationName'])){ + $model->apiDestinationName = $map['apiDestinationName']; + } + return $model; + } + /** + * @description The name of the API destination. This parameter is required. + * @example api-destination-name + * @var string + */ + public $apiDestinationName; + +} diff --git a/sdk/generated/php/src/Models/GetApiDestinationResponse.php b/sdk/generated/php/src/Models/GetApiDestinationResponse.php new file mode 100644 index 00000000..3a89a8b3 --- /dev/null +++ b/sdk/generated/php/src/Models/GetApiDestinationResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return GetApiDestinationResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = GetApiDestinationResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var GetApiDestinationResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/GetApiDestinationResponseBody.php b/sdk/generated/php/src/Models/GetApiDestinationResponseBody.php new file mode 100644 index 00000000..0e9c9328 --- /dev/null +++ b/sdk/generated/php/src/Models/GetApiDestinationResponseBody.php @@ -0,0 +1,150 @@ + 'code', + 'apiDestinationName' => 'apiDestinationName', + 'connectionName' => 'connectionName', + 'description' => 'description', + 'gmtCreate' => 'gmtCreate', + 'httpApiParameters' => 'httpApiParameters', + 'invocationRateLimitPerSecond' => 'invocationRateLimitPerSecond', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->apiDestinationName) { + $res['apiDestinationName'] = $this->apiDestinationName; + } + if (null !== $this->connectionName) { + $res['connectionName'] = $this->connectionName; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->gmtCreate) { + $res['gmtCreate'] = $this->gmtCreate; + } + if (null !== $this->httpApiParameters) { + $res['httpApiParameters'] = null !== $this->httpApiParameters ? $this->httpApiParameters->toMap() : null; + } + if (null !== $this->invocationRateLimitPerSecond) { + $res['invocationRateLimitPerSecond'] = $this->invocationRateLimitPerSecond; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return GetApiDestinationResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['apiDestinationName'])){ + $model->apiDestinationName = $map['apiDestinationName']; + } + if(isset($map['connectionName'])){ + $model->connectionName = $map['connectionName']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['gmtCreate'])){ + $model->gmtCreate = $map['gmtCreate']; + } + if(isset($map['httpApiParameters'])){ + $model->httpApiParameters = httpApiParameters::fromMap($map['httpApiParameters']); + } + if(isset($map['invocationRateLimitPerSecond'])){ + $model->invocationRateLimitPerSecond = $map['invocationRateLimitPerSecond']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. The value Success indicates that the request is successful. + * @example Success + * @var string + */ + public $code; + + /** + * @description The name of the API destination. + * @example api-destination-2 + * @var string + */ + public $apiDestinationName; + + /** + * @description The connection name. + * @example connection-name + * @var string + */ + public $connectionName; + + /** + * @description The description of the connection. + * @example demo + * @var string + */ + public $description; + + /** + * @description The time when the API destination was created. + * @example 1665223213000 + * @var int + */ + public $gmtCreate; + + /** + * @description The request parameters that are configured for the API destination. + * @var httpApiParameters + */ + public $httpApiParameters; + + /** + * @description TODO + * @var int + */ + public $invocationRateLimitPerSecond; + + /** + * @description The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + * @example success + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example B896B484-F16D-59DE-9E23-DD0E5C361108 + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/GetApiDestinationResponseBody/httpApiParameters.php b/sdk/generated/php/src/Models/GetApiDestinationResponseBody/httpApiParameters.php new file mode 100644 index 00000000..b5fdfced --- /dev/null +++ b/sdk/generated/php/src/Models/GetApiDestinationResponseBody/httpApiParameters.php @@ -0,0 +1,93 @@ + 'endpoint', + 'method' => 'method', + 'apiParameters' => 'apiParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->endpoint) { + $res['endpoint'] = $this->endpoint; + } + if (null !== $this->method) { + $res['method'] = $this->method; + } + if (null !== $this->apiParameters) { + $res['apiParameters'] = []; + if(null !== $this->apiParameters && is_array($this->apiParameters)){ + $n = 0; + foreach($this->apiParameters as $item){ + $res['apiParameters'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + return $res; + } + /** + * @param array $map + * @return httpApiParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['endpoint'])){ + $model->endpoint = $map['endpoint']; + } + if(isset($map['method'])){ + $model->method = $map['method']; + } + if(isset($map['apiParameters'])){ + if(!empty($map['apiParameters'])){ + $model->apiParameters = []; + $n = 0; + foreach($map['apiParameters'] as $item) { + $model->apiParameters[$n++] = null !== $item ? apiParameters::fromMap($item) : $item; + } + } + } + return $model; + } + /** + * @description The endpoint of the API destination. + * @example http://127.0.0.1:8001/api + * @var string + */ + public $endpoint; + + /** + * @description The HTTP request method. Valid values: + + - POST + + - GET + + - DELETE + + - PUT + + - HEAD + + - TRACE + + - PATCH + * @example POST + * @var string + */ + public $method; + + /** + * @description TODO + * @var apiParameters[] + */ + public $apiParameters; + +} diff --git a/sdk/generated/php/src/Models/GetApiDestinationResponseBody/httpApiParameters/apiParameters.php b/sdk/generated/php/src/Models/GetApiDestinationResponseBody/httpApiParameters/apiParameters.php new file mode 100644 index 00000000..cee81266 --- /dev/null +++ b/sdk/generated/php/src/Models/GetApiDestinationResponseBody/httpApiParameters/apiParameters.php @@ -0,0 +1,85 @@ + 'name', + 'description' => 'description', + 'type' => 'type', + 'defaultValue' => 'defaultValue', + 'in' => 'in', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->name) { + $res['name'] = $this->name; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->type) { + $res['type'] = $this->type; + } + if (null !== $this->defaultValue) { + $res['defaultValue'] = $this->defaultValue; + } + if (null !== $this->in) { + $res['in'] = $this->in; + } + return $res; + } + /** + * @param array $map + * @return apiParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['name'])){ + $model->name = $map['name']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['type'])){ + $model->type = $map['type']; + } + if(isset($map['defaultValue'])){ + $model->defaultValue = $map['defaultValue']; + } + if(isset($map['in'])){ + $model->in = $map['in']; + } + return $model; + } + /** + * @var string + */ + public $name; + + /** + * @description The description of the API destination. The description can be up to 255 characters in length. + * @var string + */ + public $description; + + /** + * @var string + */ + public $type; + + /** + * @var string + */ + public $defaultValue; + + /** + * @var string + */ + public $in; + +} diff --git a/sdk/generated/php/src/Models/GetConnectionRequest.php b/sdk/generated/php/src/Models/GetConnectionRequest.php new file mode 100644 index 00000000..6b933b8e --- /dev/null +++ b/sdk/generated/php/src/Models/GetConnectionRequest.php @@ -0,0 +1,38 @@ + 'connectionName', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->connectionName) { + $res['connectionName'] = $this->connectionName; + } + return $res; + } + /** + * @param array $map + * @return GetConnectionRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['connectionName'])){ + $model->connectionName = $map['connectionName']; + } + return $model; + } + /** + * @description The connection name. This parameter is required. + * @example connection-name + * @var string + */ + public $connectionName; + +} diff --git a/sdk/generated/php/src/Models/GetConnectionResponse.php b/sdk/generated/php/src/Models/GetConnectionResponse.php new file mode 100644 index 00000000..655c7c7a --- /dev/null +++ b/sdk/generated/php/src/Models/GetConnectionResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return GetConnectionResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = GetConnectionResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var GetConnectionResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/GetConnectionResponseBody.php b/sdk/generated/php/src/Models/GetConnectionResponseBody.php new file mode 100644 index 00000000..b0572f7e --- /dev/null +++ b/sdk/generated/php/src/Models/GetConnectionResponseBody.php @@ -0,0 +1,93 @@ + 'code', + 'connections' => 'connections', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->connections) { + $res['connections'] = []; + if(null !== $this->connections && is_array($this->connections)){ + $n = 0; + foreach($this->connections as $item){ + $res['connections'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return GetConnectionResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['connections'])){ + if(!empty($map['connections'])){ + $model->connections = []; + $n = 0; + foreach($map['connections'] as $item) { + $model->connections[$n++] = null !== $item ? connections::fromMap($item) : $item; + } + } + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. The value Success indicates that the request is successful. + * @example Success + * @var string + */ + public $code; + + /** + * @description The value of the key in the request path. + * @var connections[] + */ + public $connections; + + /** + * @description The returned message. + * @example success + * @var string + */ + public $message; + + /** + * @description The returned request ID. + * @example 34AD682D-5B91-5773-8132-AA38C130**** + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/GetConnectionResponseBody/connections.php b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections.php new file mode 100644 index 00000000..c91eb165 --- /dev/null +++ b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections.php @@ -0,0 +1,108 @@ + 'authParameters', + 'connectionName' => 'connectionName', + 'description' => 'description', + 'gmtCreate' => 'gmtCreate', + 'id' => 'id', + 'networkParameters' => 'networkParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->authParameters) { + $res['authParameters'] = null !== $this->authParameters ? $this->authParameters->toMap() : null; + } + if (null !== $this->connectionName) { + $res['connectionName'] = $this->connectionName; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->gmtCreate) { + $res['gmtCreate'] = $this->gmtCreate; + } + if (null !== $this->id) { + $res['id'] = $this->id; + } + if (null !== $this->networkParameters) { + $res['networkParameters'] = null !== $this->networkParameters ? $this->networkParameters->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return connections + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['authParameters'])){ + $model->authParameters = authParameters::fromMap($map['authParameters']); + } + if(isset($map['connectionName'])){ + $model->connectionName = $map['connectionName']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['gmtCreate'])){ + $model->gmtCreate = $map['gmtCreate']; + } + if(isset($map['id'])){ + $model->id = $map['id']; + } + if(isset($map['networkParameters'])){ + $model->networkParameters = networkParameters::fromMap($map['networkParameters']); + } + return $model; + } + /** + * @description The parameters that are configured for authentication. + * @var authParameters + */ + public $authParameters; + + /** + * @description The connection name. + * @example connection-name + * @var string + */ + public $connectionName; + + /** + * @description The connection description. + * @example The description of the connection. + * @var string + */ + public $description; + + /** + * @description The time when the connection was created. + * @example 1592838994234 + * @var int + */ + public $gmtCreate; + + /** + * @description The connection ID. + * @example 1141093 + * @var int + */ + public $id; + + /** + * @var networkParameters + */ + public $networkParameters; + +} diff --git a/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters.php b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters.php new file mode 100644 index 00000000..cf7a91e7 --- /dev/null +++ b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters.php @@ -0,0 +1,90 @@ + 'apiKeyAuthParameters', + 'authorizationType' => 'authorizationType', + 'basicAuthParameters' => 'basicAuthParameters', + 'oauthParameters' => 'oauthParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->apiKeyAuthParameters) { + $res['apiKeyAuthParameters'] = null !== $this->apiKeyAuthParameters ? $this->apiKeyAuthParameters->toMap() : null; + } + if (null !== $this->authorizationType) { + $res['authorizationType'] = $this->authorizationType; + } + if (null !== $this->basicAuthParameters) { + $res['basicAuthParameters'] = null !== $this->basicAuthParameters ? $this->basicAuthParameters->toMap() : null; + } + if (null !== $this->oauthParameters) { + $res['oauthParameters'] = null !== $this->oauthParameters ? $this->oauthParameters->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return authParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['apiKeyAuthParameters'])){ + $model->apiKeyAuthParameters = apiKeyAuthParameters::fromMap($map['apiKeyAuthParameters']); + } + if(isset($map['authorizationType'])){ + $model->authorizationType = $map['authorizationType']; + } + if(isset($map['basicAuthParameters'])){ + $model->basicAuthParameters = basicAuthParameters::fromMap($map['basicAuthParameters']); + } + if(isset($map['oauthParameters'])){ + $model->oauthParameters = oauthParameters::fromMap($map['oauthParameters']); + } + return $model; + } + /** + * @description The parameters that are configured for API key authentication. + * @var apiKeyAuthParameters + */ + public $apiKeyAuthParameters; + + /** + * @description The authentication type. Valid values: + + + - BASIC_AUTH: basic authentication. + + + - API_KEY_AUTH: API key authentication. + + + - OAUTH_AUTH: OAuth authentication. + * @example BASIC_AUTH + * @var string + */ + public $authorizationType; + + /** + * @description The parameters that are configured for basic authentication. + * @var basicAuthParameters + */ + public $basicAuthParameters; + + /** + * @description The parameters that are configured for OAuth authentication. + * @var oauthParameters + */ + public $oauthParameters; + +} diff --git a/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/apiKeyAuthParameters.php b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/apiKeyAuthParameters.php new file mode 100644 index 00000000..2bcccb30 --- /dev/null +++ b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/apiKeyAuthParameters.php @@ -0,0 +1,52 @@ + 'apiKeyName', + 'apiKeyValue' => 'apiKeyValue', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->apiKeyName) { + $res['apiKeyName'] = $this->apiKeyName; + } + if (null !== $this->apiKeyValue) { + $res['apiKeyValue'] = $this->apiKeyValue; + } + return $res; + } + /** + * @param array $map + * @return apiKeyAuthParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['apiKeyName'])){ + $model->apiKeyName = $map['apiKeyName']; + } + if(isset($map['apiKeyValue'])){ + $model->apiKeyValue = $map['apiKeyValue']; + } + return $model; + } + /** + * @description The API key. + * @example Token + * @var string + */ + public $apiKeyName; + + /** + * @description The value of the API key. + * @example asdkjnqkwejooa + * @var string + */ + public $apiKeyValue; + +} diff --git a/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/basicAuthParameters.php b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/basicAuthParameters.php new file mode 100644 index 00000000..c3d70873 --- /dev/null +++ b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/basicAuthParameters.php @@ -0,0 +1,52 @@ + 'password', + 'username' => 'username', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->password) { + $res['password'] = $this->password; + } + if (null !== $this->username) { + $res['username'] = $this->username; + } + return $res; + } + /** + * @param array $map + * @return basicAuthParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['password'])){ + $model->password = $map['password']; + } + if(isset($map['username'])){ + $model->username = $map['username']; + } + return $model; + } + /** + * @description The password for basic authentication. + * @example admin + * @var string + */ + public $password; + + /** + * @description The username for basic authentication. + * @example admin + * @var string + */ + public $username; + +} diff --git a/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters.php b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters.php new file mode 100644 index 00000000..90cc5e40 --- /dev/null +++ b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters.php @@ -0,0 +1,87 @@ + 'authorizationEndpoint', + 'clientParameters' => 'clientParameters', + 'httpMethod' => 'httpMethod', + 'oauthHttpParameters' => 'oauthHttpParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->authorizationEndpoint) { + $res['authorizationEndpoint'] = $this->authorizationEndpoint; + } + if (null !== $this->clientParameters) { + $res['clientParameters'] = null !== $this->clientParameters ? $this->clientParameters->toMap() : null; + } + if (null !== $this->httpMethod) { + $res['httpMethod'] = $this->httpMethod; + } + if (null !== $this->oauthHttpParameters) { + $res['oauthHttpParameters'] = null !== $this->oauthHttpParameters ? $this->oauthHttpParameters->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return oauthParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['authorizationEndpoint'])){ + $model->authorizationEndpoint = $map['authorizationEndpoint']; + } + if(isset($map['clientParameters'])){ + $model->clientParameters = clientParameters::fromMap($map['clientParameters']); + } + if(isset($map['httpMethod'])){ + $model->httpMethod = $map['httpMethod']; + } + if(isset($map['oauthHttpParameters'])){ + $model->oauthHttpParameters = oauthHttpParameters::fromMap($map['oauthHttpParameters']); + } + return $model; + } + /** + * @description The endpoint that is used to obtain the OAuth token. + * @example http://localhost:8080/oauth/token + * @var string + */ + public $authorizationEndpoint; + + /** + * @description The parameters that are configured for the client. + * @var clientParameters + */ + public $clientParameters; + + /** + * @description The HTTP request method. Valid values: + + - GET + + - POST + + - HEAD + * @example POST + * @var string + */ + public $httpMethod; + + /** + * @description The request parameters for OAuth authentication. + * @var oauthHttpParameters + */ + public $oauthHttpParameters; + +} diff --git a/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/clientParameters.php b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/clientParameters.php new file mode 100644 index 00000000..5763eb42 --- /dev/null +++ b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/clientParameters.php @@ -0,0 +1,52 @@ + 'clientID', + 'clientSecret' => 'clientSecret', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->clientID) { + $res['clientID'] = $this->clientID; + } + if (null !== $this->clientSecret) { + $res['clientSecret'] = $this->clientSecret; + } + return $res; + } + /** + * @param array $map + * @return clientParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['clientID'])){ + $model->clientID = $map['clientID']; + } + if(isset($map['clientSecret'])){ + $model->clientSecret = $map['clientSecret']; + } + return $model; + } + /** + * @description The client ID. + * @example ClientID + * @var string + */ + public $clientID; + + /** + * @description The client key secret of the application. + * @example ClientSecret + * @var string + */ + public $clientSecret; + +} diff --git a/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters.php b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters.php new file mode 100644 index 00000000..188bbb8c --- /dev/null +++ b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters.php @@ -0,0 +1,103 @@ + 'bodyParameters', + 'headerParameters' => 'headerParameters', + 'queryStringParameters' => 'queryStringParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->bodyParameters) { + $res['bodyParameters'] = []; + if(null !== $this->bodyParameters && is_array($this->bodyParameters)){ + $n = 0; + foreach($this->bodyParameters as $item){ + $res['bodyParameters'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->headerParameters) { + $res['headerParameters'] = []; + if(null !== $this->headerParameters && is_array($this->headerParameters)){ + $n = 0; + foreach($this->headerParameters as $item){ + $res['headerParameters'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->queryStringParameters) { + $res['queryStringParameters'] = []; + if(null !== $this->queryStringParameters && is_array($this->queryStringParameters)){ + $n = 0; + foreach($this->queryStringParameters as $item){ + $res['queryStringParameters'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + return $res; + } + /** + * @param array $map + * @return oauthHttpParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['bodyParameters'])){ + if(!empty($map['bodyParameters'])){ + $model->bodyParameters = []; + $n = 0; + foreach($map['bodyParameters'] as $item) { + $model->bodyParameters[$n++] = null !== $item ? bodyParameters::fromMap($item) : $item; + } + } + } + if(isset($map['headerParameters'])){ + if(!empty($map['headerParameters'])){ + $model->headerParameters = []; + $n = 0; + foreach($map['headerParameters'] as $item) { + $model->headerParameters[$n++] = null !== $item ? headerParameters::fromMap($item) : $item; + } + } + } + if(isset($map['queryStringParameters'])){ + if(!empty($map['queryStringParameters'])){ + $model->queryStringParameters = []; + $n = 0; + foreach($map['queryStringParameters'] as $item) { + $model->queryStringParameters[$n++] = null !== $item ? queryStringParameters::fromMap($item) : $item; + } + } + } + return $model; + } + /** + * @description The parameters that are configured for the request. + * @var bodyParameters[] + */ + public $bodyParameters; + + /** + * @description The parameters that are configured for the request header. + * @var headerParameters[] + */ + public $headerParameters; + + /** + * @description The parameters that are configured for the request path. + * @var queryStringParameters[] + */ + public $queryStringParameters; + +} diff --git a/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/bodyParameters.php b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/bodyParameters.php new file mode 100644 index 00000000..d37763e4 --- /dev/null +++ b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/bodyParameters.php @@ -0,0 +1,66 @@ + 'isValueSecret', + 'key' => 'key', + 'value' => 'value', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->isValueSecret) { + $res['isValueSecret'] = $this->isValueSecret; + } + if (null !== $this->key) { + $res['key'] = $this->key; + } + if (null !== $this->value) { + $res['value'] = $this->value; + } + return $res; + } + /** + * @param array $map + * @return bodyParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['isValueSecret'])){ + $model->isValueSecret = $map['isValueSecret']; + } + if(isset($map['key'])){ + $model->key = $map['key']; + } + if(isset($map['value'])){ + $model->value = $map['value']; + } + return $model; + } + /** + * @description Indicates whether authentication is enabled. + * @example false + * @var string + */ + public $isValueSecret; + + /** + * @description The key in the request body. + * @example name + * @var string + */ + public $key; + + /** + * @description The value of the key in the request body. + * @example demo + * @var string + */ + public $value; + +} diff --git a/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/headerParameters.php b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/headerParameters.php new file mode 100644 index 00000000..2c9b8f1f --- /dev/null +++ b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/headerParameters.php @@ -0,0 +1,66 @@ + 'isValueSecret', + 'key' => 'key', + 'value' => 'value', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->isValueSecret) { + $res['isValueSecret'] = $this->isValueSecret; + } + if (null !== $this->key) { + $res['key'] = $this->key; + } + if (null !== $this->value) { + $res['value'] = $this->value; + } + return $res; + } + /** + * @param array $map + * @return headerParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['isValueSecret'])){ + $model->isValueSecret = $map['isValueSecret']; + } + if(isset($map['key'])){ + $model->key = $map['key']; + } + if(isset($map['value'])){ + $model->value = $map['value']; + } + return $model; + } + /** + * @description Indicates whether authentication is enabled. + * @example false + * @var string + */ + public $isValueSecret; + + /** + * @description The key in the request header. + * @example name + * @var string + */ + public $key; + + /** + * @description The value of the key in the request header. + * @example demo + * @var string + */ + public $value; + +} diff --git a/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/queryStringParameters.php b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/queryStringParameters.php new file mode 100644 index 00000000..24d8ef7f --- /dev/null +++ b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/queryStringParameters.php @@ -0,0 +1,66 @@ + 'isValueSecret', + 'key' => 'key', + 'value' => 'value', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->isValueSecret) { + $res['isValueSecret'] = $this->isValueSecret; + } + if (null !== $this->key) { + $res['key'] = $this->key; + } + if (null !== $this->value) { + $res['value'] = $this->value; + } + return $res; + } + /** + * @param array $map + * @return queryStringParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['isValueSecret'])){ + $model->isValueSecret = $map['isValueSecret']; + } + if(isset($map['key'])){ + $model->key = $map['key']; + } + if(isset($map['value'])){ + $model->value = $map['value']; + } + return $model; + } + /** + * @description Indicates whether authentication is enabled. + * @example false + * @var string + */ + public $isValueSecret; + + /** + * @description The key in the request path. + * @example name + * @var string + */ + public $key; + + /** + * @description The value of the key in the request path. + * @example demo + * @var string + */ + public $value; + +} diff --git a/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/networkParameters.php b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/networkParameters.php new file mode 100644 index 00000000..8203b4f5 --- /dev/null +++ b/sdk/generated/php/src/Models/GetConnectionResponseBody/connections/networkParameters.php @@ -0,0 +1,80 @@ + 'networkType', + 'securityGroupId' => 'securityGroupId', + 'vpcId' => 'vpcId', + 'vswitcheId' => 'vswitcheId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->networkType) { + $res['networkType'] = $this->networkType; + } + if (null !== $this->securityGroupId) { + $res['securityGroupId'] = $this->securityGroupId; + } + if (null !== $this->vpcId) { + $res['vpcId'] = $this->vpcId; + } + if (null !== $this->vswitcheId) { + $res['vswitcheId'] = $this->vswitcheId; + } + return $res; + } + /** + * @param array $map + * @return networkParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['networkType'])){ + $model->networkType = $map['networkType']; + } + if(isset($map['securityGroupId'])){ + $model->securityGroupId = $map['securityGroupId']; + } + if(isset($map['vpcId'])){ + $model->vpcId = $map['vpcId']; + } + if(isset($map['vswitcheId'])){ + $model->vswitcheId = $map['vswitcheId']; + } + return $model; + } + /** + * @description The network type. Valid values:PublicNetwork and PrivateNetwork. + * @example PublicNetwork + * @var string + */ + public $networkType; + + /** + * @description The security group ID. + * @example eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb + * @var string + */ + public $securityGroupId; + + /** + * @description The virtual private cloud (VPC) ID. + * @example eb-test/vpc-bp1symadadwnwgmqud + * @var string + */ + public $vpcId; + + /** + * @description The vSwitch ID. + * @example vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c + * @var string + */ + public $vswitcheId; + +} diff --git a/sdk/generated/php/src/Models/GetEventBusRequest.php b/sdk/generated/php/src/Models/GetEventBusRequest.php new file mode 100644 index 00000000..2bd61d1b --- /dev/null +++ b/sdk/generated/php/src/Models/GetEventBusRequest.php @@ -0,0 +1,38 @@ + 'eventBusName', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + return $res; + } + /** + * @param array $map + * @return GetEventBusRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + return $model; + } + /** + * @description The name of the event bus. This parameter is required. + * @example MyEventBus + * @var string + */ + public $eventBusName; + +} diff --git a/sdk/generated/php/src/Models/GetEventBusResponse.php b/sdk/generated/php/src/Models/GetEventBusResponse.php new file mode 100644 index 00000000..c178ca56 --- /dev/null +++ b/sdk/generated/php/src/Models/GetEventBusResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return GetEventBusResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = GetEventBusResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var GetEventBusResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/GetEventBusResponseBody.php b/sdk/generated/php/src/Models/GetEventBusResponseBody.php new file mode 100644 index 00000000..4e11a7f6 --- /dev/null +++ b/sdk/generated/php/src/Models/GetEventBusResponseBody.php @@ -0,0 +1,108 @@ + 'code', + 'createTimestamp' => 'createTimestamp', + 'description' => 'description', + 'eventBusName' => 'eventBusName', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->createTimestamp) { + $res['createTimestamp'] = $this->createTimestamp; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return GetEventBusResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['createTimestamp'])){ + $model->createTimestamp = $map['createTimestamp']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The response code. The value Success indicates that the request is successful. + * @example Success + * @var string + */ + public $code; + + /** + * @description The timestamp that indicates when the event bus was created. + * @example 1641781825000 + * @var int + */ + public $createTimestamp; + + /** + * @description The description of the event bus. + * @example demo + * @var string + */ + public $description; + + /** + * @description The name of the event bus. + * @example MyEventBus + * @var string + */ + public $eventBusName; + + /** + * @description The error message that is returned if the request failed. + * @example EventBusNotExist + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example d5bfc188-4452-4ba7-b73a-a9005e522439 + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/GetEventRuleRequest.php b/sdk/generated/php/src/Models/GetEventRuleRequest.php new file mode 100644 index 00000000..20a33dba --- /dev/null +++ b/sdk/generated/php/src/Models/GetEventRuleRequest.php @@ -0,0 +1,54 @@ + 'eventBusName', + 'eventRuleName' => 'eventRuleName', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventRuleName) { + $res['eventRuleName'] = $this->eventRuleName; + } + return $res; + } + /** + * @param array $map + * @return GetEventRuleRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventRuleName'])){ + $model->eventRuleName = $map['eventRuleName']; + } + return $model; + } + /** + * @description The name of the event bus with which the event source is associated. +This parameter is required. + * @example my-event-bus + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event rule. +This parameter is required. + * @example myrabbitmq.sourc + * @var string + */ + public $eventRuleName; + +} diff --git a/sdk/generated/php/src/Models/GetEventRuleResponse.php b/sdk/generated/php/src/Models/GetEventRuleResponse.php new file mode 100644 index 00000000..2c87ecf5 --- /dev/null +++ b/sdk/generated/php/src/Models/GetEventRuleResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return GetEventRuleResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = GetEventRuleResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var GetEventRuleResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/GetEventRuleResponseBody.php b/sdk/generated/php/src/Models/GetEventRuleResponseBody.php new file mode 100644 index 00000000..5af725e1 --- /dev/null +++ b/sdk/generated/php/src/Models/GetEventRuleResponseBody.php @@ -0,0 +1,192 @@ + 'code', + 'eventBusName' => 'eventBusName', + 'eventRuleName' => 'eventRuleName', + 'description' => 'description', + 'filterPattern' => 'filterPattern', + 'status' => 'status', + 'gmtCreate' => 'gmtCreate', + 'gmtModify' => 'gmtModify', + 'eventTargets' => 'eventTargets', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventRuleName) { + $res['eventRuleName'] = $this->eventRuleName; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->filterPattern) { + $res['filterPattern'] = $this->filterPattern; + } + if (null !== $this->status) { + $res['status'] = $this->status; + } + if (null !== $this->gmtCreate) { + $res['gmtCreate'] = $this->gmtCreate; + } + if (null !== $this->gmtModify) { + $res['gmtModify'] = $this->gmtModify; + } + if (null !== $this->eventTargets) { + $res['eventTargets'] = []; + if(null !== $this->eventTargets && is_array($this->eventTargets)){ + $n = 0; + foreach($this->eventTargets as $item){ + $res['eventTargets'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return GetEventRuleResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventRuleName'])){ + $model->eventRuleName = $map['eventRuleName']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['filterPattern'])){ + $model->filterPattern = $map['filterPattern']; + } + if(isset($map['status'])){ + $model->status = $map['status']; + } + if(isset($map['gmtCreate'])){ + $model->gmtCreate = $map['gmtCreate']; + } + if(isset($map['gmtModify'])){ + $model->gmtModify = $map['gmtModify']; + } + if(isset($map['eventTargets'])){ + if(!empty($map['eventTargets'])){ + $model->eventTargets = []; + $n = 0; + foreach($map['eventTargets'] as $item) { + $model->eventTargets[$n++] = null !== $item ? eventTargets::fromMap($item) : $item; + } + } + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. Valid values: + + * Success: The request is successful. + + * Other codes: The request failed. For more information about error codes, see Error codes. + * @example Success + * @var string + */ + public $code; + + /** + * @description The name of the event bus with which the event source is associated. +This parameter is required. + * @example my-event-bus + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event rule. +This parameter is required. + * @example myrabbitmq.sourc + * @var string + */ + public $eventRuleName; + + /** + * @var string + */ + public $description; + + /** + * @description The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + + You can specify up to five expressions in the map data structure in each field. + * @example {\"source\": [{\"prefix\": \"acs.\"}],\"type\": [{\"prefix\":\"oss:ObjectReplication\"}],\"subject\":[{\"prefix\":\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\", \"suffix\":\".txt\"}]} + * @var string + */ + public $filterPattern; + + /** + * @description The status of the event rule. Valid values: ENABLE (default): The event rule is enabled. DISABLE: The event rule is disabled. + * @example ENABLE + * @var string + */ + public $status; + + /** + * @var string + */ + public $gmtCreate; + + /** + * @var string + */ + public $gmtModify; + + /** + * @var eventTargets[] + */ + public $eventTargets; + + /** + * @description The returned error message. + * @example Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 2922208e-e1c6-43ee-bfd1-aca50263bc8a + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/GetEventRuleResponseBody/eventTargets.php b/sdk/generated/php/src/Models/GetEventRuleResponseBody/eventTargets.php new file mode 100644 index 00000000..39386377 --- /dev/null +++ b/sdk/generated/php/src/Models/GetEventRuleResponseBody/eventTargets.php @@ -0,0 +1,74 @@ + 'eventTargetName', + 'className' => 'className', + 'config' => 'config', + 'runOptions' => 'runOptions', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventTargetName) { + $res['eventTargetName'] = $this->eventTargetName; + } + if (null !== $this->className) { + $res['className'] = $this->className; + } + if (null !== $this->config) { + $res['config'] = $this->config; + } + if (null !== $this->runOptions) { + $res['runOptions'] = null !== $this->runOptions ? $this->runOptions->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return eventTargets + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventTargetName'])){ + $model->eventTargetName = $map['eventTargetName']; + } + if(isset($map['className'])){ + $model->className = $map['className']; + } + if(isset($map['config'])){ + $model->config = $map['config']; + } + if(isset($map['runOptions'])){ + $model->runOptions = runOptions::fromMap($map['runOptions']); + } + return $model; + } + /** + * @var string + */ + public $eventTargetName; + + /** + * @var string + */ + public $className; + + /** + * @var mixed[] + */ + public $config; + + /** + * @var runOptions + */ + public $runOptions; + +} diff --git a/sdk/generated/php/src/Models/GetEventRuleResponseBody/eventTargets/runOptions.php b/sdk/generated/php/src/Models/GetEventRuleResponseBody/eventTargets/runOptions.php new file mode 100644 index 00000000..b46ffcb0 --- /dev/null +++ b/sdk/generated/php/src/Models/GetEventRuleResponseBody/eventTargets/runOptions.php @@ -0,0 +1,63 @@ + 'errorsTolerance', + 'retryStrategy' => 'retryStrategy', + 'deadLetterQueue' => 'deadLetterQueue', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->errorsTolerance) { + $res['errorsTolerance'] = $this->errorsTolerance; + } + if (null !== $this->retryStrategy) { + $res['retryStrategy'] = null !== $this->retryStrategy ? $this->retryStrategy->toMap() : null; + } + if (null !== $this->deadLetterQueue) { + $res['deadLetterQueue'] = null !== $this->deadLetterQueue ? $this->deadLetterQueue->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return runOptions + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['errorsTolerance'])){ + $model->errorsTolerance = $map['errorsTolerance']; + } + if(isset($map['retryStrategy'])){ + $model->retryStrategy = retryStrategy::fromMap($map['retryStrategy']); + } + if(isset($map['deadLetterQueue'])){ + $model->deadLetterQueue = deadLetterQueue::fromMap($map['deadLetterQueue']); + } + return $model; + } + /** + * @var string + */ + public $errorsTolerance; + + /** + * @var retryStrategy + */ + public $retryStrategy; + + /** + * @var deadLetterQueue + */ + public $deadLetterQueue; + +} diff --git a/sdk/generated/php/src/Models/GetEventRuleResponseBody/eventTargets/runOptions/deadLetterQueue.php b/sdk/generated/php/src/Models/GetEventRuleResponseBody/eventTargets/runOptions/deadLetterQueue.php new file mode 100644 index 00000000..975b0bde --- /dev/null +++ b/sdk/generated/php/src/Models/GetEventRuleResponseBody/eventTargets/runOptions/deadLetterQueue.php @@ -0,0 +1,48 @@ + 'type', + 'config' => 'config', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->type) { + $res['type'] = $this->type; + } + if (null !== $this->config) { + $res['config'] = $this->config; + } + return $res; + } + /** + * @param array $map + * @return deadLetterQueue + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['type'])){ + $model->type = $map['type']; + } + if(isset($map['config'])){ + $model->config = $map['config']; + } + return $model; + } + /** + * @var string + */ + public $type; + + /** + * @var mixed[] + */ + public $config; + +} diff --git a/sdk/generated/php/src/Models/GetEventRuleResponseBody/eventTargets/runOptions/retryStrategy.php b/sdk/generated/php/src/Models/GetEventRuleResponseBody/eventTargets/runOptions/retryStrategy.php new file mode 100644 index 00000000..e4f4a462 --- /dev/null +++ b/sdk/generated/php/src/Models/GetEventRuleResponseBody/eventTargets/runOptions/retryStrategy.php @@ -0,0 +1,60 @@ + 'pushRetryStrategy', + 'maximumEventAgeInSeconds' => 'maximumEventAgeInSeconds', + 'maximumRetryAttempts' => 'maximumRetryAttempts', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->pushRetryStrategy) { + $res['pushRetryStrategy'] = $this->pushRetryStrategy; + } + if (null !== $this->maximumEventAgeInSeconds) { + $res['maximumEventAgeInSeconds'] = $this->maximumEventAgeInSeconds; + } + if (null !== $this->maximumRetryAttempts) { + $res['maximumRetryAttempts'] = $this->maximumRetryAttempts; + } + return $res; + } + /** + * @param array $map + * @return retryStrategy + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['pushRetryStrategy'])){ + $model->pushRetryStrategy = $map['pushRetryStrategy']; + } + if(isset($map['maximumEventAgeInSeconds'])){ + $model->maximumEventAgeInSeconds = $map['maximumEventAgeInSeconds']; + } + if(isset($map['maximumRetryAttempts'])){ + $model->maximumRetryAttempts = $map['maximumRetryAttempts']; + } + return $model; + } + /** + * @var string + */ + public $pushRetryStrategy; + + /** + * @var int + */ + public $maximumEventAgeInSeconds; + + /** + * @var int + */ + public $maximumRetryAttempts; + +} diff --git a/sdk/generated/php/src/Models/GetEventSourceRequest.php b/sdk/generated/php/src/Models/GetEventSourceRequest.php new file mode 100644 index 00000000..a04a3507 --- /dev/null +++ b/sdk/generated/php/src/Models/GetEventSourceRequest.php @@ -0,0 +1,51 @@ + 'eventBusName', + 'eventSourceName' => 'eventSourceName', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventSourceName) { + $res['eventSourceName'] = $this->eventSourceName; + } + return $res; + } + /** + * @param array $map + * @return GetEventSourceRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventSourceName'])){ + $model->eventSourceName = $map['eventSourceName']; + } + return $model; + } + /** + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event source. +This parameter is required. + * @example myrabbitmq.source + * @var string + */ + public $eventSourceName; + +} diff --git a/sdk/generated/php/src/Models/GetEventSourceResponse.php b/sdk/generated/php/src/Models/GetEventSourceResponse.php new file mode 100644 index 00000000..97f46dcc --- /dev/null +++ b/sdk/generated/php/src/Models/GetEventSourceResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return GetEventSourceResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = GetEventSourceResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var GetEventSourceResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/GetEventSourceResponseBody.php b/sdk/generated/php/src/Models/GetEventSourceResponseBody.php new file mode 100644 index 00000000..9da08f98 --- /dev/null +++ b/sdk/generated/php/src/Models/GetEventSourceResponseBody.php @@ -0,0 +1,91 @@ + 'eventBusName', + 'eventSourceName' => 'eventSourceName', + 'description' => 'description', + 'className' => 'className', + 'config' => 'config', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventSourceName) { + $res['eventSourceName'] = $this->eventSourceName; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->className) { + $res['className'] = $this->className; + } + if (null !== $this->config) { + $res['config'] = $this->config; + } + return $res; + } + /** + * @param array $map + * @return GetEventSourceResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventSourceName'])){ + $model->eventSourceName = $map['eventSourceName']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['className'])){ + $model->className = $map['className']; + } + if(isset($map['config'])){ + $model->config = $map['config']; + } + return $model; + } + /** + * @description The name of the event bus with which the event source is associated. +This parameter is required. + * @example my-event-bus + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event source. +This parameter is required. + * @example myrabbitmq.sourc + * @var string + */ + public $eventSourceName; + + /** + * @description The description of the event source. + * @var string + */ + public $description; + + /** + * @var string + */ + public $className; + + /** + * @var mixed[] + */ + public $config; + +} diff --git a/sdk/generated/php/src/Models/ListApiDestinationsRequest.php b/sdk/generated/php/src/Models/ListApiDestinationsRequest.php new file mode 100644 index 00000000..18c1d065 --- /dev/null +++ b/sdk/generated/php/src/Models/ListApiDestinationsRequest.php @@ -0,0 +1,84 @@ + 'apiDestinationNamePrefix', + 'connectionName' => 'connectionName', + 'maxResults' => 'maxResults', + 'nextToken' => 'nextToken', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->apiDestinationNamePrefix) { + $res['apiDestinationNamePrefix'] = $this->apiDestinationNamePrefix; + } + if (null !== $this->connectionName) { + $res['connectionName'] = $this->connectionName; + } + if (null !== $this->maxResults) { + $res['maxResults'] = $this->maxResults; + } + if (null !== $this->nextToken) { + $res['nextToken'] = $this->nextToken; + } + return $res; + } + /** + * @param array $map + * @return ListApiDestinationsRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['apiDestinationNamePrefix'])){ + $model->apiDestinationNamePrefix = $map['apiDestinationNamePrefix']; + } + if(isset($map['connectionName'])){ + $model->connectionName = $map['connectionName']; + } + if(isset($map['maxResults'])){ + $model->maxResults = $map['maxResults']; + } + if(isset($map['nextToken'])){ + $model->nextToken = $map['nextToken']; + } + return $model; + } + /** + * @description The prefix of the API destination name. + * @example api-demo + * @var string + */ + public $apiDestinationNamePrefix; + + /** + * @description The connection name. + * @example connection-name + * @var string + */ + public $connectionName; + + /** + * @description The maximum number of entries to be returned in a call. You can use this parameter and NextToken to implement paging. + + * Default value: 10. + * @example 10 + * @var int + */ + public $maxResults; + + /** + * @description If you set Limit and excess return values exist, this parameter is returned. + + * Default value: 0. + * @example 0 + * @var string + */ + public $nextToken; + +} diff --git a/sdk/generated/php/src/Models/ListApiDestinationsResponse.php b/sdk/generated/php/src/Models/ListApiDestinationsResponse.php new file mode 100644 index 00000000..95d22059 --- /dev/null +++ b/sdk/generated/php/src/Models/ListApiDestinationsResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return ListApiDestinationsResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = ListApiDestinationsResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var ListApiDestinationsResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/ListApiDestinationsResponseBody.php b/sdk/generated/php/src/Models/ListApiDestinationsResponseBody.php new file mode 100644 index 00000000..3f9e4792 --- /dev/null +++ b/sdk/generated/php/src/Models/ListApiDestinationsResponseBody.php @@ -0,0 +1,135 @@ + 'code', + 'apiDestinations' => 'apiDestinations', + 'maxResults' => 'maxResults', + 'nextToken' => 'nextToken', + 'total' => 'total', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->apiDestinations) { + $res['apiDestinations'] = []; + if(null !== $this->apiDestinations && is_array($this->apiDestinations)){ + $n = 0; + foreach($this->apiDestinations as $item){ + $res['apiDestinations'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->maxResults) { + $res['maxResults'] = $this->maxResults; + } + if (null !== $this->nextToken) { + $res['nextToken'] = $this->nextToken; + } + if (null !== $this->total) { + $res['total'] = $this->total; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return ListApiDestinationsResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['apiDestinations'])){ + if(!empty($map['apiDestinations'])){ + $model->apiDestinations = []; + $n = 0; + foreach($map['apiDestinations'] as $item) { + $model->apiDestinations[$n++] = null !== $item ? apiDestinations::fromMap($item) : $item; + } + } + } + if(isset($map['maxResults'])){ + $model->maxResults = $map['maxResults']; + } + if(isset($map['nextToken'])){ + $model->nextToken = $map['nextToken']; + } + if(isset($map['total'])){ + $model->total = $map['total']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. The value Success indicates that the request is successful. + * @example Success + * @var string + */ + public $code; + + /** + * @description The API destinations. + * @var apiDestinations[] + */ + public $apiDestinations; + + /** + * @description The maximum number of entries returned per page. + * @example 10 + * @var int + */ + public $maxResults; + + /** + * @description If excess return values exist, this parameter is returned. + * @example 1 + * @var string + */ + public $nextToken; + + /** + * @description The total number of entries returned. + * @example 2 + * @var int + */ + public $total; + + /** + * @description The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + * @example success + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 96D7C0AB-DCE5-5E82-96B8-4725E1706BB1 + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/ListApiDestinationsResponseBody/apiDestinations.php b/sdk/generated/php/src/Models/ListApiDestinationsResponseBody/apiDestinations.php new file mode 100644 index 00000000..ca2d027c --- /dev/null +++ b/sdk/generated/php/src/Models/ListApiDestinationsResponseBody/apiDestinations.php @@ -0,0 +1,108 @@ + 'apiDestinationName', + 'connectionName' => 'connectionName', + 'description' => 'description', + 'gmtCreate' => 'gmtCreate', + 'httpApiParameters' => 'httpApiParameters', + 'invocationRateLimitPerSecond' => 'invocationRateLimitPerSecond', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->apiDestinationName) { + $res['apiDestinationName'] = $this->apiDestinationName; + } + if (null !== $this->connectionName) { + $res['connectionName'] = $this->connectionName; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->gmtCreate) { + $res['gmtCreate'] = $this->gmtCreate; + } + if (null !== $this->httpApiParameters) { + $res['httpApiParameters'] = null !== $this->httpApiParameters ? $this->httpApiParameters->toMap() : null; + } + if (null !== $this->invocationRateLimitPerSecond) { + $res['invocationRateLimitPerSecond'] = $this->invocationRateLimitPerSecond; + } + return $res; + } + /** + * @param array $map + * @return apiDestinations + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['apiDestinationName'])){ + $model->apiDestinationName = $map['apiDestinationName']; + } + if(isset($map['connectionName'])){ + $model->connectionName = $map['connectionName']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['gmtCreate'])){ + $model->gmtCreate = $map['gmtCreate']; + } + if(isset($map['httpApiParameters'])){ + $model->httpApiParameters = httpApiParameters::fromMap($map['httpApiParameters']); + } + if(isset($map['invocationRateLimitPerSecond'])){ + $model->invocationRateLimitPerSecond = $map['invocationRateLimitPerSecond']; + } + return $model; + } + /** + * @description The name of the API destination. + * @example api-destination-2 + * @var string + */ + public $apiDestinationName; + + /** + * @description The connection name. + * @example connection-name + * @var string + */ + public $connectionName; + + /** + * @description The description of the connection. + * @example demo + * @var string + */ + public $description; + + /** + * @description The time when the API destination was created. + * @example 1665223213000 + * @var int + */ + public $gmtCreate; + + /** + * @description The request parameters that are configured for the API destination. + * @var httpApiParameters + */ + public $httpApiParameters; + + /** + * @description TODO + * @var int + */ + public $invocationRateLimitPerSecond; + +} diff --git a/sdk/generated/php/src/Models/ListApiDestinationsResponseBody/apiDestinations/httpApiParameters.php b/sdk/generated/php/src/Models/ListApiDestinationsResponseBody/apiDestinations/httpApiParameters.php new file mode 100644 index 00000000..fd9b1043 --- /dev/null +++ b/sdk/generated/php/src/Models/ListApiDestinationsResponseBody/apiDestinations/httpApiParameters.php @@ -0,0 +1,93 @@ + 'endpoint', + 'method' => 'method', + 'apiParameters' => 'apiParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->endpoint) { + $res['endpoint'] = $this->endpoint; + } + if (null !== $this->method) { + $res['method'] = $this->method; + } + if (null !== $this->apiParameters) { + $res['apiParameters'] = []; + if(null !== $this->apiParameters && is_array($this->apiParameters)){ + $n = 0; + foreach($this->apiParameters as $item){ + $res['apiParameters'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + return $res; + } + /** + * @param array $map + * @return httpApiParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['endpoint'])){ + $model->endpoint = $map['endpoint']; + } + if(isset($map['method'])){ + $model->method = $map['method']; + } + if(isset($map['apiParameters'])){ + if(!empty($map['apiParameters'])){ + $model->apiParameters = []; + $n = 0; + foreach($map['apiParameters'] as $item) { + $model->apiParameters[$n++] = null !== $item ? apiParameters::fromMap($item) : $item; + } + } + } + return $model; + } + /** + * @description The endpoint of the API destination. + * @example http://127.0.0.1:8001/api + * @var string + */ + public $endpoint; + + /** + * @description The HTTP request method. Valid values: + + - POST + + - GET + + - DELETE + + - PUT + + - HEAD + + - TRACE + + - PATCH + * @example POST + * @var string + */ + public $method; + + /** + * @description TODO + * @var apiParameters[] + */ + public $apiParameters; + +} diff --git a/sdk/generated/php/src/Models/ListApiDestinationsResponseBody/apiDestinations/httpApiParameters/apiParameters.php b/sdk/generated/php/src/Models/ListApiDestinationsResponseBody/apiDestinations/httpApiParameters/apiParameters.php new file mode 100644 index 00000000..86ca91bb --- /dev/null +++ b/sdk/generated/php/src/Models/ListApiDestinationsResponseBody/apiDestinations/httpApiParameters/apiParameters.php @@ -0,0 +1,85 @@ + 'name', + 'description' => 'description', + 'type' => 'type', + 'defaultValue' => 'defaultValue', + 'in' => 'in', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->name) { + $res['name'] = $this->name; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->type) { + $res['type'] = $this->type; + } + if (null !== $this->defaultValue) { + $res['defaultValue'] = $this->defaultValue; + } + if (null !== $this->in) { + $res['in'] = $this->in; + } + return $res; + } + /** + * @param array $map + * @return apiParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['name'])){ + $model->name = $map['name']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['type'])){ + $model->type = $map['type']; + } + if(isset($map['defaultValue'])){ + $model->defaultValue = $map['defaultValue']; + } + if(isset($map['in'])){ + $model->in = $map['in']; + } + return $model; + } + /** + * @var string + */ + public $name; + + /** + * @description The description of the API destination. The description can be up to 255 characters in length. + * @var string + */ + public $description; + + /** + * @var string + */ + public $type; + + /** + * @var string + */ + public $defaultValue; + + /** + * @var string + */ + public $in; + +} diff --git a/sdk/generated/php/src/Models/ListConnectionsRequest.php b/sdk/generated/php/src/Models/ListConnectionsRequest.php new file mode 100644 index 00000000..075d0712 --- /dev/null +++ b/sdk/generated/php/src/Models/ListConnectionsRequest.php @@ -0,0 +1,70 @@ + 'connectionNamePrefix', + 'maxResults' => 'maxResults', + 'nextToken' => 'nextToken', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->connectionNamePrefix) { + $res['connectionNamePrefix'] = $this->connectionNamePrefix; + } + if (null !== $this->maxResults) { + $res['maxResults'] = $this->maxResults; + } + if (null !== $this->nextToken) { + $res['nextToken'] = $this->nextToken; + } + return $res; + } + /** + * @param array $map + * @return ListConnectionsRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['connectionNamePrefix'])){ + $model->connectionNamePrefix = $map['connectionNamePrefix']; + } + if(isset($map['maxResults'])){ + $model->maxResults = $map['maxResults']; + } + if(isset($map['nextToken'])){ + $model->nextToken = $map['nextToken']; + } + return $model; + } + /** + * @description The key word that you specify to query connections. Connections can be queried by prefixes. + * @example connection-name + * @var string + */ + public $connectionNamePrefix; + + /** + * @description The maximum number of entries to be returned in a single call. You can use this parameter and the NextToken parameter to implement paging. + + * Default value: 10. + * @example 10 + * @var int + */ + public $maxResults; + + /** + * @description If you set the Limit parameter and excess return values exist, this parameter is returned. + + * Default value: 0. + * @example 0 + * @var string + */ + public $nextToken; + +} diff --git a/sdk/generated/php/src/Models/ListConnectionsResponse.php b/sdk/generated/php/src/Models/ListConnectionsResponse.php new file mode 100644 index 00000000..e253d824 --- /dev/null +++ b/sdk/generated/php/src/Models/ListConnectionsResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return ListConnectionsResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = ListConnectionsResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var ListConnectionsResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/ListConnectionsResponseBody.php b/sdk/generated/php/src/Models/ListConnectionsResponseBody.php new file mode 100644 index 00000000..94fd4215 --- /dev/null +++ b/sdk/generated/php/src/Models/ListConnectionsResponseBody.php @@ -0,0 +1,135 @@ + 'code', + 'connections' => 'connections', + 'maxResults' => 'maxResults', + 'nextToken' => 'nextToken', + 'total' => 'total', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->connections) { + $res['connections'] = []; + if(null !== $this->connections && is_array($this->connections)){ + $n = 0; + foreach($this->connections as $item){ + $res['connections'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->maxResults) { + $res['maxResults'] = $this->maxResults; + } + if (null !== $this->nextToken) { + $res['nextToken'] = $this->nextToken; + } + if (null !== $this->total) { + $res['total'] = $this->total; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return ListConnectionsResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['connections'])){ + if(!empty($map['connections'])){ + $model->connections = []; + $n = 0; + foreach($map['connections'] as $item) { + $model->connections[$n++] = null !== $item ? connections::fromMap($item) : $item; + } + } + } + if(isset($map['maxResults'])){ + $model->maxResults = $map['maxResults']; + } + if(isset($map['nextToken'])){ + $model->nextToken = $map['nextToken']; + } + if(isset($map['total'])){ + $model->total = $map['total']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The HTTP status code. The value Success indicates that the request is successful. + * @example Success + * @var string + */ + public $code; + + /** + * @description The value of the key in the request path. + * @var connections[] + */ + public $connections; + + /** + * @description The number of entries returned per page. + * @example 10 + * @var int + */ + public $maxResults; + + /** + * @description If excess return values exist, this parameter is returned. + * @example 0 + * @var string + */ + public $nextToken; + + /** + * @description The total number of entries returned. + * @example 1 + * @var int + */ + public $total; + + /** + * @description The message returned. + * @example success + * @var string + */ + public $message; + + /** + * @description The ID of the request. This parameter is a common parameter. Each request has a unique ID. You can use the ID to troubleshoot issues. + * @example E3619976-8714-5D88-BBA2-6983D798A8BB + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections.php b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections.php new file mode 100644 index 00000000..0b346684 --- /dev/null +++ b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections.php @@ -0,0 +1,108 @@ + 'authParameters', + 'connectionName' => 'connectionName', + 'description' => 'description', + 'gmtCreate' => 'gmtCreate', + 'id' => 'id', + 'networkParameters' => 'networkParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->authParameters) { + $res['authParameters'] = null !== $this->authParameters ? $this->authParameters->toMap() : null; + } + if (null !== $this->connectionName) { + $res['connectionName'] = $this->connectionName; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->gmtCreate) { + $res['gmtCreate'] = $this->gmtCreate; + } + if (null !== $this->id) { + $res['id'] = $this->id; + } + if (null !== $this->networkParameters) { + $res['networkParameters'] = null !== $this->networkParameters ? $this->networkParameters->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return connections + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['authParameters'])){ + $model->authParameters = authParameters::fromMap($map['authParameters']); + } + if(isset($map['connectionName'])){ + $model->connectionName = $map['connectionName']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['gmtCreate'])){ + $model->gmtCreate = $map['gmtCreate']; + } + if(isset($map['id'])){ + $model->id = $map['id']; + } + if(isset($map['networkParameters'])){ + $model->networkParameters = networkParameters::fromMap($map['networkParameters']); + } + return $model; + } + /** + * @description The parameters that are configured for authentication. + * @var authParameters + */ + public $authParameters; + + /** + * @description The connection name. + * @example connection-name + * @var string + */ + public $connectionName; + + /** + * @description The connection description. + * @example The description of the connection. + * @var string + */ + public $description; + + /** + * @description The time when the connection was created. + * @example 1592838994234 + * @var int + */ + public $gmtCreate; + + /** + * @description The connection ID. + * @example 1141093 + * @var int + */ + public $id; + + /** + * @var networkParameters + */ + public $networkParameters; + +} diff --git a/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters.php b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters.php new file mode 100644 index 00000000..0bf1fd55 --- /dev/null +++ b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters.php @@ -0,0 +1,90 @@ + 'apiKeyAuthParameters', + 'authorizationType' => 'authorizationType', + 'basicAuthParameters' => 'basicAuthParameters', + 'oauthParameters' => 'oauthParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->apiKeyAuthParameters) { + $res['apiKeyAuthParameters'] = null !== $this->apiKeyAuthParameters ? $this->apiKeyAuthParameters->toMap() : null; + } + if (null !== $this->authorizationType) { + $res['authorizationType'] = $this->authorizationType; + } + if (null !== $this->basicAuthParameters) { + $res['basicAuthParameters'] = null !== $this->basicAuthParameters ? $this->basicAuthParameters->toMap() : null; + } + if (null !== $this->oauthParameters) { + $res['oauthParameters'] = null !== $this->oauthParameters ? $this->oauthParameters->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return authParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['apiKeyAuthParameters'])){ + $model->apiKeyAuthParameters = apiKeyAuthParameters::fromMap($map['apiKeyAuthParameters']); + } + if(isset($map['authorizationType'])){ + $model->authorizationType = $map['authorizationType']; + } + if(isset($map['basicAuthParameters'])){ + $model->basicAuthParameters = basicAuthParameters::fromMap($map['basicAuthParameters']); + } + if(isset($map['oauthParameters'])){ + $model->oauthParameters = oauthParameters::fromMap($map['oauthParameters']); + } + return $model; + } + /** + * @description The parameters that are configured for API key authentication. + * @var apiKeyAuthParameters + */ + public $apiKeyAuthParameters; + + /** + * @description The authentication type. Valid values: + + + - BASIC_AUTH: basic authentication. + + + - API_KEY_AUTH: API key authentication. + + + - OAUTH_AUTH: OAuth authentication. + * @example BASIC_AUTH + * @var string + */ + public $authorizationType; + + /** + * @description The parameters that are configured for basic authentication. + * @var basicAuthParameters + */ + public $basicAuthParameters; + + /** + * @description The parameters that are configured for OAuth authentication. + * @var oauthParameters + */ + public $oauthParameters; + +} diff --git a/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/apiKeyAuthParameters.php b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/apiKeyAuthParameters.php new file mode 100644 index 00000000..85ec43d6 --- /dev/null +++ b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/apiKeyAuthParameters.php @@ -0,0 +1,52 @@ + 'apiKeyName', + 'apiKeyValue' => 'apiKeyValue', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->apiKeyName) { + $res['apiKeyName'] = $this->apiKeyName; + } + if (null !== $this->apiKeyValue) { + $res['apiKeyValue'] = $this->apiKeyValue; + } + return $res; + } + /** + * @param array $map + * @return apiKeyAuthParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['apiKeyName'])){ + $model->apiKeyName = $map['apiKeyName']; + } + if(isset($map['apiKeyValue'])){ + $model->apiKeyValue = $map['apiKeyValue']; + } + return $model; + } + /** + * @description The API key. + * @example Token + * @var string + */ + public $apiKeyName; + + /** + * @description The value of the API key. + * @example asdkjnqkwejooa + * @var string + */ + public $apiKeyValue; + +} diff --git a/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/basicAuthParameters.php b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/basicAuthParameters.php new file mode 100644 index 00000000..5ae661a2 --- /dev/null +++ b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/basicAuthParameters.php @@ -0,0 +1,52 @@ + 'password', + 'username' => 'username', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->password) { + $res['password'] = $this->password; + } + if (null !== $this->username) { + $res['username'] = $this->username; + } + return $res; + } + /** + * @param array $map + * @return basicAuthParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['password'])){ + $model->password = $map['password']; + } + if(isset($map['username'])){ + $model->username = $map['username']; + } + return $model; + } + /** + * @description The password for basic authentication. + * @example admin + * @var string + */ + public $password; + + /** + * @description The username for basic authentication. + * @example admin + * @var string + */ + public $username; + +} diff --git a/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters.php b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters.php new file mode 100644 index 00000000..d1222e16 --- /dev/null +++ b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters.php @@ -0,0 +1,87 @@ + 'authorizationEndpoint', + 'clientParameters' => 'clientParameters', + 'httpMethod' => 'httpMethod', + 'oauthHttpParameters' => 'oauthHttpParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->authorizationEndpoint) { + $res['authorizationEndpoint'] = $this->authorizationEndpoint; + } + if (null !== $this->clientParameters) { + $res['clientParameters'] = null !== $this->clientParameters ? $this->clientParameters->toMap() : null; + } + if (null !== $this->httpMethod) { + $res['httpMethod'] = $this->httpMethod; + } + if (null !== $this->oauthHttpParameters) { + $res['oauthHttpParameters'] = null !== $this->oauthHttpParameters ? $this->oauthHttpParameters->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return oauthParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['authorizationEndpoint'])){ + $model->authorizationEndpoint = $map['authorizationEndpoint']; + } + if(isset($map['clientParameters'])){ + $model->clientParameters = clientParameters::fromMap($map['clientParameters']); + } + if(isset($map['httpMethod'])){ + $model->httpMethod = $map['httpMethod']; + } + if(isset($map['oauthHttpParameters'])){ + $model->oauthHttpParameters = oauthHttpParameters::fromMap($map['oauthHttpParameters']); + } + return $model; + } + /** + * @description The endpoint that is used to obtain the OAuth token. + * @example http://localhost:8080/oauth/token + * @var string + */ + public $authorizationEndpoint; + + /** + * @description The parameters that are configured for the client. + * @var clientParameters + */ + public $clientParameters; + + /** + * @description The HTTP request method. Valid values: + + - GET + + - POST + + - HEAD + * @example POST + * @var string + */ + public $httpMethod; + + /** + * @description The request parameters for OAuth authentication. + * @var oauthHttpParameters + */ + public $oauthHttpParameters; + +} diff --git a/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/clientParameters.php b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/clientParameters.php new file mode 100644 index 00000000..8b6f94fa --- /dev/null +++ b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/clientParameters.php @@ -0,0 +1,52 @@ + 'clientID', + 'clientSecret' => 'clientSecret', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->clientID) { + $res['clientID'] = $this->clientID; + } + if (null !== $this->clientSecret) { + $res['clientSecret'] = $this->clientSecret; + } + return $res; + } + /** + * @param array $map + * @return clientParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['clientID'])){ + $model->clientID = $map['clientID']; + } + if(isset($map['clientSecret'])){ + $model->clientSecret = $map['clientSecret']; + } + return $model; + } + /** + * @description The client ID. + * @example ClientID + * @var string + */ + public $clientID; + + /** + * @description The client key secret of the application. + * @example ClientSecret + * @var string + */ + public $clientSecret; + +} diff --git a/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters.php b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters.php new file mode 100644 index 00000000..f06f757a --- /dev/null +++ b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters.php @@ -0,0 +1,103 @@ + 'bodyParameters', + 'headerParameters' => 'headerParameters', + 'queryStringParameters' => 'queryStringParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->bodyParameters) { + $res['bodyParameters'] = []; + if(null !== $this->bodyParameters && is_array($this->bodyParameters)){ + $n = 0; + foreach($this->bodyParameters as $item){ + $res['bodyParameters'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->headerParameters) { + $res['headerParameters'] = []; + if(null !== $this->headerParameters && is_array($this->headerParameters)){ + $n = 0; + foreach($this->headerParameters as $item){ + $res['headerParameters'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->queryStringParameters) { + $res['queryStringParameters'] = []; + if(null !== $this->queryStringParameters && is_array($this->queryStringParameters)){ + $n = 0; + foreach($this->queryStringParameters as $item){ + $res['queryStringParameters'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + return $res; + } + /** + * @param array $map + * @return oauthHttpParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['bodyParameters'])){ + if(!empty($map['bodyParameters'])){ + $model->bodyParameters = []; + $n = 0; + foreach($map['bodyParameters'] as $item) { + $model->bodyParameters[$n++] = null !== $item ? bodyParameters::fromMap($item) : $item; + } + } + } + if(isset($map['headerParameters'])){ + if(!empty($map['headerParameters'])){ + $model->headerParameters = []; + $n = 0; + foreach($map['headerParameters'] as $item) { + $model->headerParameters[$n++] = null !== $item ? headerParameters::fromMap($item) : $item; + } + } + } + if(isset($map['queryStringParameters'])){ + if(!empty($map['queryStringParameters'])){ + $model->queryStringParameters = []; + $n = 0; + foreach($map['queryStringParameters'] as $item) { + $model->queryStringParameters[$n++] = null !== $item ? queryStringParameters::fromMap($item) : $item; + } + } + } + return $model; + } + /** + * @description The parameters that are configured for the request. + * @var bodyParameters[] + */ + public $bodyParameters; + + /** + * @description The parameters that are configured for the request header. + * @var headerParameters[] + */ + public $headerParameters; + + /** + * @description The parameters that are configured for the request path. + * @var queryStringParameters[] + */ + public $queryStringParameters; + +} diff --git a/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/bodyParameters.php b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/bodyParameters.php new file mode 100644 index 00000000..5f651343 --- /dev/null +++ b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/bodyParameters.php @@ -0,0 +1,66 @@ + 'isValueSecret', + 'key' => 'key', + 'value' => 'value', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->isValueSecret) { + $res['isValueSecret'] = $this->isValueSecret; + } + if (null !== $this->key) { + $res['key'] = $this->key; + } + if (null !== $this->value) { + $res['value'] = $this->value; + } + return $res; + } + /** + * @param array $map + * @return bodyParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['isValueSecret'])){ + $model->isValueSecret = $map['isValueSecret']; + } + if(isset($map['key'])){ + $model->key = $map['key']; + } + if(isset($map['value'])){ + $model->value = $map['value']; + } + return $model; + } + /** + * @description Indicates whether authentication is enabled. + * @example false + * @var string + */ + public $isValueSecret; + + /** + * @description The key in the request body. + * @example name + * @var string + */ + public $key; + + /** + * @description The value of the key in the request body. + * @example demo + * @var string + */ + public $value; + +} diff --git a/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/headerParameters.php b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/headerParameters.php new file mode 100644 index 00000000..10d131bc --- /dev/null +++ b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/headerParameters.php @@ -0,0 +1,66 @@ + 'isValueSecret', + 'key' => 'key', + 'value' => 'value', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->isValueSecret) { + $res['isValueSecret'] = $this->isValueSecret; + } + if (null !== $this->key) { + $res['key'] = $this->key; + } + if (null !== $this->value) { + $res['value'] = $this->value; + } + return $res; + } + /** + * @param array $map + * @return headerParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['isValueSecret'])){ + $model->isValueSecret = $map['isValueSecret']; + } + if(isset($map['key'])){ + $model->key = $map['key']; + } + if(isset($map['value'])){ + $model->value = $map['value']; + } + return $model; + } + /** + * @description Indicates whether authentication is enabled. + * @example false + * @var string + */ + public $isValueSecret; + + /** + * @description The key in the request header. + * @example name + * @var string + */ + public $key; + + /** + * @description The value of the key in the request header. + * @example demo + * @var string + */ + public $value; + +} diff --git a/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/queryStringParameters.php b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/queryStringParameters.php new file mode 100644 index 00000000..39bcab67 --- /dev/null +++ b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/authParameters/oauthParameters/oauthHttpParameters/queryStringParameters.php @@ -0,0 +1,66 @@ + 'isValueSecret', + 'key' => 'key', + 'value' => 'value', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->isValueSecret) { + $res['isValueSecret'] = $this->isValueSecret; + } + if (null !== $this->key) { + $res['key'] = $this->key; + } + if (null !== $this->value) { + $res['value'] = $this->value; + } + return $res; + } + /** + * @param array $map + * @return queryStringParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['isValueSecret'])){ + $model->isValueSecret = $map['isValueSecret']; + } + if(isset($map['key'])){ + $model->key = $map['key']; + } + if(isset($map['value'])){ + $model->value = $map['value']; + } + return $model; + } + /** + * @description Indicates whether authentication is enabled. + * @example false + * @var string + */ + public $isValueSecret; + + /** + * @description The key in the request path. + * @example name + * @var string + */ + public $key; + + /** + * @description The value of the key in the request path. + * @example demo + * @var string + */ + public $value; + +} diff --git a/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/networkParameters.php b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/networkParameters.php new file mode 100644 index 00000000..ec539dde --- /dev/null +++ b/sdk/generated/php/src/Models/ListConnectionsResponseBody/connections/networkParameters.php @@ -0,0 +1,80 @@ + 'networkType', + 'securityGroupId' => 'securityGroupId', + 'vpcId' => 'vpcId', + 'vswitcheId' => 'vswitcheId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->networkType) { + $res['networkType'] = $this->networkType; + } + if (null !== $this->securityGroupId) { + $res['securityGroupId'] = $this->securityGroupId; + } + if (null !== $this->vpcId) { + $res['vpcId'] = $this->vpcId; + } + if (null !== $this->vswitcheId) { + $res['vswitcheId'] = $this->vswitcheId; + } + return $res; + } + /** + * @param array $map + * @return networkParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['networkType'])){ + $model->networkType = $map['networkType']; + } + if(isset($map['securityGroupId'])){ + $model->securityGroupId = $map['securityGroupId']; + } + if(isset($map['vpcId'])){ + $model->vpcId = $map['vpcId']; + } + if(isset($map['vswitcheId'])){ + $model->vswitcheId = $map['vswitcheId']; + } + return $model; + } + /** + * @description The network type. Valid values:PublicNetwork and PrivateNetwork. + * @example PublicNetwork + * @var string + */ + public $networkType; + + /** + * @description The security group ID. + * @example eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb + * @var string + */ + public $securityGroupId; + + /** + * @description The virtual private cloud (VPC) ID. + * @example eb-test/vpc-bp1symadadwnwgmqud + * @var string + */ + public $vpcId; + + /** + * @description The vSwitch ID. + * @example vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c + * @var string + */ + public $vswitcheId; + +} diff --git a/sdk/generated/php/src/Models/ListEnumsResponseResponse.php b/sdk/generated/php/src/Models/ListEnumsResponseResponse.php new file mode 100644 index 00000000..ec23c0bd --- /dev/null +++ b/sdk/generated/php/src/Models/ListEnumsResponseResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return ListEnumsResponseResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = UpdateConnectionResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var UpdateConnectionResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/ListEnumsResponseResponseBody.php b/sdk/generated/php/src/Models/ListEnumsResponseResponseBody.php new file mode 100644 index 00000000..8a1f1c48 --- /dev/null +++ b/sdk/generated/php/src/Models/ListEnumsResponseResponseBody.php @@ -0,0 +1,90 @@ + 'authorizationTypeEnums', + 'networkTypeEnums' => 'networkTypeEnums', + 'code' => 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->authorizationTypeEnums) { + $res['authorizationTypeEnums'] = $this->authorizationTypeEnums; + } + if (null !== $this->networkTypeEnums) { + $res['networkTypeEnums'] = $this->networkTypeEnums; + } + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return ListEnumsResponseResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['authorizationTypeEnums'])){ + $model->authorizationTypeEnums = $map['authorizationTypeEnums']; + } + if(isset($map['networkTypeEnums'])){ + $model->networkTypeEnums = $map['networkTypeEnums']; + } + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @var string + */ + public $authorizationTypeEnums; + + /** + * @var string + */ + public $networkTypeEnums; + + /** + * @description The returned response code. + * @example Success + * @var string + */ + public $code; + + /** + * @description The returned message. + * @example success + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 8346BE8F-40F3-533D-A0B8-1359C31BD5BA + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/ListEventBusesRequest.php b/sdk/generated/php/src/Models/ListEventBusesRequest.php new file mode 100644 index 00000000..2c113d5a --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventBusesRequest.php @@ -0,0 +1,52 @@ + 'maxResults', + 'nextToken' => 'nextToken', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->maxResults) { + $res['maxResults'] = $this->maxResults; + } + if (null !== $this->nextToken) { + $res['nextToken'] = $this->nextToken; + } + return $res; + } + /** + * @param array $map + * @return ListEventBusesRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['maxResults'])){ + $model->maxResults = $map['maxResults']; + } + if(isset($map['nextToken'])){ + $model->nextToken = $map['nextToken']; + } + return $model; + } + /** + * @description The maximum number of entries to be returned in a call. You can use this parameter and NextToken to implement paging. Note: Up to 100 entries can be returned in a call. + * @example 10 + * @var int + */ + public $maxResults; + + /** + * @description If you set Limit and excess return values exist, this parameter is returned. + * @example 10 + * @var string + */ + public $nextToken; + +} diff --git a/sdk/generated/php/src/Models/ListEventBusesResponse.php b/sdk/generated/php/src/Models/ListEventBusesResponse.php new file mode 100644 index 00000000..66da9bb7 --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventBusesResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return ListEventBusesResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = ListEventBusesResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var ListEventBusesResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/ListEventBusesResponseBody.php b/sdk/generated/php/src/Models/ListEventBusesResponseBody.php new file mode 100644 index 00000000..2ca78ea7 --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventBusesResponseBody.php @@ -0,0 +1,135 @@ + 'code', + 'eventBuses' => 'eventBuses', + 'message' => 'message', + 'requestId' => 'requestId', + 'nextToken' => 'nextToken', + 'total' => 'total', + 'maxResults' => 'maxResults', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->eventBuses) { + $res['eventBuses'] = []; + if(null !== $this->eventBuses && is_array($this->eventBuses)){ + $n = 0; + foreach($this->eventBuses as $item){ + $res['eventBuses'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + if (null !== $this->nextToken) { + $res['nextToken'] = $this->nextToken; + } + if (null !== $this->total) { + $res['total'] = $this->total; + } + if (null !== $this->maxResults) { + $res['maxResults'] = $this->maxResults; + } + return $res; + } + /** + * @param array $map + * @return ListEventBusesResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['eventBuses'])){ + if(!empty($map['eventBuses'])){ + $model->eventBuses = []; + $n = 0; + foreach($map['eventBuses'] as $item) { + $model->eventBuses[$n++] = null !== $item ? eventBuses::fromMap($item) : $item; + } + } + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + if(isset($map['nextToken'])){ + $model->nextToken = $map['nextToken']; + } + if(isset($map['total'])){ + $model->total = $map['total']; + } + if(isset($map['maxResults'])){ + $model->maxResults = $map['maxResults']; + } + return $model; + } + /** + * @description The returned HTTP status code. The HTTP status code 200 indicates that the request is successful. + * @example 200 + * @var string + */ + public $code; + + /** + * @description The timestamp that indicates when the event bus was created. + * @var eventBuses[] + */ + public $eventBuses; + + /** + * @description The returned error message. + * @example InvalidArgument + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example D1DCF64A-3F2C-5323-ADCB-3F4DF30FAD2D + * @var string + */ + public $requestId; + + /** + * @description If excess return values exist, this parameter is returned. + * @example 10 + * @var string + */ + public $nextToken; + + /** + * @description The total number of entries. + * @example 2 + * @var int + */ + public $total; + + /** + * @description If you set Limit and excess return values exist, this parameter is returned. + * @example 10 + * @var int + */ + public $maxResults; + +} diff --git a/sdk/generated/php/src/Models/ListEventBusesResponseBody/eventBuses.php b/sdk/generated/php/src/Models/ListEventBusesResponseBody/eventBuses.php new file mode 100644 index 00000000..4f89b7f5 --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventBusesResponseBody/eventBuses.php @@ -0,0 +1,52 @@ + 'description', + 'eventBusName' => 'eventBusName', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + return $res; + } + /** + * @param array $map + * @return eventBuses + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + return $model; + } + /** + * @description The description of the queried event bus. + * @example bus_description + * @var string + */ + public $description; + + /** + * @description The name of the queried event bus. + * @example default + * @var string + */ + public $eventBusName; + +} diff --git a/sdk/generated/php/src/Models/ListEventRulesRequest.php b/sdk/generated/php/src/Models/ListEventRulesRequest.php new file mode 100644 index 00000000..9e6064ec --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventRulesRequest.php @@ -0,0 +1,64 @@ + 'eventBusName', + 'maxResults' => 'maxResults', + 'nextToken' => 'nextToken', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->maxResults) { + $res['maxResults'] = $this->maxResults; + } + if (null !== $this->nextToken) { + $res['nextToken'] = $this->nextToken; + } + return $res; + } + /** + * @param array $map + * @return ListEventRulesRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['maxResults'])){ + $model->maxResults = $map['maxResults']; + } + if(isset($map['nextToken'])){ + $model->nextToken = $map['nextToken']; + } + return $model; + } + /** + * @var string + */ + public $eventBusName; + + /** + * @description The number of entries returned per page. + * @example 10 + * @var int + */ + public $maxResults; + + /** + * @description If excess return values exist, this parameter is returned. + * @example 0 + * @var string + */ + public $nextToken; + +} diff --git a/sdk/generated/php/src/Models/ListEventRulesResponse.php b/sdk/generated/php/src/Models/ListEventRulesResponse.php new file mode 100644 index 00000000..41ad3fb8 --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventRulesResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return ListEventRulesResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = ListEventRulesResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var ListEventRulesResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/ListEventRulesResponseBody.php b/sdk/generated/php/src/Models/ListEventRulesResponseBody.php new file mode 100644 index 00000000..2f0a1b1c --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventRulesResponseBody.php @@ -0,0 +1,92 @@ + 'eventRules', + 'total' => 'total', + 'maxResults' => 'maxResults', + 'nextToken' => 'nextToken', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventRules) { + $res['eventRules'] = []; + if(null !== $this->eventRules && is_array($this->eventRules)){ + $n = 0; + foreach($this->eventRules as $item){ + $res['eventRules'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->total) { + $res['total'] = $this->total; + } + if (null !== $this->maxResults) { + $res['maxResults'] = $this->maxResults; + } + if (null !== $this->nextToken) { + $res['nextToken'] = $this->nextToken; + } + return $res; + } + /** + * @param array $map + * @return ListEventRulesResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventRules'])){ + if(!empty($map['eventRules'])){ + $model->eventRules = []; + $n = 0; + foreach($map['eventRules'] as $item) { + $model->eventRules[$n++] = null !== $item ? eventRules::fromMap($item) : $item; + } + } + } + if(isset($map['total'])){ + $model->total = $map['total']; + } + if(isset($map['maxResults'])){ + $model->maxResults = $map['maxResults']; + } + if(isset($map['nextToken'])){ + $model->nextToken = $map['nextToken']; + } + return $model; + } + /** + * @var eventRules[] + */ + public $eventRules; + + /** + * @description The total number of entries. + * @example 2 + * @var int + */ + public $total; + + /** + * @description The number of entries returned per page. + * @example 10 + * @var int + */ + public $maxResults; + + /** + * @description If excess return values exist, this parameter is returned. + * @example 0 + * @var string + */ + public $nextToken; + +} diff --git a/sdk/generated/php/src/Models/ListEventRulesResponseBody/eventRules.php b/sdk/generated/php/src/Models/ListEventRulesResponseBody/eventRules.php new file mode 100644 index 00000000..54489ab4 --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventRulesResponseBody/eventRules.php @@ -0,0 +1,120 @@ + 'eventBusName', + 'eventRuleName' => 'eventRuleName', + 'description' => 'description', + 'filterPattern' => 'filterPattern', + 'status' => 'status', + 'gmtCreate' => 'gmtCreate', + 'gmtModify' => 'gmtModify', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventRuleName) { + $res['eventRuleName'] = $this->eventRuleName; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->filterPattern) { + $res['filterPattern'] = $this->filterPattern; + } + if (null !== $this->status) { + $res['status'] = $this->status; + } + if (null !== $this->gmtCreate) { + $res['gmtCreate'] = $this->gmtCreate; + } + if (null !== $this->gmtModify) { + $res['gmtModify'] = $this->gmtModify; + } + return $res; + } + /** + * @param array $map + * @return eventRules + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventRuleName'])){ + $model->eventRuleName = $map['eventRuleName']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['filterPattern'])){ + $model->filterPattern = $map['filterPattern']; + } + if(isset($map['status'])){ + $model->status = $map['status']; + } + if(isset($map['gmtCreate'])){ + $model->gmtCreate = $map['gmtCreate']; + } + if(isset($map['gmtModify'])){ + $model->gmtModify = $map['gmtModify']; + } + return $model; + } + /** + * @description The name of the event bus with which the event source is associated. +This parameter is required. + * @example my-event-bus + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event rule. +This parameter is required. + * @example myrabbitmq.sourc + * @var string + */ + public $eventRuleName; + + /** + * @var string + */ + public $description; + + /** + * @description The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + + You can specify up to five expressions in the map data structure in each field. + * @example {\"source\": [{\"prefix\": \"acs.\"}],\"type\": [{\"prefix\":\"oss:ObjectReplication\"}],\"subject\":[{\"prefix\":\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\", \"suffix\":\".txt\"}]} + * @var string + */ + public $filterPattern; + + /** + * @description The status of the event rule. Valid values: ENABLE (default): The event rule is enabled. DISABLE: The event rule is disabled. + * @example ENABLE + * @var string + */ + public $status; + + /** + * @var string + */ + public $gmtCreate; + + /** + * @var string + */ + public $gmtModify; + +} diff --git a/sdk/generated/php/src/Models/ListEventSourcesRequest.php b/sdk/generated/php/src/Models/ListEventSourcesRequest.php new file mode 100644 index 00000000..fd0866d3 --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventSourcesRequest.php @@ -0,0 +1,79 @@ + 'eventBusName', + 'eventSourceType' => 'eventSourceType', + 'maxResults' => 'maxResults', + 'nextToken' => 'nextToken', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventSourceType) { + $res['eventSourceType'] = $this->eventSourceType; + } + if (null !== $this->maxResults) { + $res['maxResults'] = $this->maxResults; + } + if (null !== $this->nextToken) { + $res['nextToken'] = $this->nextToken; + } + return $res; + } + /** + * @param array $map + * @return ListEventSourcesRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventSourceType'])){ + $model->eventSourceType = $map['eventSourceType']; + } + if(isset($map['maxResults'])){ + $model->maxResults = $map['maxResults']; + } + if(isset($map['nextToken'])){ + $model->nextToken = $map['nextToken']; + } + return $model; + } + /** + * @var string + */ + public $eventBusName; + + /** + * @description The type of the event source. +This parameter is required. + * @example USER_DEFINED + * @var string + */ + public $eventSourceType; + + /** + * @description The number of entries returned per page. + * @example 10 + * @var int + */ + public $maxResults; + + /** + * @description If excess return values exist, this parameter is returned. + * @example 0 + * @var string + */ + public $nextToken; + +} diff --git a/sdk/generated/php/src/Models/ListEventSourcesResponse.php b/sdk/generated/php/src/Models/ListEventSourcesResponse.php new file mode 100644 index 00000000..0aba18bb --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventSourcesResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return ListEventSourcesResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = ListEventSourcesResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var ListEventSourcesResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/ListEventSourcesResponseBody.php b/sdk/generated/php/src/Models/ListEventSourcesResponseBody.php new file mode 100644 index 00000000..0f0ea82b --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventSourcesResponseBody.php @@ -0,0 +1,92 @@ + 'eventSources', + 'total' => 'total', + 'maxResults' => 'maxResults', + 'nextToken' => 'nextToken', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventSources) { + $res['eventSources'] = []; + if(null !== $this->eventSources && is_array($this->eventSources)){ + $n = 0; + foreach($this->eventSources as $item){ + $res['eventSources'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->total) { + $res['total'] = $this->total; + } + if (null !== $this->maxResults) { + $res['maxResults'] = $this->maxResults; + } + if (null !== $this->nextToken) { + $res['nextToken'] = $this->nextToken; + } + return $res; + } + /** + * @param array $map + * @return ListEventSourcesResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventSources'])){ + if(!empty($map['eventSources'])){ + $model->eventSources = []; + $n = 0; + foreach($map['eventSources'] as $item) { + $model->eventSources[$n++] = null !== $item ? eventSources::fromMap($item) : $item; + } + } + } + if(isset($map['total'])){ + $model->total = $map['total']; + } + if(isset($map['maxResults'])){ + $model->maxResults = $map['maxResults']; + } + if(isset($map['nextToken'])){ + $model->nextToken = $map['nextToken']; + } + return $model; + } + /** + * @var eventSources[] + */ + public $eventSources; + + /** + * @description The total number of entries. + * @example 2 + * @var int + */ + public $total; + + /** + * @description The number of entries returned per page. + * @example 10 + * @var int + */ + public $maxResults; + + /** + * @description If excess return values exist, this parameter is returned. + * @example 0 + * @var string + */ + public $nextToken; + +} diff --git a/sdk/generated/php/src/Models/ListEventSourcesResponseBody/eventSources.php b/sdk/generated/php/src/Models/ListEventSourcesResponseBody/eventSources.php new file mode 100644 index 00000000..05a7287f --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventSourcesResponseBody/eventSources.php @@ -0,0 +1,115 @@ + 'eventBusName', + 'eventSourceName' => 'eventSourceName', + 'description' => 'description', + 'className' => 'className', + 'config' => 'config', + 'gmtCreate' => 'gmtCreate', + 'gmtModify' => 'gmtModify', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventSourceName) { + $res['eventSourceName'] = $this->eventSourceName; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->className) { + $res['className'] = $this->className; + } + if (null !== $this->config) { + $res['config'] = $this->config; + } + if (null !== $this->gmtCreate) { + $res['gmtCreate'] = $this->gmtCreate; + } + if (null !== $this->gmtModify) { + $res['gmtModify'] = $this->gmtModify; + } + return $res; + } + /** + * @param array $map + * @return eventSources + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventSourceName'])){ + $model->eventSourceName = $map['eventSourceName']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['className'])){ + $model->className = $map['className']; + } + if(isset($map['config'])){ + $model->config = $map['config']; + } + if(isset($map['gmtCreate'])){ + $model->gmtCreate = $map['gmtCreate']; + } + if(isset($map['gmtModify'])){ + $model->gmtModify = $map['gmtModify']; + } + return $model; + } + /** + * @description The name of the event bus. +This parameter is required. + * @example demo + * @var string + */ + public $eventBusName; + + /** + * @description EventSource is required for querying default bus events. + * @example testEventSourceName + * @var string + */ + public $eventSourceName; + + /** + * @description The description of the event type. + * @example The description of the event type. + * @var string + */ + public $description; + + /** + * @var string + */ + public $className; + + /** + * @var mixed[] + */ + public $config; + + /** + * @var string + */ + public $gmtCreate; + + /** + * @var string + */ + public $gmtModify; + +} diff --git a/sdk/generated/php/src/Models/ListEventTargetsRequest.php b/sdk/generated/php/src/Models/ListEventTargetsRequest.php new file mode 100644 index 00000000..8396483b --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventTargetsRequest.php @@ -0,0 +1,54 @@ + 'eventBusName', + 'eventRuleName' => 'eventRuleName', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventRuleName) { + $res['eventRuleName'] = $this->eventRuleName; + } + return $res; + } + /** + * @param array $map + * @return ListEventTargetsRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventRuleName'])){ + $model->eventRuleName = $map['eventRuleName']; + } + return $model; + } + /** + * @description The name of the event bus with which the event target is associated. +This parameter is required. + * @example my-event-bus + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event rule. +This parameter is required. + * @example myrabbitmq.sourc + * @var string + */ + public $eventRuleName; + +} diff --git a/sdk/generated/php/src/Models/ListEventTargetsResponse.php b/sdk/generated/php/src/Models/ListEventTargetsResponse.php new file mode 100644 index 00000000..210e5c0e --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventTargetsResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return ListEventTargetsResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = ListEventTargetsResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var ListEventTargetsResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/ListEventTargetsResponseBody.php b/sdk/generated/php/src/Models/ListEventTargetsResponseBody.php new file mode 100644 index 00000000..16c23cc9 --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventTargetsResponseBody.php @@ -0,0 +1,80 @@ + 'eventBusName', + 'eventRuleName' => 'eventRuleName', + 'eventTargets' => 'eventTargets', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventRuleName) { + $res['eventRuleName'] = $this->eventRuleName; + } + if (null !== $this->eventTargets) { + $res['eventTargets'] = []; + if(null !== $this->eventTargets && is_array($this->eventTargets)){ + $n = 0; + foreach($this->eventTargets as $item){ + $res['eventTargets'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + return $res; + } + /** + * @param array $map + * @return ListEventTargetsResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventRuleName'])){ + $model->eventRuleName = $map['eventRuleName']; + } + if(isset($map['eventTargets'])){ + if(!empty($map['eventTargets'])){ + $model->eventTargets = []; + $n = 0; + foreach($map['eventTargets'] as $item) { + $model->eventTargets[$n++] = null !== $item ? eventTargets::fromMap($item) : $item; + } + } + } + return $model; + } + /** + * @description The name of the event bus with which the event target is associated. +This parameter is required. + * @example my-event-bus + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event rule. +This parameter is required. + * @example myrabbitmq.sourc + * @var string + */ + public $eventRuleName; + + /** + * @var eventTargets[] + */ + public $eventTargets; + +} diff --git a/sdk/generated/php/src/Models/ListEventTargetsResponseBody/eventTargets.php b/sdk/generated/php/src/Models/ListEventTargetsResponseBody/eventTargets.php new file mode 100644 index 00000000..64850a63 --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventTargetsResponseBody/eventTargets.php @@ -0,0 +1,74 @@ + 'eventTargetName', + 'className' => 'className', + 'config' => 'config', + 'runOptions' => 'runOptions', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventTargetName) { + $res['eventTargetName'] = $this->eventTargetName; + } + if (null !== $this->className) { + $res['className'] = $this->className; + } + if (null !== $this->config) { + $res['config'] = $this->config; + } + if (null !== $this->runOptions) { + $res['runOptions'] = null !== $this->runOptions ? $this->runOptions->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return eventTargets + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventTargetName'])){ + $model->eventTargetName = $map['eventTargetName']; + } + if(isset($map['className'])){ + $model->className = $map['className']; + } + if(isset($map['config'])){ + $model->config = $map['config']; + } + if(isset($map['runOptions'])){ + $model->runOptions = runOptions::fromMap($map['runOptions']); + } + return $model; + } + /** + * @var string + */ + public $eventTargetName; + + /** + * @var string + */ + public $className; + + /** + * @var mixed[] + */ + public $config; + + /** + * @var runOptions + */ + public $runOptions; + +} diff --git a/sdk/generated/php/src/Models/ListEventTargetsResponseBody/eventTargets/runOptions.php b/sdk/generated/php/src/Models/ListEventTargetsResponseBody/eventTargets/runOptions.php new file mode 100644 index 00000000..038178ee --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventTargetsResponseBody/eventTargets/runOptions.php @@ -0,0 +1,63 @@ + 'errorsTolerance', + 'retryStrategy' => 'retryStrategy', + 'deadLetterQueue' => 'deadLetterQueue', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->errorsTolerance) { + $res['errorsTolerance'] = $this->errorsTolerance; + } + if (null !== $this->retryStrategy) { + $res['retryStrategy'] = null !== $this->retryStrategy ? $this->retryStrategy->toMap() : null; + } + if (null !== $this->deadLetterQueue) { + $res['deadLetterQueue'] = null !== $this->deadLetterQueue ? $this->deadLetterQueue->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return runOptions + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['errorsTolerance'])){ + $model->errorsTolerance = $map['errorsTolerance']; + } + if(isset($map['retryStrategy'])){ + $model->retryStrategy = retryStrategy::fromMap($map['retryStrategy']); + } + if(isset($map['deadLetterQueue'])){ + $model->deadLetterQueue = deadLetterQueue::fromMap($map['deadLetterQueue']); + } + return $model; + } + /** + * @var string + */ + public $errorsTolerance; + + /** + * @var retryStrategy + */ + public $retryStrategy; + + /** + * @var deadLetterQueue + */ + public $deadLetterQueue; + +} diff --git a/sdk/generated/php/src/Models/ListEventTargetsResponseBody/eventTargets/runOptions/deadLetterQueue.php b/sdk/generated/php/src/Models/ListEventTargetsResponseBody/eventTargets/runOptions/deadLetterQueue.php new file mode 100644 index 00000000..48ee8fd7 --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventTargetsResponseBody/eventTargets/runOptions/deadLetterQueue.php @@ -0,0 +1,48 @@ + 'type', + 'config' => 'config', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->type) { + $res['type'] = $this->type; + } + if (null !== $this->config) { + $res['config'] = $this->config; + } + return $res; + } + /** + * @param array $map + * @return deadLetterQueue + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['type'])){ + $model->type = $map['type']; + } + if(isset($map['config'])){ + $model->config = $map['config']; + } + return $model; + } + /** + * @var string + */ + public $type; + + /** + * @var mixed[] + */ + public $config; + +} diff --git a/sdk/generated/php/src/Models/ListEventTargetsResponseBody/eventTargets/runOptions/retryStrategy.php b/sdk/generated/php/src/Models/ListEventTargetsResponseBody/eventTargets/runOptions/retryStrategy.php new file mode 100644 index 00000000..4eaf742a --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventTargetsResponseBody/eventTargets/runOptions/retryStrategy.php @@ -0,0 +1,60 @@ + 'pushRetryStrategy', + 'maximumEventAgeInSeconds' => 'maximumEventAgeInSeconds', + 'maximumRetryAttempts' => 'maximumRetryAttempts', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->pushRetryStrategy) { + $res['pushRetryStrategy'] = $this->pushRetryStrategy; + } + if (null !== $this->maximumEventAgeInSeconds) { + $res['maximumEventAgeInSeconds'] = $this->maximumEventAgeInSeconds; + } + if (null !== $this->maximumRetryAttempts) { + $res['maximumRetryAttempts'] = $this->maximumRetryAttempts; + } + return $res; + } + /** + * @param array $map + * @return retryStrategy + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['pushRetryStrategy'])){ + $model->pushRetryStrategy = $map['pushRetryStrategy']; + } + if(isset($map['maximumEventAgeInSeconds'])){ + $model->maximumEventAgeInSeconds = $map['maximumEventAgeInSeconds']; + } + if(isset($map['maximumRetryAttempts'])){ + $model->maximumRetryAttempts = $map['maximumRetryAttempts']; + } + return $model; + } + /** + * @var string + */ + public $pushRetryStrategy; + + /** + * @var int + */ + public $maximumEventAgeInSeconds; + + /** + * @var int + */ + public $maximumRetryAttempts; + +} diff --git a/sdk/generated/php/src/Models/ListEventTypesRequest.php b/sdk/generated/php/src/Models/ListEventTypesRequest.php new file mode 100644 index 00000000..22f95091 --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventTypesRequest.php @@ -0,0 +1,85 @@ + 'eventBusName', + 'eventSourceName' => 'eventSourceName', + 'maxResults' => 'maxResults', + 'nextToken' => 'nextToken', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventSourceName) { + $res['eventSourceName'] = $this->eventSourceName; + } + if (null !== $this->maxResults) { + $res['maxResults'] = $this->maxResults; + } + if (null !== $this->nextToken) { + $res['nextToken'] = $this->nextToken; + } + return $res; + } + /** + * @param array $map + * @return ListEventTypesRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventSourceName'])){ + $model->eventSourceName = $map['eventSourceName']; + } + if(isset($map['maxResults'])){ + $model->maxResults = $map['maxResults']; + } + if(isset($map['nextToken'])){ + $model->nextToken = $map['nextToken']; + } + return $model; + } + /** + * @description The name of the event bus. +This parameter is required. + * @example demo + * @var string + */ + public $eventBusName; + + /** + * @description EventSource is required for querying default bus events. + * @example testEventSourceName + * @var string + */ + public $eventSourceName; + + /** + * @description The number of entries returned per page. + * @example 10 + * @var int + */ + public $maxResults; + + /** + * @description If excess return values exist, this parameter is returned. + * @example 0 + * @var string + */ + public $nextToken; + +} diff --git a/sdk/generated/php/src/Models/ListEventTypesResponse.php b/sdk/generated/php/src/Models/ListEventTypesResponse.php new file mode 100644 index 00000000..76ec62b2 --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventTypesResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return ListEventTypesResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = ListEventTypesResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var ListEventTypesResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/ListEventTypesResponseBody.php b/sdk/generated/php/src/Models/ListEventTypesResponseBody.php new file mode 100644 index 00000000..3319647c --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventTypesResponseBody.php @@ -0,0 +1,134 @@ + 'eventTypes', + 'nextToken' => 'nextToken', + 'total' => 'total', + 'maxResults' => 'maxResults', + 'code' => 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventTypes) { + $res['eventTypes'] = []; + if(null !== $this->eventTypes && is_array($this->eventTypes)){ + $n = 0; + foreach($this->eventTypes as $item){ + $res['eventTypes'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->nextToken) { + $res['nextToken'] = $this->nextToken; + } + if (null !== $this->total) { + $res['total'] = $this->total; + } + if (null !== $this->maxResults) { + $res['maxResults'] = $this->maxResults; + } + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return ListEventTypesResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventTypes'])){ + if(!empty($map['eventTypes'])){ + $model->eventTypes = []; + $n = 0; + foreach($map['eventTypes'] as $item) { + $model->eventTypes[$n++] = null !== $item ? eventTypes::fromMap($item) : $item; + } + } + } + if(isset($map['nextToken'])){ + $model->nextToken = $map['nextToken']; + } + if(isset($map['total'])){ + $model->total = $map['total']; + } + if(isset($map['maxResults'])){ + $model->maxResults = $map['maxResults']; + } + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @var eventTypes[] + */ + public $eventTypes; + + /** + * @description If excess return values exist, this parameter is returned. + * @example 10 + * @var string + */ + public $nextToken; + + /** + * @description The total number of entries. + * @example 2 + * @var int + */ + public $total; + + /** + * @description If you set Limit and excess return values exist, this parameter is returned. + * @example 10 + * @var int + */ + public $maxResults; + + /** + * @description The status code returned. The status code 200 indicates that the request was successful. + * @example 200 + * @var string + */ + public $code; + + /** + * @description The error message that is returned if the request failed. + * @example EventBusNotExist + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 580A938B-6107-586C-8EC7-F22EEBEDA9E6 + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/ListEventTypesResponseBody/eventTypes.php b/sdk/generated/php/src/Models/ListEventTypesResponseBody/eventTypes.php new file mode 100644 index 00000000..d7efa8c5 --- /dev/null +++ b/sdk/generated/php/src/Models/ListEventTypesResponseBody/eventTypes.php @@ -0,0 +1,104 @@ + 'eventBusName', + 'eventSourceName' => 'eventSourceName', + 'eventTypeName' => 'eventTypeName', + 'description' => 'description', + 'gmtCreate' => 'gmtCreate', + 'gmtModify' => 'gmtModify', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventSourceName) { + $res['eventSourceName'] = $this->eventSourceName; + } + if (null !== $this->eventTypeName) { + $res['eventTypeName'] = $this->eventTypeName; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->gmtCreate) { + $res['gmtCreate'] = $this->gmtCreate; + } + if (null !== $this->gmtModify) { + $res['gmtModify'] = $this->gmtModify; + } + return $res; + } + /** + * @param array $map + * @return eventTypes + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventSourceName'])){ + $model->eventSourceName = $map['eventSourceName']; + } + if(isset($map['eventTypeName'])){ + $model->eventTypeName = $map['eventTypeName']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['gmtCreate'])){ + $model->gmtCreate = $map['gmtCreate']; + } + if(isset($map['gmtModify'])){ + $model->gmtModify = $map['gmtModify']; + } + return $model; + } + /** + * @description The name of the event bus. +This parameter is required. + * @example demo + * @var string + */ + public $eventBusName; + + /** + * @description EventSource is required for querying default bus events. + * @example testEventSourceName + * @var string + */ + public $eventSourceName; + + /** + * @description The name of the event type. + * @var string + */ + public $eventTypeName; + + /** + * @description The description of the event type. + * @example The description of the event type. + * @var string + */ + public $description; + + /** + * @var string + */ + public $gmtCreate; + + /** + * @var string + */ + public $gmtModify; + +} diff --git a/sdk/generated/php/src/Models/PutEventsRequest.php b/sdk/generated/php/src/Models/PutEventsRequest.php new file mode 100644 index 00000000..5ae488ee --- /dev/null +++ b/sdk/generated/php/src/Models/PutEventsRequest.php @@ -0,0 +1,57 @@ + 'eventBusName', + 'event' => 'event', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->event) { + $res['event'] = $this->event; + } + return $res; + } + /** + * @param array $map + * @return PutEventsRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['event'])){ + $model->event = $map['event']; + } + return $model; + } + /** + * @description The name of the event bus. +This parameter is required. + * @example demo + * @var string + */ + public $eventBusName; + + /** + * @description The content of the event. + * @example The description of the event. + * @var string + */ + public $event; + +} diff --git a/sdk/generated/php/src/Models/PutEventsResponse.php b/sdk/generated/php/src/Models/PutEventsResponse.php new file mode 100644 index 00000000..5f93c78a --- /dev/null +++ b/sdk/generated/php/src/Models/PutEventsResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return PutEventsResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = PutEventsResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var PutEventsResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/PutEventsResponseBody.php b/sdk/generated/php/src/Models/PutEventsResponseBody.php new file mode 100644 index 00000000..5da76860 --- /dev/null +++ b/sdk/generated/php/src/Models/PutEventsResponseBody.php @@ -0,0 +1,104 @@ + 'failedEntryCount', + 'entryList' => 'entryList', + 'code' => 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->failedEntryCount) { + $res['failedEntryCount'] = $this->failedEntryCount; + } + if (null !== $this->entryList) { + $res['entryList'] = []; + if(null !== $this->entryList && is_array($this->entryList)){ + $n = 0; + foreach($this->entryList as $item){ + $res['entryList'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return PutEventsResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['failedEntryCount'])){ + $model->failedEntryCount = $map['failedEntryCount']; + } + if(isset($map['entryList'])){ + if(!empty($map['entryList'])){ + $model->entryList = []; + $n = 0; + foreach($map['entryList'] as $item) { + $model->entryList[$n++] = null !== $item ? entryList::fromMap($item) : $item; + } + } + } + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @var int + */ + public $failedEntryCount; + + /** + * @var entryList[] + */ + public $entryList; + + /** + * @description The status code returned. The status code 200 indicates that the request was successful. + * @example 200 + * @var string + */ + public $code; + + /** + * @description The error message that is returned if the request failed. + * @example EventBusNotExist + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 580A938B-6107-586C-8EC7-F22EEBEDA9E6 + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/PutEventsResponseBody/entryList.php b/sdk/generated/php/src/Models/PutEventsResponseBody/entryList.php new file mode 100644 index 00000000..7cf6b925 --- /dev/null +++ b/sdk/generated/php/src/Models/PutEventsResponseBody/entryList.php @@ -0,0 +1,64 @@ + 'eventId', + 'errorCode' => 'errorCode', + 'errorMessage' => 'errorMessage', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventId) { + $res['eventId'] = $this->eventId; + } + if (null !== $this->errorCode) { + $res['errorCode'] = $this->errorCode; + } + if (null !== $this->errorMessage) { + $res['errorMessage'] = $this->errorMessage; + } + return $res; + } + /** + * @param array $map + * @return entryList + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventId'])){ + $model->eventId = $map['eventId']; + } + if(isset($map['errorCode'])){ + $model->errorCode = $map['errorCode']; + } + if(isset($map['errorMessage'])){ + $model->errorMessage = $map['errorMessage']; + } + return $model; + } + /** + * @description The event ID. + * @example a5747e4f-2af2-40b6-b262-d0140e995bf7 + * @var string + */ + public $eventId; + + /** + * @description The returned error code. + * @var string + */ + public $errorCode; + + /** + * @description The returned error message. + * @var string + */ + public $errorMessage; + +} diff --git a/sdk/generated/php/src/Models/UpdateApiDestinationRequest.php b/sdk/generated/php/src/Models/UpdateApiDestinationRequest.php new file mode 100644 index 00000000..6a76abda --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateApiDestinationRequest.php @@ -0,0 +1,93 @@ + 'apiDestinationName', + 'connectionName' => 'connectionName', + 'description' => 'description', + 'httpApiParameters' => 'httpApiParameters', + 'invocationRateLimitPerSecond' => 'invocationRateLimitPerSecond', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->apiDestinationName) { + $res['apiDestinationName'] = $this->apiDestinationName; + } + if (null !== $this->connectionName) { + $res['connectionName'] = $this->connectionName; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->httpApiParameters) { + $res['httpApiParameters'] = null !== $this->httpApiParameters ? $this->httpApiParameters->toMap() : null; + } + if (null !== $this->invocationRateLimitPerSecond) { + $res['invocationRateLimitPerSecond'] = $this->invocationRateLimitPerSecond; + } + return $res; + } + /** + * @param array $map + * @return UpdateApiDestinationRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['apiDestinationName'])){ + $model->apiDestinationName = $map['apiDestinationName']; + } + if(isset($map['connectionName'])){ + $model->connectionName = $map['connectionName']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['httpApiParameters'])){ + $model->httpApiParameters = httpApiParameters::fromMap($map['httpApiParameters']); + } + if(isset($map['invocationRateLimitPerSecond'])){ + $model->invocationRateLimitPerSecond = $map['invocationRateLimitPerSecond']; + } + return $model; + } + /** + * @description The name of the API destination. The name must be 2 to 127 characters in length. This parameter is required. + * @example api-destination-name + * @var string + */ + public $apiDestinationName; + + /** + * @description The name of the connection. The name must be 2 to 127 characters in length. Before you configure this parameter, you must call the CreateConnection operation to create a connection. Then, set this parameter to the name of the connection that you created. This parameter is required. + * @example connection-name + * @var string + */ + public $connectionName; + + /** + * @description The description of the API destination. The description can be up to 255 characters in length. + * @var string + */ + public $description; + + /** + * @description The parameters that are configured for the API destination. This parameter is required. + * @var httpApiParameters + */ + public $httpApiParameters; + + /** + * @description TODO + * @var int + */ + public $invocationRateLimitPerSecond; + +} diff --git a/sdk/generated/php/src/Models/UpdateApiDestinationRequest/httpApiParameters.php b/sdk/generated/php/src/Models/UpdateApiDestinationRequest/httpApiParameters.php new file mode 100644 index 00000000..e83ba77d --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateApiDestinationRequest/httpApiParameters.php @@ -0,0 +1,95 @@ + 'endpoint', + 'method' => 'method', + 'apiParameters' => 'apiParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->endpoint) { + $res['endpoint'] = $this->endpoint; + } + if (null !== $this->method) { + $res['method'] = $this->method; + } + if (null !== $this->apiParameters) { + $res['apiParameters'] = []; + if(null !== $this->apiParameters && is_array($this->apiParameters)){ + $n = 0; + foreach($this->apiParameters as $item){ + $res['apiParameters'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + return $res; + } + /** + * @param array $map + * @return httpApiParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['endpoint'])){ + $model->endpoint = $map['endpoint']; + } + if(isset($map['method'])){ + $model->method = $map['method']; + } + if(isset($map['apiParameters'])){ + if(!empty($map['apiParameters'])){ + $model->apiParameters = []; + $n = 0; + foreach($map['apiParameters'] as $item) { + $model->apiParameters[$n++] = null !== $item ? apiParameters::fromMap($item) : $item; + } + } + } + return $model; + } + /** + * @description The endpoint of the API destination. The endpoint can be up to 127 characters in length. This parameter is required. + * @example http://127.0.0.1:8001/api + * @var string + */ + public $endpoint; + + /** + * @description The HTTP request method. Valid values: + + + * GET + + * POST + + * HEAD + + * DELETE + + * PUT + + * PATCH + + + This parameter is required. + * @example POST + * @var string + */ + public $method; + + /** + * @description TODO + * @var apiParameters[] + */ + public $apiParameters; + +} diff --git a/sdk/generated/php/src/Models/UpdateApiDestinationRequest/httpApiParameters/apiParameters.php b/sdk/generated/php/src/Models/UpdateApiDestinationRequest/httpApiParameters/apiParameters.php new file mode 100644 index 00000000..e53f47fd --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateApiDestinationRequest/httpApiParameters/apiParameters.php @@ -0,0 +1,85 @@ + 'name', + 'description' => 'description', + 'type' => 'type', + 'defaultValue' => 'defaultValue', + 'in' => 'in', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->name) { + $res['name'] = $this->name; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->type) { + $res['type'] = $this->type; + } + if (null !== $this->defaultValue) { + $res['defaultValue'] = $this->defaultValue; + } + if (null !== $this->in) { + $res['in'] = $this->in; + } + return $res; + } + /** + * @param array $map + * @return apiParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['name'])){ + $model->name = $map['name']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['type'])){ + $model->type = $map['type']; + } + if(isset($map['defaultValue'])){ + $model->defaultValue = $map['defaultValue']; + } + if(isset($map['in'])){ + $model->in = $map['in']; + } + return $model; + } + /** + * @var string + */ + public $name; + + /** + * @description The description of the API destination. The description can be up to 255 characters in length. + * @var string + */ + public $description; + + /** + * @var string + */ + public $type; + + /** + * @var string + */ + public $defaultValue; + + /** + * @var string + */ + public $in; + +} diff --git a/sdk/generated/php/src/Models/UpdateApiDestinationResponse.php b/sdk/generated/php/src/Models/UpdateApiDestinationResponse.php new file mode 100644 index 00000000..833f77da --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateApiDestinationResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return UpdateApiDestinationResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = UpdateApiDestinationResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var UpdateApiDestinationResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/UpdateApiDestinationResponseBody.php b/sdk/generated/php/src/Models/UpdateApiDestinationResponseBody.php new file mode 100644 index 00000000..c681a3a8 --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateApiDestinationResponseBody.php @@ -0,0 +1,66 @@ + 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return UpdateApiDestinationResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. The value Success indicates that the request is successful. + * @example Success + * @var string + */ + public $code; + + /** + * @description The returned message. + * @example success + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 5DAF96FB-A4B6-548C-B999-0BFDCB2261B9 + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/UpdateConnectionRequest.php b/sdk/generated/php/src/Models/UpdateConnectionRequest.php new file mode 100644 index 00000000..7038ed1e --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateConnectionRequest.php @@ -0,0 +1,83 @@ + 'authParameters', + 'connectionName' => 'connectionName', + 'description' => 'description', + 'networkParameters' => 'networkParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->authParameters) { + $res['authParameters'] = null !== $this->authParameters ? $this->authParameters->toMap() : null; + } + if (null !== $this->connectionName) { + $res['connectionName'] = $this->connectionName; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->networkParameters) { + $res['networkParameters'] = null !== $this->networkParameters ? $this->networkParameters->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return UpdateConnectionRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['authParameters'])){ + $model->authParameters = authParameters::fromMap($map['authParameters']); + } + if(isset($map['connectionName'])){ + $model->connectionName = $map['connectionName']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['networkParameters'])){ + $model->networkParameters = networkParameters::fromMap($map['networkParameters']); + } + return $model; + } + /** + * @description The parameters that are configured for authentication. + * @var authParameters + */ + public $authParameters; + + /** + * @description The name of the connection. The name must be 2 to 127 characters in length. + + This parameter is required. + * @example connection-name + * @var string + */ + public $connectionName; + + /** + * @description The description of the connection. The description can be up to 255 characters in length. + * @example demo + * @var string + */ + public $description; + + /** + * @description The parameters that are configured for the network. This parameter is required. + * @var networkParameters + */ + public $networkParameters; + +} diff --git a/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters.php b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters.php new file mode 100644 index 00000000..fbc23db2 --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters.php @@ -0,0 +1,99 @@ + 'apiKeyAuthParameters', + 'authorizationType' => 'authorizationType', + 'basicAuthParameters' => 'basicAuthParameters', + 'oauthParameters' => 'oauthParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->apiKeyAuthParameters) { + $res['apiKeyAuthParameters'] = null !== $this->apiKeyAuthParameters ? $this->apiKeyAuthParameters->toMap() : null; + } + if (null !== $this->authorizationType) { + $res['authorizationType'] = $this->authorizationType; + } + if (null !== $this->basicAuthParameters) { + $res['basicAuthParameters'] = null !== $this->basicAuthParameters ? $this->basicAuthParameters->toMap() : null; + } + if (null !== $this->oauthParameters) { + $res['oauthParameters'] = null !== $this->oauthParameters ? $this->oauthParameters->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return authParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['apiKeyAuthParameters'])){ + $model->apiKeyAuthParameters = apiKeyAuthParameters::fromMap($map['apiKeyAuthParameters']); + } + if(isset($map['authorizationType'])){ + $model->authorizationType = $map['authorizationType']; + } + if(isset($map['basicAuthParameters'])){ + $model->basicAuthParameters = basicAuthParameters::fromMap($map['basicAuthParameters']); + } + if(isset($map['oauthParameters'])){ + $model->oauthParameters = oauthParameters::fromMap($map['oauthParameters']); + } + return $model; + } + /** + * @description The parameters that are configured for API key authentication. + * @var apiKeyAuthParameters + */ + public $apiKeyAuthParameters; + + /** + * @description The authentication type. Valid values: + + BASIC_AUTH: basic authentication. + + Introduction: Basic authentication is a simple authentication scheme built into the HTTP protocol. When you use the HTTP protocol for communications, the authentication method that the HTTP server uses to authenticate user identities on the client is defined in the protocol. The request header is in the Authorization: Basic Base64-encoded string (Username:Password) format. + + 1. Username and Password are required + + API_KEY_AUTH: API key authentication. + + Introduction: The request header is in the Token: Token value format. + + * ApiKeyName and ApiKeyValue are required. + + OAUTH_AUTH: OAuth authentication. + + Introduction: OAuth2.0 is an authentication mechanism. In normal cases, a system that does not use OAuth2.0 can access the resources of the server from the client. To ensure access security, access tokens are used to authenticate users in OAuth 2.0. The client must use an access token to access protected resources. This way, OAuth 2.0 protects resources from being accessed from malicious clients and improves system security. + + * AuthorizationEndpoint, OAuthHttpParameters, and HttpMethod are required. + * @example BASIC_AUTH + * @var string + */ + public $authorizationType; + + /** + * @description The parameters that are configured for basic authentication. + * @var basicAuthParameters + */ + public $basicAuthParameters; + + /** + * @description The parameters that are configured for OAuth authentication. + * @var oauthParameters + */ + public $oauthParameters; + +} diff --git a/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/apiKeyAuthParameters.php b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/apiKeyAuthParameters.php new file mode 100644 index 00000000..6f9e5ba8 --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/apiKeyAuthParameters.php @@ -0,0 +1,52 @@ + 'apiKeyName', + 'apiKeyValue' => 'apiKeyValue', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->apiKeyName) { + $res['apiKeyName'] = $this->apiKeyName; + } + if (null !== $this->apiKeyValue) { + $res['apiKeyValue'] = $this->apiKeyValue; + } + return $res; + } + /** + * @param array $map + * @return apiKeyAuthParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['apiKeyName'])){ + $model->apiKeyName = $map['apiKeyName']; + } + if(isset($map['apiKeyValue'])){ + $model->apiKeyValue = $map['apiKeyValue']; + } + return $model; + } + /** + * @description The key of the API key. + * @example Token + * @var string + */ + public $apiKeyName; + + /** + * @description The value of the API key. + * @example adkjnakddh**** + * @var string + */ + public $apiKeyValue; + +} diff --git a/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/basicAuthParameters.php b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/basicAuthParameters.php new file mode 100644 index 00000000..8e4bd98f --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/basicAuthParameters.php @@ -0,0 +1,52 @@ + 'password', + 'username' => 'username', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->password) { + $res['password'] = $this->password; + } + if (null !== $this->username) { + $res['username'] = $this->username; + } + return $res; + } + /** + * @param array $map + * @return basicAuthParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['password'])){ + $model->password = $map['password']; + } + if(isset($map['username'])){ + $model->username = $map['username']; + } + return $model; + } + /** + * @description The password for basic authentication. + * @example ******* + * @var string + */ + public $password; + + /** + * @description The username for basic authentication. + * @example admin + * @var string + */ + public $username; + +} diff --git a/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters.php b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters.php new file mode 100644 index 00000000..769b49a6 --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters.php @@ -0,0 +1,87 @@ + 'authorizationEndpoint', + 'clientParameters' => 'clientParameters', + 'httpMethod' => 'httpMethod', + 'oauthHttpParameters' => 'oauthHttpParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->authorizationEndpoint) { + $res['authorizationEndpoint'] = $this->authorizationEndpoint; + } + if (null !== $this->clientParameters) { + $res['clientParameters'] = null !== $this->clientParameters ? $this->clientParameters->toMap() : null; + } + if (null !== $this->httpMethod) { + $res['httpMethod'] = $this->httpMethod; + } + if (null !== $this->oauthHttpParameters) { + $res['oauthHttpParameters'] = null !== $this->oauthHttpParameters ? $this->oauthHttpParameters->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return oauthParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['authorizationEndpoint'])){ + $model->authorizationEndpoint = $map['authorizationEndpoint']; + } + if(isset($map['clientParameters'])){ + $model->clientParameters = clientParameters::fromMap($map['clientParameters']); + } + if(isset($map['httpMethod'])){ + $model->httpMethod = $map['httpMethod']; + } + if(isset($map['oauthHttpParameters'])){ + $model->oauthHttpParameters = oauthHttpParameters::fromMap($map['oauthHttpParameters']); + } + return $model; + } + /** + * @description The endpoint that is used to obtain the OAuth token. + * @example http://localhost:8080/oauth/token + * @var string + */ + public $authorizationEndpoint; + + /** + * @description The parameters that are configured for the client. + * @var clientParameters + */ + public $clientParameters; + + /** + * @description The HTTP request method. Valid values: + + - GET + + - POST + + - HEAD + * @example POST + * @var string + */ + public $httpMethod; + + /** + * @description The request parameters for OAuth authentication. + * @var oauthHttpParameters + */ + public $oauthHttpParameters; + +} diff --git a/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/clientParameters.php b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/clientParameters.php new file mode 100644 index 00000000..24f3b64e --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/clientParameters.php @@ -0,0 +1,52 @@ + 'clientID', + 'clientSecret' => 'clientSecret', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->clientID) { + $res['clientID'] = $this->clientID; + } + if (null !== $this->clientSecret) { + $res['clientSecret'] = $this->clientSecret; + } + return $res; + } + /** + * @param array $map + * @return clientParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['clientID'])){ + $model->clientID = $map['clientID']; + } + if(isset($map['clientSecret'])){ + $model->clientSecret = $map['clientSecret']; + } + return $model; + } + /** + * @description The client ID. + * @example ClientID + * @var string + */ + public $clientID; + + /** + * @description The client key secret of the application. + * @example ClientSecret + * @var string + */ + public $clientSecret; + +} diff --git a/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters.php b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters.php new file mode 100644 index 00000000..a649cada --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters.php @@ -0,0 +1,103 @@ + 'bodyParameters', + 'headerParameters' => 'headerParameters', + 'queryStringParameters' => 'queryStringParameters', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->bodyParameters) { + $res['bodyParameters'] = []; + if(null !== $this->bodyParameters && is_array($this->bodyParameters)){ + $n = 0; + foreach($this->bodyParameters as $item){ + $res['bodyParameters'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->headerParameters) { + $res['headerParameters'] = []; + if(null !== $this->headerParameters && is_array($this->headerParameters)){ + $n = 0; + foreach($this->headerParameters as $item){ + $res['headerParameters'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->queryStringParameters) { + $res['queryStringParameters'] = []; + if(null !== $this->queryStringParameters && is_array($this->queryStringParameters)){ + $n = 0; + foreach($this->queryStringParameters as $item){ + $res['queryStringParameters'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + return $res; + } + /** + * @param array $map + * @return oauthHttpParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['bodyParameters'])){ + if(!empty($map['bodyParameters'])){ + $model->bodyParameters = []; + $n = 0; + foreach($map['bodyParameters'] as $item) { + $model->bodyParameters[$n++] = null !== $item ? bodyParameters::fromMap($item) : $item; + } + } + } + if(isset($map['headerParameters'])){ + if(!empty($map['headerParameters'])){ + $model->headerParameters = []; + $n = 0; + foreach($map['headerParameters'] as $item) { + $model->headerParameters[$n++] = null !== $item ? headerParameters::fromMap($item) : $item; + } + } + } + if(isset($map['queryStringParameters'])){ + if(!empty($map['queryStringParameters'])){ + $model->queryStringParameters = []; + $n = 0; + foreach($map['queryStringParameters'] as $item) { + $model->queryStringParameters[$n++] = null !== $item ? queryStringParameters::fromMap($item) : $item; + } + } + } + return $model; + } + /** + * @description The parameters that are configured for the request. + * @var bodyParameters[] + */ + public $bodyParameters; + + /** + * @description The parameters that are configured for the request header. + * @var headerParameters[] + */ + public $headerParameters; + + /** + * @description The parameters that are configured for the request path. + * @var queryStringParameters[] + */ + public $queryStringParameters; + +} diff --git a/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/bodyParameters.php b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/bodyParameters.php new file mode 100644 index 00000000..1037198b --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/bodyParameters.php @@ -0,0 +1,66 @@ + 'isValueSecret', + 'key' => 'key', + 'value' => 'value', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->isValueSecret) { + $res['isValueSecret'] = $this->isValueSecret; + } + if (null !== $this->key) { + $res['key'] = $this->key; + } + if (null !== $this->value) { + $res['value'] = $this->value; + } + return $res; + } + /** + * @param array $map + * @return bodyParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['isValueSecret'])){ + $model->isValueSecret = $map['isValueSecret']; + } + if(isset($map['key'])){ + $model->key = $map['key']; + } + if(isset($map['value'])){ + $model->value = $map['value']; + } + return $model; + } + /** + * @description Indicates whether authentication is enabled. + * @example false + * @var string + */ + public $isValueSecret; + + /** + * @description The key in the request body. + * @example name + * @var string + */ + public $key; + + /** + * @description The value of the key in the request body. + * @example demo + * @var string + */ + public $value; + +} diff --git a/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/headerParameters.php b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/headerParameters.php new file mode 100644 index 00000000..eae9cdc8 --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/headerParameters.php @@ -0,0 +1,66 @@ + 'isValueSecret', + 'key' => 'key', + 'value' => 'value', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->isValueSecret) { + $res['isValueSecret'] = $this->isValueSecret; + } + if (null !== $this->key) { + $res['key'] = $this->key; + } + if (null !== $this->value) { + $res['value'] = $this->value; + } + return $res; + } + /** + * @param array $map + * @return headerParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['isValueSecret'])){ + $model->isValueSecret = $map['isValueSecret']; + } + if(isset($map['key'])){ + $model->key = $map['key']; + } + if(isset($map['value'])){ + $model->value = $map['value']; + } + return $model; + } + /** + * @description Indicates whether authentication is enabled. + * @example false + * @var string + */ + public $isValueSecret; + + /** + * @description The key in the request header. + * @example name + * @var string + */ + public $key; + + /** + * @description The value of the key in the request header. + * @example demo + * @var string + */ + public $value; + +} diff --git a/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/queryStringParameters.php b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/queryStringParameters.php new file mode 100644 index 00000000..0c00e96e --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateConnectionRequest/authParameters/oauthParameters/oauthHttpParameters/queryStringParameters.php @@ -0,0 +1,66 @@ + 'isValueSecret', + 'key' => 'key', + 'value' => 'value', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->isValueSecret) { + $res['isValueSecret'] = $this->isValueSecret; + } + if (null !== $this->key) { + $res['key'] = $this->key; + } + if (null !== $this->value) { + $res['value'] = $this->value; + } + return $res; + } + /** + * @param array $map + * @return queryStringParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['isValueSecret'])){ + $model->isValueSecret = $map['isValueSecret']; + } + if(isset($map['key'])){ + $model->key = $map['key']; + } + if(isset($map['value'])){ + $model->value = $map['value']; + } + return $model; + } + /** + * @description Indicates whether authentication is enabled. + * @example false + * @var string + */ + public $isValueSecret; + + /** + * @description The key in the request path. + * @example name + * @var string + */ + public $key; + + /** + * @description The value of the key in the request path. + * @example demo + * @var string + */ + public $value; + +} diff --git a/sdk/generated/php/src/Models/UpdateConnectionRequest/networkParameters.php b/sdk/generated/php/src/Models/UpdateConnectionRequest/networkParameters.php new file mode 100644 index 00000000..afc94d71 --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateConnectionRequest/networkParameters.php @@ -0,0 +1,86 @@ + 'networkType', + 'securityGroupId' => 'securityGroupId', + 'vpcId' => 'vpcId', + 'vswitcheId' => 'vswitcheId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->networkType) { + $res['networkType'] = $this->networkType; + } + if (null !== $this->securityGroupId) { + $res['securityGroupId'] = $this->securityGroupId; + } + if (null !== $this->vpcId) { + $res['vpcId'] = $this->vpcId; + } + if (null !== $this->vswitcheId) { + $res['vswitcheId'] = $this->vswitcheId; + } + return $res; + } + /** + * @param array $map + * @return networkParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['networkType'])){ + $model->networkType = $map['networkType']; + } + if(isset($map['securityGroupId'])){ + $model->securityGroupId = $map['securityGroupId']; + } + if(isset($map['vpcId'])){ + $model->vpcId = $map['vpcId']; + } + if(isset($map['vswitcheId'])){ + $model->vswitcheId = $map['vswitcheId']; + } + return $model; + } + /** + * @description The network type. Valid values: + + PublicNetwork and PrivateNetwork. + + * Note: If you set this parameter to PrivateNetwork, you must configure VpcId, VswitcheId, and SecurityGroupId. + + This parameter is required. + * @example PublicNetwork + * @var string + */ + public $networkType; + + /** + * @description The ID of the security group. + * @example eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9**** + * @var string + */ + public $securityGroupId; + + /** + * @description The VPC. ID + * @example eb-test/vpc-bp1symadadwnwg**** + * @var string + */ + public $vpcId; + + /** + * @description The vSwitch ID. + * @example vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeq**** + * @var string + */ + public $vswitcheId; + +} diff --git a/sdk/generated/php/src/Models/UpdateConnectionResponse.php b/sdk/generated/php/src/Models/UpdateConnectionResponse.php new file mode 100644 index 00000000..380acdad --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateConnectionResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return UpdateConnectionResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = UpdateConnectionResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var UpdateConnectionResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/UpdateConnectionResponseBody.php b/sdk/generated/php/src/Models/UpdateConnectionResponseBody.php new file mode 100644 index 00000000..60b27a04 --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateConnectionResponseBody.php @@ -0,0 +1,66 @@ + 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return UpdateConnectionResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. + * @example Success + * @var string + */ + public $code; + + /** + * @description The returned message. + * @example success + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 8346BE8F-40F3-533D-A0B8-1359C31BD5BA + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/UpdateEventRuleRequest.php b/sdk/generated/php/src/Models/UpdateEventRuleRequest.php new file mode 100644 index 00000000..2ecb239d --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateEventRuleRequest.php @@ -0,0 +1,83 @@ + 'eventBusName', + 'eventRuleName' => 'eventRuleName', + 'description' => 'description', + 'filterPattern' => 'filterPattern', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventRuleName) { + $res['eventRuleName'] = $this->eventRuleName; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->filterPattern) { + $res['filterPattern'] = $this->filterPattern; + } + return $res; + } + /** + * @param array $map + * @return UpdateEventRuleRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventRuleName'])){ + $model->eventRuleName = $map['eventRuleName']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['filterPattern'])){ + $model->filterPattern = $map['filterPattern']; + } + return $model; + } + /** + * @description The name of the event bus with which the event source is associated. +This parameter is required. + * @example my-event-bus + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event rule. +This parameter is required. + * @example myrabbitmq.sourc + * @var string + */ + public $eventRuleName; + + /** + * @var string + */ + public $description; + + /** + * @description The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + + You can specify up to five expressions in the map data structure in each field. +This parameter is required. + * @example {\"source\": [{\"prefix\": \"acs.\"}],\"type\": [{\"prefix\":\"oss:ObjectReplication\"}],\"subject\":[{\"prefix\":\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\", \"suffix\":\".txt\"}]} + * @var string + */ + public $filterPattern; + +} diff --git a/sdk/generated/php/src/Models/UpdateEventRuleResponse.php b/sdk/generated/php/src/Models/UpdateEventRuleResponse.php new file mode 100644 index 00000000..a192dc2f --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateEventRuleResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return UpdateEventRuleResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = UpdateEventRuleResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var UpdateEventRuleResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/UpdateEventRuleResponseBody.php b/sdk/generated/php/src/Models/UpdateEventRuleResponseBody.php new file mode 100644 index 00000000..1aa3d001 --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateEventRuleResponseBody.php @@ -0,0 +1,70 @@ + 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return UpdateEventRuleResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. Valid values: + + * Success: The request is successful. + + * Other codes: The request failed. For more information about error codes, see Error codes. + * @example Success + * @var string + */ + public $code; + + /** + * @description The returned error message. + * @example Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 2922208e-e1c6-43ee-bfd1-aca50263bc8a + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/UpdateEventSourceRequest.php b/sdk/generated/php/src/Models/UpdateEventSourceRequest.php new file mode 100644 index 00000000..e33e567f --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateEventSourceRequest.php @@ -0,0 +1,103 @@ + 'eventBusName', + 'eventSourceName' => 'eventSourceName', + 'description' => 'description', + 'className' => 'className', + 'status' => 'status', + 'config' => 'config', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventSourceName) { + $res['eventSourceName'] = $this->eventSourceName; + } + if (null !== $this->description) { + $res['description'] = $this->description; + } + if (null !== $this->className) { + $res['className'] = $this->className; + } + if (null !== $this->status) { + $res['status'] = $this->status; + } + if (null !== $this->config) { + $res['config'] = $this->config; + } + return $res; + } + /** + * @param array $map + * @return UpdateEventSourceRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventSourceName'])){ + $model->eventSourceName = $map['eventSourceName']; + } + if(isset($map['description'])){ + $model->description = $map['description']; + } + if(isset($map['className'])){ + $model->className = $map['className']; + } + if(isset($map['status'])){ + $model->status = $map['status']; + } + if(isset($map['config'])){ + $model->config = $map['config']; + } + return $model; + } + /** + * @description The name of the event bus with which the event source is associated. +This parameter is required. + * @example my-event-bus + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event source. +This parameter is required. + * @example myrabbitmq.sourc + * @var string + */ + public $eventSourceName; + + /** + * @description The description of the event source. + * @var string + */ + public $description; + + /** + * @var string + */ + public $className; + + /** + * @var int + */ + public $status; + + /** + * @var mixed[] + */ + public $config; + +} diff --git a/sdk/generated/php/src/Models/UpdateEventSourceResponse.php b/sdk/generated/php/src/Models/UpdateEventSourceResponse.php new file mode 100644 index 00000000..0db7faac --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateEventSourceResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return UpdateEventSourceResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = UpdateEventSourceResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var UpdateEventSourceResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/UpdateEventSourceResponseBody.php b/sdk/generated/php/src/Models/UpdateEventSourceResponseBody.php new file mode 100644 index 00000000..13eb5126 --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateEventSourceResponseBody.php @@ -0,0 +1,70 @@ + 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return UpdateEventSourceResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. Valid values: + + * Success: The request is successful. + + * Other codes: The request failed. For more information about error codes, see Error codes. + * @example Success + * @var string + */ + public $code; + + /** + * @description The returned error message. + * @example Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 2922208e-e1c6-43ee-bfd1-aca50263bc8a + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/Models/UpdateEventTargetsRequest.php b/sdk/generated/php/src/Models/UpdateEventTargetsRequest.php new file mode 100644 index 00000000..4c640495 --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateEventTargetsRequest.php @@ -0,0 +1,80 @@ + 'eventBusName', + 'eventRuleName' => 'eventRuleName', + 'eventTargets' => 'eventTargets', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->eventBusName) { + $res['eventBusName'] = $this->eventBusName; + } + if (null !== $this->eventRuleName) { + $res['eventRuleName'] = $this->eventRuleName; + } + if (null !== $this->eventTargets) { + $res['eventTargets'] = []; + if(null !== $this->eventTargets && is_array($this->eventTargets)){ + $n = 0; + foreach($this->eventTargets as $item){ + $res['eventTargets'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + return $res; + } + /** + * @param array $map + * @return UpdateEventTargetsRequest + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['eventBusName'])){ + $model->eventBusName = $map['eventBusName']; + } + if(isset($map['eventRuleName'])){ + $model->eventRuleName = $map['eventRuleName']; + } + if(isset($map['eventTargets'])){ + if(!empty($map['eventTargets'])){ + $model->eventTargets = []; + $n = 0; + foreach($map['eventTargets'] as $item) { + $model->eventTargets[$n++] = null !== $item ? EventTarget::fromMap($item) : $item; + } + } + } + return $model; + } + /** + * @description The name of the event bus with which the event target is associated. +This parameter is required. + * @example my-event-bus + * @var string + */ + public $eventBusName; + + /** + * @description The name of the event rule. +This parameter is required. + * @example myrabbitmq.sourc + * @var string + */ + public $eventRuleName; + + /** + * @var EventTarget[] + */ + public $eventTargets; + +} diff --git a/sdk/generated/php/src/Models/UpdateEventTargetsResponse.php b/sdk/generated/php/src/Models/UpdateEventTargetsResponse.php new file mode 100644 index 00000000..c551e137 --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateEventTargetsResponse.php @@ -0,0 +1,62 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return UpdateEventTargetsResponse + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['body'])){ + $model->body = UpdateEventTargetsResponseBody::fromMap($map['body']); + } + return $model; + } + /** + * @var string[] + */ + public $headers; + + /** + * @var int + */ + public $statusCode; + + /** + * @var UpdateEventTargetsResponseBody + */ + public $body; + +} diff --git a/sdk/generated/php/src/Models/UpdateEventTargetsResponseBody.php b/sdk/generated/php/src/Models/UpdateEventTargetsResponseBody.php new file mode 100644 index 00000000..c2628ad2 --- /dev/null +++ b/sdk/generated/php/src/Models/UpdateEventTargetsResponseBody.php @@ -0,0 +1,70 @@ + 'code', + 'message' => 'message', + 'requestId' => 'requestId', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + return $res; + } + /** + * @param array $map + * @return UpdateEventTargetsResponseBody + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['code'])){ + $model->code = $map['code']; + } + if(isset($map['message'])){ + $model->message = $map['message']; + } + if(isset($map['requestId'])){ + $model->requestId = $map['requestId']; + } + return $model; + } + /** + * @description The returned response code. Valid values: + + * Success: The request is successful. + + * Other codes: The request failed. For more information about error codes, see Error codes. + * @example Success + * @var string + */ + public $code; + + /** + * @description The returned error message. + * @example Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + * @var string + */ + public $message; + + /** + * @description The request ID. + * @example 2922208e-e1c6-43ee-bfd1-aca50263bc8a + * @var string + */ + public $requestId; + +} diff --git a/sdk/generated/php/src/SDKClient.php b/sdk/generated/php/src/SDKClient.php new file mode 100644 index 00000000..c2a95ff2 --- /dev/null +++ b/sdk/generated/php/src/SDKClient.php @@ -0,0 +1,1828 @@ +_endpointRule = ""; + $this->checkConfig($config); + $this->_endpoint = $this->getEndpoint("eventbridge", $this->_regionId, $this->_endpointRule, $this->_network, $this->_suffix, $this->_endpointMap, $this->_endpoint); + } + + /** + * @param string $productId + * @param string $regionId + * @param string $endpointRule + * @param string $network + * @param string $suffix + * @param string[] $endpointMap + * @param string $endpoint + * @return string + * @throws TeaError + */ + public function getEndpoint($productId, $regionId, $endpointRule, $network, $suffix, $endpointMap, $endpoint){ + if (!Utils::empty_($endpoint)) { + return $endpoint; + } + if (!Utils::isUnset($endpointMap) && !Utils::empty_(@$endpointMap[$regionId])) { + return @$endpointMap[$regionId]; + } + $result = ""; + if (!Utils::empty_($network) && !Utils::equalString($network, "public")) { + $network = "-" . $network . ""; + } + else { + $network = ""; + } + if (!Utils::isUnset($suffix)) { + $suffix = ""; + } + else { + $suffix = "-" . $suffix . ""; + } + if (Utils::equalString($endpointRule, "regional")) { + if (Utils::empty_($regionId)) { + throw new TeaError([ + "message" => "RegionId is empty, please set a valid RegionId" + ]); + } + $result = "" . $productId . "" . $suffix . "" . $network . "." . $regionId . ".aliyuncs.com"; + } + else { + $result = "" . $productId . "" . $suffix . "" . $network . ".aliyuncs.com"; + } + return $result; + } + + /** + * @summary Creates an event bus. + * * + * @description You can call this API operation to create an event bus. + * * + * @param CreateEventBusRequest $request CreateEventBusRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return CreateEventBusResponse CreateEventBusResponse + */ + public function createEventBusWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->description)) { + $body["description"] = $request->description; + } + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "CreateEventBus", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/bus/createEventBus", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return CreateEventBusResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Creates an event bus. + * * + * @description You can call this API operation to create an event bus. + * * + * @param CreateEventBusRequest $request CreateEventBusRequest + * @return CreateEventBusResponse CreateEventBusResponse + */ + public function createEventBus($request){ + $runtime = new RuntimeOptions([]); + return $this->createEventBusWithOptions($request, $runtime); + } + + /** + * @summary Queries the detailed information about an event bus. + * * + * @description You can call this API operation to query the detailed information about an event bus. + * * + * @param GetEventBusRequest $request GetEventBusRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return GetEventBusResponse GetEventBusResponse + */ + public function getEventBusWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "GetEventBus", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/bus/getEventBus", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return GetEventBusResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Queries the detailed information about an event bus. + * * + * @description You can call this API operation to query the detailed information about an event bus. + * * + * @param GetEventBusRequest $request GetEventBusRequest + * @return GetEventBusResponse GetEventBusResponse + */ + public function getEventBus($request){ + $runtime = new RuntimeOptions([]); + return $this->getEventBusWithOptions($request, $runtime); + } + + /** + * @summary Queries all event buses. + * * + * @description You can call this API operation to query all event buses. + * * + * @param ListEventBusesRequest $request ListEventBusesRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return ListEventBusesResponse ListEventBusesResponse + */ + public function listEventBusesWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->maxResults)) { + $body["maxResults"] = $request->maxResults; + } + if (!Utils::isUnset($request->nextToken)) { + $body["nextToken"] = $request->nextToken; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "ListEventBuses", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/bus/listEventBuses", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return ListEventBusesResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Queries all event buses. + * * + * @description You can call this API operation to query all event buses. + * * + * @param ListEventBusesRequest $request ListEventBusesRequest + * @return ListEventBusesResponse ListEventBusesResponse + */ + public function listEventBuses($request){ + $runtime = new RuntimeOptions([]); + return $this->listEventBusesWithOptions($request, $runtime); + } + + /** + * @summary Deletes an event bus. + * * + * @description You can call this API operation to delete an event bus. + * * + * @param DeleteEventBusRequest $request DeleteEventBusRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return DeleteEventBusResponse DeleteEventBusResponse + */ + public function deleteEventBusWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "DeleteEventBus", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/bus/deleteEventBus", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return DeleteEventBusResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Deletes an event bus. + * * + * @description You can call this API operation to delete an event bus. + * * + * @param DeleteEventBusRequest $request DeleteEventBusRequest + * @return DeleteEventBusResponse DeleteEventBusResponse + */ + public function deleteEventBus($request){ + $runtime = new RuntimeOptions([]); + return $this->deleteEventBusWithOptions($request, $runtime); + } + + /** + * @summary Creates an API destination. + * * + * @description You can call this API operation to create an API destination. + * * + * @param CreateApiDestinationRequest $request CreateApiDestinationRequest (tmpReq before) + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return CreateApiDestinationResponse CreateApiDestinationResponse + */ + public function createApiDestinationWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->apiDestinationName)) { + $body["apiDestinationName"] = $request->apiDestinationName; + } + if (!Utils::isUnset($request->connectionName)) { + $body["connectionName"] = $request->connectionName; + } + if (!Utils::isUnset($request->description)) { + $body["description"] = $request->description; + } + if (!Utils::isUnset($request->httpApiParameters)) { + $body["httpApiParameters"] = $request->httpApiParameters; + } + if (!Utils::isUnset($request->invocationRateLimitPerSecond)) { + $body["invocationRateLimitPerSecond"] = $request->invocationRateLimitPerSecond; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "CreateApiDestination", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/api-destination/createApiDestination", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return CreateApiDestinationResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Creates an API destination. + * * + * @description You can call this API operation to create an API destination. + * * + * @param CreateApiDestinationRequest $request CreateApiDestinationRequest + * @return CreateApiDestinationResponse CreateApiDestinationResponse + */ + public function createApiDestination($request){ + $runtime = new RuntimeOptions([]); + return $this->createApiDestinationWithOptions($request, $runtime); + } + + /** + * @summary Updates an API destination. + * * + * @description You can call this API operation to update an API destination. + * * + * @param UpdateApiDestinationRequest $request UpdateApiDestinationRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return UpdateApiDestinationResponse UpdateApiDestinationResponse + */ + public function updateApiDestinationWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->apiDestinationName)) { + $body["apiDestinationName"] = $request->apiDestinationName; + } + if (!Utils::isUnset($request->connectionName)) { + $body["connectionName"] = $request->connectionName; + } + if (!Utils::isUnset($request->description)) { + $body["description"] = $request->description; + } + if (!Utils::isUnset($request->httpApiParameters)) { + $body["httpApiParameters"] = $request->httpApiParameters; + } + if (!Utils::isUnset($request->invocationRateLimitPerSecond)) { + $body["invocationRateLimitPerSecond"] = $request->invocationRateLimitPerSecond; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "UpdateApiDestination", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/api-destination/updateApiDestination", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return UpdateApiDestinationResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Updates an API destination. + * * + * @description You can call this API operation to update an API destination. + * * + * @param UpdateApiDestinationRequest $request UpdateApiDestinationRequest + * @return UpdateApiDestinationResponse UpdateApiDestinationResponse + */ + public function updateApiDestination($request){ + $runtime = new RuntimeOptions([]); + return $this->updateApiDestinationWithOptions($request, $runtime); + } + + /** + * @summary Queries the information about an API destination. + * * + * @description You can call this API operation to query the information about an API destination. + * * + * @param GetApiDestinationRequest $request GetApiDestinationRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return GetApiDestinationResponse GetApiDestinationResponse + */ + public function getApiDestinationWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->apiDestinationName)) { + $body["apiDestinationName"] = $request->apiDestinationName; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "GetApiDestination", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/api-destination/getApiDestination", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return GetApiDestinationResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Queries the information about an API destination. + * * + * @description You can call this API operation to query the information about an API destination. + * * + * @param GetApiDestinationRequest $request GetApiDestinationRequest + * @return GetApiDestinationResponse GetApiDestinationResponse + */ + public function getApiDestination($request){ + $runtime = new RuntimeOptions([]); + return $this->getApiDestinationWithOptions($request, $runtime); + } + + /** + * @summary Deletes an API destination. + * * + * @description You can call this API operation to delete an API destination. + * * + * @param DeleteApiDestinationRequest $request DeleteApiDestinationRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return DeleteApiDestinationResponse DeleteApiDestinationResponse + */ + public function deleteApiDestinationWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->apiDestinationName)) { + $body["apiDestinationName"] = $request->apiDestinationName; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "DeleteApiDestination", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/api-destination/deleteApiDestination", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return DeleteApiDestinationResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Deletes an API destination. + * * + * @description You can call this API operation to delete an API destination. + * * + * @param DeleteApiDestinationRequest $request DeleteApiDestinationRequest + * @return DeleteApiDestinationResponse DeleteApiDestinationResponse + */ + public function deleteApiDestination($request){ + $runtime = new RuntimeOptions([]); + return $this->deleteApiDestinationWithOptions($request, $runtime); + } + + /** + * @summary Queries a list of API destinations. + * * + * @description You can use this API operation to query a list of API destinations. + * * + * @param ListApiDestinationsRequest $request ListApiDestinationsRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return ListApiDestinationsResponse ListApiDestinationsResponse + */ + public function listApiDestinationsWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->apiDestinationNamePrefix)) { + $body["apiDestinationNamePrefix"] = $request->apiDestinationNamePrefix; + } + if (!Utils::isUnset($request->connectionName)) { + $body["connectionName"] = $request->connectionName; + } + if (!Utils::isUnset($request->maxResults)) { + $body["maxResults"] = $request->maxResults; + } + if (!Utils::isUnset($request->nextToken)) { + $body["nextToken"] = $request->nextToken; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "ListApiDestinations", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/api-destination/listApiDestinations", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return ListApiDestinationsResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Queries a list of API destinations. + * * + * @description You can use this API operation to query a list of API destinations. + * * + * @param ListApiDestinationsRequest $request ListApiDestinationsRequest + * @return ListApiDestinationsResponse ListApiDestinationsResponse + */ + public function listApiDestinations($request){ + $runtime = new RuntimeOptions([]); + return $this->listApiDestinationsWithOptions($request, $runtime); + } + + /** + * @summary Creates a connection. + * * + * @description You can call this API operation to create a connection. + * * + * @param CreateConnectionRequest $request CreateConnectionRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return CreateConnectionResponse CreateConnectionResponse + */ + public function createConnectionWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->authParameters)) { + $body["authParameters"] = $request->authParameters; + } + if (!Utils::isUnset($request->connectionName)) { + $body["connectionName"] = $request->connectionName; + } + if (!Utils::isUnset($request->description)) { + $body["description"] = $request->description; + } + if (!Utils::isUnset($request->networkParameters)) { + $body["networkParameters"] = $request->networkParameters; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "CreateConnection", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/connection/createConnection", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return CreateConnectionResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Creates a connection. + * * + * @description You can call this API operation to create a connection. + * * + * @param CreateConnectionRequest $request CreateConnectionRequest + * @return CreateConnectionResponse CreateConnectionResponse + */ + public function createConnection($request){ + $runtime = new RuntimeOptions([]); + return $this->createConnectionWithOptions($request, $runtime); + } + + /** + * @summary Deletes a connection. + * * + * @description You can call this API operation to delete a connection. + * * + * @param DeleteConnectionRequest $request DeleteConnectionRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return DeleteConnectionResponse DeleteConnectionResponse + */ + public function deleteConnectionWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->connectionName)) { + $body["connectionName"] = $request->connectionName; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "DeleteConnection", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/connection/deleteConnection", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return DeleteConnectionResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Deletes a connection. + * * + * @description You can call this API operation to delete a connection. + * * + * @param DeleteConnectionRequest $request DeleteConnectionRequest + * @return DeleteConnectionResponse DeleteConnectionResponse + */ + public function deleteConnection($request){ + $runtime = new RuntimeOptions([]); + return $this->deleteConnectionWithOptions($request, $runtime); + } + + /** + * @summary Updates a connection. + * * + * @description You can call this API operation to update a connection. + * * + * @param UpdateConnectionRequest $request UpdateConnectionRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return UpdateConnectionResponse UpdateConnectionResponse + */ + public function updateConnectionWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->authParameters)) { + $body["authParameters"] = $request->authParameters; + } + if (!Utils::isUnset($request->connectionName)) { + $body["connectionName"] = $request->connectionName; + } + if (!Utils::isUnset($request->description)) { + $body["description"] = $request->description; + } + if (!Utils::isUnset($request->networkParameters)) { + $body["networkParameters"] = $request->networkParameters; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "UpdateConnection", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/connection/updateConnection", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return UpdateConnectionResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Updates a connection. + * * + * @description You can call this API operation to update a connection. + * * + * @param UpdateConnectionRequest $request UpdateConnectionRequest + * @return UpdateConnectionResponse UpdateConnectionResponse + */ + public function updateConnection($request){ + $runtime = new RuntimeOptions([]); + return $this->updateConnectionWithOptions($request, $runtime); + } + + /** + * @summary Queries the configurations of a connection. + * * + * @description You can call this API operation to query the configurations of a connection. + * * + * @param GetConnectionRequest $request GetConnectionRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return GetConnectionResponse GetConnectionResponse + */ + public function getConnectionWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->connectionName)) { + $body["connectionName"] = $request->connectionName; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "GetConnection", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/connection/getConnection", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return GetConnectionResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Queries the configurations of a connection. + * * + * @description You can call this API operation to query the configurations of a connection. + * * + * @param GetConnectionRequest $request GetConnectionRequest + * @return GetConnectionResponse GetConnectionResponse + */ + public function getConnection($request){ + $runtime = new RuntimeOptions([]); + return $this->getConnectionWithOptions($request, $runtime); + } + + /** + * @summary Queries the configurations of a connection. + * * + * @description You can call this API operation to query the configurations of a connection. + * * + * @param GetConnectionRequest $request GetConnectionRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return GetConnectionResponse GetConnectionResponse + */ + public function selectOneConnectionWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->connectionName)) { + $body["connectionName"] = $request->connectionName; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "selectOneConnection", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/connection/selectOneConnection", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return GetConnectionResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Queries the configurations of a connection. + * * + * @description You can call this API operation to query the configurations of a connection. + * * + * @param GetConnectionRequest $request GetConnectionRequest + * @return GetConnectionResponse GetConnectionResponse + */ + public function selectOneConnection($request){ + $runtime = new RuntimeOptions([]); + return $this->selectOneConnectionWithOptions($request, $runtime); + } + + /** + * @summary Queries connections. + * * + * @description You can call this API operation to query connections. + * * + * @param ListConnectionsRequest $request ListConnectionsRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return ListConnectionsResponse ListConnectionsResponse + */ + public function listConnectionsWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->connectionNamePrefix)) { + $body["connectionNamePrefix"] = $request->connectionNamePrefix; + } + if (!Utils::isUnset($request->maxResults)) { + $body["maxResults"] = $request->maxResults; + } + if (!Utils::isUnset($request->nextToken)) { + $body["nextToken"] = $request->nextToken; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "ListConnections", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/connection/listConnections", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return ListConnectionsResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary list connections. + * * + * @description You can call this API operation to list connections. + * * + * @param ListConnectionsRequest $request ListConnectionsRequest + * @return ListConnectionsResponse ListConnectionsResponse + */ + public function listConnections($request){ + $runtime = new RuntimeOptions([]); + return $this->listConnectionsWithOptions($request, $runtime); + } + + /** + * @summary Updates a connection. + * * + * @description You can call this API operation to update a connection. + * * + * @return ListEnumsResponseResponse ListEnumsResponseResponse + */ + public function listEnumsResponse(){ + $runtime = new RuntimeOptions([]); + $body = []; + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "listEnumsResponse", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/connection/listEnumsResponse", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return ListEnumsResponseResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Queries the content of an event. + * * + * @description You can call this API operation to query the content of an event. + * * + * @param PutEventsRequest $request PutEventsRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return PutEventsResponse PutEventsResponse + */ + public function putEventsWithOptions($request, $runtime){ + Utils::validateModel($request); + $headers = [ + "ce-specversion" => "1.0", + "ce-type" => "com.github.pull_request.opened", + "ce-source" => "https://github.com/cloudevents/spec/pull", + "ce-subject" => "demo", + "ce-id" => "1234-1234-1234", + "ce-datacontenttype" => "application/json", + "ce-time" => "2024-07-01T17:31:00Z", + "ce-eventbusname" => "demo-bus" + ]; + $body = "{}"; + if (!Utils::isUnset($request->eventBusName)) { + $headers["ce-eventbusname"] = $request->eventBusName; + } + if (!Utils::isUnset($request->event)) { + $body = $request->event; + } + $req = new OpenApiRequest([ + "body" => $body, + "headers" => $headers + ]); + $params = new Params([ + "action" => "putEvents", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/putEvents", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return PutEventsResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Queries the content of an event. + * * + * @description You can call this API operation to query the content of an event. + * * + * @param PutEventsRequest $request PutEventsRequest + * @return PutEventsResponse PutEventsResponse + */ + public function putEvents($request){ + $runtime = new RuntimeOptions([]); + return $this->putEventsWithOptions($request, $runtime); + } + + /** + * @summary Creates an event rule. + * * + * @description You can call this operation to create an event rule. + * * + * @param CreateEventRuleRequest $request CreateEventRuleRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return CreateEventRuleResponse CreateEventRuleResponse + */ + public function createEventRuleWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->eventRuleName)) { + $body["eventRuleName"] = $request->eventRuleName; + } + if (!Utils::isUnset($request->description)) { + $body["description"] = $request->description; + } + if (!Utils::isUnset($request->filterPattern)) { + $body["filterPattern"] = $request->filterPattern; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "CreateEventRule", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/rule/createEventRule", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return CreateEventRuleResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Creates an event rule. + * * + * @description You can call this operation to create an event rule. + * * + * @param CreateEventRuleRequest $request CreateEventRuleRequest + * @return CreateEventRuleResponse CreateEventRuleResponse + */ + public function createEventRule($request){ + $runtime = new RuntimeOptions([]); + return $this->createEventRuleWithOptions($request, $runtime); + } + + /** + * @summary Gets an event rule. + * * + * @description You can call this operation to get an event rule. + * * + * @param GetEventRuleRequest $request GetEventRuleRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return GetEventRuleResponse GetEventRuleResponse + */ + public function getEventRuleWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->eventRuleName)) { + $body["eventRuleName"] = $request->eventRuleName; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "GetEventRule", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/rule/getEventRule", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return GetEventRuleResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Gets an event rule. + * * + * @description You can call this operation to get an event rule. + * * + * @param GetEventRuleRequest $request GetEventRuleRequest + * @return GetEventRuleResponse GetEventRuleResponse + */ + public function getEventRule($request){ + $runtime = new RuntimeOptions([]); + return $this->getEventRuleWithOptions($request, $runtime); + } + + /** + * @summary Deletes an event rule. + * * + * @description You can call this operation to delete an event rule. + * * + * @param DeleteEventRuleRequest $request DeleteEventRuleRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return DeleteEventRuleResponse DeleteEventRuleResponse + */ + public function deleteEventRuleWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->eventRuleName)) { + $body["eventRuleName"] = $request->eventRuleName; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "DeleteEventRule", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/rule/deleteEventRule", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return DeleteEventRuleResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Deletes an event rule. + * * + * @description You can call this operation to delete an event rule. + * * + * @param DeleteEventRuleRequest $request DeleteEventRuleRequest + * @return DeleteEventRuleResponse DeleteEventRuleResponse + */ + public function deleteEventRule($request){ + $runtime = new RuntimeOptions([]); + return $this->deleteEventRuleWithOptions($request, $runtime); + } + + /** + * @summary Updates an event rule. + * * + * @description You can call this operation to update an event rule. + * * + * @param UpdateEventRuleRequest $request UpdateEventRuleRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return UpdateEventRuleResponse UpdateEventRuleResponse + */ + public function updateEventRuleWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->eventRuleName)) { + $body["eventRuleName"] = $request->eventRuleName; + } + if (!Utils::isUnset($request->description)) { + $body["description"] = $request->description; + } + if (!Utils::isUnset($request->filterPattern)) { + $body["filterPattern"] = $request->filterPattern; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "UpdateEventRule", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/rule/updateEventRule", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return UpdateEventRuleResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Updates an event rule. + * * + * @description You can call this operation to update an event rule. + * * + * @param UpdateEventRuleRequest $request UpdateEventRuleRequest + * @return UpdateEventRuleResponse UpdateEventRuleResponse + */ + public function updateEventRule($request){ + $runtime = new RuntimeOptions([]); + return $this->updateEventRuleWithOptions($request, $runtime); + } + + /** + * @summary Lists event rules. + * * + * @description You can call this operation to list event rules. + * * + * @param ListEventRulesRequest $request ListEventRulesRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return ListEventRulesResponse ListEventRulesResponse + */ + public function listEventRulesWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->maxResults)) { + $body["maxResults"] = $request->maxResults; + } + if (!Utils::isUnset($request->nextToken)) { + $body["nextToken"] = $request->nextToken; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "ListEventRules", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/rule/listEventRules", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return ListEventRulesResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Lists event rules. + * * + * @description You can call this operation to list event rules. + * * + * @param ListEventRulesRequest $request ListEventRulesRequest + * @return ListEventRulesResponse ListEventRulesResponse + */ + public function listEventRules($request){ + $runtime = new RuntimeOptions([]); + return $this->listEventRulesWithOptions($request, $runtime); + } + + /** + * @summary Enables an event rule. + * * + * @description You can call this operation to enable an event rule. + * * + * @param EnableEventRuleRequest $request EnableEventRuleRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return EnableEventRuleResponse EnableEventRuleResponse + */ + public function enableEventRuleWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->eventRuleName)) { + $body["eventRuleName"] = $request->eventRuleName; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "EnableEventRule", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/rule/enableEventRule", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return EnableEventRuleResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Enables an event rule. + * * + * @description You can call this operation to enable an event rule. + * * + * @param EnableEventRuleRequest $request EnableEventRuleRequest + * @return EnableEventRuleResponse EnableEventRuleResponse + */ + public function enableEventRule($request){ + $runtime = new RuntimeOptions([]); + return $this->enableEventRuleWithOptions($request, $runtime); + } + + /** + * @summary Disables an event rule. + * * + * @description You can call this operation to disable an event rule. + * * + * @param DisableEventRuleRequest $request DisableEventRuleRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return DisableEventRuleResponse DisableEventRuleResponse + */ + public function disableEventRuleWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->eventRuleName)) { + $body["eventRuleName"] = $request->eventRuleName; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "DisableEventRule", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/rule/disableEventRule", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return DisableEventRuleResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Disables an event rule. + * * + * @description You can call this operation to disable an event rule. + * * + * @param DisableEventRuleRequest $request DisableEventRuleRequest + * @return DisableEventRuleResponse DisableEventRuleResponse + */ + public function disableEventRule($request){ + $runtime = new RuntimeOptions([]); + return $this->disableEventRuleWithOptions($request, $runtime); + } + + /** + * @summary Creates an event source. + * * + * @description You can call this operation to create an event source. + * * + * @param CreateEventSourceRequest $request CreateEventSourceRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return CreateEventSourceResponse CreateEventSourceResponse + */ + public function createEventSourceWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->description)) { + $body["description"] = $request->description; + } + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->eventSourceName)) { + $body["eventSourceName"] = $request->eventSourceName; + } + if (!Utils::isUnset($request->className)) { + $body["className"] = $request->className; + } + if (!Utils::isUnset($request->config)) { + $body["config"] = $request->config; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "CreateEventSource", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/source/createEventSource", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return CreateEventSourceResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Creates an event source. + * * + * @description You can call this operation to create an event source. + * * + * @param CreateEventSourceRequest $request CreateEventSourceRequest + * @return CreateEventSourceResponse CreateEventSourceResponse + */ + public function createEventSource($request){ + $runtime = new RuntimeOptions([]); + return $this->createEventSourceWithOptions($request, $runtime); + } + + /** + * @summary Updates an event source. + * * + * @description You can call this operation to update an event source. + * * + * @param UpdateEventSourceRequest $request UpdateEventSourceRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return UpdateEventSourceResponse UpdateEventSourceResponse + */ + public function updateEventSourceWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->eventSourceName)) { + $body["eventSourceName"] = $request->eventSourceName; + } + if (!Utils::isUnset($request->description)) { + $body["description"] = $request->description; + } + if (!Utils::isUnset($request->className)) { + $body["className"] = $request->className; + } + if (!Utils::isUnset($request->status)) { + $body["status"] = $request->status; + } + if (!Utils::isUnset($request->config)) { + $body["config"] = $request->config; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "UpdateEventSource", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/source/updateEventSource", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return UpdateEventSourceResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Updates an event source. + * * + * @description You can call this operation to update an event source. + * * + * @param UpdateEventSourceRequest $request UpdateEventSourceRequest + * @return UpdateEventSourceResponse UpdateEventSourceResponse + */ + public function updateEventSource($request){ + $runtime = new RuntimeOptions([]); + return $this->updateEventSourceWithOptions($request, $runtime); + } + + /** + * @summary Deletes an event source. + * * + * @description You can call this API operation to delete an event source. + * * + * @param DeleteEventSourceRequest $request DeleteEventSourceRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return DeleteEventSourceResponse DeleteEventSourceResponse + */ + public function deleteEventSourceWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->eventSourceName)) { + $body["eventSourceName"] = $request->eventSourceName; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "DeleteEventSource", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/source/deleteEventSource", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return DeleteEventSourceResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Deletes an event source. + * * + * @description You can call this API operation to delete an event source. + * * + * @param DeleteEventSourceRequest $request DeleteEventSourceRequest + * @return DeleteEventSourceResponse DeleteEventSourceResponse + */ + public function deleteEventSource($request){ + $runtime = new RuntimeOptions([]); + return $this->deleteEventSourceWithOptions($request, $runtime); + } + + /** + * @summary Gets an event source. + * * + * @description You can call this API operation to get an event source. + * * + * @param GetEventSourceRequest $request GetEventSourceRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return GetEventSourceResponse GetEventSourceResponse + */ + public function getEventSourceWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->eventSourceName)) { + $body["eventSourceName"] = $request->eventSourceName; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "GetEventSource", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/source/getEventSource", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return GetEventSourceResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Gets an event source. + * * + * @description You can call this API operation to get an event source. + * * + * @param GetEventSourceRequest $request GetEventSourceRequest + * @return GetEventSourceResponse GetEventSourceResponse + */ + public function getEventSource($request){ + $runtime = new RuntimeOptions([]); + return $this->getEventSourceWithOptions($request, $runtime); + } + + /** + * @summary Lists event sources. + * * + * @description You can call this API operation to list event sources. + * * + * @param ListEventSourcesRequest $request ListEventSourcesRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return ListEventSourcesResponse ListEventSourcesResponse + */ + public function listEventSourcesWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->eventSourceType)) { + $body["eventSourceType"] = $request->eventSourceType; + } + if (!Utils::isUnset($request->maxResults)) { + $body["maxResults"] = $request->maxResults; + } + if (!Utils::isUnset($request->nextToken)) { + $body["nextToken"] = $request->nextToken; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "ListEventSources", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/source/listEventSources", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return ListEventSourcesResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Lists event sources. + * * + * @description You can call this API operation to list event sources. + * * + * @param ListEventSourcesRequest $request ListEventSourcesRequest + * @return ListEventSourcesResponse ListEventSourcesResponse + */ + public function listEventSources($request){ + $runtime = new RuntimeOptions([]); + return $this->listEventSourcesWithOptions($request, $runtime); + } + + /** + * @summary Creates event targets. + * * + * @description You can call this operation to create event targets. + * * + * @param CreateEventTargetsRequest $request CreateEventTargetsRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return CreateEventTargetsResponse CreateEventTargetsResponse + */ + public function createEventTargetsWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->eventRuleName)) { + $body["eventRuleName"] = $request->eventRuleName; + } + if (!Utils::isUnset($request->eventTargets)) { + $body["eventTargets"] = $request->eventTargets; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "CreateEventTargets", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/target/createEventTargets", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return CreateEventTargetsResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Creates event targets. + * * + * @description You can call this operation to create event targets. + * * + * @param CreateEventTargetsRequest $request CreateEventTargetsRequest + * @return CreateEventTargetsResponse CreateEventTargetsResponse + */ + public function createEventTargets($request){ + $runtime = new RuntimeOptions([]); + return $this->createEventTargetsWithOptions($request, $runtime); + } + + /** + * @summary Updates event targets. + * * + * @description You can call this operation to update event targets. + * * + * @param UpdateEventTargetsRequest $request UpdateEventTargetsRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return UpdateEventTargetsResponse UpdateEventTargetsResponse + */ + public function updateEventTargetsWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->eventRuleName)) { + $body["eventRuleName"] = $request->eventRuleName; + } + if (!Utils::isUnset($request->eventTargets)) { + $body["eventTargets"] = $request->eventTargets; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "UpdateEventTargets", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/target/updateEventTargets", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return UpdateEventTargetsResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Updates event targets. + * * + * @description You can call this operation to update event targets. + * * + * @param UpdateEventTargetsRequest $request UpdateEventTargetsRequest + * @return UpdateEventTargetsResponse UpdateEventTargetsResponse + */ + public function updateEventTargets($request){ + $runtime = new RuntimeOptions([]); + return $this->updateEventTargetsWithOptions($request, $runtime); + } + + /** + * @summary Deletes event targets. + * * + * @description You can call this operation to delete event targets. + * * + * @param DeleteEventTargetsRequest $request DeleteEventTargetsRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return DeleteEventTargetsResponse DeleteEventTargetsResponse + */ + public function deleteEventTargetsWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->eventRuleName)) { + $body["eventRuleName"] = $request->eventRuleName; + } + if (!Utils::isUnset($request->eventTargetNames)) { + $body["eventTargetNames"] = $request->eventTargetNames; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "DeleteEventTargets", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/target/deleteEventTargets", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return DeleteEventTargetsResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Deletes event targets. + * * + * @description You can call this operation to delete event targets. + * * + * @param DeleteEventTargetsRequest $request DeleteEventTargetsRequest + * @return DeleteEventTargetsResponse DeleteEventTargetsResponse + */ + public function deleteEventTargets($request){ + $runtime = new RuntimeOptions([]); + return $this->deleteEventTargetsWithOptions($request, $runtime); + } + + /** + * @summary Lists event targets. + * * + * @description You can call this operation to list event targets. + * * + * @param ListEventTargetsRequest $request ListEventTargetsRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return ListEventTargetsResponse ListEventTargetsResponse + */ + public function listEventTargetsWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->eventRuleName)) { + $body["eventRuleName"] = $request->eventRuleName; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "ListEventTargets", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/target/listEventTargets", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return ListEventTargetsResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Lists event targets. + * * + * @description You can call this operation to list event targets. + * * + * @param ListEventTargetsRequest $request ListEventTargetsRequest + * @return ListEventTargetsResponse ListEventTargetsResponse + */ + public function listEventTargets($request){ + $runtime = new RuntimeOptions([]); + return $this->listEventTargetsWithOptions($request, $runtime); + } + + /** + * @summary Queries all event buses. + * * + * @description You can call this API operation to query all event buses. + * * + * @param ListEventTypesRequest $request ListEventTypesRequest + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * @return ListEventTypesResponse ListEventTypesResponse + */ + public function listEventTypesWithOptions($request, $runtime){ + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->eventBusName)) { + $body["eventBusName"] = $request->eventBusName; + } + if (!Utils::isUnset($request->eventSourceName)) { + $body["eventSourceName"] = $request->eventSourceName; + } + if (!Utils::isUnset($request->maxResults)) { + $body["maxResults"] = $request->maxResults; + } + if (!Utils::isUnset($request->nextToken)) { + $body["nextToken"] = $request->nextToken; + } + $req = new OpenApiRequest([ + "body" => Utils::toJSONString($body) + ]); + $params = new Params([ + "action" => "listEventTypes", + "version" => "2024-07-01", + "protocol" => "HTTP", + "pathname" => "/type/listEventTypes", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + return ListEventTypesResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary Queries all event buses. + * * + * @description You can call this API operation to query all event buses. + * * + * @param ListEventTypesRequest $request ListEventTypesRequest + * @return ListEventTypesResponse ListEventTypesResponse + */ + public function listEventTypes($request){ + $runtime = new RuntimeOptions([]); + return $this->listEventTypesWithOptions($request, $runtime); + } +} diff --git a/sdk/generated/python/.gitignore b/sdk/generated/python/.gitignore new file mode 100644 index 00000000..2bcfffae --- /dev/null +++ b/sdk/generated/python/.gitignore @@ -0,0 +1,5 @@ +runtime/ +.idea/ +.vscode/ +__pycache__/ +.pytest_cache/ \ No newline at end of file diff --git a/sdk/generated/python/rocketmq_eventbridge/__init__.py b/sdk/generated/python/rocketmq_eventbridge/__init__.py new file mode 100644 index 00000000..5becc17c --- /dev/null +++ b/sdk/generated/python/rocketmq_eventbridge/__init__.py @@ -0,0 +1 @@ +__version__ = "1.0.0" diff --git a/sdk/generated/python/rocketmq_eventbridge/client.py b/sdk/generated/python/rocketmq_eventbridge/client.py new file mode 100644 index 00000000..1df0bb92 --- /dev/null +++ b/sdk/generated/python/rocketmq_eventbridge/client.py @@ -0,0 +1,3799 @@ +# -*- coding: utf-8 -*- +# This file is auto-generated, don't edit it. Thanks. +from Tea.exceptions import TeaException +from typing import Dict +from Tea.core import TeaCore + +from alibabacloud_tea_openapi.client import Client as OpenApiClient +from alibabacloud_tea_openapi import models as open_api_models +from alibabacloud_tea_util.client import Client as UtilClient +from rocketmq_eventbridge import models as sdk_client_models +from alibabacloud_tea_util import models as util_models + + +class Client(OpenApiClient): + def __init__( + self, + config: open_api_models.Config, + ): + super().__init__(config) + self._endpoint_rule = '' + self.check_config(config) + self._endpoint = self.get_endpoint('eventbridge', self._region_id, self._endpoint_rule, self._network, self._suffix, self._endpoint_map, self._endpoint) + + def get_endpoint( + self, + product_id: str, + region_id: str, + endpoint_rule: str, + network: str, + suffix: str, + endpoint_map: Dict[str, str], + endpoint: str, + ) -> str: + if not UtilClient.empty(endpoint): + return endpoint + if not UtilClient.is_unset(endpoint_map) and not UtilClient.empty(endpoint_map.get(region_id)): + return endpoint_map.get(region_id) + result = '' + if not UtilClient.empty(network) and not UtilClient.equal_string(network, 'public'): + network = f'-{network}' + else: + network = '' + if not UtilClient.is_unset(suffix): + suffix = '' + else: + suffix = f'-{suffix}' + if UtilClient.equal_string(endpoint_rule, 'regional'): + if UtilClient.empty(region_id): + raise TeaException({ + 'message': 'RegionId is empty, please set a valid RegionId' + }) + result = f'{product_id}{suffix}{network}.{region_id}.aliyuncs.com' + else: + result = f'{product_id}{suffix}{network}.aliyuncs.com' + return result + + def create_event_bus_with_options( + self, + request: sdk_client_models.CreateEventBusRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.CreateEventBusResponse: + """ + @summary Creates an event bus. + + @description You can call this API operation to create an event bus. + + @param request: CreateEventBusRequest + @param runtime: runtime options for this request RuntimeOptions + @return: CreateEventBusResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='CreateEventBus', + version='2024-07-01', + protocol='HTTP', + pathname='/bus/createEventBus', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.CreateEventBusResponse(), + self.call_api(params, req, runtime) + ) + + async def create_event_bus_with_options_async( + self, + request: sdk_client_models.CreateEventBusRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.CreateEventBusResponse: + """ + @summary Creates an event bus. + + @description You can call this API operation to create an event bus. + + @param request: CreateEventBusRequest + @param runtime: runtime options for this request RuntimeOptions + @return: CreateEventBusResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='CreateEventBus', + version='2024-07-01', + protocol='HTTP', + pathname='/bus/createEventBus', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.CreateEventBusResponse(), + await self.call_api_async(params, req, runtime) + ) + + def create_event_bus( + self, + request: sdk_client_models.CreateEventBusRequest, + ) -> sdk_client_models.CreateEventBusResponse: + """ + @summary Creates an event bus. + + @description You can call this API operation to create an event bus. + + @param request: CreateEventBusRequest + @return: CreateEventBusResponse + """ + runtime = util_models.RuntimeOptions() + return self.create_event_bus_with_options(request, runtime) + + async def create_event_bus_async( + self, + request: sdk_client_models.CreateEventBusRequest, + ) -> sdk_client_models.CreateEventBusResponse: + """ + @summary Creates an event bus. + + @description You can call this API operation to create an event bus. + + @param request: CreateEventBusRequest + @return: CreateEventBusResponse + """ + runtime = util_models.RuntimeOptions() + return await self.create_event_bus_with_options_async(request, runtime) + + def get_event_bus_with_options( + self, + request: sdk_client_models.GetEventBusRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.GetEventBusResponse: + """ + @summary Queries the detailed information about an event bus. + + @description You can call this API operation to query the detailed information about an event bus. + + @param request: GetEventBusRequest + @param runtime: runtime options for this request RuntimeOptions + @return: GetEventBusResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='GetEventBus', + version='2024-07-01', + protocol='HTTP', + pathname='/bus/getEventBus', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.GetEventBusResponse(), + self.call_api(params, req, runtime) + ) + + async def get_event_bus_with_options_async( + self, + request: sdk_client_models.GetEventBusRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.GetEventBusResponse: + """ + @summary Queries the detailed information about an event bus. + + @description You can call this API operation to query the detailed information about an event bus. + + @param request: GetEventBusRequest + @param runtime: runtime options for this request RuntimeOptions + @return: GetEventBusResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='GetEventBus', + version='2024-07-01', + protocol='HTTP', + pathname='/bus/getEventBus', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.GetEventBusResponse(), + await self.call_api_async(params, req, runtime) + ) + + def get_event_bus( + self, + request: sdk_client_models.GetEventBusRequest, + ) -> sdk_client_models.GetEventBusResponse: + """ + @summary Queries the detailed information about an event bus. + + @description You can call this API operation to query the detailed information about an event bus. + + @param request: GetEventBusRequest + @return: GetEventBusResponse + """ + runtime = util_models.RuntimeOptions() + return self.get_event_bus_with_options(request, runtime) + + async def get_event_bus_async( + self, + request: sdk_client_models.GetEventBusRequest, + ) -> sdk_client_models.GetEventBusResponse: + """ + @summary Queries the detailed information about an event bus. + + @description You can call this API operation to query the detailed information about an event bus. + + @param request: GetEventBusRequest + @return: GetEventBusResponse + """ + runtime = util_models.RuntimeOptions() + return await self.get_event_bus_with_options_async(request, runtime) + + def list_event_buses_with_options( + self, + request: sdk_client_models.ListEventBusesRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.ListEventBusesResponse: + """ + @summary Queries all event buses. + + @description You can call this API operation to query all event buses. + + @param request: ListEventBusesRequest + @param runtime: runtime options for this request RuntimeOptions + @return: ListEventBusesResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.max_results): + body['maxResults'] = request.max_results + if not UtilClient.is_unset(request.next_token): + body['nextToken'] = request.next_token + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='ListEventBuses', + version='2024-07-01', + protocol='HTTP', + pathname='/bus/listEventBuses', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.ListEventBusesResponse(), + self.call_api(params, req, runtime) + ) + + async def list_event_buses_with_options_async( + self, + request: sdk_client_models.ListEventBusesRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.ListEventBusesResponse: + """ + @summary Queries all event buses. + + @description You can call this API operation to query all event buses. + + @param request: ListEventBusesRequest + @param runtime: runtime options for this request RuntimeOptions + @return: ListEventBusesResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.max_results): + body['maxResults'] = request.max_results + if not UtilClient.is_unset(request.next_token): + body['nextToken'] = request.next_token + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='ListEventBuses', + version='2024-07-01', + protocol='HTTP', + pathname='/bus/listEventBuses', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.ListEventBusesResponse(), + await self.call_api_async(params, req, runtime) + ) + + def list_event_buses( + self, + request: sdk_client_models.ListEventBusesRequest, + ) -> sdk_client_models.ListEventBusesResponse: + """ + @summary Queries all event buses. + + @description You can call this API operation to query all event buses. + + @param request: ListEventBusesRequest + @return: ListEventBusesResponse + """ + runtime = util_models.RuntimeOptions() + return self.list_event_buses_with_options(request, runtime) + + async def list_event_buses_async( + self, + request: sdk_client_models.ListEventBusesRequest, + ) -> sdk_client_models.ListEventBusesResponse: + """ + @summary Queries all event buses. + + @description You can call this API operation to query all event buses. + + @param request: ListEventBusesRequest + @return: ListEventBusesResponse + """ + runtime = util_models.RuntimeOptions() + return await self.list_event_buses_with_options_async(request, runtime) + + def delete_event_bus_with_options( + self, + request: sdk_client_models.DeleteEventBusRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.DeleteEventBusResponse: + """ + @summary Deletes an event bus. + + @description You can call this API operation to delete an event bus. + + @param request: DeleteEventBusRequest + @param runtime: runtime options for this request RuntimeOptions + @return: DeleteEventBusResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='DeleteEventBus', + version='2024-07-01', + protocol='HTTP', + pathname='/bus/deleteEventBus', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.DeleteEventBusResponse(), + self.call_api(params, req, runtime) + ) + + async def delete_event_bus_with_options_async( + self, + request: sdk_client_models.DeleteEventBusRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.DeleteEventBusResponse: + """ + @summary Deletes an event bus. + + @description You can call this API operation to delete an event bus. + + @param request: DeleteEventBusRequest + @param runtime: runtime options for this request RuntimeOptions + @return: DeleteEventBusResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='DeleteEventBus', + version='2024-07-01', + protocol='HTTP', + pathname='/bus/deleteEventBus', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.DeleteEventBusResponse(), + await self.call_api_async(params, req, runtime) + ) + + def delete_event_bus( + self, + request: sdk_client_models.DeleteEventBusRequest, + ) -> sdk_client_models.DeleteEventBusResponse: + """ + @summary Deletes an event bus. + + @description You can call this API operation to delete an event bus. + + @param request: DeleteEventBusRequest + @return: DeleteEventBusResponse + """ + runtime = util_models.RuntimeOptions() + return self.delete_event_bus_with_options(request, runtime) + + async def delete_event_bus_async( + self, + request: sdk_client_models.DeleteEventBusRequest, + ) -> sdk_client_models.DeleteEventBusResponse: + """ + @summary Deletes an event bus. + + @description You can call this API operation to delete an event bus. + + @param request: DeleteEventBusRequest + @return: DeleteEventBusResponse + """ + runtime = util_models.RuntimeOptions() + return await self.delete_event_bus_with_options_async(request, runtime) + + def create_api_destination_with_options( + self, + request: sdk_client_models.CreateApiDestinationRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.CreateApiDestinationResponse: + """ + @summary Creates an API destination. + + @description You can call this API operation to create an API destination. + + @param request: CreateApiDestinationRequest (tmpReq before) + @param runtime: runtime options for this request RuntimeOptions + @return: CreateApiDestinationResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.api_destination_name): + body['apiDestinationName'] = request.api_destination_name + if not UtilClient.is_unset(request.connection_name): + body['connectionName'] = request.connection_name + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.http_api_parameters): + body['httpApiParameters'] = request.http_api_parameters + if not UtilClient.is_unset(request.invocation_rate_limit_per_second): + body['invocationRateLimitPerSecond'] = request.invocation_rate_limit_per_second + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='CreateApiDestination', + version='2024-07-01', + protocol='HTTP', + pathname='/api-destination/createApiDestination', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.CreateApiDestinationResponse(), + self.call_api(params, req, runtime) + ) + + async def create_api_destination_with_options_async( + self, + request: sdk_client_models.CreateApiDestinationRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.CreateApiDestinationResponse: + """ + @summary Creates an API destination. + + @description You can call this API operation to create an API destination. + + @param request: CreateApiDestinationRequest (tmpReq before) + @param runtime: runtime options for this request RuntimeOptions + @return: CreateApiDestinationResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.api_destination_name): + body['apiDestinationName'] = request.api_destination_name + if not UtilClient.is_unset(request.connection_name): + body['connectionName'] = request.connection_name + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.http_api_parameters): + body['httpApiParameters'] = request.http_api_parameters + if not UtilClient.is_unset(request.invocation_rate_limit_per_second): + body['invocationRateLimitPerSecond'] = request.invocation_rate_limit_per_second + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='CreateApiDestination', + version='2024-07-01', + protocol='HTTP', + pathname='/api-destination/createApiDestination', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.CreateApiDestinationResponse(), + await self.call_api_async(params, req, runtime) + ) + + def create_api_destination( + self, + request: sdk_client_models.CreateApiDestinationRequest, + ) -> sdk_client_models.CreateApiDestinationResponse: + """ + @summary Creates an API destination. + + @description You can call this API operation to create an API destination. + + @param request: CreateApiDestinationRequest + @return: CreateApiDestinationResponse + """ + runtime = util_models.RuntimeOptions() + return self.create_api_destination_with_options(request, runtime) + + async def create_api_destination_async( + self, + request: sdk_client_models.CreateApiDestinationRequest, + ) -> sdk_client_models.CreateApiDestinationResponse: + """ + @summary Creates an API destination. + + @description You can call this API operation to create an API destination. + + @param request: CreateApiDestinationRequest + @return: CreateApiDestinationResponse + """ + runtime = util_models.RuntimeOptions() + return await self.create_api_destination_with_options_async(request, runtime) + + def update_api_destination_with_options( + self, + request: sdk_client_models.UpdateApiDestinationRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.UpdateApiDestinationResponse: + """ + @summary Updates an API destination. + + @description You can call this API operation to update an API destination. + + @param request: UpdateApiDestinationRequest + @param runtime: runtime options for this request RuntimeOptions + @return: UpdateApiDestinationResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.api_destination_name): + body['apiDestinationName'] = request.api_destination_name + if not UtilClient.is_unset(request.connection_name): + body['connectionName'] = request.connection_name + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.http_api_parameters): + body['httpApiParameters'] = request.http_api_parameters + if not UtilClient.is_unset(request.invocation_rate_limit_per_second): + body['invocationRateLimitPerSecond'] = request.invocation_rate_limit_per_second + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='UpdateApiDestination', + version='2024-07-01', + protocol='HTTP', + pathname='/api-destination/updateApiDestination', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.UpdateApiDestinationResponse(), + self.call_api(params, req, runtime) + ) + + async def update_api_destination_with_options_async( + self, + request: sdk_client_models.UpdateApiDestinationRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.UpdateApiDestinationResponse: + """ + @summary Updates an API destination. + + @description You can call this API operation to update an API destination. + + @param request: UpdateApiDestinationRequest + @param runtime: runtime options for this request RuntimeOptions + @return: UpdateApiDestinationResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.api_destination_name): + body['apiDestinationName'] = request.api_destination_name + if not UtilClient.is_unset(request.connection_name): + body['connectionName'] = request.connection_name + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.http_api_parameters): + body['httpApiParameters'] = request.http_api_parameters + if not UtilClient.is_unset(request.invocation_rate_limit_per_second): + body['invocationRateLimitPerSecond'] = request.invocation_rate_limit_per_second + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='UpdateApiDestination', + version='2024-07-01', + protocol='HTTP', + pathname='/api-destination/updateApiDestination', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.UpdateApiDestinationResponse(), + await self.call_api_async(params, req, runtime) + ) + + def update_api_destination( + self, + request: sdk_client_models.UpdateApiDestinationRequest, + ) -> sdk_client_models.UpdateApiDestinationResponse: + """ + @summary Updates an API destination. + + @description You can call this API operation to update an API destination. + + @param request: UpdateApiDestinationRequest + @return: UpdateApiDestinationResponse + """ + runtime = util_models.RuntimeOptions() + return self.update_api_destination_with_options(request, runtime) + + async def update_api_destination_async( + self, + request: sdk_client_models.UpdateApiDestinationRequest, + ) -> sdk_client_models.UpdateApiDestinationResponse: + """ + @summary Updates an API destination. + + @description You can call this API operation to update an API destination. + + @param request: UpdateApiDestinationRequest + @return: UpdateApiDestinationResponse + """ + runtime = util_models.RuntimeOptions() + return await self.update_api_destination_with_options_async(request, runtime) + + def get_api_destination_with_options( + self, + request: sdk_client_models.GetApiDestinationRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.GetApiDestinationResponse: + """ + @summary Queries the information about an API destination. + + @description You can call this API operation to query the information about an API destination. + + @param request: GetApiDestinationRequest + @param runtime: runtime options for this request RuntimeOptions + @return: GetApiDestinationResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.api_destination_name): + body['apiDestinationName'] = request.api_destination_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='GetApiDestination', + version='2024-07-01', + protocol='HTTP', + pathname='/api-destination/getApiDestination', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.GetApiDestinationResponse(), + self.call_api(params, req, runtime) + ) + + async def get_api_destination_with_options_async( + self, + request: sdk_client_models.GetApiDestinationRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.GetApiDestinationResponse: + """ + @summary Queries the information about an API destination. + + @description You can call this API operation to query the information about an API destination. + + @param request: GetApiDestinationRequest + @param runtime: runtime options for this request RuntimeOptions + @return: GetApiDestinationResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.api_destination_name): + body['apiDestinationName'] = request.api_destination_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='GetApiDestination', + version='2024-07-01', + protocol='HTTP', + pathname='/api-destination/getApiDestination', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.GetApiDestinationResponse(), + await self.call_api_async(params, req, runtime) + ) + + def get_api_destination( + self, + request: sdk_client_models.GetApiDestinationRequest, + ) -> sdk_client_models.GetApiDestinationResponse: + """ + @summary Queries the information about an API destination. + + @description You can call this API operation to query the information about an API destination. + + @param request: GetApiDestinationRequest + @return: GetApiDestinationResponse + """ + runtime = util_models.RuntimeOptions() + return self.get_api_destination_with_options(request, runtime) + + async def get_api_destination_async( + self, + request: sdk_client_models.GetApiDestinationRequest, + ) -> sdk_client_models.GetApiDestinationResponse: + """ + @summary Queries the information about an API destination. + + @description You can call this API operation to query the information about an API destination. + + @param request: GetApiDestinationRequest + @return: GetApiDestinationResponse + """ + runtime = util_models.RuntimeOptions() + return await self.get_api_destination_with_options_async(request, runtime) + + def delete_api_destination_with_options( + self, + request: sdk_client_models.DeleteApiDestinationRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.DeleteApiDestinationResponse: + """ + @summary Deletes an API destination. + + @description You can call this API operation to delete an API destination. + + @param request: DeleteApiDestinationRequest + @param runtime: runtime options for this request RuntimeOptions + @return: DeleteApiDestinationResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.api_destination_name): + body['apiDestinationName'] = request.api_destination_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='DeleteApiDestination', + version='2024-07-01', + protocol='HTTP', + pathname='/api-destination/deleteApiDestination', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.DeleteApiDestinationResponse(), + self.call_api(params, req, runtime) + ) + + async def delete_api_destination_with_options_async( + self, + request: sdk_client_models.DeleteApiDestinationRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.DeleteApiDestinationResponse: + """ + @summary Deletes an API destination. + + @description You can call this API operation to delete an API destination. + + @param request: DeleteApiDestinationRequest + @param runtime: runtime options for this request RuntimeOptions + @return: DeleteApiDestinationResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.api_destination_name): + body['apiDestinationName'] = request.api_destination_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='DeleteApiDestination', + version='2024-07-01', + protocol='HTTP', + pathname='/api-destination/deleteApiDestination', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.DeleteApiDestinationResponse(), + await self.call_api_async(params, req, runtime) + ) + + def delete_api_destination( + self, + request: sdk_client_models.DeleteApiDestinationRequest, + ) -> sdk_client_models.DeleteApiDestinationResponse: + """ + @summary Deletes an API destination. + + @description You can call this API operation to delete an API destination. + + @param request: DeleteApiDestinationRequest + @return: DeleteApiDestinationResponse + """ + runtime = util_models.RuntimeOptions() + return self.delete_api_destination_with_options(request, runtime) + + async def delete_api_destination_async( + self, + request: sdk_client_models.DeleteApiDestinationRequest, + ) -> sdk_client_models.DeleteApiDestinationResponse: + """ + @summary Deletes an API destination. + + @description You can call this API operation to delete an API destination. + + @param request: DeleteApiDestinationRequest + @return: DeleteApiDestinationResponse + """ + runtime = util_models.RuntimeOptions() + return await self.delete_api_destination_with_options_async(request, runtime) + + def list_api_destinations_with_options( + self, + request: sdk_client_models.ListApiDestinationsRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.ListApiDestinationsResponse: + """ + @summary Queries a list of API destinations. + + @description You can use this API operation to query a list of API destinations. + + @param request: ListApiDestinationsRequest + @param runtime: runtime options for this request RuntimeOptions + @return: ListApiDestinationsResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.api_destination_name_prefix): + body['apiDestinationNamePrefix'] = request.api_destination_name_prefix + if not UtilClient.is_unset(request.connection_name): + body['connectionName'] = request.connection_name + if not UtilClient.is_unset(request.max_results): + body['maxResults'] = request.max_results + if not UtilClient.is_unset(request.next_token): + body['nextToken'] = request.next_token + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='ListApiDestinations', + version='2024-07-01', + protocol='HTTP', + pathname='/api-destination/listApiDestinations', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.ListApiDestinationsResponse(), + self.call_api(params, req, runtime) + ) + + async def list_api_destinations_with_options_async( + self, + request: sdk_client_models.ListApiDestinationsRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.ListApiDestinationsResponse: + """ + @summary Queries a list of API destinations. + + @description You can use this API operation to query a list of API destinations. + + @param request: ListApiDestinationsRequest + @param runtime: runtime options for this request RuntimeOptions + @return: ListApiDestinationsResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.api_destination_name_prefix): + body['apiDestinationNamePrefix'] = request.api_destination_name_prefix + if not UtilClient.is_unset(request.connection_name): + body['connectionName'] = request.connection_name + if not UtilClient.is_unset(request.max_results): + body['maxResults'] = request.max_results + if not UtilClient.is_unset(request.next_token): + body['nextToken'] = request.next_token + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='ListApiDestinations', + version='2024-07-01', + protocol='HTTP', + pathname='/api-destination/listApiDestinations', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.ListApiDestinationsResponse(), + await self.call_api_async(params, req, runtime) + ) + + def list_api_destinations( + self, + request: sdk_client_models.ListApiDestinationsRequest, + ) -> sdk_client_models.ListApiDestinationsResponse: + """ + @summary Queries a list of API destinations. + + @description You can use this API operation to query a list of API destinations. + + @param request: ListApiDestinationsRequest + @return: ListApiDestinationsResponse + """ + runtime = util_models.RuntimeOptions() + return self.list_api_destinations_with_options(request, runtime) + + async def list_api_destinations_async( + self, + request: sdk_client_models.ListApiDestinationsRequest, + ) -> sdk_client_models.ListApiDestinationsResponse: + """ + @summary Queries a list of API destinations. + + @description You can use this API operation to query a list of API destinations. + + @param request: ListApiDestinationsRequest + @return: ListApiDestinationsResponse + """ + runtime = util_models.RuntimeOptions() + return await self.list_api_destinations_with_options_async(request, runtime) + + def create_connection_with_options( + self, + request: sdk_client_models.CreateConnectionRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.CreateConnectionResponse: + """ + @summary Creates a connection. + + @description You can call this API operation to create a connection. + + @param request: CreateConnectionRequest + @param runtime: runtime options for this request RuntimeOptions + @return: CreateConnectionResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.auth_parameters): + body['authParameters'] = request.auth_parameters + if not UtilClient.is_unset(request.connection_name): + body['connectionName'] = request.connection_name + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.network_parameters): + body['networkParameters'] = request.network_parameters + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='CreateConnection', + version='2024-07-01', + protocol='HTTP', + pathname='/connection/createConnection', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.CreateConnectionResponse(), + self.call_api(params, req, runtime) + ) + + async def create_connection_with_options_async( + self, + request: sdk_client_models.CreateConnectionRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.CreateConnectionResponse: + """ + @summary Creates a connection. + + @description You can call this API operation to create a connection. + + @param request: CreateConnectionRequest + @param runtime: runtime options for this request RuntimeOptions + @return: CreateConnectionResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.auth_parameters): + body['authParameters'] = request.auth_parameters + if not UtilClient.is_unset(request.connection_name): + body['connectionName'] = request.connection_name + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.network_parameters): + body['networkParameters'] = request.network_parameters + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='CreateConnection', + version='2024-07-01', + protocol='HTTP', + pathname='/connection/createConnection', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.CreateConnectionResponse(), + await self.call_api_async(params, req, runtime) + ) + + def create_connection( + self, + request: sdk_client_models.CreateConnectionRequest, + ) -> sdk_client_models.CreateConnectionResponse: + """ + @summary Creates a connection. + + @description You can call this API operation to create a connection. + + @param request: CreateConnectionRequest + @return: CreateConnectionResponse + """ + runtime = util_models.RuntimeOptions() + return self.create_connection_with_options(request, runtime) + + async def create_connection_async( + self, + request: sdk_client_models.CreateConnectionRequest, + ) -> sdk_client_models.CreateConnectionResponse: + """ + @summary Creates a connection. + + @description You can call this API operation to create a connection. + + @param request: CreateConnectionRequest + @return: CreateConnectionResponse + """ + runtime = util_models.RuntimeOptions() + return await self.create_connection_with_options_async(request, runtime) + + def delete_connection_with_options( + self, + request: sdk_client_models.DeleteConnectionRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.DeleteConnectionResponse: + """ + @summary Deletes a connection. + + @description You can call this API operation to delete a connection. + + @param request: DeleteConnectionRequest + @param runtime: runtime options for this request RuntimeOptions + @return: DeleteConnectionResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.connection_name): + body['connectionName'] = request.connection_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='DeleteConnection', + version='2024-07-01', + protocol='HTTP', + pathname='/connection/deleteConnection', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.DeleteConnectionResponse(), + self.call_api(params, req, runtime) + ) + + async def delete_connection_with_options_async( + self, + request: sdk_client_models.DeleteConnectionRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.DeleteConnectionResponse: + """ + @summary Deletes a connection. + + @description You can call this API operation to delete a connection. + + @param request: DeleteConnectionRequest + @param runtime: runtime options for this request RuntimeOptions + @return: DeleteConnectionResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.connection_name): + body['connectionName'] = request.connection_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='DeleteConnection', + version='2024-07-01', + protocol='HTTP', + pathname='/connection/deleteConnection', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.DeleteConnectionResponse(), + await self.call_api_async(params, req, runtime) + ) + + def delete_connection( + self, + request: sdk_client_models.DeleteConnectionRequest, + ) -> sdk_client_models.DeleteConnectionResponse: + """ + @summary Deletes a connection. + + @description You can call this API operation to delete a connection. + + @param request: DeleteConnectionRequest + @return: DeleteConnectionResponse + """ + runtime = util_models.RuntimeOptions() + return self.delete_connection_with_options(request, runtime) + + async def delete_connection_async( + self, + request: sdk_client_models.DeleteConnectionRequest, + ) -> sdk_client_models.DeleteConnectionResponse: + """ + @summary Deletes a connection. + + @description You can call this API operation to delete a connection. + + @param request: DeleteConnectionRequest + @return: DeleteConnectionResponse + """ + runtime = util_models.RuntimeOptions() + return await self.delete_connection_with_options_async(request, runtime) + + def update_connection_with_options( + self, + request: sdk_client_models.UpdateConnectionRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.UpdateConnectionResponse: + """ + @summary Updates a connection. + + @description You can call this API operation to update a connection. + + @param request: UpdateConnectionRequest + @param runtime: runtime options for this request RuntimeOptions + @return: UpdateConnectionResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.auth_parameters): + body['authParameters'] = request.auth_parameters + if not UtilClient.is_unset(request.connection_name): + body['connectionName'] = request.connection_name + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.network_parameters): + body['networkParameters'] = request.network_parameters + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='UpdateConnection', + version='2024-07-01', + protocol='HTTP', + pathname='/connection/updateConnection', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.UpdateConnectionResponse(), + self.call_api(params, req, runtime) + ) + + async def update_connection_with_options_async( + self, + request: sdk_client_models.UpdateConnectionRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.UpdateConnectionResponse: + """ + @summary Updates a connection. + + @description You can call this API operation to update a connection. + + @param request: UpdateConnectionRequest + @param runtime: runtime options for this request RuntimeOptions + @return: UpdateConnectionResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.auth_parameters): + body['authParameters'] = request.auth_parameters + if not UtilClient.is_unset(request.connection_name): + body['connectionName'] = request.connection_name + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.network_parameters): + body['networkParameters'] = request.network_parameters + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='UpdateConnection', + version='2024-07-01', + protocol='HTTP', + pathname='/connection/updateConnection', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.UpdateConnectionResponse(), + await self.call_api_async(params, req, runtime) + ) + + def update_connection( + self, + request: sdk_client_models.UpdateConnectionRequest, + ) -> sdk_client_models.UpdateConnectionResponse: + """ + @summary Updates a connection. + + @description You can call this API operation to update a connection. + + @param request: UpdateConnectionRequest + @return: UpdateConnectionResponse + """ + runtime = util_models.RuntimeOptions() + return self.update_connection_with_options(request, runtime) + + async def update_connection_async( + self, + request: sdk_client_models.UpdateConnectionRequest, + ) -> sdk_client_models.UpdateConnectionResponse: + """ + @summary Updates a connection. + + @description You can call this API operation to update a connection. + + @param request: UpdateConnectionRequest + @return: UpdateConnectionResponse + """ + runtime = util_models.RuntimeOptions() + return await self.update_connection_with_options_async(request, runtime) + + def get_connection_with_options( + self, + request: sdk_client_models.GetConnectionRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.GetConnectionResponse: + """ + @summary Queries the configurations of a connection. + + @description You can call this API operation to query the configurations of a connection. + + @param request: GetConnectionRequest + @param runtime: runtime options for this request RuntimeOptions + @return: GetConnectionResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.connection_name): + body['connectionName'] = request.connection_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='GetConnection', + version='2024-07-01', + protocol='HTTP', + pathname='/connection/getConnection', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.GetConnectionResponse(), + self.call_api(params, req, runtime) + ) + + async def get_connection_with_options_async( + self, + request: sdk_client_models.GetConnectionRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.GetConnectionResponse: + """ + @summary Queries the configurations of a connection. + + @description You can call this API operation to query the configurations of a connection. + + @param request: GetConnectionRequest + @param runtime: runtime options for this request RuntimeOptions + @return: GetConnectionResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.connection_name): + body['connectionName'] = request.connection_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='GetConnection', + version='2024-07-01', + protocol='HTTP', + pathname='/connection/getConnection', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.GetConnectionResponse(), + await self.call_api_async(params, req, runtime) + ) + + def get_connection( + self, + request: sdk_client_models.GetConnectionRequest, + ) -> sdk_client_models.GetConnectionResponse: + """ + @summary Queries the configurations of a connection. + + @description You can call this API operation to query the configurations of a connection. + + @param request: GetConnectionRequest + @return: GetConnectionResponse + """ + runtime = util_models.RuntimeOptions() + return self.get_connection_with_options(request, runtime) + + async def get_connection_async( + self, + request: sdk_client_models.GetConnectionRequest, + ) -> sdk_client_models.GetConnectionResponse: + """ + @summary Queries the configurations of a connection. + + @description You can call this API operation to query the configurations of a connection. + + @param request: GetConnectionRequest + @return: GetConnectionResponse + """ + runtime = util_models.RuntimeOptions() + return await self.get_connection_with_options_async(request, runtime) + + def select_one_connection_with_options( + self, + request: sdk_client_models.GetConnectionRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.GetConnectionResponse: + """ + @summary Queries the configurations of a connection. + + @description You can call this API operation to query the configurations of a connection. + + @param request: GetConnectionRequest + @param runtime: runtime options for this request RuntimeOptions + @return: GetConnectionResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.connection_name): + body['connectionName'] = request.connection_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='selectOneConnection', + version='2024-07-01', + protocol='HTTP', + pathname='/connection/selectOneConnection', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.GetConnectionResponse(), + self.call_api(params, req, runtime) + ) + + async def select_one_connection_with_options_async( + self, + request: sdk_client_models.GetConnectionRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.GetConnectionResponse: + """ + @summary Queries the configurations of a connection. + + @description You can call this API operation to query the configurations of a connection. + + @param request: GetConnectionRequest + @param runtime: runtime options for this request RuntimeOptions + @return: GetConnectionResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.connection_name): + body['connectionName'] = request.connection_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='selectOneConnection', + version='2024-07-01', + protocol='HTTP', + pathname='/connection/selectOneConnection', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.GetConnectionResponse(), + await self.call_api_async(params, req, runtime) + ) + + def select_one_connection( + self, + request: sdk_client_models.GetConnectionRequest, + ) -> sdk_client_models.GetConnectionResponse: + """ + @summary Queries the configurations of a connection. + + @description You can call this API operation to query the configurations of a connection. + + @param request: GetConnectionRequest + @return: GetConnectionResponse + """ + runtime = util_models.RuntimeOptions() + return self.select_one_connection_with_options(request, runtime) + + async def select_one_connection_async( + self, + request: sdk_client_models.GetConnectionRequest, + ) -> sdk_client_models.GetConnectionResponse: + """ + @summary Queries the configurations of a connection. + + @description You can call this API operation to query the configurations of a connection. + + @param request: GetConnectionRequest + @return: GetConnectionResponse + """ + runtime = util_models.RuntimeOptions() + return await self.select_one_connection_with_options_async(request, runtime) + + def list_connections_with_options( + self, + request: sdk_client_models.ListConnectionsRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.ListConnectionsResponse: + """ + @summary Queries connections. + + @description You can call this API operation to query connections. + + @param request: ListConnectionsRequest + @param runtime: runtime options for this request RuntimeOptions + @return: ListConnectionsResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.connection_name_prefix): + body['connectionNamePrefix'] = request.connection_name_prefix + if not UtilClient.is_unset(request.max_results): + body['maxResults'] = request.max_results + if not UtilClient.is_unset(request.next_token): + body['nextToken'] = request.next_token + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='ListConnections', + version='2024-07-01', + protocol='HTTP', + pathname='/connection/listConnections', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.ListConnectionsResponse(), + self.call_api(params, req, runtime) + ) + + async def list_connections_with_options_async( + self, + request: sdk_client_models.ListConnectionsRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.ListConnectionsResponse: + """ + @summary Queries connections. + + @description You can call this API operation to query connections. + + @param request: ListConnectionsRequest + @param runtime: runtime options for this request RuntimeOptions + @return: ListConnectionsResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.connection_name_prefix): + body['connectionNamePrefix'] = request.connection_name_prefix + if not UtilClient.is_unset(request.max_results): + body['maxResults'] = request.max_results + if not UtilClient.is_unset(request.next_token): + body['nextToken'] = request.next_token + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='ListConnections', + version='2024-07-01', + protocol='HTTP', + pathname='/connection/listConnections', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.ListConnectionsResponse(), + await self.call_api_async(params, req, runtime) + ) + + def list_connections( + self, + request: sdk_client_models.ListConnectionsRequest, + ) -> sdk_client_models.ListConnectionsResponse: + """ + @summary list connections. + + @description You can call this API operation to list connections. + + @param request: ListConnectionsRequest + @return: ListConnectionsResponse + """ + runtime = util_models.RuntimeOptions() + return self.list_connections_with_options(request, runtime) + + async def list_connections_async( + self, + request: sdk_client_models.ListConnectionsRequest, + ) -> sdk_client_models.ListConnectionsResponse: + """ + @summary list connections. + + @description You can call this API operation to list connections. + + @param request: ListConnectionsRequest + @return: ListConnectionsResponse + """ + runtime = util_models.RuntimeOptions() + return await self.list_connections_with_options_async(request, runtime) + + def list_enums_response(self) -> sdk_client_models.ListEnumsResponseResponse: + """ + @summary Updates a connection. + + @description You can call this API operation to update a connection. + + @return: ListEnumsResponseResponse + """ + runtime = util_models.RuntimeOptions() + body = {} + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='listEnumsResponse', + version='2024-07-01', + protocol='HTTP', + pathname='/connection/listEnumsResponse', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.ListEnumsResponseResponse(), + self.call_api(params, req, runtime) + ) + + async def list_enums_response_async(self) -> sdk_client_models.ListEnumsResponseResponse: + """ + @summary Updates a connection. + + @description You can call this API operation to update a connection. + + @return: ListEnumsResponseResponse + """ + runtime = util_models.RuntimeOptions() + body = {} + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='listEnumsResponse', + version='2024-07-01', + protocol='HTTP', + pathname='/connection/listEnumsResponse', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.ListEnumsResponseResponse(), + await self.call_api_async(params, req, runtime) + ) + + def put_events_with_options( + self, + request: sdk_client_models.PutEventsRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.PutEventsResponse: + """ + @summary Queries the content of an event. + + @description You can call this API operation to query the content of an event. + + @param request: PutEventsRequest + @param runtime: runtime options for this request RuntimeOptions + @return: PutEventsResponse + """ + UtilClient.validate_model(request) + headers = { + 'ce-specversion': '1.0', + 'ce-type': 'com.github.pull_request.opened', + 'ce-source': 'https://github.com/cloudevents/spec/pull', + 'ce-subject': 'demo', + 'ce-id': '1234-1234-1234', + 'ce-datacontenttype': 'application/json', + 'ce-time': '2024-07-01T17:31:00Z', + 'ce-eventbusname': 'demo-bus' + } + body = '{}' + if not UtilClient.is_unset(request.event_bus_name): + headers['ce-eventbusname'] = request.event_bus_name + if not UtilClient.is_unset(request.event): + body = request.event + req = open_api_models.OpenApiRequest( + body=body, + headers=headers + ) + params = open_api_models.Params( + action='putEvents', + version='2024-07-01', + protocol='HTTP', + pathname='/putEvents', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.PutEventsResponse(), + self.call_api(params, req, runtime) + ) + + async def put_events_with_options_async( + self, + request: sdk_client_models.PutEventsRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.PutEventsResponse: + """ + @summary Queries the content of an event. + + @description You can call this API operation to query the content of an event. + + @param request: PutEventsRequest + @param runtime: runtime options for this request RuntimeOptions + @return: PutEventsResponse + """ + UtilClient.validate_model(request) + headers = { + 'ce-specversion': '1.0', + 'ce-type': 'com.github.pull_request.opened', + 'ce-source': 'https://github.com/cloudevents/spec/pull', + 'ce-subject': 'demo', + 'ce-id': '1234-1234-1234', + 'ce-datacontenttype': 'application/json', + 'ce-time': '2024-07-01T17:31:00Z', + 'ce-eventbusname': 'demo-bus' + } + body = '{}' + if not UtilClient.is_unset(request.event_bus_name): + headers['ce-eventbusname'] = request.event_bus_name + if not UtilClient.is_unset(request.event): + body = request.event + req = open_api_models.OpenApiRequest( + body=body, + headers=headers + ) + params = open_api_models.Params( + action='putEvents', + version='2024-07-01', + protocol='HTTP', + pathname='/putEvents', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.PutEventsResponse(), + await self.call_api_async(params, req, runtime) + ) + + def put_events( + self, + request: sdk_client_models.PutEventsRequest, + ) -> sdk_client_models.PutEventsResponse: + """ + @summary Queries the content of an event. + + @description You can call this API operation to query the content of an event. + + @param request: PutEventsRequest + @return: PutEventsResponse + """ + runtime = util_models.RuntimeOptions() + return self.put_events_with_options(request, runtime) + + async def put_events_async( + self, + request: sdk_client_models.PutEventsRequest, + ) -> sdk_client_models.PutEventsResponse: + """ + @summary Queries the content of an event. + + @description You can call this API operation to query the content of an event. + + @param request: PutEventsRequest + @return: PutEventsResponse + """ + runtime = util_models.RuntimeOptions() + return await self.put_events_with_options_async(request, runtime) + + def create_event_rule_with_options( + self, + request: sdk_client_models.CreateEventRuleRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.CreateEventRuleResponse: + """ + @summary Creates an event rule. + + @description You can call this operation to create an event rule. + + @param request: CreateEventRuleRequest + @param runtime: runtime options for this request RuntimeOptions + @return: CreateEventRuleResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.filter_pattern): + body['filterPattern'] = request.filter_pattern + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='CreateEventRule', + version='2024-07-01', + protocol='HTTP', + pathname='/rule/createEventRule', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.CreateEventRuleResponse(), + self.call_api(params, req, runtime) + ) + + async def create_event_rule_with_options_async( + self, + request: sdk_client_models.CreateEventRuleRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.CreateEventRuleResponse: + """ + @summary Creates an event rule. + + @description You can call this operation to create an event rule. + + @param request: CreateEventRuleRequest + @param runtime: runtime options for this request RuntimeOptions + @return: CreateEventRuleResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.filter_pattern): + body['filterPattern'] = request.filter_pattern + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='CreateEventRule', + version='2024-07-01', + protocol='HTTP', + pathname='/rule/createEventRule', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.CreateEventRuleResponse(), + await self.call_api_async(params, req, runtime) + ) + + def create_event_rule( + self, + request: sdk_client_models.CreateEventRuleRequest, + ) -> sdk_client_models.CreateEventRuleResponse: + """ + @summary Creates an event rule. + + @description You can call this operation to create an event rule. + + @param request: CreateEventRuleRequest + @return: CreateEventRuleResponse + """ + runtime = util_models.RuntimeOptions() + return self.create_event_rule_with_options(request, runtime) + + async def create_event_rule_async( + self, + request: sdk_client_models.CreateEventRuleRequest, + ) -> sdk_client_models.CreateEventRuleResponse: + """ + @summary Creates an event rule. + + @description You can call this operation to create an event rule. + + @param request: CreateEventRuleRequest + @return: CreateEventRuleResponse + """ + runtime = util_models.RuntimeOptions() + return await self.create_event_rule_with_options_async(request, runtime) + + def get_event_rule_with_options( + self, + request: sdk_client_models.GetEventRuleRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.GetEventRuleResponse: + """ + @summary Gets an event rule. + + @description You can call this operation to get an event rule. + + @param request: GetEventRuleRequest + @param runtime: runtime options for this request RuntimeOptions + @return: GetEventRuleResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='GetEventRule', + version='2024-07-01', + protocol='HTTP', + pathname='/rule/getEventRule', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.GetEventRuleResponse(), + self.call_api(params, req, runtime) + ) + + async def get_event_rule_with_options_async( + self, + request: sdk_client_models.GetEventRuleRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.GetEventRuleResponse: + """ + @summary Gets an event rule. + + @description You can call this operation to get an event rule. + + @param request: GetEventRuleRequest + @param runtime: runtime options for this request RuntimeOptions + @return: GetEventRuleResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='GetEventRule', + version='2024-07-01', + protocol='HTTP', + pathname='/rule/getEventRule', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.GetEventRuleResponse(), + await self.call_api_async(params, req, runtime) + ) + + def get_event_rule( + self, + request: sdk_client_models.GetEventRuleRequest, + ) -> sdk_client_models.GetEventRuleResponse: + """ + @summary Gets an event rule. + + @description You can call this operation to get an event rule. + + @param request: GetEventRuleRequest + @return: GetEventRuleResponse + """ + runtime = util_models.RuntimeOptions() + return self.get_event_rule_with_options(request, runtime) + + async def get_event_rule_async( + self, + request: sdk_client_models.GetEventRuleRequest, + ) -> sdk_client_models.GetEventRuleResponse: + """ + @summary Gets an event rule. + + @description You can call this operation to get an event rule. + + @param request: GetEventRuleRequest + @return: GetEventRuleResponse + """ + runtime = util_models.RuntimeOptions() + return await self.get_event_rule_with_options_async(request, runtime) + + def delete_event_rule_with_options( + self, + request: sdk_client_models.DeleteEventRuleRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.DeleteEventRuleResponse: + """ + @summary Deletes an event rule. + + @description You can call this operation to delete an event rule. + + @param request: DeleteEventRuleRequest + @param runtime: runtime options for this request RuntimeOptions + @return: DeleteEventRuleResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='DeleteEventRule', + version='2024-07-01', + protocol='HTTP', + pathname='/rule/deleteEventRule', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.DeleteEventRuleResponse(), + self.call_api(params, req, runtime) + ) + + async def delete_event_rule_with_options_async( + self, + request: sdk_client_models.DeleteEventRuleRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.DeleteEventRuleResponse: + """ + @summary Deletes an event rule. + + @description You can call this operation to delete an event rule. + + @param request: DeleteEventRuleRequest + @param runtime: runtime options for this request RuntimeOptions + @return: DeleteEventRuleResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='DeleteEventRule', + version='2024-07-01', + protocol='HTTP', + pathname='/rule/deleteEventRule', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.DeleteEventRuleResponse(), + await self.call_api_async(params, req, runtime) + ) + + def delete_event_rule( + self, + request: sdk_client_models.DeleteEventRuleRequest, + ) -> sdk_client_models.DeleteEventRuleResponse: + """ + @summary Deletes an event rule. + + @description You can call this operation to delete an event rule. + + @param request: DeleteEventRuleRequest + @return: DeleteEventRuleResponse + """ + runtime = util_models.RuntimeOptions() + return self.delete_event_rule_with_options(request, runtime) + + async def delete_event_rule_async( + self, + request: sdk_client_models.DeleteEventRuleRequest, + ) -> sdk_client_models.DeleteEventRuleResponse: + """ + @summary Deletes an event rule. + + @description You can call this operation to delete an event rule. + + @param request: DeleteEventRuleRequest + @return: DeleteEventRuleResponse + """ + runtime = util_models.RuntimeOptions() + return await self.delete_event_rule_with_options_async(request, runtime) + + def update_event_rule_with_options( + self, + request: sdk_client_models.UpdateEventRuleRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.UpdateEventRuleResponse: + """ + @summary Updates an event rule. + + @description You can call this operation to update an event rule. + + @param request: UpdateEventRuleRequest + @param runtime: runtime options for this request RuntimeOptions + @return: UpdateEventRuleResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.filter_pattern): + body['filterPattern'] = request.filter_pattern + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='UpdateEventRule', + version='2024-07-01', + protocol='HTTP', + pathname='/rule/updateEventRule', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.UpdateEventRuleResponse(), + self.call_api(params, req, runtime) + ) + + async def update_event_rule_with_options_async( + self, + request: sdk_client_models.UpdateEventRuleRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.UpdateEventRuleResponse: + """ + @summary Updates an event rule. + + @description You can call this operation to update an event rule. + + @param request: UpdateEventRuleRequest + @param runtime: runtime options for this request RuntimeOptions + @return: UpdateEventRuleResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.filter_pattern): + body['filterPattern'] = request.filter_pattern + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='UpdateEventRule', + version='2024-07-01', + protocol='HTTP', + pathname='/rule/updateEventRule', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.UpdateEventRuleResponse(), + await self.call_api_async(params, req, runtime) + ) + + def update_event_rule( + self, + request: sdk_client_models.UpdateEventRuleRequest, + ) -> sdk_client_models.UpdateEventRuleResponse: + """ + @summary Updates an event rule. + + @description You can call this operation to update an event rule. + + @param request: UpdateEventRuleRequest + @return: UpdateEventRuleResponse + """ + runtime = util_models.RuntimeOptions() + return self.update_event_rule_with_options(request, runtime) + + async def update_event_rule_async( + self, + request: sdk_client_models.UpdateEventRuleRequest, + ) -> sdk_client_models.UpdateEventRuleResponse: + """ + @summary Updates an event rule. + + @description You can call this operation to update an event rule. + + @param request: UpdateEventRuleRequest + @return: UpdateEventRuleResponse + """ + runtime = util_models.RuntimeOptions() + return await self.update_event_rule_with_options_async(request, runtime) + + def list_event_rules_with_options( + self, + request: sdk_client_models.ListEventRulesRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.ListEventRulesResponse: + """ + @summary Lists event rules. + + @description You can call this operation to list event rules. + + @param request: ListEventRulesRequest + @param runtime: runtime options for this request RuntimeOptions + @return: ListEventRulesResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.max_results): + body['maxResults'] = request.max_results + if not UtilClient.is_unset(request.next_token): + body['nextToken'] = request.next_token + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='ListEventRules', + version='2024-07-01', + protocol='HTTP', + pathname='/rule/listEventRules', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.ListEventRulesResponse(), + self.call_api(params, req, runtime) + ) + + async def list_event_rules_with_options_async( + self, + request: sdk_client_models.ListEventRulesRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.ListEventRulesResponse: + """ + @summary Lists event rules. + + @description You can call this operation to list event rules. + + @param request: ListEventRulesRequest + @param runtime: runtime options for this request RuntimeOptions + @return: ListEventRulesResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.max_results): + body['maxResults'] = request.max_results + if not UtilClient.is_unset(request.next_token): + body['nextToken'] = request.next_token + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='ListEventRules', + version='2024-07-01', + protocol='HTTP', + pathname='/rule/listEventRules', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.ListEventRulesResponse(), + await self.call_api_async(params, req, runtime) + ) + + def list_event_rules( + self, + request: sdk_client_models.ListEventRulesRequest, + ) -> sdk_client_models.ListEventRulesResponse: + """ + @summary Lists event rules. + + @description You can call this operation to list event rules. + + @param request: ListEventRulesRequest + @return: ListEventRulesResponse + """ + runtime = util_models.RuntimeOptions() + return self.list_event_rules_with_options(request, runtime) + + async def list_event_rules_async( + self, + request: sdk_client_models.ListEventRulesRequest, + ) -> sdk_client_models.ListEventRulesResponse: + """ + @summary Lists event rules. + + @description You can call this operation to list event rules. + + @param request: ListEventRulesRequest + @return: ListEventRulesResponse + """ + runtime = util_models.RuntimeOptions() + return await self.list_event_rules_with_options_async(request, runtime) + + def enable_event_rule_with_options( + self, + request: sdk_client_models.EnableEventRuleRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.EnableEventRuleResponse: + """ + @summary Enables an event rule. + + @description You can call this operation to enable an event rule. + + @param request: EnableEventRuleRequest + @param runtime: runtime options for this request RuntimeOptions + @return: EnableEventRuleResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='EnableEventRule', + version='2024-07-01', + protocol='HTTP', + pathname='/rule/enableEventRule', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.EnableEventRuleResponse(), + self.call_api(params, req, runtime) + ) + + async def enable_event_rule_with_options_async( + self, + request: sdk_client_models.EnableEventRuleRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.EnableEventRuleResponse: + """ + @summary Enables an event rule. + + @description You can call this operation to enable an event rule. + + @param request: EnableEventRuleRequest + @param runtime: runtime options for this request RuntimeOptions + @return: EnableEventRuleResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='EnableEventRule', + version='2024-07-01', + protocol='HTTP', + pathname='/rule/enableEventRule', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.EnableEventRuleResponse(), + await self.call_api_async(params, req, runtime) + ) + + def enable_event_rule( + self, + request: sdk_client_models.EnableEventRuleRequest, + ) -> sdk_client_models.EnableEventRuleResponse: + """ + @summary Enables an event rule. + + @description You can call this operation to enable an event rule. + + @param request: EnableEventRuleRequest + @return: EnableEventRuleResponse + """ + runtime = util_models.RuntimeOptions() + return self.enable_event_rule_with_options(request, runtime) + + async def enable_event_rule_async( + self, + request: sdk_client_models.EnableEventRuleRequest, + ) -> sdk_client_models.EnableEventRuleResponse: + """ + @summary Enables an event rule. + + @description You can call this operation to enable an event rule. + + @param request: EnableEventRuleRequest + @return: EnableEventRuleResponse + """ + runtime = util_models.RuntimeOptions() + return await self.enable_event_rule_with_options_async(request, runtime) + + def disable_event_rule_with_options( + self, + request: sdk_client_models.DisableEventRuleRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.DisableEventRuleResponse: + """ + @summary Disables an event rule. + + @description You can call this operation to disable an event rule. + + @param request: DisableEventRuleRequest + @param runtime: runtime options for this request RuntimeOptions + @return: DisableEventRuleResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='DisableEventRule', + version='2024-07-01', + protocol='HTTP', + pathname='/rule/disableEventRule', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.DisableEventRuleResponse(), + self.call_api(params, req, runtime) + ) + + async def disable_event_rule_with_options_async( + self, + request: sdk_client_models.DisableEventRuleRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.DisableEventRuleResponse: + """ + @summary Disables an event rule. + + @description You can call this operation to disable an event rule. + + @param request: DisableEventRuleRequest + @param runtime: runtime options for this request RuntimeOptions + @return: DisableEventRuleResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='DisableEventRule', + version='2024-07-01', + protocol='HTTP', + pathname='/rule/disableEventRule', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.DisableEventRuleResponse(), + await self.call_api_async(params, req, runtime) + ) + + def disable_event_rule( + self, + request: sdk_client_models.DisableEventRuleRequest, + ) -> sdk_client_models.DisableEventRuleResponse: + """ + @summary Disables an event rule. + + @description You can call this operation to disable an event rule. + + @param request: DisableEventRuleRequest + @return: DisableEventRuleResponse + """ + runtime = util_models.RuntimeOptions() + return self.disable_event_rule_with_options(request, runtime) + + async def disable_event_rule_async( + self, + request: sdk_client_models.DisableEventRuleRequest, + ) -> sdk_client_models.DisableEventRuleResponse: + """ + @summary Disables an event rule. + + @description You can call this operation to disable an event rule. + + @param request: DisableEventRuleRequest + @return: DisableEventRuleResponse + """ + runtime = util_models.RuntimeOptions() + return await self.disable_event_rule_with_options_async(request, runtime) + + def create_event_source_with_options( + self, + request: sdk_client_models.CreateEventSourceRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.CreateEventSourceResponse: + """ + @summary Creates an event source. + + @description You can call this operation to create an event source. + + @param request: CreateEventSourceRequest + @param runtime: runtime options for this request RuntimeOptions + @return: CreateEventSourceResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_source_name): + body['eventSourceName'] = request.event_source_name + if not UtilClient.is_unset(request.class_name): + body['className'] = request.class_name + if not UtilClient.is_unset(request.config): + body['config'] = request.config + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='CreateEventSource', + version='2024-07-01', + protocol='HTTP', + pathname='/source/createEventSource', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.CreateEventSourceResponse(), + self.call_api(params, req, runtime) + ) + + async def create_event_source_with_options_async( + self, + request: sdk_client_models.CreateEventSourceRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.CreateEventSourceResponse: + """ + @summary Creates an event source. + + @description You can call this operation to create an event source. + + @param request: CreateEventSourceRequest + @param runtime: runtime options for this request RuntimeOptions + @return: CreateEventSourceResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_source_name): + body['eventSourceName'] = request.event_source_name + if not UtilClient.is_unset(request.class_name): + body['className'] = request.class_name + if not UtilClient.is_unset(request.config): + body['config'] = request.config + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='CreateEventSource', + version='2024-07-01', + protocol='HTTP', + pathname='/source/createEventSource', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.CreateEventSourceResponse(), + await self.call_api_async(params, req, runtime) + ) + + def create_event_source( + self, + request: sdk_client_models.CreateEventSourceRequest, + ) -> sdk_client_models.CreateEventSourceResponse: + """ + @summary Creates an event source. + + @description You can call this operation to create an event source. + + @param request: CreateEventSourceRequest + @return: CreateEventSourceResponse + """ + runtime = util_models.RuntimeOptions() + return self.create_event_source_with_options(request, runtime) + + async def create_event_source_async( + self, + request: sdk_client_models.CreateEventSourceRequest, + ) -> sdk_client_models.CreateEventSourceResponse: + """ + @summary Creates an event source. + + @description You can call this operation to create an event source. + + @param request: CreateEventSourceRequest + @return: CreateEventSourceResponse + """ + runtime = util_models.RuntimeOptions() + return await self.create_event_source_with_options_async(request, runtime) + + def update_event_source_with_options( + self, + request: sdk_client_models.UpdateEventSourceRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.UpdateEventSourceResponse: + """ + @summary Updates an event source. + + @description You can call this operation to update an event source. + + @param request: UpdateEventSourceRequest + @param runtime: runtime options for this request RuntimeOptions + @return: UpdateEventSourceResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_source_name): + body['eventSourceName'] = request.event_source_name + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.class_name): + body['className'] = request.class_name + if not UtilClient.is_unset(request.status): + body['status'] = request.status + if not UtilClient.is_unset(request.config): + body['config'] = request.config + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='UpdateEventSource', + version='2024-07-01', + protocol='HTTP', + pathname='/source/updateEventSource', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.UpdateEventSourceResponse(), + self.call_api(params, req, runtime) + ) + + async def update_event_source_with_options_async( + self, + request: sdk_client_models.UpdateEventSourceRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.UpdateEventSourceResponse: + """ + @summary Updates an event source. + + @description You can call this operation to update an event source. + + @param request: UpdateEventSourceRequest + @param runtime: runtime options for this request RuntimeOptions + @return: UpdateEventSourceResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_source_name): + body['eventSourceName'] = request.event_source_name + if not UtilClient.is_unset(request.description): + body['description'] = request.description + if not UtilClient.is_unset(request.class_name): + body['className'] = request.class_name + if not UtilClient.is_unset(request.status): + body['status'] = request.status + if not UtilClient.is_unset(request.config): + body['config'] = request.config + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='UpdateEventSource', + version='2024-07-01', + protocol='HTTP', + pathname='/source/updateEventSource', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.UpdateEventSourceResponse(), + await self.call_api_async(params, req, runtime) + ) + + def update_event_source( + self, + request: sdk_client_models.UpdateEventSourceRequest, + ) -> sdk_client_models.UpdateEventSourceResponse: + """ + @summary Updates an event source. + + @description You can call this operation to update an event source. + + @param request: UpdateEventSourceRequest + @return: UpdateEventSourceResponse + """ + runtime = util_models.RuntimeOptions() + return self.update_event_source_with_options(request, runtime) + + async def update_event_source_async( + self, + request: sdk_client_models.UpdateEventSourceRequest, + ) -> sdk_client_models.UpdateEventSourceResponse: + """ + @summary Updates an event source. + + @description You can call this operation to update an event source. + + @param request: UpdateEventSourceRequest + @return: UpdateEventSourceResponse + """ + runtime = util_models.RuntimeOptions() + return await self.update_event_source_with_options_async(request, runtime) + + def delete_event_source_with_options( + self, + request: sdk_client_models.DeleteEventSourceRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.DeleteEventSourceResponse: + """ + @summary Deletes an event source. + + @description You can call this API operation to delete an event source. + + @param request: DeleteEventSourceRequest + @param runtime: runtime options for this request RuntimeOptions + @return: DeleteEventSourceResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_source_name): + body['eventSourceName'] = request.event_source_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='DeleteEventSource', + version='2024-07-01', + protocol='HTTP', + pathname='/source/deleteEventSource', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.DeleteEventSourceResponse(), + self.call_api(params, req, runtime) + ) + + async def delete_event_source_with_options_async( + self, + request: sdk_client_models.DeleteEventSourceRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.DeleteEventSourceResponse: + """ + @summary Deletes an event source. + + @description You can call this API operation to delete an event source. + + @param request: DeleteEventSourceRequest + @param runtime: runtime options for this request RuntimeOptions + @return: DeleteEventSourceResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_source_name): + body['eventSourceName'] = request.event_source_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='DeleteEventSource', + version='2024-07-01', + protocol='HTTP', + pathname='/source/deleteEventSource', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.DeleteEventSourceResponse(), + await self.call_api_async(params, req, runtime) + ) + + def delete_event_source( + self, + request: sdk_client_models.DeleteEventSourceRequest, + ) -> sdk_client_models.DeleteEventSourceResponse: + """ + @summary Deletes an event source. + + @description You can call this API operation to delete an event source. + + @param request: DeleteEventSourceRequest + @return: DeleteEventSourceResponse + """ + runtime = util_models.RuntimeOptions() + return self.delete_event_source_with_options(request, runtime) + + async def delete_event_source_async( + self, + request: sdk_client_models.DeleteEventSourceRequest, + ) -> sdk_client_models.DeleteEventSourceResponse: + """ + @summary Deletes an event source. + + @description You can call this API operation to delete an event source. + + @param request: DeleteEventSourceRequest + @return: DeleteEventSourceResponse + """ + runtime = util_models.RuntimeOptions() + return await self.delete_event_source_with_options_async(request, runtime) + + def get_event_source_with_options( + self, + request: sdk_client_models.GetEventSourceRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.GetEventSourceResponse: + """ + @summary Gets an event source. + + @description You can call this API operation to get an event source. + + @param request: GetEventSourceRequest + @param runtime: runtime options for this request RuntimeOptions + @return: GetEventSourceResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_source_name): + body['eventSourceName'] = request.event_source_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='GetEventSource', + version='2024-07-01', + protocol='HTTP', + pathname='/source/getEventSource', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.GetEventSourceResponse(), + self.call_api(params, req, runtime) + ) + + async def get_event_source_with_options_async( + self, + request: sdk_client_models.GetEventSourceRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.GetEventSourceResponse: + """ + @summary Gets an event source. + + @description You can call this API operation to get an event source. + + @param request: GetEventSourceRequest + @param runtime: runtime options for this request RuntimeOptions + @return: GetEventSourceResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_source_name): + body['eventSourceName'] = request.event_source_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='GetEventSource', + version='2024-07-01', + protocol='HTTP', + pathname='/source/getEventSource', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.GetEventSourceResponse(), + await self.call_api_async(params, req, runtime) + ) + + def get_event_source( + self, + request: sdk_client_models.GetEventSourceRequest, + ) -> sdk_client_models.GetEventSourceResponse: + """ + @summary Gets an event source. + + @description You can call this API operation to get an event source. + + @param request: GetEventSourceRequest + @return: GetEventSourceResponse + """ + runtime = util_models.RuntimeOptions() + return self.get_event_source_with_options(request, runtime) + + async def get_event_source_async( + self, + request: sdk_client_models.GetEventSourceRequest, + ) -> sdk_client_models.GetEventSourceResponse: + """ + @summary Gets an event source. + + @description You can call this API operation to get an event source. + + @param request: GetEventSourceRequest + @return: GetEventSourceResponse + """ + runtime = util_models.RuntimeOptions() + return await self.get_event_source_with_options_async(request, runtime) + + def list_event_sources_with_options( + self, + request: sdk_client_models.ListEventSourcesRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.ListEventSourcesResponse: + """ + @summary Lists event sources. + + @description You can call this API operation to list event sources. + + @param request: ListEventSourcesRequest + @param runtime: runtime options for this request RuntimeOptions + @return: ListEventSourcesResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_source_type): + body['eventSourceType'] = request.event_source_type + if not UtilClient.is_unset(request.max_results): + body['maxResults'] = request.max_results + if not UtilClient.is_unset(request.next_token): + body['nextToken'] = request.next_token + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='ListEventSources', + version='2024-07-01', + protocol='HTTP', + pathname='/source/listEventSources', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.ListEventSourcesResponse(), + self.call_api(params, req, runtime) + ) + + async def list_event_sources_with_options_async( + self, + request: sdk_client_models.ListEventSourcesRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.ListEventSourcesResponse: + """ + @summary Lists event sources. + + @description You can call this API operation to list event sources. + + @param request: ListEventSourcesRequest + @param runtime: runtime options for this request RuntimeOptions + @return: ListEventSourcesResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_source_type): + body['eventSourceType'] = request.event_source_type + if not UtilClient.is_unset(request.max_results): + body['maxResults'] = request.max_results + if not UtilClient.is_unset(request.next_token): + body['nextToken'] = request.next_token + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='ListEventSources', + version='2024-07-01', + protocol='HTTP', + pathname='/source/listEventSources', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.ListEventSourcesResponse(), + await self.call_api_async(params, req, runtime) + ) + + def list_event_sources( + self, + request: sdk_client_models.ListEventSourcesRequest, + ) -> sdk_client_models.ListEventSourcesResponse: + """ + @summary Lists event sources. + + @description You can call this API operation to list event sources. + + @param request: ListEventSourcesRequest + @return: ListEventSourcesResponse + """ + runtime = util_models.RuntimeOptions() + return self.list_event_sources_with_options(request, runtime) + + async def list_event_sources_async( + self, + request: sdk_client_models.ListEventSourcesRequest, + ) -> sdk_client_models.ListEventSourcesResponse: + """ + @summary Lists event sources. + + @description You can call this API operation to list event sources. + + @param request: ListEventSourcesRequest + @return: ListEventSourcesResponse + """ + runtime = util_models.RuntimeOptions() + return await self.list_event_sources_with_options_async(request, runtime) + + def create_event_targets_with_options( + self, + request: sdk_client_models.CreateEventTargetsRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.CreateEventTargetsResponse: + """ + @summary Creates event targets. + + @description You can call this operation to create event targets. + + @param request: CreateEventTargetsRequest + @param runtime: runtime options for this request RuntimeOptions + @return: CreateEventTargetsResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + if not UtilClient.is_unset(request.event_targets): + body['eventTargets'] = request.event_targets + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='CreateEventTargets', + version='2024-07-01', + protocol='HTTP', + pathname='/target/createEventTargets', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.CreateEventTargetsResponse(), + self.call_api(params, req, runtime) + ) + + async def create_event_targets_with_options_async( + self, + request: sdk_client_models.CreateEventTargetsRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.CreateEventTargetsResponse: + """ + @summary Creates event targets. + + @description You can call this operation to create event targets. + + @param request: CreateEventTargetsRequest + @param runtime: runtime options for this request RuntimeOptions + @return: CreateEventTargetsResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + if not UtilClient.is_unset(request.event_targets): + body['eventTargets'] = request.event_targets + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='CreateEventTargets', + version='2024-07-01', + protocol='HTTP', + pathname='/target/createEventTargets', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.CreateEventTargetsResponse(), + await self.call_api_async(params, req, runtime) + ) + + def create_event_targets( + self, + request: sdk_client_models.CreateEventTargetsRequest, + ) -> sdk_client_models.CreateEventTargetsResponse: + """ + @summary Creates event targets. + + @description You can call this operation to create event targets. + + @param request: CreateEventTargetsRequest + @return: CreateEventTargetsResponse + """ + runtime = util_models.RuntimeOptions() + return self.create_event_targets_with_options(request, runtime) + + async def create_event_targets_async( + self, + request: sdk_client_models.CreateEventTargetsRequest, + ) -> sdk_client_models.CreateEventTargetsResponse: + """ + @summary Creates event targets. + + @description You can call this operation to create event targets. + + @param request: CreateEventTargetsRequest + @return: CreateEventTargetsResponse + """ + runtime = util_models.RuntimeOptions() + return await self.create_event_targets_with_options_async(request, runtime) + + def update_event_targets_with_options( + self, + request: sdk_client_models.UpdateEventTargetsRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.UpdateEventTargetsResponse: + """ + @summary Updates event targets. + + @description You can call this operation to update event targets. + + @param request: UpdateEventTargetsRequest + @param runtime: runtime options for this request RuntimeOptions + @return: UpdateEventTargetsResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + if not UtilClient.is_unset(request.event_targets): + body['eventTargets'] = request.event_targets + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='UpdateEventTargets', + version='2024-07-01', + protocol='HTTP', + pathname='/target/updateEventTargets', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.UpdateEventTargetsResponse(), + self.call_api(params, req, runtime) + ) + + async def update_event_targets_with_options_async( + self, + request: sdk_client_models.UpdateEventTargetsRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.UpdateEventTargetsResponse: + """ + @summary Updates event targets. + + @description You can call this operation to update event targets. + + @param request: UpdateEventTargetsRequest + @param runtime: runtime options for this request RuntimeOptions + @return: UpdateEventTargetsResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + if not UtilClient.is_unset(request.event_targets): + body['eventTargets'] = request.event_targets + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='UpdateEventTargets', + version='2024-07-01', + protocol='HTTP', + pathname='/target/updateEventTargets', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.UpdateEventTargetsResponse(), + await self.call_api_async(params, req, runtime) + ) + + def update_event_targets( + self, + request: sdk_client_models.UpdateEventTargetsRequest, + ) -> sdk_client_models.UpdateEventTargetsResponse: + """ + @summary Updates event targets. + + @description You can call this operation to update event targets. + + @param request: UpdateEventTargetsRequest + @return: UpdateEventTargetsResponse + """ + runtime = util_models.RuntimeOptions() + return self.update_event_targets_with_options(request, runtime) + + async def update_event_targets_async( + self, + request: sdk_client_models.UpdateEventTargetsRequest, + ) -> sdk_client_models.UpdateEventTargetsResponse: + """ + @summary Updates event targets. + + @description You can call this operation to update event targets. + + @param request: UpdateEventTargetsRequest + @return: UpdateEventTargetsResponse + """ + runtime = util_models.RuntimeOptions() + return await self.update_event_targets_with_options_async(request, runtime) + + def delete_event_targets_with_options( + self, + request: sdk_client_models.DeleteEventTargetsRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.DeleteEventTargetsResponse: + """ + @summary Deletes event targets. + + @description You can call this operation to delete event targets. + + @param request: DeleteEventTargetsRequest + @param runtime: runtime options for this request RuntimeOptions + @return: DeleteEventTargetsResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + if not UtilClient.is_unset(request.event_target_names): + body['eventTargetNames'] = request.event_target_names + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='DeleteEventTargets', + version='2024-07-01', + protocol='HTTP', + pathname='/target/deleteEventTargets', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.DeleteEventTargetsResponse(), + self.call_api(params, req, runtime) + ) + + async def delete_event_targets_with_options_async( + self, + request: sdk_client_models.DeleteEventTargetsRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.DeleteEventTargetsResponse: + """ + @summary Deletes event targets. + + @description You can call this operation to delete event targets. + + @param request: DeleteEventTargetsRequest + @param runtime: runtime options for this request RuntimeOptions + @return: DeleteEventTargetsResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + if not UtilClient.is_unset(request.event_target_names): + body['eventTargetNames'] = request.event_target_names + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='DeleteEventTargets', + version='2024-07-01', + protocol='HTTP', + pathname='/target/deleteEventTargets', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.DeleteEventTargetsResponse(), + await self.call_api_async(params, req, runtime) + ) + + def delete_event_targets( + self, + request: sdk_client_models.DeleteEventTargetsRequest, + ) -> sdk_client_models.DeleteEventTargetsResponse: + """ + @summary Deletes event targets. + + @description You can call this operation to delete event targets. + + @param request: DeleteEventTargetsRequest + @return: DeleteEventTargetsResponse + """ + runtime = util_models.RuntimeOptions() + return self.delete_event_targets_with_options(request, runtime) + + async def delete_event_targets_async( + self, + request: sdk_client_models.DeleteEventTargetsRequest, + ) -> sdk_client_models.DeleteEventTargetsResponse: + """ + @summary Deletes event targets. + + @description You can call this operation to delete event targets. + + @param request: DeleteEventTargetsRequest + @return: DeleteEventTargetsResponse + """ + runtime = util_models.RuntimeOptions() + return await self.delete_event_targets_with_options_async(request, runtime) + + def list_event_targets_with_options( + self, + request: sdk_client_models.ListEventTargetsRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.ListEventTargetsResponse: + """ + @summary Lists event targets. + + @description You can call this operation to list event targets. + + @param request: ListEventTargetsRequest + @param runtime: runtime options for this request RuntimeOptions + @return: ListEventTargetsResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='ListEventTargets', + version='2024-07-01', + protocol='HTTP', + pathname='/target/listEventTargets', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.ListEventTargetsResponse(), + self.call_api(params, req, runtime) + ) + + async def list_event_targets_with_options_async( + self, + request: sdk_client_models.ListEventTargetsRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.ListEventTargetsResponse: + """ + @summary Lists event targets. + + @description You can call this operation to list event targets. + + @param request: ListEventTargetsRequest + @param runtime: runtime options for this request RuntimeOptions + @return: ListEventTargetsResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_rule_name): + body['eventRuleName'] = request.event_rule_name + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='ListEventTargets', + version='2024-07-01', + protocol='HTTP', + pathname='/target/listEventTargets', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.ListEventTargetsResponse(), + await self.call_api_async(params, req, runtime) + ) + + def list_event_targets( + self, + request: sdk_client_models.ListEventTargetsRequest, + ) -> sdk_client_models.ListEventTargetsResponse: + """ + @summary Lists event targets. + + @description You can call this operation to list event targets. + + @param request: ListEventTargetsRequest + @return: ListEventTargetsResponse + """ + runtime = util_models.RuntimeOptions() + return self.list_event_targets_with_options(request, runtime) + + async def list_event_targets_async( + self, + request: sdk_client_models.ListEventTargetsRequest, + ) -> sdk_client_models.ListEventTargetsResponse: + """ + @summary Lists event targets. + + @description You can call this operation to list event targets. + + @param request: ListEventTargetsRequest + @return: ListEventTargetsResponse + """ + runtime = util_models.RuntimeOptions() + return await self.list_event_targets_with_options_async(request, runtime) + + def list_event_types_with_options( + self, + request: sdk_client_models.ListEventTypesRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.ListEventTypesResponse: + """ + @summary Queries all event buses. + + @description You can call this API operation to query all event buses. + + @param request: ListEventTypesRequest + @param runtime: runtime options for this request RuntimeOptions + @return: ListEventTypesResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_source_name): + body['eventSourceName'] = request.event_source_name + if not UtilClient.is_unset(request.max_results): + body['maxResults'] = request.max_results + if not UtilClient.is_unset(request.next_token): + body['nextToken'] = request.next_token + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='listEventTypes', + version='2024-07-01', + protocol='HTTP', + pathname='/type/listEventTypes', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.ListEventTypesResponse(), + self.call_api(params, req, runtime) + ) + + async def list_event_types_with_options_async( + self, + request: sdk_client_models.ListEventTypesRequest, + runtime: util_models.RuntimeOptions, + ) -> sdk_client_models.ListEventTypesResponse: + """ + @summary Queries all event buses. + + @description You can call this API operation to query all event buses. + + @param request: ListEventTypesRequest + @param runtime: runtime options for this request RuntimeOptions + @return: ListEventTypesResponse + """ + UtilClient.validate_model(request) + body = {} + if not UtilClient.is_unset(request.event_bus_name): + body['eventBusName'] = request.event_bus_name + if not UtilClient.is_unset(request.event_source_name): + body['eventSourceName'] = request.event_source_name + if not UtilClient.is_unset(request.max_results): + body['maxResults'] = request.max_results + if not UtilClient.is_unset(request.next_token): + body['nextToken'] = request.next_token + req = open_api_models.OpenApiRequest( + body=UtilClient.to_jsonstring(body) + ) + params = open_api_models.Params( + action='listEventTypes', + version='2024-07-01', + protocol='HTTP', + pathname='/type/listEventTypes', + method='POST', + auth_type='Anonymous', + style='RPC', + req_body_type='json', + body_type='json' + ) + return TeaCore.from_map( + sdk_client_models.ListEventTypesResponse(), + await self.call_api_async(params, req, runtime) + ) + + def list_event_types( + self, + request: sdk_client_models.ListEventTypesRequest, + ) -> sdk_client_models.ListEventTypesResponse: + """ + @summary Queries all event buses. + + @description You can call this API operation to query all event buses. + + @param request: ListEventTypesRequest + @return: ListEventTypesResponse + """ + runtime = util_models.RuntimeOptions() + return self.list_event_types_with_options(request, runtime) + + async def list_event_types_async( + self, + request: sdk_client_models.ListEventTypesRequest, + ) -> sdk_client_models.ListEventTypesResponse: + """ + @summary Queries all event buses. + + @description You can call this API operation to query all event buses. + + @param request: ListEventTypesRequest + @return: ListEventTypesResponse + """ + runtime = util_models.RuntimeOptions() + return await self.list_event_types_with_options_async(request, runtime) diff --git a/sdk/generated/python/rocketmq_eventbridge/models.py b/sdk/generated/python/rocketmq_eventbridge/models.py new file mode 100644 index 00000000..186de16a --- /dev/null +++ b/sdk/generated/python/rocketmq_eventbridge/models.py @@ -0,0 +1,7982 @@ +# -*- coding: utf-8 -*- +# This file is auto-generated, don't edit it. Thanks. +from Tea.model import TeaModel +from typing import Dict, List, Any + + +class CreateEventBusRequest(TeaModel): + """ + EventBus Controller apis: + * createEventBus *\ + * getEventBus *\ + * deleteEventBus *\ + * listEventBuses *\ + """ + def __init__( + self, + description: str = None, + event_bus_name: str = None, + ): + # The description of the event bus. + self.description = description + # The name of the event bus. This parameter is required. + self.event_bus_name = event_bus_name + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.description is not None: + result['description'] = self.description + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('description') is not None: + self.description = m.get('description') + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + return self + + +class CreateEventBusResponseBody(TeaModel): + def __init__( + self, + code: str = None, + event_bus_name: str = None, + message: str = None, + request_id: str = None, + success: bool = None, + ): + # The returned response code. The value Success indicates that the request is successful. Other values indicate that the request failed. For more information about error codes, see Error codes. + self.code = code + # The name of the event bus. This parameter is required. + self.event_bus_name = event_bus_name + # The returned error message. + self.message = message + # The request ID. + self.request_id = request_id + # Indicates whether the request is successful. The value true indicates that the request is successful. + self.success = success + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + if self.success is not None: + result['success'] = self.success + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + if m.get('success') is not None: + self.success = m.get('success') + return self + + +class CreateEventBusResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: CreateEventBusResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = CreateEventBusResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class GetEventBusRequest(TeaModel): + def __init__( + self, + event_bus_name: str = None, + ): + # The name of the event bus. This parameter is required. + self.event_bus_name = event_bus_name + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + return self + + +class GetEventBusResponseBody(TeaModel): + def __init__( + self, + code: str = None, + create_timestamp: int = None, + description: str = None, + event_bus_name: str = None, + message: str = None, + request_id: str = None, + ): + # The response code. The value Success indicates that the request is successful. + self.code = code + # The timestamp that indicates when the event bus was created. + self.create_timestamp = create_timestamp + # The description of the event bus. + self.description = description + # The name of the event bus. + self.event_bus_name = event_bus_name + # The error message that is returned if the request failed. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.create_timestamp is not None: + result['createTimestamp'] = self.create_timestamp + if self.description is not None: + result['description'] = self.description + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('createTimestamp') is not None: + self.create_timestamp = m.get('createTimestamp') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class GetEventBusResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: GetEventBusResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = GetEventBusResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class ListEventBusesRequest(TeaModel): + def __init__( + self, + max_results: int = None, + next_token: str = None, + ): + # The maximum number of entries to be returned in a call. You can use this parameter and NextToken to implement paging. Note: Up to 100 entries can be returned in a call. + self.max_results = max_results + # If you set Limit and excess return values exist, this parameter is returned. + self.next_token = next_token + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.max_results is not None: + result['maxResults'] = self.max_results + if self.next_token is not None: + result['nextToken'] = self.next_token + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('maxResults') is not None: + self.max_results = m.get('maxResults') + if m.get('nextToken') is not None: + self.next_token = m.get('nextToken') + return self + + +class ListEventBusesResponseBodyEventBuses(TeaModel): + def __init__( + self, + description: str = None, + event_bus_name: str = None, + ): + # The description of the queried event bus. + self.description = description + # The name of the queried event bus. + self.event_bus_name = event_bus_name + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.description is not None: + result['description'] = self.description + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('description') is not None: + self.description = m.get('description') + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + return self + + +class ListEventBusesResponseBody(TeaModel): + def __init__( + self, + code: str = None, + event_buses: List[ListEventBusesResponseBodyEventBuses] = None, + message: str = None, + request_id: str = None, + next_token: str = None, + total: int = None, + max_results: int = None, + ): + # The returned HTTP status code. The HTTP status code 200 indicates that the request is successful. + self.code = code + # The timestamp that indicates when the event bus was created. + self.event_buses = event_buses + # The returned error message. + self.message = message + # The request ID. + self.request_id = request_id + # If excess return values exist, this parameter is returned. + self.next_token = next_token + # The total number of entries. + self.total = total + # If you set Limit and excess return values exist, this parameter is returned. + self.max_results = max_results + + def validate(self): + if self.event_buses: + for k in self.event_buses: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + result['eventBuses'] = [] + if self.event_buses is not None: + for k in self.event_buses: + result['eventBuses'].append(k.to_map() if k else None) + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + if self.next_token is not None: + result['nextToken'] = self.next_token + if self.total is not None: + result['total'] = self.total + if self.max_results is not None: + result['maxResults'] = self.max_results + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + self.event_buses = [] + if m.get('eventBuses') is not None: + for k in m.get('eventBuses'): + temp_model = ListEventBusesResponseBodyEventBuses() + self.event_buses.append(temp_model.from_map(k)) + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + if m.get('nextToken') is not None: + self.next_token = m.get('nextToken') + if m.get('total') is not None: + self.total = m.get('total') + if m.get('maxResults') is not None: + self.max_results = m.get('maxResults') + return self + + +class ListEventBusesResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: ListEventBusesResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = ListEventBusesResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class DeleteEventBusRequest(TeaModel): + def __init__( + self, + event_bus_name: str = None, + ): + # The name of the event bus. This parameter is required. + self.event_bus_name = event_bus_name + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + return self + + +class DeleteEventBusResponseBody(TeaModel): + def __init__( + self, + code: str = None, + message: str = None, + request_id: str = None, + ): + # The returned HTTP status code. The HTTP status code 200 indicates that the request is successful. + self.code = code + # The returned error message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class DeleteEventBusResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: DeleteEventBusResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = DeleteEventBusResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class CreateApiDestinationRequestHttpApiParametersApiParameters(TeaModel): + def __init__( + self, + name: str = None, + description: str = None, + type: str = None, + default_value: str = None, + in_: str = None, + ): + self.name = name + # The description of the API destination. The description can be up to 255 characters in length. + self.description = description + self.type = type + self.default_value = default_value + self.in_ = in_ + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.name is not None: + result['name'] = self.name + if self.description is not None: + result['description'] = self.description + if self.type is not None: + result['type'] = self.type + if self.default_value is not None: + result['defaultValue'] = self.default_value + if self.in_ is not None: + result['in'] = self.in_ + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('name') is not None: + self.name = m.get('name') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('type') is not None: + self.type = m.get('type') + if m.get('defaultValue') is not None: + self.default_value = m.get('defaultValue') + if m.get('in') is not None: + self.in_ = m.get('in') + return self + + +class CreateApiDestinationRequestHttpApiParameters(TeaModel): + def __init__( + self, + endpoint: str = None, + method: str = None, + api_parameters: List[CreateApiDestinationRequestHttpApiParametersApiParameters] = None, + ): + # The endpoint of the API destination. The endpoint can be up to 127 characters in length. This parameter is required. + self.endpoint = endpoint + # The HTTP request method. Valid values: + # + # + # * GET + # + # * POST + # + # * HEAD + # + # * DELETE + # + # * PUT + # + # * PATCH + # + # + # This parameter is required. + self.method = method + # TODO + self.api_parameters = api_parameters + + def validate(self): + if self.api_parameters: + for k in self.api_parameters: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.endpoint is not None: + result['endpoint'] = self.endpoint + if self.method is not None: + result['method'] = self.method + result['apiParameters'] = [] + if self.api_parameters is not None: + for k in self.api_parameters: + result['apiParameters'].append(k.to_map() if k else None) + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('endpoint') is not None: + self.endpoint = m.get('endpoint') + if m.get('method') is not None: + self.method = m.get('method') + self.api_parameters = [] + if m.get('apiParameters') is not None: + for k in m.get('apiParameters'): + temp_model = CreateApiDestinationRequestHttpApiParametersApiParameters() + self.api_parameters.append(temp_model.from_map(k)) + return self + + +class CreateApiDestinationRequest(TeaModel): + """ + ApiDestination Controller apis: + * createApiDestination *\ + * updateApiDestination *\ + * getApiDestination *\ + * deleteApiDestination *\ + * listApiDestinations *\ + """ + def __init__( + self, + api_destination_name: str = None, + connection_name: str = None, + description: str = None, + http_api_parameters: CreateApiDestinationRequestHttpApiParameters = None, + invocation_rate_limit_per_second: int = None, + ): + # The name of the API destination. The name must be 2 to 127 characters in length. This parameter is required. + self.api_destination_name = api_destination_name + # The name of the connection. The name must be 2 to 127 characters in length. Before you configure this parameter, you must call the CreateConnection operation to create a connection. Then, set this parameter to the name of the connection that you created. This parameter is required. + self.connection_name = connection_name + # The description of the API destination. The description can be up to 255 characters in length. + self.description = description + # The parameters that are configured for the API destination. This parameter is required. + self.http_api_parameters = http_api_parameters + # TODO + self.invocation_rate_limit_per_second = invocation_rate_limit_per_second + + def validate(self): + if self.http_api_parameters: + self.http_api_parameters.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.api_destination_name is not None: + result['apiDestinationName'] = self.api_destination_name + if self.connection_name is not None: + result['connectionName'] = self.connection_name + if self.description is not None: + result['description'] = self.description + if self.http_api_parameters is not None: + result['httpApiParameters'] = self.http_api_parameters.to_map() + if self.invocation_rate_limit_per_second is not None: + result['invocationRateLimitPerSecond'] = self.invocation_rate_limit_per_second + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('apiDestinationName') is not None: + self.api_destination_name = m.get('apiDestinationName') + if m.get('connectionName') is not None: + self.connection_name = m.get('connectionName') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('httpApiParameters') is not None: + temp_model = CreateApiDestinationRequestHttpApiParameters() + self.http_api_parameters = temp_model.from_map(m['httpApiParameters']) + if m.get('invocationRateLimitPerSecond') is not None: + self.invocation_rate_limit_per_second = m.get('invocationRateLimitPerSecond') + return self + + +class CreateApiDestinationResponseBody(TeaModel): + def __init__( + self, + code: str = None, + api_destination_name: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. The value Success indicates that the request is successful. + self.code = code + # The name of the API destination. + self.api_destination_name = api_destination_name + # The returned message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.api_destination_name is not None: + result['apiDestinationName'] = self.api_destination_name + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('apiDestinationName') is not None: + self.api_destination_name = m.get('apiDestinationName') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class CreateApiDestinationResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: CreateApiDestinationResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = CreateApiDestinationResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class UpdateApiDestinationRequestHttpApiParametersApiParameters(TeaModel): + def __init__( + self, + name: str = None, + description: str = None, + type: str = None, + default_value: str = None, + in_: str = None, + ): + self.name = name + # The description of the API destination. The description can be up to 255 characters in length. + self.description = description + self.type = type + self.default_value = default_value + self.in_ = in_ + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.name is not None: + result['name'] = self.name + if self.description is not None: + result['description'] = self.description + if self.type is not None: + result['type'] = self.type + if self.default_value is not None: + result['defaultValue'] = self.default_value + if self.in_ is not None: + result['in'] = self.in_ + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('name') is not None: + self.name = m.get('name') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('type') is not None: + self.type = m.get('type') + if m.get('defaultValue') is not None: + self.default_value = m.get('defaultValue') + if m.get('in') is not None: + self.in_ = m.get('in') + return self + + +class UpdateApiDestinationRequestHttpApiParameters(TeaModel): + def __init__( + self, + endpoint: str = None, + method: str = None, + api_parameters: List[UpdateApiDestinationRequestHttpApiParametersApiParameters] = None, + ): + # The endpoint of the API destination. The endpoint can be up to 127 characters in length. This parameter is required. + self.endpoint = endpoint + # The HTTP request method. Valid values: + # + # + # * GET + # + # * POST + # + # * HEAD + # + # * DELETE + # + # * PUT + # + # * PATCH + # + # + # This parameter is required. + self.method = method + # TODO + self.api_parameters = api_parameters + + def validate(self): + if self.api_parameters: + for k in self.api_parameters: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.endpoint is not None: + result['endpoint'] = self.endpoint + if self.method is not None: + result['method'] = self.method + result['apiParameters'] = [] + if self.api_parameters is not None: + for k in self.api_parameters: + result['apiParameters'].append(k.to_map() if k else None) + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('endpoint') is not None: + self.endpoint = m.get('endpoint') + if m.get('method') is not None: + self.method = m.get('method') + self.api_parameters = [] + if m.get('apiParameters') is not None: + for k in m.get('apiParameters'): + temp_model = UpdateApiDestinationRequestHttpApiParametersApiParameters() + self.api_parameters.append(temp_model.from_map(k)) + return self + + +class UpdateApiDestinationRequest(TeaModel): + def __init__( + self, + api_destination_name: str = None, + connection_name: str = None, + description: str = None, + http_api_parameters: UpdateApiDestinationRequestHttpApiParameters = None, + invocation_rate_limit_per_second: int = None, + ): + # The name of the API destination. The name must be 2 to 127 characters in length. This parameter is required. + self.api_destination_name = api_destination_name + # The name of the connection. The name must be 2 to 127 characters in length. Before you configure this parameter, you must call the CreateConnection operation to create a connection. Then, set this parameter to the name of the connection that you created. This parameter is required. + self.connection_name = connection_name + # The description of the API destination. The description can be up to 255 characters in length. + self.description = description + # The parameters that are configured for the API destination. This parameter is required. + self.http_api_parameters = http_api_parameters + # TODO + self.invocation_rate_limit_per_second = invocation_rate_limit_per_second + + def validate(self): + if self.http_api_parameters: + self.http_api_parameters.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.api_destination_name is not None: + result['apiDestinationName'] = self.api_destination_name + if self.connection_name is not None: + result['connectionName'] = self.connection_name + if self.description is not None: + result['description'] = self.description + if self.http_api_parameters is not None: + result['httpApiParameters'] = self.http_api_parameters.to_map() + if self.invocation_rate_limit_per_second is not None: + result['invocationRateLimitPerSecond'] = self.invocation_rate_limit_per_second + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('apiDestinationName') is not None: + self.api_destination_name = m.get('apiDestinationName') + if m.get('connectionName') is not None: + self.connection_name = m.get('connectionName') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('httpApiParameters') is not None: + temp_model = UpdateApiDestinationRequestHttpApiParameters() + self.http_api_parameters = temp_model.from_map(m['httpApiParameters']) + if m.get('invocationRateLimitPerSecond') is not None: + self.invocation_rate_limit_per_second = m.get('invocationRateLimitPerSecond') + return self + + +class UpdateApiDestinationResponseBody(TeaModel): + def __init__( + self, + code: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. The value Success indicates that the request is successful. + self.code = code + # The returned message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class UpdateApiDestinationResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: UpdateApiDestinationResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = UpdateApiDestinationResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class GetApiDestinationRequest(TeaModel): + def __init__( + self, + api_destination_name: str = None, + ): + # The name of the API destination. This parameter is required. + self.api_destination_name = api_destination_name + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.api_destination_name is not None: + result['apiDestinationName'] = self.api_destination_name + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('apiDestinationName') is not None: + self.api_destination_name = m.get('apiDestinationName') + return self + + +class GetApiDestinationResponseBodyHttpApiParametersApiParameters(TeaModel): + def __init__( + self, + name: str = None, + description: str = None, + type: str = None, + default_value: str = None, + in_: str = None, + ): + self.name = name + # The description of the API destination. The description can be up to 255 characters in length. + self.description = description + self.type = type + self.default_value = default_value + self.in_ = in_ + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.name is not None: + result['name'] = self.name + if self.description is not None: + result['description'] = self.description + if self.type is not None: + result['type'] = self.type + if self.default_value is not None: + result['defaultValue'] = self.default_value + if self.in_ is not None: + result['in'] = self.in_ + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('name') is not None: + self.name = m.get('name') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('type') is not None: + self.type = m.get('type') + if m.get('defaultValue') is not None: + self.default_value = m.get('defaultValue') + if m.get('in') is not None: + self.in_ = m.get('in') + return self + + +class GetApiDestinationResponseBodyHttpApiParameters(TeaModel): + def __init__( + self, + endpoint: str = None, + method: str = None, + api_parameters: List[GetApiDestinationResponseBodyHttpApiParametersApiParameters] = None, + ): + # The endpoint of the API destination. + self.endpoint = endpoint + # The HTTP request method. Valid values: + # + # - POST + # + # - GET + # + # - DELETE + # + # - PUT + # + # - HEAD + # + # - TRACE + # + # - PATCH + self.method = method + # TODO + self.api_parameters = api_parameters + + def validate(self): + if self.api_parameters: + for k in self.api_parameters: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.endpoint is not None: + result['endpoint'] = self.endpoint + if self.method is not None: + result['method'] = self.method + result['apiParameters'] = [] + if self.api_parameters is not None: + for k in self.api_parameters: + result['apiParameters'].append(k.to_map() if k else None) + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('endpoint') is not None: + self.endpoint = m.get('endpoint') + if m.get('method') is not None: + self.method = m.get('method') + self.api_parameters = [] + if m.get('apiParameters') is not None: + for k in m.get('apiParameters'): + temp_model = GetApiDestinationResponseBodyHttpApiParametersApiParameters() + self.api_parameters.append(temp_model.from_map(k)) + return self + + +class GetApiDestinationResponseBody(TeaModel): + def __init__( + self, + code: str = None, + api_destination_name: str = None, + connection_name: str = None, + description: str = None, + gmt_create: int = None, + http_api_parameters: GetApiDestinationResponseBodyHttpApiParameters = None, + invocation_rate_limit_per_second: int = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. The value Success indicates that the request is successful. + self.code = code + # The name of the API destination. + self.api_destination_name = api_destination_name + # The connection name. + self.connection_name = connection_name + # The description of the connection. + self.description = description + # The time when the API destination was created. + self.gmt_create = gmt_create + # The request parameters that are configured for the API destination. + self.http_api_parameters = http_api_parameters + # TODO + self.invocation_rate_limit_per_second = invocation_rate_limit_per_second + # The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + if self.http_api_parameters: + self.http_api_parameters.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.api_destination_name is not None: + result['apiDestinationName'] = self.api_destination_name + if self.connection_name is not None: + result['connectionName'] = self.connection_name + if self.description is not None: + result['description'] = self.description + if self.gmt_create is not None: + result['gmtCreate'] = self.gmt_create + if self.http_api_parameters is not None: + result['httpApiParameters'] = self.http_api_parameters.to_map() + if self.invocation_rate_limit_per_second is not None: + result['invocationRateLimitPerSecond'] = self.invocation_rate_limit_per_second + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('apiDestinationName') is not None: + self.api_destination_name = m.get('apiDestinationName') + if m.get('connectionName') is not None: + self.connection_name = m.get('connectionName') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('gmtCreate') is not None: + self.gmt_create = m.get('gmtCreate') + if m.get('httpApiParameters') is not None: + temp_model = GetApiDestinationResponseBodyHttpApiParameters() + self.http_api_parameters = temp_model.from_map(m['httpApiParameters']) + if m.get('invocationRateLimitPerSecond') is not None: + self.invocation_rate_limit_per_second = m.get('invocationRateLimitPerSecond') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class GetApiDestinationResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: GetApiDestinationResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = GetApiDestinationResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class DeleteApiDestinationRequest(TeaModel): + def __init__( + self, + api_destination_name: str = None, + ): + # The name of the API destination. This parameter is required. + self.api_destination_name = api_destination_name + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.api_destination_name is not None: + result['apiDestinationName'] = self.api_destination_name + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('apiDestinationName') is not None: + self.api_destination_name = m.get('apiDestinationName') + return self + + +class DeleteApiDestinationResponseBody(TeaModel): + def __init__( + self, + code: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. The value Success indicates that the request is successful. + self.code = code + # The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class DeleteApiDestinationResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: DeleteApiDestinationResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = DeleteApiDestinationResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class ListApiDestinationsRequest(TeaModel): + def __init__( + self, + api_destination_name_prefix: str = None, + connection_name: str = None, + max_results: int = None, + next_token: str = None, + ): + # The prefix of the API destination name. + self.api_destination_name_prefix = api_destination_name_prefix + # The connection name. + self.connection_name = connection_name + # The maximum number of entries to be returned in a call. You can use this parameter and NextToken to implement paging. + # + # * Default value: 10. + self.max_results = max_results + # If you set Limit and excess return values exist, this parameter is returned. + # + # * Default value: 0. + self.next_token = next_token + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.api_destination_name_prefix is not None: + result['apiDestinationNamePrefix'] = self.api_destination_name_prefix + if self.connection_name is not None: + result['connectionName'] = self.connection_name + if self.max_results is not None: + result['maxResults'] = self.max_results + if self.next_token is not None: + result['nextToken'] = self.next_token + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('apiDestinationNamePrefix') is not None: + self.api_destination_name_prefix = m.get('apiDestinationNamePrefix') + if m.get('connectionName') is not None: + self.connection_name = m.get('connectionName') + if m.get('maxResults') is not None: + self.max_results = m.get('maxResults') + if m.get('nextToken') is not None: + self.next_token = m.get('nextToken') + return self + + +class ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters(TeaModel): + def __init__( + self, + name: str = None, + description: str = None, + type: str = None, + default_value: str = None, + in_: str = None, + ): + self.name = name + # The description of the API destination. The description can be up to 255 characters in length. + self.description = description + self.type = type + self.default_value = default_value + self.in_ = in_ + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.name is not None: + result['name'] = self.name + if self.description is not None: + result['description'] = self.description + if self.type is not None: + result['type'] = self.type + if self.default_value is not None: + result['defaultValue'] = self.default_value + if self.in_ is not None: + result['in'] = self.in_ + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('name') is not None: + self.name = m.get('name') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('type') is not None: + self.type = m.get('type') + if m.get('defaultValue') is not None: + self.default_value = m.get('defaultValue') + if m.get('in') is not None: + self.in_ = m.get('in') + return self + + +class ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters(TeaModel): + def __init__( + self, + endpoint: str = None, + method: str = None, + api_parameters: List[ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters] = None, + ): + # The endpoint of the API destination. + self.endpoint = endpoint + # The HTTP request method. Valid values: + # + # - POST + # + # - GET + # + # - DELETE + # + # - PUT + # + # - HEAD + # + # - TRACE + # + # - PATCH + self.method = method + # TODO + self.api_parameters = api_parameters + + def validate(self): + if self.api_parameters: + for k in self.api_parameters: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.endpoint is not None: + result['endpoint'] = self.endpoint + if self.method is not None: + result['method'] = self.method + result['apiParameters'] = [] + if self.api_parameters is not None: + for k in self.api_parameters: + result['apiParameters'].append(k.to_map() if k else None) + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('endpoint') is not None: + self.endpoint = m.get('endpoint') + if m.get('method') is not None: + self.method = m.get('method') + self.api_parameters = [] + if m.get('apiParameters') is not None: + for k in m.get('apiParameters'): + temp_model = ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters() + self.api_parameters.append(temp_model.from_map(k)) + return self + + +class ListApiDestinationsResponseBodyApiDestinations(TeaModel): + def __init__( + self, + api_destination_name: str = None, + connection_name: str = None, + description: str = None, + gmt_create: int = None, + http_api_parameters: ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters = None, + invocation_rate_limit_per_second: int = None, + ): + # The name of the API destination. + self.api_destination_name = api_destination_name + # The connection name. + self.connection_name = connection_name + # The description of the connection. + self.description = description + # The time when the API destination was created. + self.gmt_create = gmt_create + # The request parameters that are configured for the API destination. + self.http_api_parameters = http_api_parameters + # TODO + self.invocation_rate_limit_per_second = invocation_rate_limit_per_second + + def validate(self): + if self.http_api_parameters: + self.http_api_parameters.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.api_destination_name is not None: + result['apiDestinationName'] = self.api_destination_name + if self.connection_name is not None: + result['connectionName'] = self.connection_name + if self.description is not None: + result['description'] = self.description + if self.gmt_create is not None: + result['gmtCreate'] = self.gmt_create + if self.http_api_parameters is not None: + result['httpApiParameters'] = self.http_api_parameters.to_map() + if self.invocation_rate_limit_per_second is not None: + result['invocationRateLimitPerSecond'] = self.invocation_rate_limit_per_second + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('apiDestinationName') is not None: + self.api_destination_name = m.get('apiDestinationName') + if m.get('connectionName') is not None: + self.connection_name = m.get('connectionName') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('gmtCreate') is not None: + self.gmt_create = m.get('gmtCreate') + if m.get('httpApiParameters') is not None: + temp_model = ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters() + self.http_api_parameters = temp_model.from_map(m['httpApiParameters']) + if m.get('invocationRateLimitPerSecond') is not None: + self.invocation_rate_limit_per_second = m.get('invocationRateLimitPerSecond') + return self + + +class ListApiDestinationsResponseBody(TeaModel): + def __init__( + self, + code: str = None, + api_destinations: List[ListApiDestinationsResponseBodyApiDestinations] = None, + max_results: int = None, + next_token: str = None, + total: int = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. The value Success indicates that the request is successful. + self.code = code + # The API destinations. + self.api_destinations = api_destinations + # The maximum number of entries returned per page. + self.max_results = max_results + # If excess return values exist, this parameter is returned. + self.next_token = next_token + # The total number of entries returned. + self.total = total + # The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + if self.api_destinations: + for k in self.api_destinations: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + result['apiDestinations'] = [] + if self.api_destinations is not None: + for k in self.api_destinations: + result['apiDestinations'].append(k.to_map() if k else None) + if self.max_results is not None: + result['maxResults'] = self.max_results + if self.next_token is not None: + result['nextToken'] = self.next_token + if self.total is not None: + result['total'] = self.total + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + self.api_destinations = [] + if m.get('apiDestinations') is not None: + for k in m.get('apiDestinations'): + temp_model = ListApiDestinationsResponseBodyApiDestinations() + self.api_destinations.append(temp_model.from_map(k)) + if m.get('maxResults') is not None: + self.max_results = m.get('maxResults') + if m.get('nextToken') is not None: + self.next_token = m.get('nextToken') + if m.get('total') is not None: + self.total = m.get('total') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class ListApiDestinationsResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: ListApiDestinationsResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = ListApiDestinationsResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class CreateConnectionRequestAuthParametersApiKeyAuthParameters(TeaModel): + def __init__( + self, + api_key_name: str = None, + api_key_value: str = None, + ): + # The key of the API key. + self.api_key_name = api_key_name + # The value of the API key. + self.api_key_value = api_key_value + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.api_key_name is not None: + result['apiKeyName'] = self.api_key_name + if self.api_key_value is not None: + result['apiKeyValue'] = self.api_key_value + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('apiKeyName') is not None: + self.api_key_name = m.get('apiKeyName') + if m.get('apiKeyValue') is not None: + self.api_key_value = m.get('apiKeyValue') + return self + + +class CreateConnectionRequestAuthParametersBasicAuthParameters(TeaModel): + def __init__( + self, + password: str = None, + username: str = None, + ): + # The password for basic authentication. + self.password = password + # The username for basic authentication. + self.username = username + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.password is not None: + result['password'] = self.password + if self.username is not None: + result['username'] = self.username + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('password') is not None: + self.password = m.get('password') + if m.get('username') is not None: + self.username = m.get('username') + return self + + +class CreateConnectionRequestAuthParametersOauthParametersClientParameters(TeaModel): + def __init__( + self, + client_id: str = None, + client_secret: str = None, + ): + # The client ID. + self.client_id = client_id + # The client key secret of the application. + self.client_secret = client_secret + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.client_id is not None: + result['clientID'] = self.client_id + if self.client_secret is not None: + result['clientSecret'] = self.client_secret + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('clientID') is not None: + self.client_id = m.get('clientID') + if m.get('clientSecret') is not None: + self.client_secret = m.get('clientSecret') + return self + + +class CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters(TeaModel): + def __init__( + self, + is_value_secret: str = None, + key: str = None, + value: str = None, + ): + # Indicates whether authentication is enabled. + self.is_value_secret = is_value_secret + # The key in the request body. + self.key = key + # The value of the key in the request body. + self.value = value + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.is_value_secret is not None: + result['isValueSecret'] = self.is_value_secret + if self.key is not None: + result['key'] = self.key + if self.value is not None: + result['value'] = self.value + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('isValueSecret') is not None: + self.is_value_secret = m.get('isValueSecret') + if m.get('key') is not None: + self.key = m.get('key') + if m.get('value') is not None: + self.value = m.get('value') + return self + + +class CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters(TeaModel): + def __init__( + self, + is_value_secret: str = None, + key: str = None, + value: str = None, + ): + # Indicates whether authentication is enabled. + self.is_value_secret = is_value_secret + # The key in the request header. + self.key = key + # The value of the key in the request header. + self.value = value + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.is_value_secret is not None: + result['isValueSecret'] = self.is_value_secret + if self.key is not None: + result['key'] = self.key + if self.value is not None: + result['value'] = self.value + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('isValueSecret') is not None: + self.is_value_secret = m.get('isValueSecret') + if m.get('key') is not None: + self.key = m.get('key') + if m.get('value') is not None: + self.value = m.get('value') + return self + + +class CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters(TeaModel): + def __init__( + self, + is_value_secret: str = None, + key: str = None, + value: str = None, + ): + # Indicates whether authentication is enabled. + self.is_value_secret = is_value_secret + # The key in the request path. + self.key = key + # The value of the key in the request path. + self.value = value + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.is_value_secret is not None: + result['isValueSecret'] = self.is_value_secret + if self.key is not None: + result['key'] = self.key + if self.value is not None: + result['value'] = self.value + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('isValueSecret') is not None: + self.is_value_secret = m.get('isValueSecret') + if m.get('key') is not None: + self.key = m.get('key') + if m.get('value') is not None: + self.value = m.get('value') + return self + + +class CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters(TeaModel): + def __init__( + self, + body_parameters: List[CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters] = None, + header_parameters: List[CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters] = None, + query_string_parameters: List[CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters] = None, + ): + # The parameters that are configured for the request. + self.body_parameters = body_parameters + # The parameters that are configured for the request header. + self.header_parameters = header_parameters + # The parameters that are configured for the request path. + self.query_string_parameters = query_string_parameters + + def validate(self): + if self.body_parameters: + for k in self.body_parameters: + if k: + k.validate() + if self.header_parameters: + for k in self.header_parameters: + if k: + k.validate() + if self.query_string_parameters: + for k in self.query_string_parameters: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + result['bodyParameters'] = [] + if self.body_parameters is not None: + for k in self.body_parameters: + result['bodyParameters'].append(k.to_map() if k else None) + result['headerParameters'] = [] + if self.header_parameters is not None: + for k in self.header_parameters: + result['headerParameters'].append(k.to_map() if k else None) + result['queryStringParameters'] = [] + if self.query_string_parameters is not None: + for k in self.query_string_parameters: + result['queryStringParameters'].append(k.to_map() if k else None) + return result + + def from_map(self, m: dict = None): + m = m or dict() + self.body_parameters = [] + if m.get('bodyParameters') is not None: + for k in m.get('bodyParameters'): + temp_model = CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters() + self.body_parameters.append(temp_model.from_map(k)) + self.header_parameters = [] + if m.get('headerParameters') is not None: + for k in m.get('headerParameters'): + temp_model = CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters() + self.header_parameters.append(temp_model.from_map(k)) + self.query_string_parameters = [] + if m.get('queryStringParameters') is not None: + for k in m.get('queryStringParameters'): + temp_model = CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters() + self.query_string_parameters.append(temp_model.from_map(k)) + return self + + +class CreateConnectionRequestAuthParametersOauthParameters(TeaModel): + def __init__( + self, + authorization_endpoint: str = None, + client_parameters: CreateConnectionRequestAuthParametersOauthParametersClientParameters = None, + http_method: str = None, + oauth_http_parameters: CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters = None, + ): + # The endpoint that is used to obtain the OAuth token. + self.authorization_endpoint = authorization_endpoint + # The parameters that are configured for the client. + self.client_parameters = client_parameters + # The HTTP request method. Valid values: + # + # - GET + # + # - POST + # + # - HEAD + self.http_method = http_method + # The request parameters for OAuth authentication. + self.oauth_http_parameters = oauth_http_parameters + + def validate(self): + if self.client_parameters: + self.client_parameters.validate() + if self.oauth_http_parameters: + self.oauth_http_parameters.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.authorization_endpoint is not None: + result['authorizationEndpoint'] = self.authorization_endpoint + if self.client_parameters is not None: + result['clientParameters'] = self.client_parameters.to_map() + if self.http_method is not None: + result['httpMethod'] = self.http_method + if self.oauth_http_parameters is not None: + result['oauthHttpParameters'] = self.oauth_http_parameters.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('authorizationEndpoint') is not None: + self.authorization_endpoint = m.get('authorizationEndpoint') + if m.get('clientParameters') is not None: + temp_model = CreateConnectionRequestAuthParametersOauthParametersClientParameters() + self.client_parameters = temp_model.from_map(m['clientParameters']) + if m.get('httpMethod') is not None: + self.http_method = m.get('httpMethod') + if m.get('oauthHttpParameters') is not None: + temp_model = CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters() + self.oauth_http_parameters = temp_model.from_map(m['oauthHttpParameters']) + return self + + +class CreateConnectionRequestAuthParameters(TeaModel): + def __init__( + self, + api_key_auth_parameters: CreateConnectionRequestAuthParametersApiKeyAuthParameters = None, + authorization_type: str = None, + basic_auth_parameters: CreateConnectionRequestAuthParametersBasicAuthParameters = None, + oauth_parameters: CreateConnectionRequestAuthParametersOauthParameters = None, + ): + # The parameters that are configured for API key authentication. + self.api_key_auth_parameters = api_key_auth_parameters + # The authentication type. Valid values: + # + # BASIC_AUTH: basic authentication. + # + # Introduction: Basic authentication is a simple authentication scheme built into the HTTP protocol. When you use the HTTP protocol for communications, the authentication method that the HTTP server uses to authenticate user identities on the client is defined in the protocol. The request header is in the Authorization: Basic Base64-encoded string (Username:Password) format. + # + # 1. Username and Password are required + # + # API_KEY_AUTH: API key authentication. + # + # Introduction: The request header is in the Token: Token value format. + # + # * ApiKeyName and ApiKeyValue are required. + # + # OAUTH_AUTH: OAuth authentication. + # + # Introduction: OAuth2.0 is an authentication mechanism. In normal cases, a system that does not use OAuth2.0 can access the resources of the server from the client. To ensure access security, access tokens are used to authenticate users in OAuth 2.0. The client must use an access token to access protected resources. This way, OAuth 2.0 protects resources from being accessed from malicious clients and improves system security. + # + # * AuthorizationEndpoint, OAuthHttpParameters, and HttpMethod are required. + self.authorization_type = authorization_type + # The parameters that are configured for basic authentication. + self.basic_auth_parameters = basic_auth_parameters + # The parameters that are configured for OAuth authentication. + self.oauth_parameters = oauth_parameters + + def validate(self): + if self.api_key_auth_parameters: + self.api_key_auth_parameters.validate() + if self.basic_auth_parameters: + self.basic_auth_parameters.validate() + if self.oauth_parameters: + self.oauth_parameters.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.api_key_auth_parameters is not None: + result['apiKeyAuthParameters'] = self.api_key_auth_parameters.to_map() + if self.authorization_type is not None: + result['authorizationType'] = self.authorization_type + if self.basic_auth_parameters is not None: + result['basicAuthParameters'] = self.basic_auth_parameters.to_map() + if self.oauth_parameters is not None: + result['oauthParameters'] = self.oauth_parameters.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('apiKeyAuthParameters') is not None: + temp_model = CreateConnectionRequestAuthParametersApiKeyAuthParameters() + self.api_key_auth_parameters = temp_model.from_map(m['apiKeyAuthParameters']) + if m.get('authorizationType') is not None: + self.authorization_type = m.get('authorizationType') + if m.get('basicAuthParameters') is not None: + temp_model = CreateConnectionRequestAuthParametersBasicAuthParameters() + self.basic_auth_parameters = temp_model.from_map(m['basicAuthParameters']) + if m.get('oauthParameters') is not None: + temp_model = CreateConnectionRequestAuthParametersOauthParameters() + self.oauth_parameters = temp_model.from_map(m['oauthParameters']) + return self + + +class CreateConnectionRequestNetworkParameters(TeaModel): + def __init__( + self, + network_type: str = None, + security_group_id: str = None, + vpc_id: str = None, + vswitche_id: str = None, + ): + # The network type. Valid values: + # + # PublicNetwork and PrivateNetwork. + # + # * Note: If you set this parameter to PrivateNetwork, you must configure VpcId, VswitcheId, and SecurityGroupId. + # + # This parameter is required. + self.network_type = network_type + # The ID of the security group. + self.security_group_id = security_group_id + # The VPC. ID + self.vpc_id = vpc_id + # The vSwitch ID. + self.vswitche_id = vswitche_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.network_type is not None: + result['networkType'] = self.network_type + if self.security_group_id is not None: + result['securityGroupId'] = self.security_group_id + if self.vpc_id is not None: + result['vpcId'] = self.vpc_id + if self.vswitche_id is not None: + result['vswitcheId'] = self.vswitche_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('networkType') is not None: + self.network_type = m.get('networkType') + if m.get('securityGroupId') is not None: + self.security_group_id = m.get('securityGroupId') + if m.get('vpcId') is not None: + self.vpc_id = m.get('vpcId') + if m.get('vswitcheId') is not None: + self.vswitche_id = m.get('vswitcheId') + return self + + +class CreateConnectionRequest(TeaModel): + """ + Connection Controller apis: + * createConnection *\ + * deleteConnection *\ + * updateConnection *\ + * getConnection *\ + * selectOneConnection *\ + * listConnections *\ + * listEnumsResponse *\ + """ + def __init__( + self, + auth_parameters: CreateConnectionRequestAuthParameters = None, + connection_name: str = None, + description: str = None, + network_parameters: CreateConnectionRequestNetworkParameters = None, + ): + # The parameters that are configured for authentication. + self.auth_parameters = auth_parameters + # The name of the connection. The name must be 2 to 127 characters in length. + # + # This parameter is required. + self.connection_name = connection_name + # The description of the connection. The description can be up to 255 characters in length. + self.description = description + # The parameters that are configured for the network. This parameter is required. + self.network_parameters = network_parameters + + def validate(self): + if self.auth_parameters: + self.auth_parameters.validate() + if self.network_parameters: + self.network_parameters.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.auth_parameters is not None: + result['authParameters'] = self.auth_parameters.to_map() + if self.connection_name is not None: + result['connectionName'] = self.connection_name + if self.description is not None: + result['description'] = self.description + if self.network_parameters is not None: + result['networkParameters'] = self.network_parameters.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('authParameters') is not None: + temp_model = CreateConnectionRequestAuthParameters() + self.auth_parameters = temp_model.from_map(m['authParameters']) + if m.get('connectionName') is not None: + self.connection_name = m.get('connectionName') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('networkParameters') is not None: + temp_model = CreateConnectionRequestNetworkParameters() + self.network_parameters = temp_model.from_map(m['networkParameters']) + return self + + +class CreateConnectionResponseBody(TeaModel): + def __init__( + self, + code: str = None, + connection_name: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. The value Success indicates that the request is successful. + self.code = code + # The connection name. + self.connection_name = connection_name + # The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.connection_name is not None: + result['connectionName'] = self.connection_name + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('connectionName') is not None: + self.connection_name = m.get('connectionName') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class CreateConnectionResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: CreateConnectionResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = CreateConnectionResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class DeleteConnectionRequest(TeaModel): + def __init__( + self, + connection_name: str = None, + ): + # The name of the connection that you want to delete. This parameter is required. + self.connection_name = connection_name + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.connection_name is not None: + result['connectionName'] = self.connection_name + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('connectionName') is not None: + self.connection_name = m.get('connectionName') + return self + + +class DeleteConnectionResponseBody(TeaModel): + def __init__( + self, + code: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. The value Success indicates that the request is successful. + self.code = code + # The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class DeleteConnectionResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: DeleteConnectionResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = DeleteConnectionResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class UpdateConnectionRequestAuthParametersApiKeyAuthParameters(TeaModel): + def __init__( + self, + api_key_name: str = None, + api_key_value: str = None, + ): + # The key of the API key. + self.api_key_name = api_key_name + # The value of the API key. + self.api_key_value = api_key_value + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.api_key_name is not None: + result['apiKeyName'] = self.api_key_name + if self.api_key_value is not None: + result['apiKeyValue'] = self.api_key_value + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('apiKeyName') is not None: + self.api_key_name = m.get('apiKeyName') + if m.get('apiKeyValue') is not None: + self.api_key_value = m.get('apiKeyValue') + return self + + +class UpdateConnectionRequestAuthParametersBasicAuthParameters(TeaModel): + def __init__( + self, + password: str = None, + username: str = None, + ): + # The password for basic authentication. + self.password = password + # The username for basic authentication. + self.username = username + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.password is not None: + result['password'] = self.password + if self.username is not None: + result['username'] = self.username + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('password') is not None: + self.password = m.get('password') + if m.get('username') is not None: + self.username = m.get('username') + return self + + +class UpdateConnectionRequestAuthParametersOauthParametersClientParameters(TeaModel): + def __init__( + self, + client_id: str = None, + client_secret: str = None, + ): + # The client ID. + self.client_id = client_id + # The client key secret of the application. + self.client_secret = client_secret + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.client_id is not None: + result['clientID'] = self.client_id + if self.client_secret is not None: + result['clientSecret'] = self.client_secret + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('clientID') is not None: + self.client_id = m.get('clientID') + if m.get('clientSecret') is not None: + self.client_secret = m.get('clientSecret') + return self + + +class UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters(TeaModel): + def __init__( + self, + is_value_secret: str = None, + key: str = None, + value: str = None, + ): + # Indicates whether authentication is enabled. + self.is_value_secret = is_value_secret + # The key in the request body. + self.key = key + # The value of the key in the request body. + self.value = value + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.is_value_secret is not None: + result['isValueSecret'] = self.is_value_secret + if self.key is not None: + result['key'] = self.key + if self.value is not None: + result['value'] = self.value + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('isValueSecret') is not None: + self.is_value_secret = m.get('isValueSecret') + if m.get('key') is not None: + self.key = m.get('key') + if m.get('value') is not None: + self.value = m.get('value') + return self + + +class UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters(TeaModel): + def __init__( + self, + is_value_secret: str = None, + key: str = None, + value: str = None, + ): + # Indicates whether authentication is enabled. + self.is_value_secret = is_value_secret + # The key in the request header. + self.key = key + # The value of the key in the request header. + self.value = value + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.is_value_secret is not None: + result['isValueSecret'] = self.is_value_secret + if self.key is not None: + result['key'] = self.key + if self.value is not None: + result['value'] = self.value + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('isValueSecret') is not None: + self.is_value_secret = m.get('isValueSecret') + if m.get('key') is not None: + self.key = m.get('key') + if m.get('value') is not None: + self.value = m.get('value') + return self + + +class UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters(TeaModel): + def __init__( + self, + is_value_secret: str = None, + key: str = None, + value: str = None, + ): + # Indicates whether authentication is enabled. + self.is_value_secret = is_value_secret + # The key in the request path. + self.key = key + # The value of the key in the request path. + self.value = value + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.is_value_secret is not None: + result['isValueSecret'] = self.is_value_secret + if self.key is not None: + result['key'] = self.key + if self.value is not None: + result['value'] = self.value + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('isValueSecret') is not None: + self.is_value_secret = m.get('isValueSecret') + if m.get('key') is not None: + self.key = m.get('key') + if m.get('value') is not None: + self.value = m.get('value') + return self + + +class UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters(TeaModel): + def __init__( + self, + body_parameters: List[UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters] = None, + header_parameters: List[UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters] = None, + query_string_parameters: List[UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters] = None, + ): + # The parameters that are configured for the request. + self.body_parameters = body_parameters + # The parameters that are configured for the request header. + self.header_parameters = header_parameters + # The parameters that are configured for the request path. + self.query_string_parameters = query_string_parameters + + def validate(self): + if self.body_parameters: + for k in self.body_parameters: + if k: + k.validate() + if self.header_parameters: + for k in self.header_parameters: + if k: + k.validate() + if self.query_string_parameters: + for k in self.query_string_parameters: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + result['bodyParameters'] = [] + if self.body_parameters is not None: + for k in self.body_parameters: + result['bodyParameters'].append(k.to_map() if k else None) + result['headerParameters'] = [] + if self.header_parameters is not None: + for k in self.header_parameters: + result['headerParameters'].append(k.to_map() if k else None) + result['queryStringParameters'] = [] + if self.query_string_parameters is not None: + for k in self.query_string_parameters: + result['queryStringParameters'].append(k.to_map() if k else None) + return result + + def from_map(self, m: dict = None): + m = m or dict() + self.body_parameters = [] + if m.get('bodyParameters') is not None: + for k in m.get('bodyParameters'): + temp_model = UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters() + self.body_parameters.append(temp_model.from_map(k)) + self.header_parameters = [] + if m.get('headerParameters') is not None: + for k in m.get('headerParameters'): + temp_model = UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters() + self.header_parameters.append(temp_model.from_map(k)) + self.query_string_parameters = [] + if m.get('queryStringParameters') is not None: + for k in m.get('queryStringParameters'): + temp_model = UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters() + self.query_string_parameters.append(temp_model.from_map(k)) + return self + + +class UpdateConnectionRequestAuthParametersOauthParameters(TeaModel): + def __init__( + self, + authorization_endpoint: str = None, + client_parameters: UpdateConnectionRequestAuthParametersOauthParametersClientParameters = None, + http_method: str = None, + oauth_http_parameters: UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters = None, + ): + # The endpoint that is used to obtain the OAuth token. + self.authorization_endpoint = authorization_endpoint + # The parameters that are configured for the client. + self.client_parameters = client_parameters + # The HTTP request method. Valid values: + # + # - GET + # + # - POST + # + # - HEAD + self.http_method = http_method + # The request parameters for OAuth authentication. + self.oauth_http_parameters = oauth_http_parameters + + def validate(self): + if self.client_parameters: + self.client_parameters.validate() + if self.oauth_http_parameters: + self.oauth_http_parameters.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.authorization_endpoint is not None: + result['authorizationEndpoint'] = self.authorization_endpoint + if self.client_parameters is not None: + result['clientParameters'] = self.client_parameters.to_map() + if self.http_method is not None: + result['httpMethod'] = self.http_method + if self.oauth_http_parameters is not None: + result['oauthHttpParameters'] = self.oauth_http_parameters.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('authorizationEndpoint') is not None: + self.authorization_endpoint = m.get('authorizationEndpoint') + if m.get('clientParameters') is not None: + temp_model = UpdateConnectionRequestAuthParametersOauthParametersClientParameters() + self.client_parameters = temp_model.from_map(m['clientParameters']) + if m.get('httpMethod') is not None: + self.http_method = m.get('httpMethod') + if m.get('oauthHttpParameters') is not None: + temp_model = UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters() + self.oauth_http_parameters = temp_model.from_map(m['oauthHttpParameters']) + return self + + +class UpdateConnectionRequestAuthParameters(TeaModel): + def __init__( + self, + api_key_auth_parameters: UpdateConnectionRequestAuthParametersApiKeyAuthParameters = None, + authorization_type: str = None, + basic_auth_parameters: UpdateConnectionRequestAuthParametersBasicAuthParameters = None, + oauth_parameters: UpdateConnectionRequestAuthParametersOauthParameters = None, + ): + # The parameters that are configured for API key authentication. + self.api_key_auth_parameters = api_key_auth_parameters + # The authentication type. Valid values: + # + # BASIC_AUTH: basic authentication. + # + # Introduction: Basic authentication is a simple authentication scheme built into the HTTP protocol. When you use the HTTP protocol for communications, the authentication method that the HTTP server uses to authenticate user identities on the client is defined in the protocol. The request header is in the Authorization: Basic Base64-encoded string (Username:Password) format. + # + # 1. Username and Password are required + # + # API_KEY_AUTH: API key authentication. + # + # Introduction: The request header is in the Token: Token value format. + # + # * ApiKeyName and ApiKeyValue are required. + # + # OAUTH_AUTH: OAuth authentication. + # + # Introduction: OAuth2.0 is an authentication mechanism. In normal cases, a system that does not use OAuth2.0 can access the resources of the server from the client. To ensure access security, access tokens are used to authenticate users in OAuth 2.0. The client must use an access token to access protected resources. This way, OAuth 2.0 protects resources from being accessed from malicious clients and improves system security. + # + # * AuthorizationEndpoint, OAuthHttpParameters, and HttpMethod are required. + self.authorization_type = authorization_type + # The parameters that are configured for basic authentication. + self.basic_auth_parameters = basic_auth_parameters + # The parameters that are configured for OAuth authentication. + self.oauth_parameters = oauth_parameters + + def validate(self): + if self.api_key_auth_parameters: + self.api_key_auth_parameters.validate() + if self.basic_auth_parameters: + self.basic_auth_parameters.validate() + if self.oauth_parameters: + self.oauth_parameters.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.api_key_auth_parameters is not None: + result['apiKeyAuthParameters'] = self.api_key_auth_parameters.to_map() + if self.authorization_type is not None: + result['authorizationType'] = self.authorization_type + if self.basic_auth_parameters is not None: + result['basicAuthParameters'] = self.basic_auth_parameters.to_map() + if self.oauth_parameters is not None: + result['oauthParameters'] = self.oauth_parameters.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('apiKeyAuthParameters') is not None: + temp_model = UpdateConnectionRequestAuthParametersApiKeyAuthParameters() + self.api_key_auth_parameters = temp_model.from_map(m['apiKeyAuthParameters']) + if m.get('authorizationType') is not None: + self.authorization_type = m.get('authorizationType') + if m.get('basicAuthParameters') is not None: + temp_model = UpdateConnectionRequestAuthParametersBasicAuthParameters() + self.basic_auth_parameters = temp_model.from_map(m['basicAuthParameters']) + if m.get('oauthParameters') is not None: + temp_model = UpdateConnectionRequestAuthParametersOauthParameters() + self.oauth_parameters = temp_model.from_map(m['oauthParameters']) + return self + + +class UpdateConnectionRequestNetworkParameters(TeaModel): + def __init__( + self, + network_type: str = None, + security_group_id: str = None, + vpc_id: str = None, + vswitche_id: str = None, + ): + # The network type. Valid values: + # + # PublicNetwork and PrivateNetwork. + # + # * Note: If you set this parameter to PrivateNetwork, you must configure VpcId, VswitcheId, and SecurityGroupId. + # + # This parameter is required. + self.network_type = network_type + # The ID of the security group. + self.security_group_id = security_group_id + # The VPC. ID + self.vpc_id = vpc_id + # The vSwitch ID. + self.vswitche_id = vswitche_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.network_type is not None: + result['networkType'] = self.network_type + if self.security_group_id is not None: + result['securityGroupId'] = self.security_group_id + if self.vpc_id is not None: + result['vpcId'] = self.vpc_id + if self.vswitche_id is not None: + result['vswitcheId'] = self.vswitche_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('networkType') is not None: + self.network_type = m.get('networkType') + if m.get('securityGroupId') is not None: + self.security_group_id = m.get('securityGroupId') + if m.get('vpcId') is not None: + self.vpc_id = m.get('vpcId') + if m.get('vswitcheId') is not None: + self.vswitche_id = m.get('vswitcheId') + return self + + +class UpdateConnectionRequest(TeaModel): + def __init__( + self, + auth_parameters: UpdateConnectionRequestAuthParameters = None, + connection_name: str = None, + description: str = None, + network_parameters: UpdateConnectionRequestNetworkParameters = None, + ): + # The parameters that are configured for authentication. + self.auth_parameters = auth_parameters + # The name of the connection. The name must be 2 to 127 characters in length. + # + # This parameter is required. + self.connection_name = connection_name + # The description of the connection. The description can be up to 255 characters in length. + self.description = description + # The parameters that are configured for the network. This parameter is required. + self.network_parameters = network_parameters + + def validate(self): + if self.auth_parameters: + self.auth_parameters.validate() + if self.network_parameters: + self.network_parameters.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.auth_parameters is not None: + result['authParameters'] = self.auth_parameters.to_map() + if self.connection_name is not None: + result['connectionName'] = self.connection_name + if self.description is not None: + result['description'] = self.description + if self.network_parameters is not None: + result['networkParameters'] = self.network_parameters.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('authParameters') is not None: + temp_model = UpdateConnectionRequestAuthParameters() + self.auth_parameters = temp_model.from_map(m['authParameters']) + if m.get('connectionName') is not None: + self.connection_name = m.get('connectionName') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('networkParameters') is not None: + temp_model = UpdateConnectionRequestNetworkParameters() + self.network_parameters = temp_model.from_map(m['networkParameters']) + return self + + +class UpdateConnectionResponseBody(TeaModel): + def __init__( + self, + code: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. + self.code = code + # The returned message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class UpdateConnectionResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: UpdateConnectionResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = UpdateConnectionResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class GetConnectionRequest(TeaModel): + def __init__( + self, + connection_name: str = None, + ): + # The connection name. This parameter is required. + self.connection_name = connection_name + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.connection_name is not None: + result['connectionName'] = self.connection_name + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('connectionName') is not None: + self.connection_name = m.get('connectionName') + return self + + +class GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters(TeaModel): + def __init__( + self, + api_key_name: str = None, + api_key_value: str = None, + ): + # The API key. + self.api_key_name = api_key_name + # The value of the API key. + self.api_key_value = api_key_value + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.api_key_name is not None: + result['apiKeyName'] = self.api_key_name + if self.api_key_value is not None: + result['apiKeyValue'] = self.api_key_value + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('apiKeyName') is not None: + self.api_key_name = m.get('apiKeyName') + if m.get('apiKeyValue') is not None: + self.api_key_value = m.get('apiKeyValue') + return self + + +class GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters(TeaModel): + def __init__( + self, + password: str = None, + username: str = None, + ): + # The password for basic authentication. + self.password = password + # The username for basic authentication. + self.username = username + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.password is not None: + result['password'] = self.password + if self.username is not None: + result['username'] = self.username + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('password') is not None: + self.password = m.get('password') + if m.get('username') is not None: + self.username = m.get('username') + return self + + +class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters(TeaModel): + def __init__( + self, + client_id: str = None, + client_secret: str = None, + ): + # The client ID. + self.client_id = client_id + # The client key secret of the application. + self.client_secret = client_secret + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.client_id is not None: + result['clientID'] = self.client_id + if self.client_secret is not None: + result['clientSecret'] = self.client_secret + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('clientID') is not None: + self.client_id = m.get('clientID') + if m.get('clientSecret') is not None: + self.client_secret = m.get('clientSecret') + return self + + +class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters(TeaModel): + def __init__( + self, + is_value_secret: str = None, + key: str = None, + value: str = None, + ): + # Indicates whether authentication is enabled. + self.is_value_secret = is_value_secret + # The key in the request body. + self.key = key + # The value of the key in the request body. + self.value = value + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.is_value_secret is not None: + result['isValueSecret'] = self.is_value_secret + if self.key is not None: + result['key'] = self.key + if self.value is not None: + result['value'] = self.value + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('isValueSecret') is not None: + self.is_value_secret = m.get('isValueSecret') + if m.get('key') is not None: + self.key = m.get('key') + if m.get('value') is not None: + self.value = m.get('value') + return self + + +class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters(TeaModel): + def __init__( + self, + is_value_secret: str = None, + key: str = None, + value: str = None, + ): + # Indicates whether authentication is enabled. + self.is_value_secret = is_value_secret + # The key in the request header. + self.key = key + # The value of the key in the request header. + self.value = value + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.is_value_secret is not None: + result['isValueSecret'] = self.is_value_secret + if self.key is not None: + result['key'] = self.key + if self.value is not None: + result['value'] = self.value + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('isValueSecret') is not None: + self.is_value_secret = m.get('isValueSecret') + if m.get('key') is not None: + self.key = m.get('key') + if m.get('value') is not None: + self.value = m.get('value') + return self + + +class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters(TeaModel): + def __init__( + self, + is_value_secret: str = None, + key: str = None, + value: str = None, + ): + # Indicates whether authentication is enabled. + self.is_value_secret = is_value_secret + # The key in the request path. + self.key = key + # The value of the key in the request path. + self.value = value + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.is_value_secret is not None: + result['isValueSecret'] = self.is_value_secret + if self.key is not None: + result['key'] = self.key + if self.value is not None: + result['value'] = self.value + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('isValueSecret') is not None: + self.is_value_secret = m.get('isValueSecret') + if m.get('key') is not None: + self.key = m.get('key') + if m.get('value') is not None: + self.value = m.get('value') + return self + + +class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters(TeaModel): + def __init__( + self, + body_parameters: List[GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters] = None, + header_parameters: List[GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters] = None, + query_string_parameters: List[GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters] = None, + ): + # The parameters that are configured for the request. + self.body_parameters = body_parameters + # The parameters that are configured for the request header. + self.header_parameters = header_parameters + # The parameters that are configured for the request path. + self.query_string_parameters = query_string_parameters + + def validate(self): + if self.body_parameters: + for k in self.body_parameters: + if k: + k.validate() + if self.header_parameters: + for k in self.header_parameters: + if k: + k.validate() + if self.query_string_parameters: + for k in self.query_string_parameters: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + result['bodyParameters'] = [] + if self.body_parameters is not None: + for k in self.body_parameters: + result['bodyParameters'].append(k.to_map() if k else None) + result['headerParameters'] = [] + if self.header_parameters is not None: + for k in self.header_parameters: + result['headerParameters'].append(k.to_map() if k else None) + result['queryStringParameters'] = [] + if self.query_string_parameters is not None: + for k in self.query_string_parameters: + result['queryStringParameters'].append(k.to_map() if k else None) + return result + + def from_map(self, m: dict = None): + m = m or dict() + self.body_parameters = [] + if m.get('bodyParameters') is not None: + for k in m.get('bodyParameters'): + temp_model = GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters() + self.body_parameters.append(temp_model.from_map(k)) + self.header_parameters = [] + if m.get('headerParameters') is not None: + for k in m.get('headerParameters'): + temp_model = GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters() + self.header_parameters.append(temp_model.from_map(k)) + self.query_string_parameters = [] + if m.get('queryStringParameters') is not None: + for k in m.get('queryStringParameters'): + temp_model = GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters() + self.query_string_parameters.append(temp_model.from_map(k)) + return self + + +class GetConnectionResponseBodyConnectionsAuthParametersOauthParameters(TeaModel): + def __init__( + self, + authorization_endpoint: str = None, + client_parameters: GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters = None, + http_method: str = None, + oauth_http_parameters: GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters = None, + ): + # The endpoint that is used to obtain the OAuth token. + self.authorization_endpoint = authorization_endpoint + # The parameters that are configured for the client. + self.client_parameters = client_parameters + # The HTTP request method. Valid values: + # + # - GET + # + # - POST + # + # - HEAD + self.http_method = http_method + # The request parameters for OAuth authentication. + self.oauth_http_parameters = oauth_http_parameters + + def validate(self): + if self.client_parameters: + self.client_parameters.validate() + if self.oauth_http_parameters: + self.oauth_http_parameters.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.authorization_endpoint is not None: + result['authorizationEndpoint'] = self.authorization_endpoint + if self.client_parameters is not None: + result['clientParameters'] = self.client_parameters.to_map() + if self.http_method is not None: + result['httpMethod'] = self.http_method + if self.oauth_http_parameters is not None: + result['oauthHttpParameters'] = self.oauth_http_parameters.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('authorizationEndpoint') is not None: + self.authorization_endpoint = m.get('authorizationEndpoint') + if m.get('clientParameters') is not None: + temp_model = GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters() + self.client_parameters = temp_model.from_map(m['clientParameters']) + if m.get('httpMethod') is not None: + self.http_method = m.get('httpMethod') + if m.get('oauthHttpParameters') is not None: + temp_model = GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters() + self.oauth_http_parameters = temp_model.from_map(m['oauthHttpParameters']) + return self + + +class GetConnectionResponseBodyConnectionsAuthParameters(TeaModel): + def __init__( + self, + api_key_auth_parameters: GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters = None, + authorization_type: str = None, + basic_auth_parameters: GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters = None, + oauth_parameters: GetConnectionResponseBodyConnectionsAuthParametersOauthParameters = None, + ): + # The parameters that are configured for API key authentication. + self.api_key_auth_parameters = api_key_auth_parameters + # The authentication type. Valid values: + # + # + # - BASIC_AUTH: basic authentication. + # + # + # - API_KEY_AUTH: API key authentication. + # + # + # - OAUTH_AUTH: OAuth authentication. + self.authorization_type = authorization_type + # The parameters that are configured for basic authentication. + self.basic_auth_parameters = basic_auth_parameters + # The parameters that are configured for OAuth authentication. + self.oauth_parameters = oauth_parameters + + def validate(self): + if self.api_key_auth_parameters: + self.api_key_auth_parameters.validate() + if self.basic_auth_parameters: + self.basic_auth_parameters.validate() + if self.oauth_parameters: + self.oauth_parameters.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.api_key_auth_parameters is not None: + result['apiKeyAuthParameters'] = self.api_key_auth_parameters.to_map() + if self.authorization_type is not None: + result['authorizationType'] = self.authorization_type + if self.basic_auth_parameters is not None: + result['basicAuthParameters'] = self.basic_auth_parameters.to_map() + if self.oauth_parameters is not None: + result['oauthParameters'] = self.oauth_parameters.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('apiKeyAuthParameters') is not None: + temp_model = GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters() + self.api_key_auth_parameters = temp_model.from_map(m['apiKeyAuthParameters']) + if m.get('authorizationType') is not None: + self.authorization_type = m.get('authorizationType') + if m.get('basicAuthParameters') is not None: + temp_model = GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters() + self.basic_auth_parameters = temp_model.from_map(m['basicAuthParameters']) + if m.get('oauthParameters') is not None: + temp_model = GetConnectionResponseBodyConnectionsAuthParametersOauthParameters() + self.oauth_parameters = temp_model.from_map(m['oauthParameters']) + return self + + +class GetConnectionResponseBodyConnectionsNetworkParameters(TeaModel): + def __init__( + self, + network_type: str = None, + security_group_id: str = None, + vpc_id: str = None, + vswitche_id: str = None, + ): + # The network type. Valid values:PublicNetwork and PrivateNetwork. + self.network_type = network_type + # The security group ID. + self.security_group_id = security_group_id + # The virtual private cloud (VPC) ID. + self.vpc_id = vpc_id + # The vSwitch ID. + self.vswitche_id = vswitche_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.network_type is not None: + result['networkType'] = self.network_type + if self.security_group_id is not None: + result['securityGroupId'] = self.security_group_id + if self.vpc_id is not None: + result['vpcId'] = self.vpc_id + if self.vswitche_id is not None: + result['vswitcheId'] = self.vswitche_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('networkType') is not None: + self.network_type = m.get('networkType') + if m.get('securityGroupId') is not None: + self.security_group_id = m.get('securityGroupId') + if m.get('vpcId') is not None: + self.vpc_id = m.get('vpcId') + if m.get('vswitcheId') is not None: + self.vswitche_id = m.get('vswitcheId') + return self + + +class GetConnectionResponseBodyConnections(TeaModel): + def __init__( + self, + auth_parameters: GetConnectionResponseBodyConnectionsAuthParameters = None, + connection_name: str = None, + description: str = None, + gmt_create: int = None, + id: int = None, + network_parameters: GetConnectionResponseBodyConnectionsNetworkParameters = None, + ): + # The parameters that are configured for authentication. + self.auth_parameters = auth_parameters + # The connection name. + self.connection_name = connection_name + # The connection description. + self.description = description + # The time when the connection was created. + self.gmt_create = gmt_create + # The connection ID. + self.id = id + self.network_parameters = network_parameters + + def validate(self): + if self.auth_parameters: + self.auth_parameters.validate() + if self.network_parameters: + self.network_parameters.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.auth_parameters is not None: + result['authParameters'] = self.auth_parameters.to_map() + if self.connection_name is not None: + result['connectionName'] = self.connection_name + if self.description is not None: + result['description'] = self.description + if self.gmt_create is not None: + result['gmtCreate'] = self.gmt_create + if self.id is not None: + result['id'] = self.id + if self.network_parameters is not None: + result['networkParameters'] = self.network_parameters.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('authParameters') is not None: + temp_model = GetConnectionResponseBodyConnectionsAuthParameters() + self.auth_parameters = temp_model.from_map(m['authParameters']) + if m.get('connectionName') is not None: + self.connection_name = m.get('connectionName') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('gmtCreate') is not None: + self.gmt_create = m.get('gmtCreate') + if m.get('id') is not None: + self.id = m.get('id') + if m.get('networkParameters') is not None: + temp_model = GetConnectionResponseBodyConnectionsNetworkParameters() + self.network_parameters = temp_model.from_map(m['networkParameters']) + return self + + +class GetConnectionResponseBody(TeaModel): + def __init__( + self, + code: str = None, + connections: List[GetConnectionResponseBodyConnections] = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. The value Success indicates that the request is successful. + self.code = code + # The value of the key in the request path. + self.connections = connections + # The returned message. + self.message = message + # The returned request ID. + self.request_id = request_id + + def validate(self): + if self.connections: + for k in self.connections: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + result['connections'] = [] + if self.connections is not None: + for k in self.connections: + result['connections'].append(k.to_map() if k else None) + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + self.connections = [] + if m.get('connections') is not None: + for k in m.get('connections'): + temp_model = GetConnectionResponseBodyConnections() + self.connections.append(temp_model.from_map(k)) + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class GetConnectionResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: GetConnectionResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = GetConnectionResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class ListConnectionsRequest(TeaModel): + def __init__( + self, + connection_name_prefix: str = None, + max_results: int = None, + next_token: str = None, + ): + # The key word that you specify to query connections. Connections can be queried by prefixes. + self.connection_name_prefix = connection_name_prefix + # The maximum number of entries to be returned in a single call. You can use this parameter and the NextToken parameter to implement paging. + # + # * Default value: 10. + self.max_results = max_results + # If you set the Limit parameter and excess return values exist, this parameter is returned. + # + # * Default value: 0. + self.next_token = next_token + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.connection_name_prefix is not None: + result['connectionNamePrefix'] = self.connection_name_prefix + if self.max_results is not None: + result['maxResults'] = self.max_results + if self.next_token is not None: + result['nextToken'] = self.next_token + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('connectionNamePrefix') is not None: + self.connection_name_prefix = m.get('connectionNamePrefix') + if m.get('maxResults') is not None: + self.max_results = m.get('maxResults') + if m.get('nextToken') is not None: + self.next_token = m.get('nextToken') + return self + + +class ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters(TeaModel): + def __init__( + self, + api_key_name: str = None, + api_key_value: str = None, + ): + # The API key. + self.api_key_name = api_key_name + # The value of the API key. + self.api_key_value = api_key_value + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.api_key_name is not None: + result['apiKeyName'] = self.api_key_name + if self.api_key_value is not None: + result['apiKeyValue'] = self.api_key_value + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('apiKeyName') is not None: + self.api_key_name = m.get('apiKeyName') + if m.get('apiKeyValue') is not None: + self.api_key_value = m.get('apiKeyValue') + return self + + +class ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters(TeaModel): + def __init__( + self, + password: str = None, + username: str = None, + ): + # The password for basic authentication. + self.password = password + # The username for basic authentication. + self.username = username + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.password is not None: + result['password'] = self.password + if self.username is not None: + result['username'] = self.username + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('password') is not None: + self.password = m.get('password') + if m.get('username') is not None: + self.username = m.get('username') + return self + + +class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters(TeaModel): + def __init__( + self, + client_id: str = None, + client_secret: str = None, + ): + # The client ID. + self.client_id = client_id + # The client key secret of the application. + self.client_secret = client_secret + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.client_id is not None: + result['clientID'] = self.client_id + if self.client_secret is not None: + result['clientSecret'] = self.client_secret + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('clientID') is not None: + self.client_id = m.get('clientID') + if m.get('clientSecret') is not None: + self.client_secret = m.get('clientSecret') + return self + + +class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters(TeaModel): + def __init__( + self, + is_value_secret: str = None, + key: str = None, + value: str = None, + ): + # Indicates whether authentication is enabled. + self.is_value_secret = is_value_secret + # The key in the request body. + self.key = key + # The value of the key in the request body. + self.value = value + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.is_value_secret is not None: + result['isValueSecret'] = self.is_value_secret + if self.key is not None: + result['key'] = self.key + if self.value is not None: + result['value'] = self.value + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('isValueSecret') is not None: + self.is_value_secret = m.get('isValueSecret') + if m.get('key') is not None: + self.key = m.get('key') + if m.get('value') is not None: + self.value = m.get('value') + return self + + +class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters(TeaModel): + def __init__( + self, + is_value_secret: str = None, + key: str = None, + value: str = None, + ): + # Indicates whether authentication is enabled. + self.is_value_secret = is_value_secret + # The key in the request header. + self.key = key + # The value of the key in the request header. + self.value = value + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.is_value_secret is not None: + result['isValueSecret'] = self.is_value_secret + if self.key is not None: + result['key'] = self.key + if self.value is not None: + result['value'] = self.value + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('isValueSecret') is not None: + self.is_value_secret = m.get('isValueSecret') + if m.get('key') is not None: + self.key = m.get('key') + if m.get('value') is not None: + self.value = m.get('value') + return self + + +class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters(TeaModel): + def __init__( + self, + is_value_secret: str = None, + key: str = None, + value: str = None, + ): + # Indicates whether authentication is enabled. + self.is_value_secret = is_value_secret + # The key in the request path. + self.key = key + # The value of the key in the request path. + self.value = value + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.is_value_secret is not None: + result['isValueSecret'] = self.is_value_secret + if self.key is not None: + result['key'] = self.key + if self.value is not None: + result['value'] = self.value + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('isValueSecret') is not None: + self.is_value_secret = m.get('isValueSecret') + if m.get('key') is not None: + self.key = m.get('key') + if m.get('value') is not None: + self.value = m.get('value') + return self + + +class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters(TeaModel): + def __init__( + self, + body_parameters: List[ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters] = None, + header_parameters: List[ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters] = None, + query_string_parameters: List[ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters] = None, + ): + # The parameters that are configured for the request. + self.body_parameters = body_parameters + # The parameters that are configured for the request header. + self.header_parameters = header_parameters + # The parameters that are configured for the request path. + self.query_string_parameters = query_string_parameters + + def validate(self): + if self.body_parameters: + for k in self.body_parameters: + if k: + k.validate() + if self.header_parameters: + for k in self.header_parameters: + if k: + k.validate() + if self.query_string_parameters: + for k in self.query_string_parameters: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + result['bodyParameters'] = [] + if self.body_parameters is not None: + for k in self.body_parameters: + result['bodyParameters'].append(k.to_map() if k else None) + result['headerParameters'] = [] + if self.header_parameters is not None: + for k in self.header_parameters: + result['headerParameters'].append(k.to_map() if k else None) + result['queryStringParameters'] = [] + if self.query_string_parameters is not None: + for k in self.query_string_parameters: + result['queryStringParameters'].append(k.to_map() if k else None) + return result + + def from_map(self, m: dict = None): + m = m or dict() + self.body_parameters = [] + if m.get('bodyParameters') is not None: + for k in m.get('bodyParameters'): + temp_model = ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters() + self.body_parameters.append(temp_model.from_map(k)) + self.header_parameters = [] + if m.get('headerParameters') is not None: + for k in m.get('headerParameters'): + temp_model = ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters() + self.header_parameters.append(temp_model.from_map(k)) + self.query_string_parameters = [] + if m.get('queryStringParameters') is not None: + for k in m.get('queryStringParameters'): + temp_model = ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters() + self.query_string_parameters.append(temp_model.from_map(k)) + return self + + +class ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters(TeaModel): + def __init__( + self, + authorization_endpoint: str = None, + client_parameters: ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters = None, + http_method: str = None, + oauth_http_parameters: ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters = None, + ): + # The endpoint that is used to obtain the OAuth token. + self.authorization_endpoint = authorization_endpoint + # The parameters that are configured for the client. + self.client_parameters = client_parameters + # The HTTP request method. Valid values: + # + # - GET + # + # - POST + # + # - HEAD + self.http_method = http_method + # The request parameters for OAuth authentication. + self.oauth_http_parameters = oauth_http_parameters + + def validate(self): + if self.client_parameters: + self.client_parameters.validate() + if self.oauth_http_parameters: + self.oauth_http_parameters.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.authorization_endpoint is not None: + result['authorizationEndpoint'] = self.authorization_endpoint + if self.client_parameters is not None: + result['clientParameters'] = self.client_parameters.to_map() + if self.http_method is not None: + result['httpMethod'] = self.http_method + if self.oauth_http_parameters is not None: + result['oauthHttpParameters'] = self.oauth_http_parameters.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('authorizationEndpoint') is not None: + self.authorization_endpoint = m.get('authorizationEndpoint') + if m.get('clientParameters') is not None: + temp_model = ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters() + self.client_parameters = temp_model.from_map(m['clientParameters']) + if m.get('httpMethod') is not None: + self.http_method = m.get('httpMethod') + if m.get('oauthHttpParameters') is not None: + temp_model = ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters() + self.oauth_http_parameters = temp_model.from_map(m['oauthHttpParameters']) + return self + + +class ListConnectionsResponseBodyConnectionsAuthParameters(TeaModel): + def __init__( + self, + api_key_auth_parameters: ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters = None, + authorization_type: str = None, + basic_auth_parameters: ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters = None, + oauth_parameters: ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters = None, + ): + # The parameters that are configured for API key authentication. + self.api_key_auth_parameters = api_key_auth_parameters + # The authentication type. Valid values: + # + # + # - BASIC_AUTH: basic authentication. + # + # + # - API_KEY_AUTH: API key authentication. + # + # + # - OAUTH_AUTH: OAuth authentication. + self.authorization_type = authorization_type + # The parameters that are configured for basic authentication. + self.basic_auth_parameters = basic_auth_parameters + # The parameters that are configured for OAuth authentication. + self.oauth_parameters = oauth_parameters + + def validate(self): + if self.api_key_auth_parameters: + self.api_key_auth_parameters.validate() + if self.basic_auth_parameters: + self.basic_auth_parameters.validate() + if self.oauth_parameters: + self.oauth_parameters.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.api_key_auth_parameters is not None: + result['apiKeyAuthParameters'] = self.api_key_auth_parameters.to_map() + if self.authorization_type is not None: + result['authorizationType'] = self.authorization_type + if self.basic_auth_parameters is not None: + result['basicAuthParameters'] = self.basic_auth_parameters.to_map() + if self.oauth_parameters is not None: + result['oauthParameters'] = self.oauth_parameters.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('apiKeyAuthParameters') is not None: + temp_model = ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters() + self.api_key_auth_parameters = temp_model.from_map(m['apiKeyAuthParameters']) + if m.get('authorizationType') is not None: + self.authorization_type = m.get('authorizationType') + if m.get('basicAuthParameters') is not None: + temp_model = ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters() + self.basic_auth_parameters = temp_model.from_map(m['basicAuthParameters']) + if m.get('oauthParameters') is not None: + temp_model = ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters() + self.oauth_parameters = temp_model.from_map(m['oauthParameters']) + return self + + +class ListConnectionsResponseBodyConnectionsNetworkParameters(TeaModel): + def __init__( + self, + network_type: str = None, + security_group_id: str = None, + vpc_id: str = None, + vswitche_id: str = None, + ): + # The network type. Valid values:PublicNetwork and PrivateNetwork. + self.network_type = network_type + # The security group ID. + self.security_group_id = security_group_id + # The virtual private cloud (VPC) ID. + self.vpc_id = vpc_id + # The vSwitch ID. + self.vswitche_id = vswitche_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.network_type is not None: + result['networkType'] = self.network_type + if self.security_group_id is not None: + result['securityGroupId'] = self.security_group_id + if self.vpc_id is not None: + result['vpcId'] = self.vpc_id + if self.vswitche_id is not None: + result['vswitcheId'] = self.vswitche_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('networkType') is not None: + self.network_type = m.get('networkType') + if m.get('securityGroupId') is not None: + self.security_group_id = m.get('securityGroupId') + if m.get('vpcId') is not None: + self.vpc_id = m.get('vpcId') + if m.get('vswitcheId') is not None: + self.vswitche_id = m.get('vswitcheId') + return self + + +class ListConnectionsResponseBodyConnections(TeaModel): + def __init__( + self, + auth_parameters: ListConnectionsResponseBodyConnectionsAuthParameters = None, + connection_name: str = None, + description: str = None, + gmt_create: int = None, + id: int = None, + network_parameters: ListConnectionsResponseBodyConnectionsNetworkParameters = None, + ): + # The parameters that are configured for authentication. + self.auth_parameters = auth_parameters + # The connection name. + self.connection_name = connection_name + # The connection description. + self.description = description + # The time when the connection was created. + self.gmt_create = gmt_create + # The connection ID. + self.id = id + self.network_parameters = network_parameters + + def validate(self): + if self.auth_parameters: + self.auth_parameters.validate() + if self.network_parameters: + self.network_parameters.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.auth_parameters is not None: + result['authParameters'] = self.auth_parameters.to_map() + if self.connection_name is not None: + result['connectionName'] = self.connection_name + if self.description is not None: + result['description'] = self.description + if self.gmt_create is not None: + result['gmtCreate'] = self.gmt_create + if self.id is not None: + result['id'] = self.id + if self.network_parameters is not None: + result['networkParameters'] = self.network_parameters.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('authParameters') is not None: + temp_model = ListConnectionsResponseBodyConnectionsAuthParameters() + self.auth_parameters = temp_model.from_map(m['authParameters']) + if m.get('connectionName') is not None: + self.connection_name = m.get('connectionName') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('gmtCreate') is not None: + self.gmt_create = m.get('gmtCreate') + if m.get('id') is not None: + self.id = m.get('id') + if m.get('networkParameters') is not None: + temp_model = ListConnectionsResponseBodyConnectionsNetworkParameters() + self.network_parameters = temp_model.from_map(m['networkParameters']) + return self + + +class ListConnectionsResponseBody(TeaModel): + def __init__( + self, + code: str = None, + connections: List[ListConnectionsResponseBodyConnections] = None, + max_results: int = None, + next_token: str = None, + total: int = None, + message: str = None, + request_id: str = None, + ): + # The HTTP status code. The value Success indicates that the request is successful. + self.code = code + # The value of the key in the request path. + self.connections = connections + # The number of entries returned per page. + self.max_results = max_results + # If excess return values exist, this parameter is returned. + self.next_token = next_token + # The total number of entries returned. + self.total = total + # The message returned. + self.message = message + # The ID of the request. This parameter is a common parameter. Each request has a unique ID. You can use the ID to troubleshoot issues. + self.request_id = request_id + + def validate(self): + if self.connections: + for k in self.connections: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + result['connections'] = [] + if self.connections is not None: + for k in self.connections: + result['connections'].append(k.to_map() if k else None) + if self.max_results is not None: + result['maxResults'] = self.max_results + if self.next_token is not None: + result['nextToken'] = self.next_token + if self.total is not None: + result['total'] = self.total + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + self.connections = [] + if m.get('connections') is not None: + for k in m.get('connections'): + temp_model = ListConnectionsResponseBodyConnections() + self.connections.append(temp_model.from_map(k)) + if m.get('maxResults') is not None: + self.max_results = m.get('maxResults') + if m.get('nextToken') is not None: + self.next_token = m.get('nextToken') + if m.get('total') is not None: + self.total = m.get('total') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class ListConnectionsResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: ListConnectionsResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = ListConnectionsResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class ListEnumsResponseResponseBody(TeaModel): + def __init__( + self, + authorization_type_enums: str = None, + network_type_enums: str = None, + code: str = None, + message: str = None, + request_id: str = None, + ): + self.authorization_type_enums = authorization_type_enums + self.network_type_enums = network_type_enums + # The returned response code. + self.code = code + # The returned message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.authorization_type_enums is not None: + result['authorizationTypeEnums'] = self.authorization_type_enums + if self.network_type_enums is not None: + result['networkTypeEnums'] = self.network_type_enums + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('authorizationTypeEnums') is not None: + self.authorization_type_enums = m.get('authorizationTypeEnums') + if m.get('networkTypeEnums') is not None: + self.network_type_enums = m.get('networkTypeEnums') + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class ListEnumsResponseResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: UpdateConnectionResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = UpdateConnectionResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class PutEventsRequest(TeaModel): + """ + EventData Controller apis: + * putEvents + """ + def __init__( + self, + event_bus_name: str = None, + event: str = None, + ): + # The name of the event bus. + # This parameter is required. + self.event_bus_name = event_bus_name + # The content of the event. + self.event = event + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event is not None: + result['event'] = self.event + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('event') is not None: + self.event = m.get('event') + return self + + +class PutEventsResponseBodyEntryList(TeaModel): + def __init__( + self, + event_id: str = None, + error_code: str = None, + error_message: str = None, + ): + # The event ID. + self.event_id = event_id + # The returned error code. + self.error_code = error_code + # The returned error message. + self.error_message = error_message + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_id is not None: + result['eventId'] = self.event_id + if self.error_code is not None: + result['errorCode'] = self.error_code + if self.error_message is not None: + result['errorMessage'] = self.error_message + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventId') is not None: + self.event_id = m.get('eventId') + if m.get('errorCode') is not None: + self.error_code = m.get('errorCode') + if m.get('errorMessage') is not None: + self.error_message = m.get('errorMessage') + return self + + +class PutEventsResponseBody(TeaModel): + def __init__( + self, + failed_entry_count: int = None, + entry_list: List[PutEventsResponseBodyEntryList] = None, + code: str = None, + message: str = None, + request_id: str = None, + ): + self.failed_entry_count = failed_entry_count + self.entry_list = entry_list + # The status code returned. The status code 200 indicates that the request was successful. + self.code = code + # The error message that is returned if the request failed. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + if self.entry_list: + for k in self.entry_list: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.failed_entry_count is not None: + result['failedEntryCount'] = self.failed_entry_count + result['entryList'] = [] + if self.entry_list is not None: + for k in self.entry_list: + result['entryList'].append(k.to_map() if k else None) + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('failedEntryCount') is not None: + self.failed_entry_count = m.get('failedEntryCount') + self.entry_list = [] + if m.get('entryList') is not None: + for k in m.get('entryList'): + temp_model = PutEventsResponseBodyEntryList() + self.entry_list.append(temp_model.from_map(k)) + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class PutEventsResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: PutEventsResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = PutEventsResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class CreateEventRuleRequest(TeaModel): + """ + EventRule Controller apis: + * createEventRule *\ + * getEventRule *\ + * deleteEventRule *\ + * updateEventRule *\ + * listEventRules *\ + * enableEventRule *\ + * disableEventRule *\ + """ + def __init__( + self, + event_bus_name: str = None, + event_rule_name: str = None, + description: str = None, + filter_pattern: str = None, + ): + # The name of the event bus with which the event source is associated. + # This parameter is required. + self.event_bus_name = event_bus_name + # The name of the event rule. + # This parameter is required. + self.event_rule_name = event_rule_name + self.description = description + # The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + # + # You can specify up to five expressions in the map data structure in each field. + self.filter_pattern = filter_pattern + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_rule_name is not None: + result['eventRuleName'] = self.event_rule_name + if self.description is not None: + result['description'] = self.description + if self.filter_pattern is not None: + result['filterPattern'] = self.filter_pattern + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventRuleName') is not None: + self.event_rule_name = m.get('eventRuleName') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('filterPattern') is not None: + self.filter_pattern = m.get('filterPattern') + return self + + +class CreateEventRuleResponseBody(TeaModel): + def __init__( + self, + code: str = None, + event_rule_name: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. Valid values: + # + # * Success: The request is successful. + # + # * Other codes: The request failed. For more information about error codes, see Error codes. + self.code = code + # The name of the event rule. + self.event_rule_name = event_rule_name + # The returned error message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.event_rule_name is not None: + result['eventRuleName'] = self.event_rule_name + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('eventRuleName') is not None: + self.event_rule_name = m.get('eventRuleName') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class CreateEventRuleResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: CreateEventRuleResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = CreateEventRuleResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class GetEventRuleRequest(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_rule_name: str = None, + ): + # The name of the event bus with which the event source is associated. + # This parameter is required. + self.event_bus_name = event_bus_name + # The name of the event rule. + # This parameter is required. + self.event_rule_name = event_rule_name + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_rule_name is not None: + result['eventRuleName'] = self.event_rule_name + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventRuleName') is not None: + self.event_rule_name = m.get('eventRuleName') + return self + + +class GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy(TeaModel): + def __init__( + self, + push_retry_strategy: str = None, + maximum_event_age_in_seconds: int = None, + maximum_retry_attempts: int = None, + ): + self.push_retry_strategy = push_retry_strategy + self.maximum_event_age_in_seconds = maximum_event_age_in_seconds + self.maximum_retry_attempts = maximum_retry_attempts + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.push_retry_strategy is not None: + result['pushRetryStrategy'] = self.push_retry_strategy + if self.maximum_event_age_in_seconds is not None: + result['maximumEventAgeInSeconds'] = self.maximum_event_age_in_seconds + if self.maximum_retry_attempts is not None: + result['maximumRetryAttempts'] = self.maximum_retry_attempts + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('pushRetryStrategy') is not None: + self.push_retry_strategy = m.get('pushRetryStrategy') + if m.get('maximumEventAgeInSeconds') is not None: + self.maximum_event_age_in_seconds = m.get('maximumEventAgeInSeconds') + if m.get('maximumRetryAttempts') is not None: + self.maximum_retry_attempts = m.get('maximumRetryAttempts') + return self + + +class GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue(TeaModel): + def __init__( + self, + type: str = None, + config: Dict[str, Any] = None, + ): + self.type = type + self.config = config + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.type is not None: + result['type'] = self.type + if self.config is not None: + result['config'] = self.config + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('type') is not None: + self.type = m.get('type') + if m.get('config') is not None: + self.config = m.get('config') + return self + + +class GetEventRuleResponseBodyEventTargetsRunOptions(TeaModel): + def __init__( + self, + errors_tolerance: str = None, + retry_strategy: GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy = None, + dead_letter_queue: GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue = None, + ): + self.errors_tolerance = errors_tolerance + self.retry_strategy = retry_strategy + self.dead_letter_queue = dead_letter_queue + + def validate(self): + if self.retry_strategy: + self.retry_strategy.validate() + if self.dead_letter_queue: + self.dead_letter_queue.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.errors_tolerance is not None: + result['errorsTolerance'] = self.errors_tolerance + if self.retry_strategy is not None: + result['retryStrategy'] = self.retry_strategy.to_map() + if self.dead_letter_queue is not None: + result['deadLetterQueue'] = self.dead_letter_queue.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('errorsTolerance') is not None: + self.errors_tolerance = m.get('errorsTolerance') + if m.get('retryStrategy') is not None: + temp_model = GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy() + self.retry_strategy = temp_model.from_map(m['retryStrategy']) + if m.get('deadLetterQueue') is not None: + temp_model = GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue() + self.dead_letter_queue = temp_model.from_map(m['deadLetterQueue']) + return self + + +class GetEventRuleResponseBodyEventTargets(TeaModel): + def __init__( + self, + event_target_name: str = None, + class_name: str = None, + config: Dict[str, Any] = None, + run_options: GetEventRuleResponseBodyEventTargetsRunOptions = None, + ): + self.event_target_name = event_target_name + self.class_name = class_name + self.config = config + self.run_options = run_options + + def validate(self): + if self.run_options: + self.run_options.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_target_name is not None: + result['eventTargetName'] = self.event_target_name + if self.class_name is not None: + result['className'] = self.class_name + if self.config is not None: + result['config'] = self.config + if self.run_options is not None: + result['runOptions'] = self.run_options.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventTargetName') is not None: + self.event_target_name = m.get('eventTargetName') + if m.get('className') is not None: + self.class_name = m.get('className') + if m.get('config') is not None: + self.config = m.get('config') + if m.get('runOptions') is not None: + temp_model = GetEventRuleResponseBodyEventTargetsRunOptions() + self.run_options = temp_model.from_map(m['runOptions']) + return self + + +class GetEventRuleResponseBody(TeaModel): + def __init__( + self, + code: str = None, + event_bus_name: str = None, + event_rule_name: str = None, + description: str = None, + filter_pattern: str = None, + status: str = None, + gmt_create: str = None, + gmt_modify: str = None, + event_targets: List[GetEventRuleResponseBodyEventTargets] = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. Valid values: + # + # * Success: The request is successful. + # + # * Other codes: The request failed. For more information about error codes, see Error codes. + self.code = code + # The name of the event bus with which the event source is associated. + # This parameter is required. + self.event_bus_name = event_bus_name + # The name of the event rule. + # This parameter is required. + self.event_rule_name = event_rule_name + self.description = description + # The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + # + # You can specify up to five expressions in the map data structure in each field. + self.filter_pattern = filter_pattern + # The status of the event rule. Valid values: ENABLE (default): The event rule is enabled. DISABLE: The event rule is disabled. + self.status = status + self.gmt_create = gmt_create + self.gmt_modify = gmt_modify + self.event_targets = event_targets + # The returned error message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + if self.event_targets: + for k in self.event_targets: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_rule_name is not None: + result['eventRuleName'] = self.event_rule_name + if self.description is not None: + result['description'] = self.description + if self.filter_pattern is not None: + result['filterPattern'] = self.filter_pattern + if self.status is not None: + result['status'] = self.status + if self.gmt_create is not None: + result['gmtCreate'] = self.gmt_create + if self.gmt_modify is not None: + result['gmtModify'] = self.gmt_modify + result['eventTargets'] = [] + if self.event_targets is not None: + for k in self.event_targets: + result['eventTargets'].append(k.to_map() if k else None) + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventRuleName') is not None: + self.event_rule_name = m.get('eventRuleName') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('filterPattern') is not None: + self.filter_pattern = m.get('filterPattern') + if m.get('status') is not None: + self.status = m.get('status') + if m.get('gmtCreate') is not None: + self.gmt_create = m.get('gmtCreate') + if m.get('gmtModify') is not None: + self.gmt_modify = m.get('gmtModify') + self.event_targets = [] + if m.get('eventTargets') is not None: + for k in m.get('eventTargets'): + temp_model = GetEventRuleResponseBodyEventTargets() + self.event_targets.append(temp_model.from_map(k)) + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class GetEventRuleResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: GetEventRuleResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = GetEventRuleResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class DeleteEventRuleRequest(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_rule_name: str = None, + ): + # The name of the event bus with which the event source is associated. + # This parameter is required. + self.event_bus_name = event_bus_name + # The name of the event rule. + # This parameter is required. + self.event_rule_name = event_rule_name + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_rule_name is not None: + result['eventRuleName'] = self.event_rule_name + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventRuleName') is not None: + self.event_rule_name = m.get('eventRuleName') + return self + + +class DeleteEventRuleResponseBody(TeaModel): + def __init__( + self, + code: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. Valid values: + # + # * Success: The request is successful. + # + # * Other codes: The request failed. For more information about error codes, see Error codes. + self.code = code + # The returned error message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class DeleteEventRuleResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: DeleteEventRuleResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = DeleteEventRuleResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class UpdateEventRuleRequest(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_rule_name: str = None, + description: str = None, + filter_pattern: str = None, + ): + # The name of the event bus with which the event source is associated. + # This parameter is required. + self.event_bus_name = event_bus_name + # The name of the event rule. + # This parameter is required. + self.event_rule_name = event_rule_name + self.description = description + # The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + # + # You can specify up to five expressions in the map data structure in each field. + # This parameter is required. + self.filter_pattern = filter_pattern + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_rule_name is not None: + result['eventRuleName'] = self.event_rule_name + if self.description is not None: + result['description'] = self.description + if self.filter_pattern is not None: + result['filterPattern'] = self.filter_pattern + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventRuleName') is not None: + self.event_rule_name = m.get('eventRuleName') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('filterPattern') is not None: + self.filter_pattern = m.get('filterPattern') + return self + + +class UpdateEventRuleResponseBody(TeaModel): + def __init__( + self, + code: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. Valid values: + # + # * Success: The request is successful. + # + # * Other codes: The request failed. For more information about error codes, see Error codes. + self.code = code + # The returned error message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class UpdateEventRuleResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: UpdateEventRuleResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = UpdateEventRuleResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class ListEventRulesRequest(TeaModel): + def __init__( + self, + event_bus_name: str = None, + max_results: int = None, + next_token: str = None, + ): + self.event_bus_name = event_bus_name + # The number of entries returned per page. + self.max_results = max_results + # If excess return values exist, this parameter is returned. + self.next_token = next_token + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.max_results is not None: + result['maxResults'] = self.max_results + if self.next_token is not None: + result['nextToken'] = self.next_token + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('maxResults') is not None: + self.max_results = m.get('maxResults') + if m.get('nextToken') is not None: + self.next_token = m.get('nextToken') + return self + + +class ListEventRulesResponseBodyEventRules(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_rule_name: str = None, + description: str = None, + filter_pattern: str = None, + status: str = None, + gmt_create: str = None, + gmt_modify: str = None, + ): + # The name of the event bus with which the event source is associated. + # This parameter is required. + self.event_bus_name = event_bus_name + # The name of the event rule. + # This parameter is required. + self.event_rule_name = event_rule_name + self.description = description + # The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + # + # You can specify up to five expressions in the map data structure in each field. + self.filter_pattern = filter_pattern + # The status of the event rule. Valid values: ENABLE (default): The event rule is enabled. DISABLE: The event rule is disabled. + self.status = status + self.gmt_create = gmt_create + self.gmt_modify = gmt_modify + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_rule_name is not None: + result['eventRuleName'] = self.event_rule_name + if self.description is not None: + result['description'] = self.description + if self.filter_pattern is not None: + result['filterPattern'] = self.filter_pattern + if self.status is not None: + result['status'] = self.status + if self.gmt_create is not None: + result['gmtCreate'] = self.gmt_create + if self.gmt_modify is not None: + result['gmtModify'] = self.gmt_modify + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventRuleName') is not None: + self.event_rule_name = m.get('eventRuleName') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('filterPattern') is not None: + self.filter_pattern = m.get('filterPattern') + if m.get('status') is not None: + self.status = m.get('status') + if m.get('gmtCreate') is not None: + self.gmt_create = m.get('gmtCreate') + if m.get('gmtModify') is not None: + self.gmt_modify = m.get('gmtModify') + return self + + +class ListEventRulesResponseBody(TeaModel): + def __init__( + self, + event_rules: List[ListEventRulesResponseBodyEventRules] = None, + total: int = None, + max_results: int = None, + next_token: str = None, + ): + self.event_rules = event_rules + # The total number of entries. + self.total = total + # The number of entries returned per page. + self.max_results = max_results + # If excess return values exist, this parameter is returned. + self.next_token = next_token + + def validate(self): + if self.event_rules: + for k in self.event_rules: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + result['eventRules'] = [] + if self.event_rules is not None: + for k in self.event_rules: + result['eventRules'].append(k.to_map() if k else None) + if self.total is not None: + result['total'] = self.total + if self.max_results is not None: + result['maxResults'] = self.max_results + if self.next_token is not None: + result['nextToken'] = self.next_token + return result + + def from_map(self, m: dict = None): + m = m or dict() + self.event_rules = [] + if m.get('eventRules') is not None: + for k in m.get('eventRules'): + temp_model = ListEventRulesResponseBodyEventRules() + self.event_rules.append(temp_model.from_map(k)) + if m.get('total') is not None: + self.total = m.get('total') + if m.get('maxResults') is not None: + self.max_results = m.get('maxResults') + if m.get('nextToken') is not None: + self.next_token = m.get('nextToken') + return self + + +class ListEventRulesResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: ListEventRulesResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = ListEventRulesResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class EnableEventRuleRequest(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_rule_name: str = None, + ): + # The name of the event bus with which the event source is associated. + # This parameter is required. + self.event_bus_name = event_bus_name + # The name of the event rule. + # This parameter is required. + self.event_rule_name = event_rule_name + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_rule_name is not None: + result['eventRuleName'] = self.event_rule_name + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventRuleName') is not None: + self.event_rule_name = m.get('eventRuleName') + return self + + +class EnableEventRuleResponseBody(TeaModel): + def __init__( + self, + code: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. Valid values: + # + # * Success: The request is successful. + # + # * Other codes: The request failed. For more information about error codes, see Error codes. + self.code = code + # The returned error message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class EnableEventRuleResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: EnableEventRuleResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = EnableEventRuleResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class DisableEventRuleRequest(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_rule_name: str = None, + ): + # The name of the event bus with which the event source is associated. + # This parameter is required. + self.event_bus_name = event_bus_name + # The name of the event rule. + # This parameter is required. + self.event_rule_name = event_rule_name + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_rule_name is not None: + result['eventRuleName'] = self.event_rule_name + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventRuleName') is not None: + self.event_rule_name = m.get('eventRuleName') + return self + + +class DisableEventRuleResponseBody(TeaModel): + def __init__( + self, + code: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. Valid values: + # + # * Success: The request is successful. + # + # * Other codes: The request failed. For more information about error codes, see Error codes. + self.code = code + # The returned error message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class DisableEventRuleResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: DisableEventRuleResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = DisableEventRuleResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class CreateEventSourceRequest(TeaModel): + """ + EventSource Controller apis: + * createEventSource *\ + * updateEventSource *\ + * deleteEventSource *\ + * getEventSource *\ + * listEventSources *\ + """ + def __init__( + self, + description: str = None, + event_bus_name: str = None, + event_source_name: str = None, + class_name: str = None, + config: Dict[str, Any] = None, + ): + # The description of the event source. + self.description = description + # The name of the event bus with which the event source is associated. + # This parameter is required. + self.event_bus_name = event_bus_name + # The name of the event source. + # This parameter is required. + self.event_source_name = event_source_name + self.class_name = class_name + self.config = config + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.description is not None: + result['description'] = self.description + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_source_name is not None: + result['eventSourceName'] = self.event_source_name + if self.class_name is not None: + result['className'] = self.class_name + if self.config is not None: + result['config'] = self.config + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('description') is not None: + self.description = m.get('description') + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventSourceName') is not None: + self.event_source_name = m.get('eventSourceName') + if m.get('className') is not None: + self.class_name = m.get('className') + if m.get('config') is not None: + self.config = m.get('config') + return self + + +class CreateEventSourceResponseBody(TeaModel): + def __init__( + self, + code: str = None, + event_source_name: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. Valid values: + # + # * Success: The request is successful. + # + # * Other codes: The request failed. For more information about error codes, see Error codes. + self.code = code + # The name of the event source. + self.event_source_name = event_source_name + # The returned error message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.event_source_name is not None: + result['eventSourceName'] = self.event_source_name + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('eventSourceName') is not None: + self.event_source_name = m.get('eventSourceName') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class CreateEventSourceResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: CreateEventSourceResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = CreateEventSourceResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class UpdateEventSourceRequest(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_source_name: str = None, + description: str = None, + class_name: str = None, + status: int = None, + config: Dict[str, Any] = None, + ): + # The name of the event bus with which the event source is associated. + # This parameter is required. + self.event_bus_name = event_bus_name + # The name of the event source. + # This parameter is required. + self.event_source_name = event_source_name + # The description of the event source. + self.description = description + self.class_name = class_name + self.status = status + self.config = config + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_source_name is not None: + result['eventSourceName'] = self.event_source_name + if self.description is not None: + result['description'] = self.description + if self.class_name is not None: + result['className'] = self.class_name + if self.status is not None: + result['status'] = self.status + if self.config is not None: + result['config'] = self.config + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventSourceName') is not None: + self.event_source_name = m.get('eventSourceName') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('className') is not None: + self.class_name = m.get('className') + if m.get('status') is not None: + self.status = m.get('status') + if m.get('config') is not None: + self.config = m.get('config') + return self + + +class UpdateEventSourceResponseBody(TeaModel): + def __init__( + self, + code: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. Valid values: + # + # * Success: The request is successful. + # + # * Other codes: The request failed. For more information about error codes, see Error codes. + self.code = code + # The returned error message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class UpdateEventSourceResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: UpdateEventSourceResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = UpdateEventSourceResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class DeleteEventSourceRequest(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_source_name: str = None, + ): + self.event_bus_name = event_bus_name + # The name of the event source. + # This parameter is required. + self.event_source_name = event_source_name + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_source_name is not None: + result['eventSourceName'] = self.event_source_name + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventSourceName') is not None: + self.event_source_name = m.get('eventSourceName') + return self + + +class DeleteEventSourceResponseBody(TeaModel): + def __init__( + self, + code: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. The value Success indicates that the request is successful. Other values indicate that the request failed. For more information about error codes, see Error codes. + self.code = code + # The returned error message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class DeleteEventSourceResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: DeleteEventSourceResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = DeleteEventSourceResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class GetEventSourceRequest(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_source_name: str = None, + ): + self.event_bus_name = event_bus_name + # The name of the event source. + # This parameter is required. + self.event_source_name = event_source_name + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_source_name is not None: + result['eventSourceName'] = self.event_source_name + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventSourceName') is not None: + self.event_source_name = m.get('eventSourceName') + return self + + +class GetEventSourceResponseBody(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_source_name: str = None, + description: str = None, + class_name: str = None, + config: Dict[str, Any] = None, + ): + # The name of the event bus with which the event source is associated. + # This parameter is required. + self.event_bus_name = event_bus_name + # The name of the event source. + # This parameter is required. + self.event_source_name = event_source_name + # The description of the event source. + self.description = description + self.class_name = class_name + self.config = config + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_source_name is not None: + result['eventSourceName'] = self.event_source_name + if self.description is not None: + result['description'] = self.description + if self.class_name is not None: + result['className'] = self.class_name + if self.config is not None: + result['config'] = self.config + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventSourceName') is not None: + self.event_source_name = m.get('eventSourceName') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('className') is not None: + self.class_name = m.get('className') + if m.get('config') is not None: + self.config = m.get('config') + return self + + +class GetEventSourceResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: GetEventSourceResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = GetEventSourceResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class ListEventSourcesRequest(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_source_type: str = None, + max_results: int = None, + next_token: str = None, + ): + self.event_bus_name = event_bus_name + # The type of the event source. + # This parameter is required. + self.event_source_type = event_source_type + # The number of entries returned per page. + self.max_results = max_results + # If excess return values exist, this parameter is returned. + self.next_token = next_token + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_source_type is not None: + result['eventSourceType'] = self.event_source_type + if self.max_results is not None: + result['maxResults'] = self.max_results + if self.next_token is not None: + result['nextToken'] = self.next_token + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventSourceType') is not None: + self.event_source_type = m.get('eventSourceType') + if m.get('maxResults') is not None: + self.max_results = m.get('maxResults') + if m.get('nextToken') is not None: + self.next_token = m.get('nextToken') + return self + + +class ListEventSourcesResponseBodyEventSources(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_source_name: str = None, + description: str = None, + class_name: str = None, + config: Dict[str, Any] = None, + gmt_create: str = None, + gmt_modify: str = None, + ): + # The name of the event bus. + # This parameter is required. + self.event_bus_name = event_bus_name + # EventSource is required for querying default bus events. + self.event_source_name = event_source_name + # The description of the event type. + self.description = description + self.class_name = class_name + self.config = config + self.gmt_create = gmt_create + self.gmt_modify = gmt_modify + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_source_name is not None: + result['eventSourceName'] = self.event_source_name + if self.description is not None: + result['description'] = self.description + if self.class_name is not None: + result['className'] = self.class_name + if self.config is not None: + result['config'] = self.config + if self.gmt_create is not None: + result['gmtCreate'] = self.gmt_create + if self.gmt_modify is not None: + result['gmtModify'] = self.gmt_modify + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventSourceName') is not None: + self.event_source_name = m.get('eventSourceName') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('className') is not None: + self.class_name = m.get('className') + if m.get('config') is not None: + self.config = m.get('config') + if m.get('gmtCreate') is not None: + self.gmt_create = m.get('gmtCreate') + if m.get('gmtModify') is not None: + self.gmt_modify = m.get('gmtModify') + return self + + +class ListEventSourcesResponseBody(TeaModel): + def __init__( + self, + event_sources: List[ListEventSourcesResponseBodyEventSources] = None, + total: int = None, + max_results: int = None, + next_token: str = None, + ): + self.event_sources = event_sources + # The total number of entries. + self.total = total + # The number of entries returned per page. + self.max_results = max_results + # If excess return values exist, this parameter is returned. + self.next_token = next_token + + def validate(self): + if self.event_sources: + for k in self.event_sources: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + result['eventSources'] = [] + if self.event_sources is not None: + for k in self.event_sources: + result['eventSources'].append(k.to_map() if k else None) + if self.total is not None: + result['total'] = self.total + if self.max_results is not None: + result['maxResults'] = self.max_results + if self.next_token is not None: + result['nextToken'] = self.next_token + return result + + def from_map(self, m: dict = None): + m = m or dict() + self.event_sources = [] + if m.get('eventSources') is not None: + for k in m.get('eventSources'): + temp_model = ListEventSourcesResponseBodyEventSources() + self.event_sources.append(temp_model.from_map(k)) + if m.get('total') is not None: + self.total = m.get('total') + if m.get('maxResults') is not None: + self.max_results = m.get('maxResults') + if m.get('nextToken') is not None: + self.next_token = m.get('nextToken') + return self + + +class ListEventSourcesResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: ListEventSourcesResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = ListEventSourcesResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class EventTargetRunOptionsRetryStrategy(TeaModel): + def __init__( + self, + push_retry_strategy: str = None, + maximum_event_age_in_seconds: int = None, + maximum_retry_attempts: int = None, + ): + self.push_retry_strategy = push_retry_strategy + self.maximum_event_age_in_seconds = maximum_event_age_in_seconds + self.maximum_retry_attempts = maximum_retry_attempts + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.push_retry_strategy is not None: + result['pushRetryStrategy'] = self.push_retry_strategy + if self.maximum_event_age_in_seconds is not None: + result['maximumEventAgeInSeconds'] = self.maximum_event_age_in_seconds + if self.maximum_retry_attempts is not None: + result['maximumRetryAttempts'] = self.maximum_retry_attempts + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('pushRetryStrategy') is not None: + self.push_retry_strategy = m.get('pushRetryStrategy') + if m.get('maximumEventAgeInSeconds') is not None: + self.maximum_event_age_in_seconds = m.get('maximumEventAgeInSeconds') + if m.get('maximumRetryAttempts') is not None: + self.maximum_retry_attempts = m.get('maximumRetryAttempts') + return self + + +class EventTargetRunOptionsDeadLetterQueue(TeaModel): + def __init__( + self, + type: str = None, + config: Dict[str, Any] = None, + ): + self.type = type + self.config = config + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.type is not None: + result['type'] = self.type + if self.config is not None: + result['config'] = self.config + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('type') is not None: + self.type = m.get('type') + if m.get('config') is not None: + self.config = m.get('config') + return self + + +class EventTargetRunOptions(TeaModel): + def __init__( + self, + errors_tolerance: str = None, + retry_strategy: EventTargetRunOptionsRetryStrategy = None, + dead_letter_queue: EventTargetRunOptionsDeadLetterQueue = None, + ): + self.errors_tolerance = errors_tolerance + self.retry_strategy = retry_strategy + self.dead_letter_queue = dead_letter_queue + + def validate(self): + if self.retry_strategy: + self.retry_strategy.validate() + if self.dead_letter_queue: + self.dead_letter_queue.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.errors_tolerance is not None: + result['errorsTolerance'] = self.errors_tolerance + if self.retry_strategy is not None: + result['retryStrategy'] = self.retry_strategy.to_map() + if self.dead_letter_queue is not None: + result['deadLetterQueue'] = self.dead_letter_queue.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('errorsTolerance') is not None: + self.errors_tolerance = m.get('errorsTolerance') + if m.get('retryStrategy') is not None: + temp_model = EventTargetRunOptionsRetryStrategy() + self.retry_strategy = temp_model.from_map(m['retryStrategy']) + if m.get('deadLetterQueue') is not None: + temp_model = EventTargetRunOptionsDeadLetterQueue() + self.dead_letter_queue = temp_model.from_map(m['deadLetterQueue']) + return self + + +class EventTarget(TeaModel): + """ + EventTarget Controller apis: + * createEventTargets *\ + * updateEventTargets *\ + * deleteEventTargets *\ + * listEventTargets *\ + """ + def __init__( + self, + event_target_name: str = None, + class_name: str = None, + config: Dict[str, Any] = None, + run_options: EventTargetRunOptions = None, + ): + self.event_target_name = event_target_name + self.class_name = class_name + self.config = config + self.run_options = run_options + + def validate(self): + if self.run_options: + self.run_options.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_target_name is not None: + result['eventTargetName'] = self.event_target_name + if self.class_name is not None: + result['className'] = self.class_name + if self.config is not None: + result['config'] = self.config + if self.run_options is not None: + result['runOptions'] = self.run_options.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventTargetName') is not None: + self.event_target_name = m.get('eventTargetName') + if m.get('className') is not None: + self.class_name = m.get('className') + if m.get('config') is not None: + self.config = m.get('config') + if m.get('runOptions') is not None: + temp_model = EventTargetRunOptions() + self.run_options = temp_model.from_map(m['runOptions']) + return self + + +class CreateEventTargetsRequest(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_rule_name: str = None, + event_targets: List[EventTarget] = None, + ): + # The name of the event bus with which the event target is associated. + # This parameter is required. + self.event_bus_name = event_bus_name + # The name of the event rule. + # This parameter is required. + self.event_rule_name = event_rule_name + self.event_targets = event_targets + + def validate(self): + if self.event_targets: + for k in self.event_targets: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_rule_name is not None: + result['eventRuleName'] = self.event_rule_name + result['eventTargets'] = [] + if self.event_targets is not None: + for k in self.event_targets: + result['eventTargets'].append(k.to_map() if k else None) + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventRuleName') is not None: + self.event_rule_name = m.get('eventRuleName') + self.event_targets = [] + if m.get('eventTargets') is not None: + for k in m.get('eventTargets'): + temp_model = EventTarget() + self.event_targets.append(temp_model.from_map(k)) + return self + + +class CreateEventTargetsResponseBody(TeaModel): + def __init__( + self, + code: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. Valid values: + # + # * Success: The request is successful. + # + # * Other codes: The request failed. For more information about error codes, see Error codes. + self.code = code + # The returned error message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class CreateEventTargetsResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: CreateEventTargetsResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = CreateEventTargetsResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class UpdateEventTargetsRequest(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_rule_name: str = None, + event_targets: List[EventTarget] = None, + ): + # The name of the event bus with which the event target is associated. + # This parameter is required. + self.event_bus_name = event_bus_name + # The name of the event rule. + # This parameter is required. + self.event_rule_name = event_rule_name + self.event_targets = event_targets + + def validate(self): + if self.event_targets: + for k in self.event_targets: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_rule_name is not None: + result['eventRuleName'] = self.event_rule_name + result['eventTargets'] = [] + if self.event_targets is not None: + for k in self.event_targets: + result['eventTargets'].append(k.to_map() if k else None) + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventRuleName') is not None: + self.event_rule_name = m.get('eventRuleName') + self.event_targets = [] + if m.get('eventTargets') is not None: + for k in m.get('eventTargets'): + temp_model = EventTarget() + self.event_targets.append(temp_model.from_map(k)) + return self + + +class UpdateEventTargetsResponseBody(TeaModel): + def __init__( + self, + code: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. Valid values: + # + # * Success: The request is successful. + # + # * Other codes: The request failed. For more information about error codes, see Error codes. + self.code = code + # The returned error message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class UpdateEventTargetsResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: UpdateEventTargetsResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = UpdateEventTargetsResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class DeleteEventTargetsRequest(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_rule_name: str = None, + event_target_names: List[str] = None, + ): + # The name of the event bus. + self.event_bus_name = event_bus_name + # The name of the event rule. + self.event_rule_name = event_rule_name + # The names of the event targets that you want to delete. + self.event_target_names = event_target_names + + def validate(self): + self.validate_required(self.event_bus_name, 'event_bus_name') + self.validate_required(self.event_rule_name, 'event_rule_name') + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_rule_name is not None: + result['eventRuleName'] = self.event_rule_name + if self.event_target_names is not None: + result['eventTargetNames'] = self.event_target_names + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventRuleName') is not None: + self.event_rule_name = m.get('eventRuleName') + if m.get('eventTargetNames') is not None: + self.event_target_names = m.get('eventTargetNames') + return self + + +class DeleteEventTargetsResponseBody(TeaModel): + def __init__( + self, + code: str = None, + message: str = None, + request_id: str = None, + ): + # The returned response code. Valid values: + # + # * Success: The request is successful. + # + # * Other codes: The request failed. For more information about error codes, see Error codes. + self.code = code + # The returned error message. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class DeleteEventTargetsResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: DeleteEventTargetsResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = DeleteEventTargetsResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class ListEventTargetsRequest(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_rule_name: str = None, + ): + # The name of the event bus with which the event target is associated. + # This parameter is required. + self.event_bus_name = event_bus_name + # The name of the event rule. + # This parameter is required. + self.event_rule_name = event_rule_name + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_rule_name is not None: + result['eventRuleName'] = self.event_rule_name + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventRuleName') is not None: + self.event_rule_name = m.get('eventRuleName') + return self + + +class ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy(TeaModel): + def __init__( + self, + push_retry_strategy: str = None, + maximum_event_age_in_seconds: int = None, + maximum_retry_attempts: int = None, + ): + self.push_retry_strategy = push_retry_strategy + self.maximum_event_age_in_seconds = maximum_event_age_in_seconds + self.maximum_retry_attempts = maximum_retry_attempts + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.push_retry_strategy is not None: + result['pushRetryStrategy'] = self.push_retry_strategy + if self.maximum_event_age_in_seconds is not None: + result['maximumEventAgeInSeconds'] = self.maximum_event_age_in_seconds + if self.maximum_retry_attempts is not None: + result['maximumRetryAttempts'] = self.maximum_retry_attempts + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('pushRetryStrategy') is not None: + self.push_retry_strategy = m.get('pushRetryStrategy') + if m.get('maximumEventAgeInSeconds') is not None: + self.maximum_event_age_in_seconds = m.get('maximumEventAgeInSeconds') + if m.get('maximumRetryAttempts') is not None: + self.maximum_retry_attempts = m.get('maximumRetryAttempts') + return self + + +class ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue(TeaModel): + def __init__( + self, + type: str = None, + config: Dict[str, Any] = None, + ): + self.type = type + self.config = config + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.type is not None: + result['type'] = self.type + if self.config is not None: + result['config'] = self.config + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('type') is not None: + self.type = m.get('type') + if m.get('config') is not None: + self.config = m.get('config') + return self + + +class ListEventTargetsResponseBodyEventTargetsRunOptions(TeaModel): + def __init__( + self, + errors_tolerance: str = None, + retry_strategy: ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy = None, + dead_letter_queue: ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue = None, + ): + self.errors_tolerance = errors_tolerance + self.retry_strategy = retry_strategy + self.dead_letter_queue = dead_letter_queue + + def validate(self): + if self.retry_strategy: + self.retry_strategy.validate() + if self.dead_letter_queue: + self.dead_letter_queue.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.errors_tolerance is not None: + result['errorsTolerance'] = self.errors_tolerance + if self.retry_strategy is not None: + result['retryStrategy'] = self.retry_strategy.to_map() + if self.dead_letter_queue is not None: + result['deadLetterQueue'] = self.dead_letter_queue.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('errorsTolerance') is not None: + self.errors_tolerance = m.get('errorsTolerance') + if m.get('retryStrategy') is not None: + temp_model = ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy() + self.retry_strategy = temp_model.from_map(m['retryStrategy']) + if m.get('deadLetterQueue') is not None: + temp_model = ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue() + self.dead_letter_queue = temp_model.from_map(m['deadLetterQueue']) + return self + + +class ListEventTargetsResponseBodyEventTargets(TeaModel): + def __init__( + self, + event_target_name: str = None, + class_name: str = None, + config: Dict[str, Any] = None, + run_options: ListEventTargetsResponseBodyEventTargetsRunOptions = None, + ): + self.event_target_name = event_target_name + self.class_name = class_name + self.config = config + self.run_options = run_options + + def validate(self): + if self.run_options: + self.run_options.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_target_name is not None: + result['eventTargetName'] = self.event_target_name + if self.class_name is not None: + result['className'] = self.class_name + if self.config is not None: + result['config'] = self.config + if self.run_options is not None: + result['runOptions'] = self.run_options.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventTargetName') is not None: + self.event_target_name = m.get('eventTargetName') + if m.get('className') is not None: + self.class_name = m.get('className') + if m.get('config') is not None: + self.config = m.get('config') + if m.get('runOptions') is not None: + temp_model = ListEventTargetsResponseBodyEventTargetsRunOptions() + self.run_options = temp_model.from_map(m['runOptions']) + return self + + +class ListEventTargetsResponseBody(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_rule_name: str = None, + event_targets: List[ListEventTargetsResponseBodyEventTargets] = None, + ): + # The name of the event bus with which the event target is associated. + # This parameter is required. + self.event_bus_name = event_bus_name + # The name of the event rule. + # This parameter is required. + self.event_rule_name = event_rule_name + self.event_targets = event_targets + + def validate(self): + if self.event_targets: + for k in self.event_targets: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_rule_name is not None: + result['eventRuleName'] = self.event_rule_name + result['eventTargets'] = [] + if self.event_targets is not None: + for k in self.event_targets: + result['eventTargets'].append(k.to_map() if k else None) + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventRuleName') is not None: + self.event_rule_name = m.get('eventRuleName') + self.event_targets = [] + if m.get('eventTargets') is not None: + for k in m.get('eventTargets'): + temp_model = ListEventTargetsResponseBodyEventTargets() + self.event_targets.append(temp_model.from_map(k)) + return self + + +class ListEventTargetsResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: ListEventTargetsResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = ListEventTargetsResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + +class ListEventTypesRequest(TeaModel): + """ + EventType Controller apis: + * listEventTypes *\ + """ + def __init__( + self, + event_bus_name: str = None, + event_source_name: str = None, + max_results: int = None, + next_token: str = None, + ): + # The name of the event bus. + # This parameter is required. + self.event_bus_name = event_bus_name + # EventSource is required for querying default bus events. + self.event_source_name = event_source_name + # The number of entries returned per page. + self.max_results = max_results + # If excess return values exist, this parameter is returned. + self.next_token = next_token + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_source_name is not None: + result['eventSourceName'] = self.event_source_name + if self.max_results is not None: + result['maxResults'] = self.max_results + if self.next_token is not None: + result['nextToken'] = self.next_token + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventSourceName') is not None: + self.event_source_name = m.get('eventSourceName') + if m.get('maxResults') is not None: + self.max_results = m.get('maxResults') + if m.get('nextToken') is not None: + self.next_token = m.get('nextToken') + return self + + +class ListEventTypesResponseBodyEventTypes(TeaModel): + def __init__( + self, + event_bus_name: str = None, + event_source_name: str = None, + event_type_name: str = None, + description: str = None, + gmt_create: str = None, + gmt_modify: str = None, + ): + # The name of the event bus. + # This parameter is required. + self.event_bus_name = event_bus_name + # EventSource is required for querying default bus events. + self.event_source_name = event_source_name + # The name of the event type. + self.event_type_name = event_type_name + # The description of the event type. + self.description = description + self.gmt_create = gmt_create + self.gmt_modify = gmt_modify + + def validate(self): + pass + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.event_bus_name is not None: + result['eventBusName'] = self.event_bus_name + if self.event_source_name is not None: + result['eventSourceName'] = self.event_source_name + if self.event_type_name is not None: + result['eventTypeName'] = self.event_type_name + if self.description is not None: + result['description'] = self.description + if self.gmt_create is not None: + result['gmtCreate'] = self.gmt_create + if self.gmt_modify is not None: + result['gmtModify'] = self.gmt_modify + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('eventBusName') is not None: + self.event_bus_name = m.get('eventBusName') + if m.get('eventSourceName') is not None: + self.event_source_name = m.get('eventSourceName') + if m.get('eventTypeName') is not None: + self.event_type_name = m.get('eventTypeName') + if m.get('description') is not None: + self.description = m.get('description') + if m.get('gmtCreate') is not None: + self.gmt_create = m.get('gmtCreate') + if m.get('gmtModify') is not None: + self.gmt_modify = m.get('gmtModify') + return self + + +class ListEventTypesResponseBody(TeaModel): + def __init__( + self, + event_types: List[ListEventTypesResponseBodyEventTypes] = None, + next_token: str = None, + total: int = None, + max_results: int = None, + code: str = None, + message: str = None, + request_id: str = None, + ): + self.event_types = event_types + # If excess return values exist, this parameter is returned. + self.next_token = next_token + # The total number of entries. + self.total = total + # If you set Limit and excess return values exist, this parameter is returned. + self.max_results = max_results + # The status code returned. The status code 200 indicates that the request was successful. + self.code = code + # The error message that is returned if the request failed. + self.message = message + # The request ID. + self.request_id = request_id + + def validate(self): + if self.event_types: + for k in self.event_types: + if k: + k.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + result['eventTypes'] = [] + if self.event_types is not None: + for k in self.event_types: + result['eventTypes'].append(k.to_map() if k else None) + if self.next_token is not None: + result['nextToken'] = self.next_token + if self.total is not None: + result['total'] = self.total + if self.max_results is not None: + result['maxResults'] = self.max_results + if self.code is not None: + result['code'] = self.code + if self.message is not None: + result['message'] = self.message + if self.request_id is not None: + result['requestId'] = self.request_id + return result + + def from_map(self, m: dict = None): + m = m or dict() + self.event_types = [] + if m.get('eventTypes') is not None: + for k in m.get('eventTypes'): + temp_model = ListEventTypesResponseBodyEventTypes() + self.event_types.append(temp_model.from_map(k)) + if m.get('nextToken') is not None: + self.next_token = m.get('nextToken') + if m.get('total') is not None: + self.total = m.get('total') + if m.get('maxResults') is not None: + self.max_results = m.get('maxResults') + if m.get('code') is not None: + self.code = m.get('code') + if m.get('message') is not None: + self.message = m.get('message') + if m.get('requestId') is not None: + self.request_id = m.get('requestId') + return self + + +class ListEventTypesResponse(TeaModel): + def __init__( + self, + headers: Dict[str, str] = None, + status_code: int = None, + body: ListEventTypesResponseBody = None, + ): + self.headers = headers + self.status_code = status_code + self.body = body + + def validate(self): + if self.body: + self.body.validate() + + def to_map(self): + _map = super().to_map() + if _map is not None: + return _map + + result = dict() + if self.headers is not None: + result['headers'] = self.headers + if self.status_code is not None: + result['statusCode'] = self.status_code + if self.body is not None: + result['body'] = self.body.to_map() + return result + + def from_map(self, m: dict = None): + m = m or dict() + if m.get('headers') is not None: + self.headers = m.get('headers') + if m.get('statusCode') is not None: + self.status_code = m.get('statusCode') + if m.get('body') is not None: + temp_model = ListEventTypesResponseBody() + self.body = temp_model.from_map(m['body']) + return self + + diff --git a/sdk/generated/python/setup.py b/sdk/generated/python/setup.py new file mode 100644 index 00000000..9c7922ae --- /dev/null +++ b/sdk/generated/python/setup.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +""" + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +""" + +import os +from setuptools import setup, find_packages + +""" +setup module for rocketmq_eventbridge. + +Created on 14/10/2024 + +@author: Alibaba Cloud SDK +""" + +PACKAGE = "rocketmq_eventbridge" +NAME = "rocketmq_eventbridge" or "alibabacloud-package" +DESCRIPTION = "Alibaba Cloud eventbridge (20240701) SDK Library for Python" +AUTHOR = "Alibaba Cloud SDK" +AUTHOR_EMAIL = "sdk-team@alibabacloud.com" +URL = "https://github.com/aliyun/alibabacloud-python-sdk" +VERSION = __import__(PACKAGE).__version__ +REQUIRES = [ + "alibabacloud_tea_util>=0.3.13, <1.0.0", + "alibabacloud_tea_openapi>=0.3.12, <1.0.0" +] + +LONG_DESCRIPTION = '' +if os.path.exists('./README.md'): + with open("README.md", encoding='utf-8') as fp: + LONG_DESCRIPTION = fp.read() + +setup( + name=NAME, + version=VERSION, + description=DESCRIPTION, + long_description=LONG_DESCRIPTION, + long_description_content_type='text/markdown', + author=AUTHOR, + author_email=AUTHOR_EMAIL, + license="Apache License 2.0", + url=URL, + keywords=["rocketmq","eventbridge"], + packages=find_packages(exclude=["tests*"]), + include_package_data=True, + platforms="any", + install_requires=REQUIRES, + python_requires=">=3.6", + classifiers=( + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + "Topic :: Software Development" + ) +) diff --git a/sdk/generated/ts/package.json b/sdk/generated/ts/package.json new file mode 100644 index 00000000..b46b4ae5 --- /dev/null +++ b/sdk/generated/ts/package.json @@ -0,0 +1,30 @@ +{ + "name": "", + "version": "1.0.0", + "description": "", + "main": "dist/client.js", + "scripts": { + "test": "mocha --reporter spec --timeout 3000 test/*.test.js", + "test-cov": "nyc -e .ts -r=html -r=text -r=lcov npm run test", + "build": "tsc", + "prepublishOnly": "tsc" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "@types/node": "^12.12.26", + "nyc": "^15.0.0", + "source-map-support": "^0.5.16", + "ts-node": "^8.6.2", + "typescript": "^3.7.5" + }, + "dependencies": { + "@alicloud/tea-typescript": "^1.7.1", + "@alicloud/tea-util": "^1.4.9", + "@alicloud/openapi-client": "^0.4.12" + }, + "files": [ + "dist", + "src" + ] +} \ No newline at end of file diff --git a/sdk/generated/ts/src/client.ts b/sdk/generated/ts/src/client.ts new file mode 100644 index 00000000..1cc663da --- /dev/null +++ b/sdk/generated/ts/src/client.ts @@ -0,0 +1,9038 @@ +// This file is auto-generated, don't edit it +import Util, * as $Util from '@alicloud/tea-util'; +import OpenApi, * as $OpenApi from '@alicloud/openapi-client'; +import * as $tea from '@alicloud/tea-typescript'; + +/** + * @remarks + * EventBus Controller apis: + * createEventBus * + * getEventBus * + * deleteEventBus * + * listEventBuses * + */ +export class CreateEventBusRequest extends $tea.Model { + /** + * @remarks + * The description of the event bus. + * + * @example + * demo + */ + description?: string; + /** + * @remarks + * The name of the event bus. This parameter is required. + * + * @example + * MyEventBus + */ + eventBusName?: string; + static names(): { [key: string]: string } { + return { + description: 'description', + eventBusName: 'eventBusName', + }; + } + + static types(): { [key: string]: any } { + return { + description: 'string', + eventBusName: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateEventBusResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. The value Success indicates that the request is successful. Other values indicate that the request failed. For more information about error codes, see Error codes. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The name of the event bus. This parameter is required. + * + * @example + * MyEventBus + */ + eventBusName?: string; + /** + * @remarks + * The returned error message. + * + * @example + * The event bus [xxxx] not existed! + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * A995F07C-E503-5881-9962-9CECA8566876 + */ + requestId?: string; + /** + * @remarks + * Indicates whether the request is successful. The value true indicates that the request is successful. + * + * @example + * true + */ + success?: boolean; + static names(): { [key: string]: string } { + return { + code: 'code', + eventBusName: 'eventBusName', + message: 'message', + requestId: 'requestId', + success: 'success', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + eventBusName: 'string', + message: 'string', + requestId: 'string', + success: 'boolean', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateEventBusResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: CreateEventBusResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: CreateEventBusResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetEventBusRequest extends $tea.Model { + /** + * @remarks + * The name of the event bus. This parameter is required. + * + * @example + * MyEventBus + */ + eventBusName?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetEventBusResponseBody extends $tea.Model { + /** + * @remarks + * The response code. The value Success indicates that the request is successful. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The timestamp that indicates when the event bus was created. + * + * @example + * 1641781825000 + */ + createTimestamp?: number; + /** + * @remarks + * The description of the event bus. + * + * @example + * demo + */ + description?: string; + /** + * @remarks + * The name of the event bus. + * + * @example + * MyEventBus + */ + eventBusName?: string; + /** + * @remarks + * The error message that is returned if the request failed. + * + * @example + * EventBusNotExist + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * d5bfc188-4452-4ba7-b73a-a9005e522439 + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + createTimestamp: 'createTimestamp', + description: 'description', + eventBusName: 'eventBusName', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + createTimestamp: 'number', + description: 'string', + eventBusName: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetEventBusResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: GetEventBusResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: GetEventBusResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventBusesRequest extends $tea.Model { + /** + * @remarks + * The maximum number of entries to be returned in a call. You can use this parameter and NextToken to implement paging. Note: Up to 100 entries can be returned in a call. + * + * @example + * 10 + */ + maxResults?: number; + /** + * @remarks + * If you set Limit and excess return values exist, this parameter is returned. + * + * @example + * 10 + */ + nextToken?: string; + static names(): { [key: string]: string } { + return { + maxResults: 'maxResults', + nextToken: 'nextToken', + }; + } + + static types(): { [key: string]: any } { + return { + maxResults: 'number', + nextToken: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventBusesResponseBody extends $tea.Model { + /** + * @remarks + * The returned HTTP status code. The HTTP status code 200 indicates that the request is successful. + * + * @example + * 200 + */ + code?: string; + /** + * @remarks + * The timestamp that indicates when the event bus was created. + */ + eventBuses?: ListEventBusesResponseBodyEventBuses[]; + /** + * @remarks + * The returned error message. + * + * @example + * InvalidArgument + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * D1DCF64A-3F2C-5323-ADCB-3F4DF30FAD2D + */ + requestId?: string; + /** + * @remarks + * If excess return values exist, this parameter is returned. + * + * @example + * 10 + */ + nextToken?: string; + /** + * @remarks + * The total number of entries. + * + * @example + * 2 + */ + total?: number; + /** + * @remarks + * If you set Limit and excess return values exist, this parameter is returned. + * + * @example + * 10 + */ + maxResults?: number; + static names(): { [key: string]: string } { + return { + code: 'code', + eventBuses: 'eventBuses', + message: 'message', + requestId: 'requestId', + nextToken: 'nextToken', + total: 'total', + maxResults: 'maxResults', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + eventBuses: { 'type': 'array', 'itemType': ListEventBusesResponseBodyEventBuses }, + message: 'string', + requestId: 'string', + nextToken: 'string', + total: 'number', + maxResults: 'number', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventBusesResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: ListEventBusesResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: ListEventBusesResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteEventBusRequest extends $tea.Model { + /** + * @remarks + * The name of the event bus. This parameter is required. + * + * @example + * MyEventBus + */ + eventBusName?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteEventBusResponseBody extends $tea.Model { + /** + * @remarks + * The returned HTTP status code. The HTTP status code 200 indicates that the request is successful. + * + * @example + * 200 + */ + code?: string; + /** + * @remarks + * The returned error message. + * + * @example + * EventBusNotExist + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * C229E140-1A5C-5D55-8904-CFC5BA4CAA98 + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteEventBusResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: DeleteEventBusResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: DeleteEventBusResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +/** + * @remarks + * ApiDestination Controller apis: + * createApiDestination * + * updateApiDestination * + * getApiDestination * + * deleteApiDestination * + * listApiDestinations * + */ +export class CreateApiDestinationRequest extends $tea.Model { + /** + * @remarks + * The name of the API destination. The name must be 2 to 127 characters in length. This parameter is required. + * + * @example + * api-destination-name + */ + apiDestinationName?: string; + /** + * @remarks + * The name of the connection. The name must be 2 to 127 characters in length. Before you configure this parameter, you must call the CreateConnection operation to create a connection. Then, set this parameter to the name of the connection that you created. This parameter is required. + * + * @example + * connection-name + */ + connectionName?: string; + /** + * @remarks + * The description of the API destination. The description can be up to 255 characters in length. + */ + description?: string; + /** + * @remarks + * The parameters that are configured for the API destination. This parameter is required. + */ + httpApiParameters?: CreateApiDestinationRequestHttpApiParameters; + /** + * @remarks + * TODO + */ + invocationRateLimitPerSecond?: number; + static names(): { [key: string]: string } { + return { + apiDestinationName: 'apiDestinationName', + connectionName: 'connectionName', + description: 'description', + httpApiParameters: 'httpApiParameters', + invocationRateLimitPerSecond: 'invocationRateLimitPerSecond', + }; + } + + static types(): { [key: string]: any } { + return { + apiDestinationName: 'string', + connectionName: 'string', + description: 'string', + httpApiParameters: CreateApiDestinationRequestHttpApiParameters, + invocationRateLimitPerSecond: 'number', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateApiDestinationResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. The value Success indicates that the request is successful. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The name of the API destination. + * + * @example + * ApiDestinationName + */ + apiDestinationName?: string; + /** + * @remarks + * The returned message. + * + * @example + * success + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 5DAF96FB-A4B6-548C-B999-0BFDCB2261B9 + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + apiDestinationName: 'apiDestinationName', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + apiDestinationName: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateApiDestinationResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: CreateApiDestinationResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: CreateApiDestinationResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateApiDestinationRequest extends $tea.Model { + /** + * @remarks + * The name of the API destination. The name must be 2 to 127 characters in length. This parameter is required. + * + * @example + * api-destination-name + */ + apiDestinationName?: string; + /** + * @remarks + * The name of the connection. The name must be 2 to 127 characters in length. Before you configure this parameter, you must call the CreateConnection operation to create a connection. Then, set this parameter to the name of the connection that you created. This parameter is required. + * + * @example + * connection-name + */ + connectionName?: string; + /** + * @remarks + * The description of the API destination. The description can be up to 255 characters in length. + */ + description?: string; + /** + * @remarks + * The parameters that are configured for the API destination. This parameter is required. + */ + httpApiParameters?: UpdateApiDestinationRequestHttpApiParameters; + /** + * @remarks + * TODO + */ + invocationRateLimitPerSecond?: number; + static names(): { [key: string]: string } { + return { + apiDestinationName: 'apiDestinationName', + connectionName: 'connectionName', + description: 'description', + httpApiParameters: 'httpApiParameters', + invocationRateLimitPerSecond: 'invocationRateLimitPerSecond', + }; + } + + static types(): { [key: string]: any } { + return { + apiDestinationName: 'string', + connectionName: 'string', + description: 'string', + httpApiParameters: UpdateApiDestinationRequestHttpApiParameters, + invocationRateLimitPerSecond: 'number', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateApiDestinationResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. The value Success indicates that the request is successful. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The returned message. + * + * @example + * success + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 5DAF96FB-A4B6-548C-B999-0BFDCB2261B9 + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateApiDestinationResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: UpdateApiDestinationResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: UpdateApiDestinationResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetApiDestinationRequest extends $tea.Model { + /** + * @remarks + * The name of the API destination. This parameter is required. + * + * @example + * api-destination-name + */ + apiDestinationName?: string; + static names(): { [key: string]: string } { + return { + apiDestinationName: 'apiDestinationName', + }; + } + + static types(): { [key: string]: any } { + return { + apiDestinationName: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetApiDestinationResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. The value Success indicates that the request is successful. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The name of the API destination. + * + * @example + * api-destination-2 + */ + apiDestinationName?: string; + /** + * @remarks + * The connection name. + * + * @example + * connection-name + */ + connectionName?: string; + /** + * @remarks + * The description of the connection. + * + * @example + * demo + */ + description?: string; + /** + * @remarks + * The time when the API destination was created. + * + * @example + * 1665223213000 + */ + gmtCreate?: number; + /** + * @remarks + * The request parameters that are configured for the API destination. + */ + httpApiParameters?: GetApiDestinationResponseBodyHttpApiParameters; + /** + * @remarks + * TODO + */ + invocationRateLimitPerSecond?: number; + /** + * @remarks + * The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + * + * @example + * success + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * B896B484-F16D-59DE-9E23-DD0E5C361108 + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + apiDestinationName: 'apiDestinationName', + connectionName: 'connectionName', + description: 'description', + gmtCreate: 'gmtCreate', + httpApiParameters: 'httpApiParameters', + invocationRateLimitPerSecond: 'invocationRateLimitPerSecond', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + apiDestinationName: 'string', + connectionName: 'string', + description: 'string', + gmtCreate: 'number', + httpApiParameters: GetApiDestinationResponseBodyHttpApiParameters, + invocationRateLimitPerSecond: 'number', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetApiDestinationResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: GetApiDestinationResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: GetApiDestinationResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteApiDestinationRequest extends $tea.Model { + /** + * @remarks + * The name of the API destination. This parameter is required. + * + * @example + * ApiDestinationName + */ + apiDestinationName?: string; + static names(): { [key: string]: string } { + return { + apiDestinationName: 'apiDestinationName', + }; + } + + static types(): { [key: string]: any } { + return { + apiDestinationName: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteApiDestinationResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. The value Success indicates that the request is successful. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + * + * @example + * success + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 382E6272-8E9C-5681-AC96-A8AF0BFAC1A5 + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteApiDestinationResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: DeleteApiDestinationResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: DeleteApiDestinationResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListApiDestinationsRequest extends $tea.Model { + /** + * @remarks + * The prefix of the API destination name. + * + * @example + * api-demo + */ + apiDestinationNamePrefix?: string; + /** + * @remarks + * The connection name. + * + * @example + * connection-name + */ + connectionName?: string; + /** + * @remarks + * The maximum number of entries to be returned in a call. You can use this parameter and NextToken to implement paging. + * + * * Default value: 10. + * + * @example + * 10 + */ + maxResults?: number; + /** + * @remarks + * If you set Limit and excess return values exist, this parameter is returned. + * + * * Default value: 0. + * + * @example + * 0 + */ + nextToken?: string; + static names(): { [key: string]: string } { + return { + apiDestinationNamePrefix: 'apiDestinationNamePrefix', + connectionName: 'connectionName', + maxResults: 'maxResults', + nextToken: 'nextToken', + }; + } + + static types(): { [key: string]: any } { + return { + apiDestinationNamePrefix: 'string', + connectionName: 'string', + maxResults: 'number', + nextToken: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListApiDestinationsResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. The value Success indicates that the request is successful. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The API destinations. + */ + apiDestinations?: ListApiDestinationsResponseBodyApiDestinations[]; + /** + * @remarks + * The maximum number of entries returned per page. + * + * @example + * 10 + */ + maxResults?: number; + /** + * @remarks + * If excess return values exist, this parameter is returned. + * + * @example + * 1 + */ + nextToken?: string; + /** + * @remarks + * The total number of entries returned. + * + * @example + * 2 + */ + total?: number; + /** + * @remarks + * The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + * + * @example + * success + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 96D7C0AB-DCE5-5E82-96B8-4725E1706BB1 + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + apiDestinations: 'apiDestinations', + maxResults: 'maxResults', + nextToken: 'nextToken', + total: 'total', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + apiDestinations: { 'type': 'array', 'itemType': ListApiDestinationsResponseBodyApiDestinations }, + maxResults: 'number', + nextToken: 'string', + total: 'number', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListApiDestinationsResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: ListApiDestinationsResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: ListApiDestinationsResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +/** + * @remarks + * Connection Controller apis: + * createConnection * + * deleteConnection * + * updateConnection * + * getConnection * + * selectOneConnection * + * listConnections * + * listEnumsResponse * + */ +export class CreateConnectionRequest extends $tea.Model { + /** + * @remarks + * The parameters that are configured for authentication. + */ + authParameters?: CreateConnectionRequestAuthParameters; + /** + * @remarks + * The name of the connection. The name must be 2 to 127 characters in length. + * + * This parameter is required. + * + * @example + * connection-name + */ + connectionName?: string; + /** + * @remarks + * The description of the connection. The description can be up to 255 characters in length. + * + * @example + * demo + */ + description?: string; + /** + * @remarks + * The parameters that are configured for the network. This parameter is required. + */ + networkParameters?: CreateConnectionRequestNetworkParameters; + static names(): { [key: string]: string } { + return { + authParameters: 'authParameters', + connectionName: 'connectionName', + description: 'description', + networkParameters: 'networkParameters', + }; + } + + static types(): { [key: string]: any } { + return { + authParameters: CreateConnectionRequestAuthParameters, + connectionName: 'string', + description: 'string', + networkParameters: CreateConnectionRequestNetworkParameters, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateConnectionResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. The value Success indicates that the request is successful. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The connection name. + * + * @example + * connection-demo + */ + connectionName?: string; + /** + * @remarks + * The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + * + * @example + * success + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 7DA60DED-CD36-5837-B848-C01A23D2**** + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + connectionName: 'connectionName', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + connectionName: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateConnectionResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: CreateConnectionResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: CreateConnectionResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteConnectionRequest extends $tea.Model { + /** + * @remarks + * The name of the connection that you want to delete. This parameter is required. + * + * @example + * connection-name + */ + connectionName?: string; + static names(): { [key: string]: string } { + return { + connectionName: 'connectionName', + }; + } + + static types(): { [key: string]: any } { + return { + connectionName: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteConnectionResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. The value Success indicates that the request is successful. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The returned message. If the request is successful, success is returned. If the request failed, an error code is returned. + * + * @example + * success + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 8EF25E37-1750-5D7A-BA56-F8AE081A69C8 + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteConnectionResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: DeleteConnectionResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: DeleteConnectionResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateConnectionRequest extends $tea.Model { + /** + * @remarks + * The parameters that are configured for authentication. + */ + authParameters?: UpdateConnectionRequestAuthParameters; + /** + * @remarks + * The name of the connection. The name must be 2 to 127 characters in length. + * + * This parameter is required. + * + * @example + * connection-name + */ + connectionName?: string; + /** + * @remarks + * The description of the connection. The description can be up to 255 characters in length. + * + * @example + * demo + */ + description?: string; + /** + * @remarks + * The parameters that are configured for the network. This parameter is required. + */ + networkParameters?: UpdateConnectionRequestNetworkParameters; + static names(): { [key: string]: string } { + return { + authParameters: 'authParameters', + connectionName: 'connectionName', + description: 'description', + networkParameters: 'networkParameters', + }; + } + + static types(): { [key: string]: any } { + return { + authParameters: UpdateConnectionRequestAuthParameters, + connectionName: 'string', + description: 'string', + networkParameters: UpdateConnectionRequestNetworkParameters, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateConnectionResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The returned message. + * + * @example + * success + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 8346BE8F-40F3-533D-A0B8-1359C31BD5BA + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateConnectionResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: UpdateConnectionResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: UpdateConnectionResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetConnectionRequest extends $tea.Model { + /** + * @remarks + * The connection name. This parameter is required. + * + * @example + * connection-name + */ + connectionName?: string; + static names(): { [key: string]: string } { + return { + connectionName: 'connectionName', + }; + } + + static types(): { [key: string]: any } { + return { + connectionName: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetConnectionResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. The value Success indicates that the request is successful. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The value of the key in the request path. + */ + connections?: GetConnectionResponseBodyConnections[]; + /** + * @remarks + * The returned message. + * + * @example + * success + */ + message?: string; + /** + * @remarks + * The returned request ID. + * + * @example + * 34AD682D-5B91-5773-8132-AA38C130**** + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + connections: 'connections', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + connections: { 'type': 'array', 'itemType': GetConnectionResponseBodyConnections }, + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetConnectionResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: GetConnectionResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: GetConnectionResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListConnectionsRequest extends $tea.Model { + /** + * @remarks + * The key word that you specify to query connections. Connections can be queried by prefixes. + * + * @example + * connection-name + */ + connectionNamePrefix?: string; + /** + * @remarks + * The maximum number of entries to be returned in a single call. You can use this parameter and the NextToken parameter to implement paging. + * + * * Default value: 10. + * + * @example + * 10 + */ + maxResults?: number; + /** + * @remarks + * If you set the Limit parameter and excess return values exist, this parameter is returned. + * + * * Default value: 0. + * + * @example + * 0 + */ + nextToken?: string; + static names(): { [key: string]: string } { + return { + connectionNamePrefix: 'connectionNamePrefix', + maxResults: 'maxResults', + nextToken: 'nextToken', + }; + } + + static types(): { [key: string]: any } { + return { + connectionNamePrefix: 'string', + maxResults: 'number', + nextToken: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListConnectionsResponseBody extends $tea.Model { + /** + * @remarks + * The HTTP status code. The value Success indicates that the request is successful. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The value of the key in the request path. + */ + connections?: ListConnectionsResponseBodyConnections[]; + /** + * @remarks + * The number of entries returned per page. + * + * @example + * 10 + */ + maxResults?: number; + /** + * @remarks + * If excess return values exist, this parameter is returned. + * + * @example + * 0 + */ + nextToken?: string; + /** + * @remarks + * The total number of entries returned. + * + * @example + * 1 + */ + total?: number; + /** + * @remarks + * The message returned. + * + * @example + * success + */ + message?: string; + /** + * @remarks + * The ID of the request. This parameter is a common parameter. Each request has a unique ID. You can use the ID to troubleshoot issues. + * + * @example + * E3619976-8714-5D88-BBA2-6983D798A8BB + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + connections: 'connections', + maxResults: 'maxResults', + nextToken: 'nextToken', + total: 'total', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + connections: { 'type': 'array', 'itemType': ListConnectionsResponseBodyConnections }, + maxResults: 'number', + nextToken: 'string', + total: 'number', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListConnectionsResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: ListConnectionsResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: ListConnectionsResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +// enum AuthorizationTypeEnums : string { +// API_KEY_AUTH(name="API_KEY_AUTH", value="API_KEY_AUTH"), +// BASIC_AUTH(name="BASIC_AUTH", value="BASIC_AUTH"), +// OAUTH_AUTH(name="OAUTH_AUTH", value="OAUTH_AUTH"), +// } +// enum NetworkTypeEnum : string { +// PUBLIC_NETWORK(name="PUBLIC_NETWORK", value="PublicNetwork"), +// PRIVATE_NETWORK(name="PRIVATE_NETWORK", value="PrivateNetwork") +// } +export class ListEnumsResponseResponseBody extends $tea.Model { + authorizationTypeEnums?: string; + networkTypeEnums?: string; + /** + * @remarks + * The returned response code. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The returned message. + * + * @example + * success + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 8346BE8F-40F3-533D-A0B8-1359C31BD5BA + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + authorizationTypeEnums: 'authorizationTypeEnums', + networkTypeEnums: 'networkTypeEnums', + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + authorizationTypeEnums: 'string', + networkTypeEnums: 'string', + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEnumsResponseResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: UpdateConnectionResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: UpdateConnectionResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +/** + * @remarks + * EventData Controller apis: + * putEvents + */ +export class PutEventsRequest extends $tea.Model { + /** + * @remarks + * The name of the event bus. + * This parameter is required. + * + * @example + * demo + */ + eventBusName?: string; + /** + * @remarks + * The content of the event. + * + * @example + * The description of the event. + */ + event?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + event: 'event', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + event: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class PutEventsResponseBody extends $tea.Model { + failedEntryCount?: number; + entryList?: PutEventsResponseBodyEntryList[]; + /** + * @remarks + * The status code returned. The status code 200 indicates that the request was successful. + * + * @example + * 200 + */ + code?: string; + /** + * @remarks + * The error message that is returned if the request failed. + * + * @example + * EventBusNotExist + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 580A938B-6107-586C-8EC7-F22EEBEDA9E6 + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + failedEntryCount: 'failedEntryCount', + entryList: 'entryList', + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + failedEntryCount: 'number', + entryList: { 'type': 'array', 'itemType': PutEventsResponseBodyEntryList }, + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class PutEventsResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: PutEventsResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: PutEventsResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +/** + * @remarks + * EventRule Controller apis: + * createEventRule * + * getEventRule * + * deleteEventRule * + * updateEventRule * + * listEventRules * + * enableEventRule * + * disableEventRule * + */ +export class CreateEventRuleRequest extends $tea.Model { + /** + * @remarks + * The name of the event bus with which the event source is associated. + * This parameter is required. + * + * @example + * my-event-bus + */ + eventBusName?: string; + /** + * @remarks + * The name of the event rule. + * This parameter is required. + * + * @example + * myrabbitmq.sourc + */ + eventRuleName?: string; + description?: string; + /** + * @remarks + * The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + * + * You can specify up to five expressions in the map data structure in each field. + * + * @example + * {\"source\": [{\"prefix\": \"acs.\"}],\"type\": [{\"prefix\":\"oss:ObjectReplication\"}],\"subject\":[{\"prefix\":\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\", \"suffix\":\".txt\"}]} + */ + filterPattern?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventRuleName: 'eventRuleName', + description: 'description', + filterPattern: 'filterPattern', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventRuleName: 'string', + description: 'string', + filterPattern: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateEventRuleResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. Valid values: + * + * * Success: The request is successful. + * + * * Other codes: The request failed. For more information about error codes, see Error codes. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The name of the event rule. + * + * @example + * myrabbitmq.sourc + */ + eventRuleName?: string; + /** + * @remarks + * The returned error message. + * + * @example + * Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 2922208e-e1c6-43ee-bfd1-aca50263bc8a + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + eventRuleName: 'eventRuleName', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + eventRuleName: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateEventRuleResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: CreateEventRuleResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: CreateEventRuleResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetEventRuleRequest extends $tea.Model { + /** + * @remarks + * The name of the event bus with which the event source is associated. + * This parameter is required. + * + * @example + * my-event-bus + */ + eventBusName?: string; + /** + * @remarks + * The name of the event rule. + * This parameter is required. + * + * @example + * myrabbitmq.sourc + */ + eventRuleName?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventRuleName: 'eventRuleName', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventRuleName: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetEventRuleResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. Valid values: + * + * * Success: The request is successful. + * + * * Other codes: The request failed. For more information about error codes, see Error codes. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The name of the event bus with which the event source is associated. + * This parameter is required. + * + * @example + * my-event-bus + */ + eventBusName?: string; + /** + * @remarks + * The name of the event rule. + * This parameter is required. + * + * @example + * myrabbitmq.sourc + */ + eventRuleName?: string; + description?: string; + /** + * @remarks + * The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + * + * You can specify up to five expressions in the map data structure in each field. + * + * @example + * {\"source\": [{\"prefix\": \"acs.\"}],\"type\": [{\"prefix\":\"oss:ObjectReplication\"}],\"subject\":[{\"prefix\":\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\", \"suffix\":\".txt\"}]} + */ + filterPattern?: string; + /** + * @remarks + * The status of the event rule. Valid values: ENABLE (default): The event rule is enabled. DISABLE: The event rule is disabled. + * + * @example + * ENABLE + */ + status?: string; + gmtCreate?: string; + gmtModify?: string; + eventTargets?: GetEventRuleResponseBodyEventTargets[]; + /** + * @remarks + * The returned error message. + * + * @example + * Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 2922208e-e1c6-43ee-bfd1-aca50263bc8a + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + eventBusName: 'eventBusName', + eventRuleName: 'eventRuleName', + description: 'description', + filterPattern: 'filterPattern', + status: 'status', + gmtCreate: 'gmtCreate', + gmtModify: 'gmtModify', + eventTargets: 'eventTargets', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + eventBusName: 'string', + eventRuleName: 'string', + description: 'string', + filterPattern: 'string', + status: 'string', + gmtCreate: 'string', + gmtModify: 'string', + eventTargets: { 'type': 'array', 'itemType': GetEventRuleResponseBodyEventTargets }, + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetEventRuleResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: GetEventRuleResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: GetEventRuleResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteEventRuleRequest extends $tea.Model { + /** + * @remarks + * The name of the event bus with which the event source is associated. + * This parameter is required. + * + * @example + * my-event-bus + */ + eventBusName?: string; + /** + * @remarks + * The name of the event rule. + * This parameter is required. + * + * @example + * myrabbitmq.sourc + */ + eventRuleName?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventRuleName: 'eventRuleName', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventRuleName: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteEventRuleResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. Valid values: + * + * * Success: The request is successful. + * + * * Other codes: The request failed. For more information about error codes, see Error codes. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The returned error message. + * + * @example + * Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 2922208e-e1c6-43ee-bfd1-aca50263bc8a + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteEventRuleResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: DeleteEventRuleResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: DeleteEventRuleResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateEventRuleRequest extends $tea.Model { + /** + * @remarks + * The name of the event bus with which the event source is associated. + * This parameter is required. + * + * @example + * my-event-bus + */ + eventBusName?: string; + /** + * @remarks + * The name of the event rule. + * This parameter is required. + * + * @example + * myrabbitmq.sourc + */ + eventRuleName?: string; + description?: string; + /** + * @remarks + * The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + * + * You can specify up to five expressions in the map data structure in each field. + * This parameter is required. + * + * @example + * {\"source\": [{\"prefix\": \"acs.\"}],\"type\": [{\"prefix\":\"oss:ObjectReplication\"}],\"subject\":[{\"prefix\":\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\", \"suffix\":\".txt\"}]} + */ + filterPattern?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventRuleName: 'eventRuleName', + description: 'description', + filterPattern: 'filterPattern', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventRuleName: 'string', + description: 'string', + filterPattern: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateEventRuleResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. Valid values: + * + * * Success: The request is successful. + * + * * Other codes: The request failed. For more information about error codes, see Error codes. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The returned error message. + * + * @example + * Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 2922208e-e1c6-43ee-bfd1-aca50263bc8a + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateEventRuleResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: UpdateEventRuleResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: UpdateEventRuleResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventRulesRequest extends $tea.Model { + eventBusName?: string; + /** + * @remarks + * The number of entries returned per page. + * + * @example + * 10 + */ + maxResults?: number; + /** + * @remarks + * If excess return values exist, this parameter is returned. + * + * @example + * 0 + */ + nextToken?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + maxResults: 'maxResults', + nextToken: 'nextToken', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + maxResults: 'number', + nextToken: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventRulesResponseBody extends $tea.Model { + eventRules?: ListEventRulesResponseBodyEventRules[]; + /** + * @remarks + * The total number of entries. + * + * @example + * 2 + */ + total?: number; + /** + * @remarks + * The number of entries returned per page. + * + * @example + * 10 + */ + maxResults?: number; + /** + * @remarks + * If excess return values exist, this parameter is returned. + * + * @example + * 0 + */ + nextToken?: string; + static names(): { [key: string]: string } { + return { + eventRules: 'eventRules', + total: 'total', + maxResults: 'maxResults', + nextToken: 'nextToken', + }; + } + + static types(): { [key: string]: any } { + return { + eventRules: { 'type': 'array', 'itemType': ListEventRulesResponseBodyEventRules }, + total: 'number', + maxResults: 'number', + nextToken: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventRulesResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: ListEventRulesResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: ListEventRulesResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class EnableEventRuleRequest extends $tea.Model { + /** + * @remarks + * The name of the event bus with which the event source is associated. + * This parameter is required. + * + * @example + * my-event-bus + */ + eventBusName?: string; + /** + * @remarks + * The name of the event rule. + * This parameter is required. + * + * @example + * myrabbitmq.sourc + */ + eventRuleName?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventRuleName: 'eventRuleName', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventRuleName: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class EnableEventRuleResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. Valid values: + * + * * Success: The request is successful. + * + * * Other codes: The request failed. For more information about error codes, see Error codes. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The returned error message. + * + * @example + * Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 2922208e-e1c6-43ee-bfd1-aca50263bc8a + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class EnableEventRuleResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: EnableEventRuleResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: EnableEventRuleResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DisableEventRuleRequest extends $tea.Model { + /** + * @remarks + * The name of the event bus with which the event source is associated. + * This parameter is required. + * + * @example + * my-event-bus + */ + eventBusName?: string; + /** + * @remarks + * The name of the event rule. + * This parameter is required. + * + * @example + * myrabbitmq.sourc + */ + eventRuleName?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventRuleName: 'eventRuleName', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventRuleName: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DisableEventRuleResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. Valid values: + * + * * Success: The request is successful. + * + * * Other codes: The request failed. For more information about error codes, see Error codes. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The returned error message. + * + * @example + * Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 2922208e-e1c6-43ee-bfd1-aca50263bc8a + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DisableEventRuleResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: DisableEventRuleResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: DisableEventRuleResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +/** + * @remarks + * EventSource Controller apis: + * createEventSource * + * updateEventSource * + * deleteEventSource * + * getEventSource * + * listEventSources * + */ +export class CreateEventSourceRequest extends $tea.Model { + /** + * @remarks + * The description of the event source. + */ + description?: string; + /** + * @remarks + * The name of the event bus with which the event source is associated. + * This parameter is required. + * + * @example + * my-event-bus + */ + eventBusName?: string; + /** + * @remarks + * The name of the event source. + * This parameter is required. + * + * @example + * myrabbitmq.sourc + */ + eventSourceName?: string; + className?: string; + config?: { [key: string]: any }; + static names(): { [key: string]: string } { + return { + description: 'description', + eventBusName: 'eventBusName', + eventSourceName: 'eventSourceName', + className: 'className', + config: 'config', + }; + } + + static types(): { [key: string]: any } { + return { + description: 'string', + eventBusName: 'string', + eventSourceName: 'string', + className: 'string', + config: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateEventSourceResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. Valid values: + * + * * Success: The request is successful. + * + * * Other codes: The request failed. For more information about error codes, see Error codes. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The name of the event source. + * + * @example + * myrabbitmq.sourc + */ + eventSourceName?: string; + /** + * @remarks + * The returned error message. + * + * @example + * Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 2922208e-e1c6-43ee-bfd1-aca50263bc8a + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + eventSourceName: 'eventSourceName', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + eventSourceName: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateEventSourceResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: CreateEventSourceResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: CreateEventSourceResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateEventSourceRequest extends $tea.Model { + /** + * @remarks + * The name of the event bus with which the event source is associated. + * This parameter is required. + * + * @example + * my-event-bus + */ + eventBusName?: string; + /** + * @remarks + * The name of the event source. + * This parameter is required. + * + * @example + * myrabbitmq.sourc + */ + eventSourceName?: string; + /** + * @remarks + * The description of the event source. + */ + description?: string; + className?: string; + status?: number; + config?: { [key: string]: any }; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventSourceName: 'eventSourceName', + description: 'description', + className: 'className', + status: 'status', + config: 'config', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventSourceName: 'string', + description: 'string', + className: 'string', + status: 'number', + config: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateEventSourceResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. Valid values: + * + * * Success: The request is successful. + * + * * Other codes: The request failed. For more information about error codes, see Error codes. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The returned error message. + * + * @example + * Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 2922208e-e1c6-43ee-bfd1-aca50263bc8a + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateEventSourceResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: UpdateEventSourceResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: UpdateEventSourceResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteEventSourceRequest extends $tea.Model { + eventBusName?: string; + /** + * @remarks + * The name of the event source. + * This parameter is required. + * + * @example + * myrabbitmq.source + */ + eventSourceName?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventSourceName: 'eventSourceName', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventSourceName: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteEventSourceResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. The value Success indicates that the request is successful. Other values indicate that the request failed. For more information about error codes, see Error codes. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The returned error message. + * + * @example + * Remote error. requestId: [78B66E68-E778-1F33-84BD-xxxx], error code: [EventSourceNotExist], message: [The event source in request is not exist! ] + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 5f80e9b3-98d5-4f51-8412-c758818a03e4 + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteEventSourceResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: DeleteEventSourceResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: DeleteEventSourceResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetEventSourceRequest extends $tea.Model { + eventBusName?: string; + /** + * @remarks + * The name of the event source. + * This parameter is required. + * + * @example + * myrabbitmq.source + */ + eventSourceName?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventSourceName: 'eventSourceName', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventSourceName: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetEventSourceResponseBody extends $tea.Model { + /** + * @remarks + * The name of the event bus with which the event source is associated. + * This parameter is required. + * + * @example + * my-event-bus + */ + eventBusName?: string; + /** + * @remarks + * The name of the event source. + * This parameter is required. + * + * @example + * myrabbitmq.sourc + */ + eventSourceName?: string; + /** + * @remarks + * The description of the event source. + */ + description?: string; + className?: string; + config?: { [key: string]: any }; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventSourceName: 'eventSourceName', + description: 'description', + className: 'className', + config: 'config', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventSourceName: 'string', + description: 'string', + className: 'string', + config: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetEventSourceResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: GetEventSourceResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: GetEventSourceResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventSourcesRequest extends $tea.Model { + eventBusName?: string; + /** + * @remarks + * The type of the event source. + * This parameter is required. + * + * @example + * USER_DEFINED + */ + eventSourceType?: string; + /** + * @remarks + * The number of entries returned per page. + * + * @example + * 10 + */ + maxResults?: number; + /** + * @remarks + * If excess return values exist, this parameter is returned. + * + * @example + * 0 + */ + nextToken?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventSourceType: 'eventSourceType', + maxResults: 'maxResults', + nextToken: 'nextToken', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventSourceType: 'string', + maxResults: 'number', + nextToken: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventSourcesResponseBody extends $tea.Model { + eventSources?: ListEventSourcesResponseBodyEventSources[]; + /** + * @remarks + * The total number of entries. + * + * @example + * 2 + */ + total?: number; + /** + * @remarks + * The number of entries returned per page. + * + * @example + * 10 + */ + maxResults?: number; + /** + * @remarks + * If excess return values exist, this parameter is returned. + * + * @example + * 0 + */ + nextToken?: string; + static names(): { [key: string]: string } { + return { + eventSources: 'eventSources', + total: 'total', + maxResults: 'maxResults', + nextToken: 'nextToken', + }; + } + + static types(): { [key: string]: any } { + return { + eventSources: { 'type': 'array', 'itemType': ListEventSourcesResponseBodyEventSources }, + total: 'number', + maxResults: 'number', + nextToken: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventSourcesResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: ListEventSourcesResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: ListEventSourcesResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +/** + * @remarks + * EventTarget Controller apis: + * createEventTargets * + * updateEventTargets * + * deleteEventTargets * + * listEventTargets * + */ +export class EventTarget extends $tea.Model { + eventTargetName?: string; + className?: string; + config?: { [key: string]: any }; + runOptions?: EventTargetRunOptions; + static names(): { [key: string]: string } { + return { + eventTargetName: 'eventTargetName', + className: 'className', + config: 'config', + runOptions: 'runOptions', + }; + } + + static types(): { [key: string]: any } { + return { + eventTargetName: 'string', + className: 'string', + config: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' }, + runOptions: EventTargetRunOptions, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateEventTargetsRequest extends $tea.Model { + /** + * @remarks + * The name of the event bus with which the event target is associated. + * This parameter is required. + * + * @example + * my-event-bus + */ + eventBusName?: string; + /** + * @remarks + * The name of the event rule. + * This parameter is required. + * + * @example + * myrabbitmq.sourc + */ + eventRuleName?: string; + eventTargets?: EventTarget[]; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventRuleName: 'eventRuleName', + eventTargets: 'eventTargets', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventRuleName: 'string', + eventTargets: { 'type': 'array', 'itemType': EventTarget }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateEventTargetsResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. Valid values: + * + * * Success: The request is successful. + * + * * Other codes: The request failed. For more information about error codes, see Error codes. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The returned error message. + * + * @example + * Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 2922208e-e1c6-43ee-bfd1-aca50263bc8a + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateEventTargetsResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: CreateEventTargetsResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: CreateEventTargetsResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateEventTargetsRequest extends $tea.Model { + /** + * @remarks + * The name of the event bus with which the event target is associated. + * This parameter is required. + * + * @example + * my-event-bus + */ + eventBusName?: string; + /** + * @remarks + * The name of the event rule. + * This parameter is required. + * + * @example + * myrabbitmq.sourc + */ + eventRuleName?: string; + eventTargets?: EventTarget[]; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventRuleName: 'eventRuleName', + eventTargets: 'eventTargets', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventRuleName: 'string', + eventTargets: { 'type': 'array', 'itemType': EventTarget }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateEventTargetsResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. Valid values: + * + * * Success: The request is successful. + * + * * Other codes: The request failed. For more information about error codes, see Error codes. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The returned error message. + * + * @example + * Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 2922208e-e1c6-43ee-bfd1-aca50263bc8a + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateEventTargetsResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: UpdateEventTargetsResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: UpdateEventTargetsResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteEventTargetsRequest extends $tea.Model { + /** + * @remarks + * The name of the event bus. + * + * @example + * MyEventBus + */ + eventBusName: string; + /** + * @remarks + * The name of the event rule. + * + * @example + * ramrolechange-mns + */ + eventRuleName: string; + /** + * @remarks + * The names of the event targets that you want to delete. + */ + eventTargetNames?: string[]; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventRuleName: 'eventRuleName', + eventTargetNames: 'eventTargetNames', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventRuleName: 'string', + eventTargetNames: { 'type': 'array', 'itemType': 'string' }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteEventTargetsResponseBody extends $tea.Model { + /** + * @remarks + * The returned response code. Valid values: + * + * * Success: The request is successful. + * + * * Other codes: The request failed. For more information about error codes, see Error codes. + * + * @example + * Success + */ + code?: string; + /** + * @remarks + * The returned error message. + * + * @example + * Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\r\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7] + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 2922208e-e1c6-43ee-bfd1-aca50263bc8a + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class DeleteEventTargetsResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: DeleteEventTargetsResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: DeleteEventTargetsResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventTargetsRequest extends $tea.Model { + /** + * @remarks + * The name of the event bus with which the event target is associated. + * This parameter is required. + * + * @example + * my-event-bus + */ + eventBusName?: string; + /** + * @remarks + * The name of the event rule. + * This parameter is required. + * + * @example + * myrabbitmq.sourc + */ + eventRuleName?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventRuleName: 'eventRuleName', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventRuleName: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventTargetsResponseBody extends $tea.Model { + /** + * @remarks + * The name of the event bus with which the event target is associated. + * This parameter is required. + * + * @example + * my-event-bus + */ + eventBusName?: string; + /** + * @remarks + * The name of the event rule. + * This parameter is required. + * + * @example + * myrabbitmq.sourc + */ + eventRuleName?: string; + eventTargets?: ListEventTargetsResponseBodyEventTargets[]; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventRuleName: 'eventRuleName', + eventTargets: 'eventTargets', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventRuleName: 'string', + eventTargets: { 'type': 'array', 'itemType': ListEventTargetsResponseBodyEventTargets }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventTargetsResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: ListEventTargetsResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: ListEventTargetsResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +/** + * @remarks + * EventType Controller apis: + * listEventTypes * + */ +export class ListEventTypesRequest extends $tea.Model { + /** + * @remarks + * The name of the event bus. + * This parameter is required. + * + * @example + * demo + */ + eventBusName?: string; + /** + * @remarks + * EventSource is required for querying default bus events. + * + * @example + * testEventSourceName + */ + eventSourceName?: string; + /** + * @remarks + * The number of entries returned per page. + * + * @example + * 10 + */ + maxResults?: number; + /** + * @remarks + * If excess return values exist, this parameter is returned. + * + * @example + * 0 + */ + nextToken?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventSourceName: 'eventSourceName', + maxResults: 'maxResults', + nextToken: 'nextToken', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventSourceName: 'string', + maxResults: 'number', + nextToken: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventTypesResponseBody extends $tea.Model { + eventTypes?: ListEventTypesResponseBodyEventTypes[]; + /** + * @remarks + * If excess return values exist, this parameter is returned. + * + * @example + * 10 + */ + nextToken?: string; + /** + * @remarks + * The total number of entries. + * + * @example + * 2 + */ + total?: number; + /** + * @remarks + * If you set Limit and excess return values exist, this parameter is returned. + * + * @example + * 10 + */ + maxResults?: number; + /** + * @remarks + * The status code returned. The status code 200 indicates that the request was successful. + * + * @example + * 200 + */ + code?: string; + /** + * @remarks + * The error message that is returned if the request failed. + * + * @example + * EventBusNotExist + */ + message?: string; + /** + * @remarks + * The request ID. + * + * @example + * 580A938B-6107-586C-8EC7-F22EEBEDA9E6 + */ + requestId?: string; + static names(): { [key: string]: string } { + return { + eventTypes: 'eventTypes', + nextToken: 'nextToken', + total: 'total', + maxResults: 'maxResults', + code: 'code', + message: 'message', + requestId: 'requestId', + }; + } + + static types(): { [key: string]: any } { + return { + eventTypes: { 'type': 'array', 'itemType': ListEventTypesResponseBodyEventTypes }, + nextToken: 'string', + total: 'number', + maxResults: 'number', + code: 'string', + message: 'string', + requestId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventTypesResponse extends $tea.Model { + headers?: { [key: string]: string }; + statusCode?: number; + body?: ListEventTypesResponseBody; + static names(): { [key: string]: string } { + return { + headers: 'headers', + statusCode: 'statusCode', + body: 'body', + }; + } + + static types(): { [key: string]: any } { + return { + headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, + statusCode: 'number', + body: ListEventTypesResponseBody, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventBusesResponseBodyEventBuses extends $tea.Model { + /** + * @remarks + * The description of the queried event bus. + * + * @example + * bus_description + */ + description?: string; + /** + * @remarks + * The name of the queried event bus. + * + * @example + * default + */ + eventBusName?: string; + static names(): { [key: string]: string } { + return { + description: 'description', + eventBusName: 'eventBusName', + }; + } + + static types(): { [key: string]: any } { + return { + description: 'string', + eventBusName: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateApiDestinationRequestHttpApiParametersApiParameters extends $tea.Model { + name?: string; + /** + * @remarks + * The description of the API destination. The description can be up to 255 characters in length. + */ + description?: string; + type?: string; + defaultValue?: string; + in?: string; + static names(): { [key: string]: string } { + return { + name: 'name', + description: 'description', + type: 'type', + defaultValue: 'defaultValue', + in: 'in', + }; + } + + static types(): { [key: string]: any } { + return { + name: 'string', + description: 'string', + type: 'string', + defaultValue: 'string', + in: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateApiDestinationRequestHttpApiParameters extends $tea.Model { + /** + * @remarks + * The endpoint of the API destination. The endpoint can be up to 127 characters in length. This parameter is required. + * + * @example + * http://127.0.0.1:8001/api + */ + endpoint?: string; + /** + * @remarks + * The HTTP request method. Valid values: + * + * + * * GET + * + * * POST + * + * * HEAD + * + * * DELETE + * + * * PUT + * + * * PATCH + * + * + * This parameter is required. + * + * @example + * POST + */ + method?: string; + /** + * @remarks + * TODO + */ + apiParameters?: CreateApiDestinationRequestHttpApiParametersApiParameters[]; + static names(): { [key: string]: string } { + return { + endpoint: 'endpoint', + method: 'method', + apiParameters: 'apiParameters', + }; + } + + static types(): { [key: string]: any } { + return { + endpoint: 'string', + method: 'string', + apiParameters: { 'type': 'array', 'itemType': CreateApiDestinationRequestHttpApiParametersApiParameters }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateApiDestinationRequestHttpApiParametersApiParameters extends $tea.Model { + name?: string; + /** + * @remarks + * The description of the API destination. The description can be up to 255 characters in length. + */ + description?: string; + type?: string; + defaultValue?: string; + in?: string; + static names(): { [key: string]: string } { + return { + name: 'name', + description: 'description', + type: 'type', + defaultValue: 'defaultValue', + in: 'in', + }; + } + + static types(): { [key: string]: any } { + return { + name: 'string', + description: 'string', + type: 'string', + defaultValue: 'string', + in: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateApiDestinationRequestHttpApiParameters extends $tea.Model { + /** + * @remarks + * The endpoint of the API destination. The endpoint can be up to 127 characters in length. This parameter is required. + * + * @example + * http://127.0.0.1:8001/api + */ + endpoint?: string; + /** + * @remarks + * The HTTP request method. Valid values: + * + * + * * GET + * + * * POST + * + * * HEAD + * + * * DELETE + * + * * PUT + * + * * PATCH + * + * + * This parameter is required. + * + * @example + * POST + */ + method?: string; + /** + * @remarks + * TODO + */ + apiParameters?: UpdateApiDestinationRequestHttpApiParametersApiParameters[]; + static names(): { [key: string]: string } { + return { + endpoint: 'endpoint', + method: 'method', + apiParameters: 'apiParameters', + }; + } + + static types(): { [key: string]: any } { + return { + endpoint: 'string', + method: 'string', + apiParameters: { 'type': 'array', 'itemType': UpdateApiDestinationRequestHttpApiParametersApiParameters }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetApiDestinationResponseBodyHttpApiParametersApiParameters extends $tea.Model { + name?: string; + /** + * @remarks + * The description of the API destination. The description can be up to 255 characters in length. + */ + description?: string; + type?: string; + defaultValue?: string; + in?: string; + static names(): { [key: string]: string } { + return { + name: 'name', + description: 'description', + type: 'type', + defaultValue: 'defaultValue', + in: 'in', + }; + } + + static types(): { [key: string]: any } { + return { + name: 'string', + description: 'string', + type: 'string', + defaultValue: 'string', + in: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetApiDestinationResponseBodyHttpApiParameters extends $tea.Model { + /** + * @remarks + * The endpoint of the API destination. + * + * @example + * http://127.0.0.1:8001/api + */ + endpoint?: string; + /** + * @remarks + * The HTTP request method. Valid values: + * + * - POST + * + * - GET + * + * - DELETE + * + * - PUT + * + * - HEAD + * + * - TRACE + * + * - PATCH + * + * @example + * POST + */ + method?: string; + /** + * @remarks + * TODO + */ + apiParameters?: GetApiDestinationResponseBodyHttpApiParametersApiParameters[]; + static names(): { [key: string]: string } { + return { + endpoint: 'endpoint', + method: 'method', + apiParameters: 'apiParameters', + }; + } + + static types(): { [key: string]: any } { + return { + endpoint: 'string', + method: 'string', + apiParameters: { 'type': 'array', 'itemType': GetApiDestinationResponseBodyHttpApiParametersApiParameters }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters extends $tea.Model { + name?: string; + /** + * @remarks + * The description of the API destination. The description can be up to 255 characters in length. + */ + description?: string; + type?: string; + defaultValue?: string; + in?: string; + static names(): { [key: string]: string } { + return { + name: 'name', + description: 'description', + type: 'type', + defaultValue: 'defaultValue', + in: 'in', + }; + } + + static types(): { [key: string]: any } { + return { + name: 'string', + description: 'string', + type: 'string', + defaultValue: 'string', + in: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters extends $tea.Model { + /** + * @remarks + * The endpoint of the API destination. + * + * @example + * http://127.0.0.1:8001/api + */ + endpoint?: string; + /** + * @remarks + * The HTTP request method. Valid values: + * + * - POST + * + * - GET + * + * - DELETE + * + * - PUT + * + * - HEAD + * + * - TRACE + * + * - PATCH + * + * @example + * POST + */ + method?: string; + /** + * @remarks + * TODO + */ + apiParameters?: ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters[]; + static names(): { [key: string]: string } { + return { + endpoint: 'endpoint', + method: 'method', + apiParameters: 'apiParameters', + }; + } + + static types(): { [key: string]: any } { + return { + endpoint: 'string', + method: 'string', + apiParameters: { 'type': 'array', 'itemType': ListApiDestinationsResponseBodyApiDestinationsHttpApiParametersApiParameters }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListApiDestinationsResponseBodyApiDestinations extends $tea.Model { + /** + * @remarks + * The name of the API destination. + * + * @example + * api-destination-2 + */ + apiDestinationName?: string; + /** + * @remarks + * The connection name. + * + * @example + * connection-name + */ + connectionName?: string; + /** + * @remarks + * The description of the connection. + * + * @example + * demo + */ + description?: string; + /** + * @remarks + * The time when the API destination was created. + * + * @example + * 1665223213000 + */ + gmtCreate?: number; + /** + * @remarks + * The request parameters that are configured for the API destination. + */ + httpApiParameters?: ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters; + /** + * @remarks + * TODO + */ + invocationRateLimitPerSecond?: number; + static names(): { [key: string]: string } { + return { + apiDestinationName: 'apiDestinationName', + connectionName: 'connectionName', + description: 'description', + gmtCreate: 'gmtCreate', + httpApiParameters: 'httpApiParameters', + invocationRateLimitPerSecond: 'invocationRateLimitPerSecond', + }; + } + + static types(): { [key: string]: any } { + return { + apiDestinationName: 'string', + connectionName: 'string', + description: 'string', + gmtCreate: 'number', + httpApiParameters: ListApiDestinationsResponseBodyApiDestinationsHttpApiParameters, + invocationRateLimitPerSecond: 'number', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateConnectionRequestAuthParametersApiKeyAuthParameters extends $tea.Model { + /** + * @remarks + * The key of the API key. + * + * @example + * Token + */ + apiKeyName?: string; + /** + * @remarks + * The value of the API key. + * + * @example + * adkjnakddh**** + */ + apiKeyValue?: string; + static names(): { [key: string]: string } { + return { + apiKeyName: 'apiKeyName', + apiKeyValue: 'apiKeyValue', + }; + } + + static types(): { [key: string]: any } { + return { + apiKeyName: 'string', + apiKeyValue: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateConnectionRequestAuthParametersBasicAuthParameters extends $tea.Model { + /** + * @remarks + * The password for basic authentication. + * + * @example + * ******* + */ + password?: string; + /** + * @remarks + * The username for basic authentication. + * + * @example + * admin + */ + username?: string; + static names(): { [key: string]: string } { + return { + password: 'password', + username: 'username', + }; + } + + static types(): { [key: string]: any } { + return { + password: 'string', + username: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateConnectionRequestAuthParametersOauthParametersClientParameters extends $tea.Model { + /** + * @remarks + * The client ID. + * + * @example + * ClientID + */ + clientID?: string; + /** + * @remarks + * The client key secret of the application. + * + * @example + * ClientSecret + */ + clientSecret?: string; + static names(): { [key: string]: string } { + return { + clientID: 'clientID', + clientSecret: 'clientSecret', + }; + } + + static types(): { [key: string]: any } { + return { + clientID: 'string', + clientSecret: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters extends $tea.Model { + /** + * @remarks + * Indicates whether authentication is enabled. + * + * @example + * false + */ + isValueSecret?: string; + /** + * @remarks + * The key in the request body. + * + * @example + * name + */ + key?: string; + /** + * @remarks + * The value of the key in the request body. + * + * @example + * demo + */ + value?: string; + static names(): { [key: string]: string } { + return { + isValueSecret: 'isValueSecret', + key: 'key', + value: 'value', + }; + } + + static types(): { [key: string]: any } { + return { + isValueSecret: 'string', + key: 'string', + value: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters extends $tea.Model { + /** + * @remarks + * Indicates whether authentication is enabled. + * + * @example + * false + */ + isValueSecret?: string; + /** + * @remarks + * The key in the request header. + * + * @example + * name + */ + key?: string; + /** + * @remarks + * The value of the key in the request header. + * + * @example + * demo + */ + value?: string; + static names(): { [key: string]: string } { + return { + isValueSecret: 'isValueSecret', + key: 'key', + value: 'value', + }; + } + + static types(): { [key: string]: any } { + return { + isValueSecret: 'string', + key: 'string', + value: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters extends $tea.Model { + /** + * @remarks + * Indicates whether authentication is enabled. + * + * @example + * false + */ + isValueSecret?: string; + /** + * @remarks + * The key in the request path. + * + * @example + * name + */ + key?: string; + /** + * @remarks + * The value of the key in the request path. + * + * @example + * demo + */ + value?: string; + static names(): { [key: string]: string } { + return { + isValueSecret: 'isValueSecret', + key: 'key', + value: 'value', + }; + } + + static types(): { [key: string]: any } { + return { + isValueSecret: 'string', + key: 'string', + value: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters extends $tea.Model { + /** + * @remarks + * The parameters that are configured for the request. + */ + bodyParameters?: CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters[]; + /** + * @remarks + * The parameters that are configured for the request header. + */ + headerParameters?: CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters[]; + /** + * @remarks + * The parameters that are configured for the request path. + */ + queryStringParameters?: CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters[]; + static names(): { [key: string]: string } { + return { + bodyParameters: 'bodyParameters', + headerParameters: 'headerParameters', + queryStringParameters: 'queryStringParameters', + }; + } + + static types(): { [key: string]: any } { + return { + bodyParameters: { 'type': 'array', 'itemType': CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters }, + headerParameters: { 'type': 'array', 'itemType': CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters }, + queryStringParameters: { 'type': 'array', 'itemType': CreateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateConnectionRequestAuthParametersOauthParameters extends $tea.Model { + /** + * @remarks + * The endpoint that is used to obtain the OAuth token. + * + * @example + * http://localhost:8080/oauth/token + */ + authorizationEndpoint?: string; + /** + * @remarks + * The parameters that are configured for the client. + */ + clientParameters?: CreateConnectionRequestAuthParametersOauthParametersClientParameters; + /** + * @remarks + * The HTTP request method. Valid values: + * + * - GET + * + * - POST + * + * - HEAD + * + * @example + * POST + */ + httpMethod?: string; + /** + * @remarks + * The request parameters for OAuth authentication. + */ + oauthHttpParameters?: CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters; + static names(): { [key: string]: string } { + return { + authorizationEndpoint: 'authorizationEndpoint', + clientParameters: 'clientParameters', + httpMethod: 'httpMethod', + oauthHttpParameters: 'oauthHttpParameters', + }; + } + + static types(): { [key: string]: any } { + return { + authorizationEndpoint: 'string', + clientParameters: CreateConnectionRequestAuthParametersOauthParametersClientParameters, + httpMethod: 'string', + oauthHttpParameters: CreateConnectionRequestAuthParametersOauthParametersOauthHttpParameters, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateConnectionRequestAuthParameters extends $tea.Model { + /** + * @remarks + * The parameters that are configured for API key authentication. + */ + apiKeyAuthParameters?: CreateConnectionRequestAuthParametersApiKeyAuthParameters; + /** + * @remarks + * The authentication type. Valid values: + * + * BASIC_AUTH: basic authentication. + * + * Introduction: Basic authentication is a simple authentication scheme built into the HTTP protocol. When you use the HTTP protocol for communications, the authentication method that the HTTP server uses to authenticate user identities on the client is defined in the protocol. The request header is in the Authorization: Basic Base64-encoded string (Username:Password) format. + * + * 1. Username and Password are required + * + * API_KEY_AUTH: API key authentication. + * + * Introduction: The request header is in the Token: Token value format. + * + * * ApiKeyName and ApiKeyValue are required. + * + * OAUTH_AUTH: OAuth authentication. + * + * Introduction: OAuth2.0 is an authentication mechanism. In normal cases, a system that does not use OAuth2.0 can access the resources of the server from the client. To ensure access security, access tokens are used to authenticate users in OAuth 2.0. The client must use an access token to access protected resources. This way, OAuth 2.0 protects resources from being accessed from malicious clients and improves system security. + * + * * AuthorizationEndpoint, OAuthHttpParameters, and HttpMethod are required. + * + * @example + * BASIC_AUTH + */ + authorizationType?: string; + /** + * @remarks + * The parameters that are configured for basic authentication. + */ + basicAuthParameters?: CreateConnectionRequestAuthParametersBasicAuthParameters; + /** + * @remarks + * The parameters that are configured for OAuth authentication. + */ + oauthParameters?: CreateConnectionRequestAuthParametersOauthParameters; + static names(): { [key: string]: string } { + return { + apiKeyAuthParameters: 'apiKeyAuthParameters', + authorizationType: 'authorizationType', + basicAuthParameters: 'basicAuthParameters', + oauthParameters: 'oauthParameters', + }; + } + + static types(): { [key: string]: any } { + return { + apiKeyAuthParameters: CreateConnectionRequestAuthParametersApiKeyAuthParameters, + authorizationType: 'string', + basicAuthParameters: CreateConnectionRequestAuthParametersBasicAuthParameters, + oauthParameters: CreateConnectionRequestAuthParametersOauthParameters, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class CreateConnectionRequestNetworkParameters extends $tea.Model { + /** + * @remarks + * The network type. Valid values: + * + * PublicNetwork and PrivateNetwork. + * + * * Note: If you set this parameter to PrivateNetwork, you must configure VpcId, VswitcheId, and SecurityGroupId. + * + * This parameter is required. + * + * @example + * PublicNetwork + */ + networkType?: string; + /** + * @remarks + * The ID of the security group. + * + * @example + * eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9**** + */ + securityGroupId?: string; + /** + * @remarks + * The VPC. ID + * + * @example + * eb-test/vpc-bp1symadadwnwg**** + */ + vpcId?: string; + /** + * @remarks + * The vSwitch ID. + * + * @example + * vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeq**** + */ + vswitcheId?: string; + static names(): { [key: string]: string } { + return { + networkType: 'networkType', + securityGroupId: 'securityGroupId', + vpcId: 'vpcId', + vswitcheId: 'vswitcheId', + }; + } + + static types(): { [key: string]: any } { + return { + networkType: 'string', + securityGroupId: 'string', + vpcId: 'string', + vswitcheId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateConnectionRequestAuthParametersApiKeyAuthParameters extends $tea.Model { + /** + * @remarks + * The key of the API key. + * + * @example + * Token + */ + apiKeyName?: string; + /** + * @remarks + * The value of the API key. + * + * @example + * adkjnakddh**** + */ + apiKeyValue?: string; + static names(): { [key: string]: string } { + return { + apiKeyName: 'apiKeyName', + apiKeyValue: 'apiKeyValue', + }; + } + + static types(): { [key: string]: any } { + return { + apiKeyName: 'string', + apiKeyValue: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateConnectionRequestAuthParametersBasicAuthParameters extends $tea.Model { + /** + * @remarks + * The password for basic authentication. + * + * @example + * ******* + */ + password?: string; + /** + * @remarks + * The username for basic authentication. + * + * @example + * admin + */ + username?: string; + static names(): { [key: string]: string } { + return { + password: 'password', + username: 'username', + }; + } + + static types(): { [key: string]: any } { + return { + password: 'string', + username: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateConnectionRequestAuthParametersOauthParametersClientParameters extends $tea.Model { + /** + * @remarks + * The client ID. + * + * @example + * ClientID + */ + clientID?: string; + /** + * @remarks + * The client key secret of the application. + * + * @example + * ClientSecret + */ + clientSecret?: string; + static names(): { [key: string]: string } { + return { + clientID: 'clientID', + clientSecret: 'clientSecret', + }; + } + + static types(): { [key: string]: any } { + return { + clientID: 'string', + clientSecret: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters extends $tea.Model { + /** + * @remarks + * Indicates whether authentication is enabled. + * + * @example + * false + */ + isValueSecret?: string; + /** + * @remarks + * The key in the request body. + * + * @example + * name + */ + key?: string; + /** + * @remarks + * The value of the key in the request body. + * + * @example + * demo + */ + value?: string; + static names(): { [key: string]: string } { + return { + isValueSecret: 'isValueSecret', + key: 'key', + value: 'value', + }; + } + + static types(): { [key: string]: any } { + return { + isValueSecret: 'string', + key: 'string', + value: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters extends $tea.Model { + /** + * @remarks + * Indicates whether authentication is enabled. + * + * @example + * false + */ + isValueSecret?: string; + /** + * @remarks + * The key in the request header. + * + * @example + * name + */ + key?: string; + /** + * @remarks + * The value of the key in the request header. + * + * @example + * demo + */ + value?: string; + static names(): { [key: string]: string } { + return { + isValueSecret: 'isValueSecret', + key: 'key', + value: 'value', + }; + } + + static types(): { [key: string]: any } { + return { + isValueSecret: 'string', + key: 'string', + value: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters extends $tea.Model { + /** + * @remarks + * Indicates whether authentication is enabled. + * + * @example + * false + */ + isValueSecret?: string; + /** + * @remarks + * The key in the request path. + * + * @example + * name + */ + key?: string; + /** + * @remarks + * The value of the key in the request path. + * + * @example + * demo + */ + value?: string; + static names(): { [key: string]: string } { + return { + isValueSecret: 'isValueSecret', + key: 'key', + value: 'value', + }; + } + + static types(): { [key: string]: any } { + return { + isValueSecret: 'string', + key: 'string', + value: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters extends $tea.Model { + /** + * @remarks + * The parameters that are configured for the request. + */ + bodyParameters?: UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters[]; + /** + * @remarks + * The parameters that are configured for the request header. + */ + headerParameters?: UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters[]; + /** + * @remarks + * The parameters that are configured for the request path. + */ + queryStringParameters?: UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters[]; + static names(): { [key: string]: string } { + return { + bodyParameters: 'bodyParameters', + headerParameters: 'headerParameters', + queryStringParameters: 'queryStringParameters', + }; + } + + static types(): { [key: string]: any } { + return { + bodyParameters: { 'type': 'array', 'itemType': UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersBodyParameters }, + headerParameters: { 'type': 'array', 'itemType': UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersHeaderParameters }, + queryStringParameters: { 'type': 'array', 'itemType': UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParametersQueryStringParameters }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateConnectionRequestAuthParametersOauthParameters extends $tea.Model { + /** + * @remarks + * The endpoint that is used to obtain the OAuth token. + * + * @example + * http://localhost:8080/oauth/token + */ + authorizationEndpoint?: string; + /** + * @remarks + * The parameters that are configured for the client. + */ + clientParameters?: UpdateConnectionRequestAuthParametersOauthParametersClientParameters; + /** + * @remarks + * The HTTP request method. Valid values: + * + * - GET + * + * - POST + * + * - HEAD + * + * @example + * POST + */ + httpMethod?: string; + /** + * @remarks + * The request parameters for OAuth authentication. + */ + oauthHttpParameters?: UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters; + static names(): { [key: string]: string } { + return { + authorizationEndpoint: 'authorizationEndpoint', + clientParameters: 'clientParameters', + httpMethod: 'httpMethod', + oauthHttpParameters: 'oauthHttpParameters', + }; + } + + static types(): { [key: string]: any } { + return { + authorizationEndpoint: 'string', + clientParameters: UpdateConnectionRequestAuthParametersOauthParametersClientParameters, + httpMethod: 'string', + oauthHttpParameters: UpdateConnectionRequestAuthParametersOauthParametersOauthHttpParameters, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateConnectionRequestAuthParameters extends $tea.Model { + /** + * @remarks + * The parameters that are configured for API key authentication. + */ + apiKeyAuthParameters?: UpdateConnectionRequestAuthParametersApiKeyAuthParameters; + /** + * @remarks + * The authentication type. Valid values: + * + * BASIC_AUTH: basic authentication. + * + * Introduction: Basic authentication is a simple authentication scheme built into the HTTP protocol. When you use the HTTP protocol for communications, the authentication method that the HTTP server uses to authenticate user identities on the client is defined in the protocol. The request header is in the Authorization: Basic Base64-encoded string (Username:Password) format. + * + * 1. Username and Password are required + * + * API_KEY_AUTH: API key authentication. + * + * Introduction: The request header is in the Token: Token value format. + * + * * ApiKeyName and ApiKeyValue are required. + * + * OAUTH_AUTH: OAuth authentication. + * + * Introduction: OAuth2.0 is an authentication mechanism. In normal cases, a system that does not use OAuth2.0 can access the resources of the server from the client. To ensure access security, access tokens are used to authenticate users in OAuth 2.0. The client must use an access token to access protected resources. This way, OAuth 2.0 protects resources from being accessed from malicious clients and improves system security. + * + * * AuthorizationEndpoint, OAuthHttpParameters, and HttpMethod are required. + * + * @example + * BASIC_AUTH + */ + authorizationType?: string; + /** + * @remarks + * The parameters that are configured for basic authentication. + */ + basicAuthParameters?: UpdateConnectionRequestAuthParametersBasicAuthParameters; + /** + * @remarks + * The parameters that are configured for OAuth authentication. + */ + oauthParameters?: UpdateConnectionRequestAuthParametersOauthParameters; + static names(): { [key: string]: string } { + return { + apiKeyAuthParameters: 'apiKeyAuthParameters', + authorizationType: 'authorizationType', + basicAuthParameters: 'basicAuthParameters', + oauthParameters: 'oauthParameters', + }; + } + + static types(): { [key: string]: any } { + return { + apiKeyAuthParameters: UpdateConnectionRequestAuthParametersApiKeyAuthParameters, + authorizationType: 'string', + basicAuthParameters: UpdateConnectionRequestAuthParametersBasicAuthParameters, + oauthParameters: UpdateConnectionRequestAuthParametersOauthParameters, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class UpdateConnectionRequestNetworkParameters extends $tea.Model { + /** + * @remarks + * The network type. Valid values: + * + * PublicNetwork and PrivateNetwork. + * + * * Note: If you set this parameter to PrivateNetwork, you must configure VpcId, VswitcheId, and SecurityGroupId. + * + * This parameter is required. + * + * @example + * PublicNetwork + */ + networkType?: string; + /** + * @remarks + * The ID of the security group. + * + * @example + * eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9**** + */ + securityGroupId?: string; + /** + * @remarks + * The VPC. ID + * + * @example + * eb-test/vpc-bp1symadadwnwg**** + */ + vpcId?: string; + /** + * @remarks + * The vSwitch ID. + * + * @example + * vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeq**** + */ + vswitcheId?: string; + static names(): { [key: string]: string } { + return { + networkType: 'networkType', + securityGroupId: 'securityGroupId', + vpcId: 'vpcId', + vswitcheId: 'vswitcheId', + }; + } + + static types(): { [key: string]: any } { + return { + networkType: 'string', + securityGroupId: 'string', + vpcId: 'string', + vswitcheId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters extends $tea.Model { + /** + * @remarks + * The API key. + * + * @example + * Token + */ + apiKeyName?: string; + /** + * @remarks + * The value of the API key. + * + * @example + * asdkjnqkwejooa + */ + apiKeyValue?: string; + static names(): { [key: string]: string } { + return { + apiKeyName: 'apiKeyName', + apiKeyValue: 'apiKeyValue', + }; + } + + static types(): { [key: string]: any } { + return { + apiKeyName: 'string', + apiKeyValue: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters extends $tea.Model { + /** + * @remarks + * The password for basic authentication. + * + * @example + * admin + */ + password?: string; + /** + * @remarks + * The username for basic authentication. + * + * @example + * admin + */ + username?: string; + static names(): { [key: string]: string } { + return { + password: 'password', + username: 'username', + }; + } + + static types(): { [key: string]: any } { + return { + password: 'string', + username: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters extends $tea.Model { + /** + * @remarks + * The client ID. + * + * @example + * ClientID + */ + clientID?: string; + /** + * @remarks + * The client key secret of the application. + * + * @example + * ClientSecret + */ + clientSecret?: string; + static names(): { [key: string]: string } { + return { + clientID: 'clientID', + clientSecret: 'clientSecret', + }; + } + + static types(): { [key: string]: any } { + return { + clientID: 'string', + clientSecret: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters extends $tea.Model { + /** + * @remarks + * Indicates whether authentication is enabled. + * + * @example + * false + */ + isValueSecret?: string; + /** + * @remarks + * The key in the request body. + * + * @example + * name + */ + key?: string; + /** + * @remarks + * The value of the key in the request body. + * + * @example + * demo + */ + value?: string; + static names(): { [key: string]: string } { + return { + isValueSecret: 'isValueSecret', + key: 'key', + value: 'value', + }; + } + + static types(): { [key: string]: any } { + return { + isValueSecret: 'string', + key: 'string', + value: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters extends $tea.Model { + /** + * @remarks + * Indicates whether authentication is enabled. + * + * @example + * false + */ + isValueSecret?: string; + /** + * @remarks + * The key in the request header. + * + * @example + * name + */ + key?: string; + /** + * @remarks + * The value of the key in the request header. + * + * @example + * demo + */ + value?: string; + static names(): { [key: string]: string } { + return { + isValueSecret: 'isValueSecret', + key: 'key', + value: 'value', + }; + } + + static types(): { [key: string]: any } { + return { + isValueSecret: 'string', + key: 'string', + value: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters extends $tea.Model { + /** + * @remarks + * Indicates whether authentication is enabled. + * + * @example + * false + */ + isValueSecret?: string; + /** + * @remarks + * The key in the request path. + * + * @example + * name + */ + key?: string; + /** + * @remarks + * The value of the key in the request path. + * + * @example + * demo + */ + value?: string; + static names(): { [key: string]: string } { + return { + isValueSecret: 'isValueSecret', + key: 'key', + value: 'value', + }; + } + + static types(): { [key: string]: any } { + return { + isValueSecret: 'string', + key: 'string', + value: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters extends $tea.Model { + /** + * @remarks + * The parameters that are configured for the request. + */ + bodyParameters?: GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters[]; + /** + * @remarks + * The parameters that are configured for the request header. + */ + headerParameters?: GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters[]; + /** + * @remarks + * The parameters that are configured for the request path. + */ + queryStringParameters?: GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters[]; + static names(): { [key: string]: string } { + return { + bodyParameters: 'bodyParameters', + headerParameters: 'headerParameters', + queryStringParameters: 'queryStringParameters', + }; + } + + static types(): { [key: string]: any } { + return { + bodyParameters: { 'type': 'array', 'itemType': GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters }, + headerParameters: { 'type': 'array', 'itemType': GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters }, + queryStringParameters: { 'type': 'array', 'itemType': GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetConnectionResponseBodyConnectionsAuthParametersOauthParameters extends $tea.Model { + /** + * @remarks + * The endpoint that is used to obtain the OAuth token. + * + * @example + * http://localhost:8080/oauth/token + */ + authorizationEndpoint?: string; + /** + * @remarks + * The parameters that are configured for the client. + */ + clientParameters?: GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters; + /** + * @remarks + * The HTTP request method. Valid values: + * + * - GET + * + * - POST + * + * - HEAD + * + * @example + * POST + */ + httpMethod?: string; + /** + * @remarks + * The request parameters for OAuth authentication. + */ + oauthHttpParameters?: GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters; + static names(): { [key: string]: string } { + return { + authorizationEndpoint: 'authorizationEndpoint', + clientParameters: 'clientParameters', + httpMethod: 'httpMethod', + oauthHttpParameters: 'oauthHttpParameters', + }; + } + + static types(): { [key: string]: any } { + return { + authorizationEndpoint: 'string', + clientParameters: GetConnectionResponseBodyConnectionsAuthParametersOauthParametersClientParameters, + httpMethod: 'string', + oauthHttpParameters: GetConnectionResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetConnectionResponseBodyConnectionsAuthParameters extends $tea.Model { + /** + * @remarks + * The parameters that are configured for API key authentication. + */ + apiKeyAuthParameters?: GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters; + /** + * @remarks + * The authentication type. Valid values: + * + * + * - BASIC_AUTH: basic authentication. + * + * + * - API_KEY_AUTH: API key authentication. + * + * + * - OAUTH_AUTH: OAuth authentication. + * + * @example + * BASIC_AUTH + */ + authorizationType?: string; + /** + * @remarks + * The parameters that are configured for basic authentication. + */ + basicAuthParameters?: GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters; + /** + * @remarks + * The parameters that are configured for OAuth authentication. + */ + oauthParameters?: GetConnectionResponseBodyConnectionsAuthParametersOauthParameters; + static names(): { [key: string]: string } { + return { + apiKeyAuthParameters: 'apiKeyAuthParameters', + authorizationType: 'authorizationType', + basicAuthParameters: 'basicAuthParameters', + oauthParameters: 'oauthParameters', + }; + } + + static types(): { [key: string]: any } { + return { + apiKeyAuthParameters: GetConnectionResponseBodyConnectionsAuthParametersApiKeyAuthParameters, + authorizationType: 'string', + basicAuthParameters: GetConnectionResponseBodyConnectionsAuthParametersBasicAuthParameters, + oauthParameters: GetConnectionResponseBodyConnectionsAuthParametersOauthParameters, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetConnectionResponseBodyConnectionsNetworkParameters extends $tea.Model { + /** + * @remarks + * The network type. Valid values:PublicNetwork and PrivateNetwork. + * + * @example + * PublicNetwork + */ + networkType?: string; + /** + * @remarks + * The security group ID. + * + * @example + * eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb + */ + securityGroupId?: string; + /** + * @remarks + * The virtual private cloud (VPC) ID. + * + * @example + * eb-test/vpc-bp1symadadwnwgmqud + */ + vpcId?: string; + /** + * @remarks + * The vSwitch ID. + * + * @example + * vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c + */ + vswitcheId?: string; + static names(): { [key: string]: string } { + return { + networkType: 'networkType', + securityGroupId: 'securityGroupId', + vpcId: 'vpcId', + vswitcheId: 'vswitcheId', + }; + } + + static types(): { [key: string]: any } { + return { + networkType: 'string', + securityGroupId: 'string', + vpcId: 'string', + vswitcheId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetConnectionResponseBodyConnections extends $tea.Model { + /** + * @remarks + * The parameters that are configured for authentication. + */ + authParameters?: GetConnectionResponseBodyConnectionsAuthParameters; + /** + * @remarks + * The connection name. + * + * @example + * connection-name + */ + connectionName?: string; + /** + * @remarks + * The connection description. + * + * @example + * The description of the connection. + */ + description?: string; + /** + * @remarks + * The time when the connection was created. + * + * @example + * 1592838994234 + */ + gmtCreate?: number; + /** + * @remarks + * The connection ID. + * + * @example + * 1141093 + */ + id?: number; + networkParameters?: GetConnectionResponseBodyConnectionsNetworkParameters; + static names(): { [key: string]: string } { + return { + authParameters: 'authParameters', + connectionName: 'connectionName', + description: 'description', + gmtCreate: 'gmtCreate', + id: 'id', + networkParameters: 'networkParameters', + }; + } + + static types(): { [key: string]: any } { + return { + authParameters: GetConnectionResponseBodyConnectionsAuthParameters, + connectionName: 'string', + description: 'string', + gmtCreate: 'number', + id: 'number', + networkParameters: GetConnectionResponseBodyConnectionsNetworkParameters, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters extends $tea.Model { + /** + * @remarks + * The API key. + * + * @example + * Token + */ + apiKeyName?: string; + /** + * @remarks + * The value of the API key. + * + * @example + * asdkjnqkwejooa + */ + apiKeyValue?: string; + static names(): { [key: string]: string } { + return { + apiKeyName: 'apiKeyName', + apiKeyValue: 'apiKeyValue', + }; + } + + static types(): { [key: string]: any } { + return { + apiKeyName: 'string', + apiKeyValue: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters extends $tea.Model { + /** + * @remarks + * The password for basic authentication. + * + * @example + * admin + */ + password?: string; + /** + * @remarks + * The username for basic authentication. + * + * @example + * admin + */ + username?: string; + static names(): { [key: string]: string } { + return { + password: 'password', + username: 'username', + }; + } + + static types(): { [key: string]: any } { + return { + password: 'string', + username: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters extends $tea.Model { + /** + * @remarks + * The client ID. + * + * @example + * ClientID + */ + clientID?: string; + /** + * @remarks + * The client key secret of the application. + * + * @example + * ClientSecret + */ + clientSecret?: string; + static names(): { [key: string]: string } { + return { + clientID: 'clientID', + clientSecret: 'clientSecret', + }; + } + + static types(): { [key: string]: any } { + return { + clientID: 'string', + clientSecret: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters extends $tea.Model { + /** + * @remarks + * Indicates whether authentication is enabled. + * + * @example + * false + */ + isValueSecret?: string; + /** + * @remarks + * The key in the request body. + * + * @example + * name + */ + key?: string; + /** + * @remarks + * The value of the key in the request body. + * + * @example + * demo + */ + value?: string; + static names(): { [key: string]: string } { + return { + isValueSecret: 'isValueSecret', + key: 'key', + value: 'value', + }; + } + + static types(): { [key: string]: any } { + return { + isValueSecret: 'string', + key: 'string', + value: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters extends $tea.Model { + /** + * @remarks + * Indicates whether authentication is enabled. + * + * @example + * false + */ + isValueSecret?: string; + /** + * @remarks + * The key in the request header. + * + * @example + * name + */ + key?: string; + /** + * @remarks + * The value of the key in the request header. + * + * @example + * demo + */ + value?: string; + static names(): { [key: string]: string } { + return { + isValueSecret: 'isValueSecret', + key: 'key', + value: 'value', + }; + } + + static types(): { [key: string]: any } { + return { + isValueSecret: 'string', + key: 'string', + value: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters extends $tea.Model { + /** + * @remarks + * Indicates whether authentication is enabled. + * + * @example + * false + */ + isValueSecret?: string; + /** + * @remarks + * The key in the request path. + * + * @example + * name + */ + key?: string; + /** + * @remarks + * The value of the key in the request path. + * + * @example + * demo + */ + value?: string; + static names(): { [key: string]: string } { + return { + isValueSecret: 'isValueSecret', + key: 'key', + value: 'value', + }; + } + + static types(): { [key: string]: any } { + return { + isValueSecret: 'string', + key: 'string', + value: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters extends $tea.Model { + /** + * @remarks + * The parameters that are configured for the request. + */ + bodyParameters?: ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters[]; + /** + * @remarks + * The parameters that are configured for the request header. + */ + headerParameters?: ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters[]; + /** + * @remarks + * The parameters that are configured for the request path. + */ + queryStringParameters?: ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters[]; + static names(): { [key: string]: string } { + return { + bodyParameters: 'bodyParameters', + headerParameters: 'headerParameters', + queryStringParameters: 'queryStringParameters', + }; + } + + static types(): { [key: string]: any } { + return { + bodyParameters: { 'type': 'array', 'itemType': ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersBodyParameters }, + headerParameters: { 'type': 'array', 'itemType': ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersHeaderParameters }, + queryStringParameters: { 'type': 'array', 'itemType': ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParametersQueryStringParameters }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters extends $tea.Model { + /** + * @remarks + * The endpoint that is used to obtain the OAuth token. + * + * @example + * http://localhost:8080/oauth/token + */ + authorizationEndpoint?: string; + /** + * @remarks + * The parameters that are configured for the client. + */ + clientParameters?: ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters; + /** + * @remarks + * The HTTP request method. Valid values: + * + * - GET + * + * - POST + * + * - HEAD + * + * @example + * POST + */ + httpMethod?: string; + /** + * @remarks + * The request parameters for OAuth authentication. + */ + oauthHttpParameters?: ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters; + static names(): { [key: string]: string } { + return { + authorizationEndpoint: 'authorizationEndpoint', + clientParameters: 'clientParameters', + httpMethod: 'httpMethod', + oauthHttpParameters: 'oauthHttpParameters', + }; + } + + static types(): { [key: string]: any } { + return { + authorizationEndpoint: 'string', + clientParameters: ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersClientParameters, + httpMethod: 'string', + oauthHttpParameters: ListConnectionsResponseBodyConnectionsAuthParametersOauthParametersOauthHttpParameters, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListConnectionsResponseBodyConnectionsAuthParameters extends $tea.Model { + /** + * @remarks + * The parameters that are configured for API key authentication. + */ + apiKeyAuthParameters?: ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters; + /** + * @remarks + * The authentication type. Valid values: + * + * + * - BASIC_AUTH: basic authentication. + * + * + * - API_KEY_AUTH: API key authentication. + * + * + * - OAUTH_AUTH: OAuth authentication. + * + * @example + * BASIC_AUTH + */ + authorizationType?: string; + /** + * @remarks + * The parameters that are configured for basic authentication. + */ + basicAuthParameters?: ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters; + /** + * @remarks + * The parameters that are configured for OAuth authentication. + */ + oauthParameters?: ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters; + static names(): { [key: string]: string } { + return { + apiKeyAuthParameters: 'apiKeyAuthParameters', + authorizationType: 'authorizationType', + basicAuthParameters: 'basicAuthParameters', + oauthParameters: 'oauthParameters', + }; + } + + static types(): { [key: string]: any } { + return { + apiKeyAuthParameters: ListConnectionsResponseBodyConnectionsAuthParametersApiKeyAuthParameters, + authorizationType: 'string', + basicAuthParameters: ListConnectionsResponseBodyConnectionsAuthParametersBasicAuthParameters, + oauthParameters: ListConnectionsResponseBodyConnectionsAuthParametersOauthParameters, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListConnectionsResponseBodyConnectionsNetworkParameters extends $tea.Model { + /** + * @remarks + * The network type. Valid values:PublicNetwork and PrivateNetwork. + * + * @example + * PublicNetwork + */ + networkType?: string; + /** + * @remarks + * The security group ID. + * + * @example + * eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb + */ + securityGroupId?: string; + /** + * @remarks + * The virtual private cloud (VPC) ID. + * + * @example + * eb-test/vpc-bp1symadadwnwgmqud + */ + vpcId?: string; + /** + * @remarks + * The vSwitch ID. + * + * @example + * vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c + */ + vswitcheId?: string; + static names(): { [key: string]: string } { + return { + networkType: 'networkType', + securityGroupId: 'securityGroupId', + vpcId: 'vpcId', + vswitcheId: 'vswitcheId', + }; + } + + static types(): { [key: string]: any } { + return { + networkType: 'string', + securityGroupId: 'string', + vpcId: 'string', + vswitcheId: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListConnectionsResponseBodyConnections extends $tea.Model { + /** + * @remarks + * The parameters that are configured for authentication. + */ + authParameters?: ListConnectionsResponseBodyConnectionsAuthParameters; + /** + * @remarks + * The connection name. + * + * @example + * connection-name + */ + connectionName?: string; + /** + * @remarks + * The connection description. + * + * @example + * The description of the connection. + */ + description?: string; + /** + * @remarks + * The time when the connection was created. + * + * @example + * 1592838994234 + */ + gmtCreate?: number; + /** + * @remarks + * The connection ID. + * + * @example + * 1141093 + */ + id?: number; + networkParameters?: ListConnectionsResponseBodyConnectionsNetworkParameters; + static names(): { [key: string]: string } { + return { + authParameters: 'authParameters', + connectionName: 'connectionName', + description: 'description', + gmtCreate: 'gmtCreate', + id: 'id', + networkParameters: 'networkParameters', + }; + } + + static types(): { [key: string]: any } { + return { + authParameters: ListConnectionsResponseBodyConnectionsAuthParameters, + connectionName: 'string', + description: 'string', + gmtCreate: 'number', + id: 'number', + networkParameters: ListConnectionsResponseBodyConnectionsNetworkParameters, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class PutEventsResponseBodyEntryList extends $tea.Model { + /** + * @remarks + * The event ID. + * + * @example + * a5747e4f-2af2-40b6-b262-d0140e995bf7 + */ + eventId?: string; + /** + * @remarks + * The returned error code. + */ + errorCode?: string; + /** + * @remarks + * The returned error message. + */ + errorMessage?: string; + static names(): { [key: string]: string } { + return { + eventId: 'eventId', + errorCode: 'errorCode', + errorMessage: 'errorMessage', + }; + } + + static types(): { [key: string]: any } { + return { + eventId: 'string', + errorCode: 'string', + errorMessage: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy extends $tea.Model { + pushRetryStrategy?: string; + maximumEventAgeInSeconds?: number; + maximumRetryAttempts?: number; + static names(): { [key: string]: string } { + return { + pushRetryStrategy: 'pushRetryStrategy', + maximumEventAgeInSeconds: 'maximumEventAgeInSeconds', + maximumRetryAttempts: 'maximumRetryAttempts', + }; + } + + static types(): { [key: string]: any } { + return { + pushRetryStrategy: 'string', + maximumEventAgeInSeconds: 'number', + maximumRetryAttempts: 'number', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue extends $tea.Model { + type?: string; + config?: { [key: string]: any }; + static names(): { [key: string]: string } { + return { + type: 'type', + config: 'config', + }; + } + + static types(): { [key: string]: any } { + return { + type: 'string', + config: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetEventRuleResponseBodyEventTargetsRunOptions extends $tea.Model { + errorsTolerance?: string; + retryStrategy?: GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy; + deadLetterQueue?: GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue; + static names(): { [key: string]: string } { + return { + errorsTolerance: 'errorsTolerance', + retryStrategy: 'retryStrategy', + deadLetterQueue: 'deadLetterQueue', + }; + } + + static types(): { [key: string]: any } { + return { + errorsTolerance: 'string', + retryStrategy: GetEventRuleResponseBodyEventTargetsRunOptionsRetryStrategy, + deadLetterQueue: GetEventRuleResponseBodyEventTargetsRunOptionsDeadLetterQueue, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class GetEventRuleResponseBodyEventTargets extends $tea.Model { + eventTargetName?: string; + className?: string; + config?: { [key: string]: any }; + runOptions?: GetEventRuleResponseBodyEventTargetsRunOptions; + static names(): { [key: string]: string } { + return { + eventTargetName: 'eventTargetName', + className: 'className', + config: 'config', + runOptions: 'runOptions', + }; + } + + static types(): { [key: string]: any } { + return { + eventTargetName: 'string', + className: 'string', + config: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' }, + runOptions: GetEventRuleResponseBodyEventTargetsRunOptions, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventRulesResponseBodyEventRules extends $tea.Model { + /** + * @remarks + * The name of the event bus with which the event source is associated. + * This parameter is required. + * + * @example + * my-event-bus + */ + eventBusName?: string; + /** + * @remarks + * The name of the event rule. + * This parameter is required. + * + * @example + * myrabbitmq.sourc + */ + eventRuleName?: string; + description?: string; + /** + * @remarks + * The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field. + * + * You can specify up to five expressions in the map data structure in each field. + * + * @example + * {\"source\": [{\"prefix\": \"acs.\"}],\"type\": [{\"prefix\":\"oss:ObjectReplication\"}],\"subject\":[{\"prefix\":\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\", \"suffix\":\".txt\"}]} + */ + filterPattern?: string; + /** + * @remarks + * The status of the event rule. Valid values: ENABLE (default): The event rule is enabled. DISABLE: The event rule is disabled. + * + * @example + * ENABLE + */ + status?: string; + gmtCreate?: string; + gmtModify?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventRuleName: 'eventRuleName', + description: 'description', + filterPattern: 'filterPattern', + status: 'status', + gmtCreate: 'gmtCreate', + gmtModify: 'gmtModify', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventRuleName: 'string', + description: 'string', + filterPattern: 'string', + status: 'string', + gmtCreate: 'string', + gmtModify: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventSourcesResponseBodyEventSources extends $tea.Model { + /** + * @remarks + * The name of the event bus. + * This parameter is required. + * + * @example + * demo + */ + eventBusName?: string; + /** + * @remarks + * EventSource is required for querying default bus events. + * + * @example + * testEventSourceName + */ + eventSourceName?: string; + /** + * @remarks + * The description of the event type. + * + * @example + * The description of the event type. + */ + description?: string; + className?: string; + config?: { [key: string]: any }; + gmtCreate?: string; + gmtModify?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventSourceName: 'eventSourceName', + description: 'description', + className: 'className', + config: 'config', + gmtCreate: 'gmtCreate', + gmtModify: 'gmtModify', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventSourceName: 'string', + description: 'string', + className: 'string', + config: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' }, + gmtCreate: 'string', + gmtModify: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class EventTargetRunOptionsRetryStrategy extends $tea.Model { + pushRetryStrategy?: string; + maximumEventAgeInSeconds?: number; + maximumRetryAttempts?: number; + static names(): { [key: string]: string } { + return { + pushRetryStrategy: 'pushRetryStrategy', + maximumEventAgeInSeconds: 'maximumEventAgeInSeconds', + maximumRetryAttempts: 'maximumRetryAttempts', + }; + } + + static types(): { [key: string]: any } { + return { + pushRetryStrategy: 'string', + maximumEventAgeInSeconds: 'number', + maximumRetryAttempts: 'number', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class EventTargetRunOptionsDeadLetterQueue extends $tea.Model { + type?: string; + config?: { [key: string]: any }; + static names(): { [key: string]: string } { + return { + type: 'type', + config: 'config', + }; + } + + static types(): { [key: string]: any } { + return { + type: 'string', + config: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class EventTargetRunOptions extends $tea.Model { + errorsTolerance?: string; + retryStrategy?: EventTargetRunOptionsRetryStrategy; + deadLetterQueue?: EventTargetRunOptionsDeadLetterQueue; + static names(): { [key: string]: string } { + return { + errorsTolerance: 'errorsTolerance', + retryStrategy: 'retryStrategy', + deadLetterQueue: 'deadLetterQueue', + }; + } + + static types(): { [key: string]: any } { + return { + errorsTolerance: 'string', + retryStrategy: EventTargetRunOptionsRetryStrategy, + deadLetterQueue: EventTargetRunOptionsDeadLetterQueue, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy extends $tea.Model { + pushRetryStrategy?: string; + maximumEventAgeInSeconds?: number; + maximumRetryAttempts?: number; + static names(): { [key: string]: string } { + return { + pushRetryStrategy: 'pushRetryStrategy', + maximumEventAgeInSeconds: 'maximumEventAgeInSeconds', + maximumRetryAttempts: 'maximumRetryAttempts', + }; + } + + static types(): { [key: string]: any } { + return { + pushRetryStrategy: 'string', + maximumEventAgeInSeconds: 'number', + maximumRetryAttempts: 'number', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue extends $tea.Model { + type?: string; + config?: { [key: string]: any }; + static names(): { [key: string]: string } { + return { + type: 'type', + config: 'config', + }; + } + + static types(): { [key: string]: any } { + return { + type: 'string', + config: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' }, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventTargetsResponseBodyEventTargetsRunOptions extends $tea.Model { + errorsTolerance?: string; + retryStrategy?: ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy; + deadLetterQueue?: ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue; + static names(): { [key: string]: string } { + return { + errorsTolerance: 'errorsTolerance', + retryStrategy: 'retryStrategy', + deadLetterQueue: 'deadLetterQueue', + }; + } + + static types(): { [key: string]: any } { + return { + errorsTolerance: 'string', + retryStrategy: ListEventTargetsResponseBodyEventTargetsRunOptionsRetryStrategy, + deadLetterQueue: ListEventTargetsResponseBodyEventTargetsRunOptionsDeadLetterQueue, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventTargetsResponseBodyEventTargets extends $tea.Model { + eventTargetName?: string; + className?: string; + config?: { [key: string]: any }; + runOptions?: ListEventTargetsResponseBodyEventTargetsRunOptions; + static names(): { [key: string]: string } { + return { + eventTargetName: 'eventTargetName', + className: 'className', + config: 'config', + runOptions: 'runOptions', + }; + } + + static types(): { [key: string]: any } { + return { + eventTargetName: 'string', + className: 'string', + config: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' }, + runOptions: ListEventTargetsResponseBodyEventTargetsRunOptions, + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + +export class ListEventTypesResponseBodyEventTypes extends $tea.Model { + /** + * @remarks + * The name of the event bus. + * This parameter is required. + * + * @example + * demo + */ + eventBusName?: string; + /** + * @remarks + * EventSource is required for querying default bus events. + * + * @example + * testEventSourceName + */ + eventSourceName?: string; + /** + * @remarks + * The name of the event type. + */ + eventTypeName?: string; + /** + * @remarks + * The description of the event type. + * + * @example + * The description of the event type. + */ + description?: string; + gmtCreate?: string; + gmtModify?: string; + static names(): { [key: string]: string } { + return { + eventBusName: 'eventBusName', + eventSourceName: 'eventSourceName', + eventTypeName: 'eventTypeName', + description: 'description', + gmtCreate: 'gmtCreate', + gmtModify: 'gmtModify', + }; + } + + static types(): { [key: string]: any } { + return { + eventBusName: 'string', + eventSourceName: 'string', + eventTypeName: 'string', + description: 'string', + gmtCreate: 'string', + gmtModify: 'string', + }; + } + + constructor(map?: { [key: string]: any }) { + super(map); + } +} + + +export default class Client extends OpenApi { + + constructor(config: $OpenApi.Config) { + super(config); + this._endpointRule = ""; + this.checkConfig(config); + this._endpoint = this.getEndpoint("eventbridge", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint); + } + + + getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {[key: string ]: string}, endpoint: string): string { + if (!Util.empty(endpoint)) { + return endpoint; + } + + if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) { + return endpointMap[regionId]; + } + + let result : string = ""; + if (!Util.empty(network) && !Util.equalString(network, "public")) { + network = `-${network}`; + } else { + network = ""; + } + + if (!Util.isUnset(suffix)) { + suffix = ""; + } else { + suffix = `-${suffix}`; + } + + if (Util.equalString(endpointRule, "regional")) { + if (Util.empty(regionId)) { + throw $tea.newError({ + message: "RegionId is empty, please set a valid RegionId", + }); + } + + result = `${productId}${suffix}${network}.${regionId}.aliyuncs.com`; + } else { + result = `${productId}${suffix}${network}.aliyuncs.com`; + } + + return result; + // return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix); + } + + /** + * Creates an event bus. + * + * @remarks + * You can call this API operation to create an event bus. + * + * @param request - CreateEventBusRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns CreateEventBusResponse + */ + async createEventBusWithOptions(request: CreateEventBusRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.description)) { + body["description"] = request.description; + } + + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "CreateEventBus", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/bus/createEventBus", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new CreateEventBusResponse({})); + } + + /** + * Creates an event bus. + * + * @remarks + * You can call this API operation to create an event bus. + * + * @param request - CreateEventBusRequest + * @returns CreateEventBusResponse + */ + async createEventBus(request: CreateEventBusRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.createEventBusWithOptions(request, runtime); + } + + /** + * Queries the detailed information about an event bus. + * + * @remarks + * You can call this API operation to query the detailed information about an event bus. + * + * @param request - GetEventBusRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns GetEventBusResponse + */ + async getEventBusWithOptions(request: GetEventBusRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "GetEventBus", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/bus/getEventBus", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new GetEventBusResponse({})); + } + + /** + * Queries the detailed information about an event bus. + * + * @remarks + * You can call this API operation to query the detailed information about an event bus. + * + * @param request - GetEventBusRequest + * @returns GetEventBusResponse + */ + async getEventBus(request: GetEventBusRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.getEventBusWithOptions(request, runtime); + } + + /** + * Queries all event buses. + * + * @remarks + * You can call this API operation to query all event buses. + * + * @param request - ListEventBusesRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns ListEventBusesResponse + */ + async listEventBusesWithOptions(request: ListEventBusesRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.maxResults)) { + body["maxResults"] = request.maxResults; + } + + if (!Util.isUnset(request.nextToken)) { + body["nextToken"] = request.nextToken; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "ListEventBuses", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/bus/listEventBuses", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new ListEventBusesResponse({})); + } + + /** + * Queries all event buses. + * + * @remarks + * You can call this API operation to query all event buses. + * + * @param request - ListEventBusesRequest + * @returns ListEventBusesResponse + */ + async listEventBuses(request: ListEventBusesRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.listEventBusesWithOptions(request, runtime); + } + + /** + * Deletes an event bus. + * + * @remarks + * You can call this API operation to delete an event bus. + * + * @param request - DeleteEventBusRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns DeleteEventBusResponse + */ + async deleteEventBusWithOptions(request: DeleteEventBusRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "DeleteEventBus", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/bus/deleteEventBus", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new DeleteEventBusResponse({})); + } + + /** + * Deletes an event bus. + * + * @remarks + * You can call this API operation to delete an event bus. + * + * @param request - DeleteEventBusRequest + * @returns DeleteEventBusResponse + */ + async deleteEventBus(request: DeleteEventBusRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.deleteEventBusWithOptions(request, runtime); + } + + /** + * Creates an API destination. + * + * @remarks + * You can call this API operation to create an API destination. + * + * @param request - CreateApiDestinationRequest (tmpReq before) + * @param runtime - runtime options for this request RuntimeOptions + * @returns CreateApiDestinationResponse + */ + async createApiDestinationWithOptions(request: CreateApiDestinationRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.apiDestinationName)) { + body["apiDestinationName"] = request.apiDestinationName; + } + + if (!Util.isUnset(request.connectionName)) { + body["connectionName"] = request.connectionName; + } + + if (!Util.isUnset(request.description)) { + body["description"] = request.description; + } + + if (!Util.isUnset(request.httpApiParameters)) { + body["httpApiParameters"] = request.httpApiParameters; + } + + if (!Util.isUnset(request.invocationRateLimitPerSecond)) { + body["invocationRateLimitPerSecond"] = request.invocationRateLimitPerSecond; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "CreateApiDestination", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/api-destination/createApiDestination", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new CreateApiDestinationResponse({})); + } + + /** + * Creates an API destination. + * + * @remarks + * You can call this API operation to create an API destination. + * + * @param request - CreateApiDestinationRequest + * @returns CreateApiDestinationResponse + */ + async createApiDestination(request: CreateApiDestinationRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.createApiDestinationWithOptions(request, runtime); + } + + /** + * Updates an API destination. + * + * @remarks + * You can call this API operation to update an API destination. + * + * @param request - UpdateApiDestinationRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns UpdateApiDestinationResponse + */ + async updateApiDestinationWithOptions(request: UpdateApiDestinationRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.apiDestinationName)) { + body["apiDestinationName"] = request.apiDestinationName; + } + + if (!Util.isUnset(request.connectionName)) { + body["connectionName"] = request.connectionName; + } + + if (!Util.isUnset(request.description)) { + body["description"] = request.description; + } + + if (!Util.isUnset(request.httpApiParameters)) { + body["httpApiParameters"] = request.httpApiParameters; + } + + if (!Util.isUnset(request.invocationRateLimitPerSecond)) { + body["invocationRateLimitPerSecond"] = request.invocationRateLimitPerSecond; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "UpdateApiDestination", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/api-destination/updateApiDestination", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new UpdateApiDestinationResponse({})); + } + + /** + * Updates an API destination. + * + * @remarks + * You can call this API operation to update an API destination. + * + * @param request - UpdateApiDestinationRequest + * @returns UpdateApiDestinationResponse + */ + async updateApiDestination(request: UpdateApiDestinationRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.updateApiDestinationWithOptions(request, runtime); + } + + /** + * Queries the information about an API destination. + * + * @remarks + * You can call this API operation to query the information about an API destination. + * + * @param request - GetApiDestinationRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns GetApiDestinationResponse + */ + async getApiDestinationWithOptions(request: GetApiDestinationRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.apiDestinationName)) { + body["apiDestinationName"] = request.apiDestinationName; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "GetApiDestination", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/api-destination/getApiDestination", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new GetApiDestinationResponse({})); + } + + /** + * Queries the information about an API destination. + * + * @remarks + * You can call this API operation to query the information about an API destination. + * + * @param request - GetApiDestinationRequest + * @returns GetApiDestinationResponse + */ + async getApiDestination(request: GetApiDestinationRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.getApiDestinationWithOptions(request, runtime); + } + + /** + * Deletes an API destination. + * + * @remarks + * You can call this API operation to delete an API destination. + * + * @param request - DeleteApiDestinationRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns DeleteApiDestinationResponse + */ + async deleteApiDestinationWithOptions(request: DeleteApiDestinationRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.apiDestinationName)) { + body["apiDestinationName"] = request.apiDestinationName; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "DeleteApiDestination", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/api-destination/deleteApiDestination", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new DeleteApiDestinationResponse({})); + } + + /** + * Deletes an API destination. + * + * @remarks + * You can call this API operation to delete an API destination. + * + * @param request - DeleteApiDestinationRequest + * @returns DeleteApiDestinationResponse + */ + async deleteApiDestination(request: DeleteApiDestinationRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.deleteApiDestinationWithOptions(request, runtime); + } + + /** + * Queries a list of API destinations. + * + * @remarks + * You can use this API operation to query a list of API destinations. + * + * @param request - ListApiDestinationsRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns ListApiDestinationsResponse + */ + async listApiDestinationsWithOptions(request: ListApiDestinationsRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.apiDestinationNamePrefix)) { + body["apiDestinationNamePrefix"] = request.apiDestinationNamePrefix; + } + + if (!Util.isUnset(request.connectionName)) { + body["connectionName"] = request.connectionName; + } + + if (!Util.isUnset(request.maxResults)) { + body["maxResults"] = request.maxResults; + } + + if (!Util.isUnset(request.nextToken)) { + body["nextToken"] = request.nextToken; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "ListApiDestinations", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/api-destination/listApiDestinations", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new ListApiDestinationsResponse({})); + } + + /** + * Queries a list of API destinations. + * + * @remarks + * You can use this API operation to query a list of API destinations. + * + * @param request - ListApiDestinationsRequest + * @returns ListApiDestinationsResponse + */ + async listApiDestinations(request: ListApiDestinationsRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.listApiDestinationsWithOptions(request, runtime); + } + + /** + * Creates a connection. + * + * @remarks + * You can call this API operation to create a connection. + * + * @param request - CreateConnectionRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns CreateConnectionResponse + */ + async createConnectionWithOptions(request: CreateConnectionRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.authParameters)) { + body["authParameters"] = request.authParameters; + } + + if (!Util.isUnset(request.connectionName)) { + body["connectionName"] = request.connectionName; + } + + if (!Util.isUnset(request.description)) { + body["description"] = request.description; + } + + if (!Util.isUnset(request.networkParameters)) { + body["networkParameters"] = request.networkParameters; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "CreateConnection", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/connection/createConnection", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new CreateConnectionResponse({})); + } + + /** + * Creates a connection. + * + * @remarks + * You can call this API operation to create a connection. + * + * @param request - CreateConnectionRequest + * @returns CreateConnectionResponse + */ + async createConnection(request: CreateConnectionRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.createConnectionWithOptions(request, runtime); + } + + /** + * Deletes a connection. + * + * @remarks + * You can call this API operation to delete a connection. + * + * @param request - DeleteConnectionRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns DeleteConnectionResponse + */ + async deleteConnectionWithOptions(request: DeleteConnectionRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.connectionName)) { + body["connectionName"] = request.connectionName; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "DeleteConnection", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/connection/deleteConnection", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new DeleteConnectionResponse({})); + } + + /** + * Deletes a connection. + * + * @remarks + * You can call this API operation to delete a connection. + * + * @param request - DeleteConnectionRequest + * @returns DeleteConnectionResponse + */ + async deleteConnection(request: DeleteConnectionRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.deleteConnectionWithOptions(request, runtime); + } + + /** + * Updates a connection. + * + * @remarks + * You can call this API operation to update a connection. + * + * @param request - UpdateConnectionRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns UpdateConnectionResponse + */ + async updateConnectionWithOptions(request: UpdateConnectionRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.authParameters)) { + body["authParameters"] = request.authParameters; + } + + if (!Util.isUnset(request.connectionName)) { + body["connectionName"] = request.connectionName; + } + + if (!Util.isUnset(request.description)) { + body["description"] = request.description; + } + + if (!Util.isUnset(request.networkParameters)) { + body["networkParameters"] = request.networkParameters; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "UpdateConnection", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/connection/updateConnection", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new UpdateConnectionResponse({})); + } + + /** + * Updates a connection. + * + * @remarks + * You can call this API operation to update a connection. + * + * @param request - UpdateConnectionRequest + * @returns UpdateConnectionResponse + */ + async updateConnection(request: UpdateConnectionRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.updateConnectionWithOptions(request, runtime); + } + + /** + * Queries the configurations of a connection. + * + * @remarks + * You can call this API operation to query the configurations of a connection. + * + * @param request - GetConnectionRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns GetConnectionResponse + */ + async getConnectionWithOptions(request: GetConnectionRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.connectionName)) { + body["connectionName"] = request.connectionName; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "GetConnection", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/connection/getConnection", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new GetConnectionResponse({})); + } + + /** + * Queries the configurations of a connection. + * + * @remarks + * You can call this API operation to query the configurations of a connection. + * + * @param request - GetConnectionRequest + * @returns GetConnectionResponse + */ + async getConnection(request: GetConnectionRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.getConnectionWithOptions(request, runtime); + } + + /** + * Queries the configurations of a connection. + * + * @remarks + * You can call this API operation to query the configurations of a connection. + * + * @param request - GetConnectionRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns GetConnectionResponse + */ + async selectOneConnectionWithOptions(request: GetConnectionRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.connectionName)) { + body["connectionName"] = request.connectionName; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "selectOneConnection", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/connection/selectOneConnection", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new GetConnectionResponse({})); + } + + /** + * Queries the configurations of a connection. + * + * @remarks + * You can call this API operation to query the configurations of a connection. + * + * @param request - GetConnectionRequest + * @returns GetConnectionResponse + */ + async selectOneConnection(request: GetConnectionRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.selectOneConnectionWithOptions(request, runtime); + } + + /** + * Queries connections. + * + * @remarks + * You can call this API operation to query connections. + * + * @param request - ListConnectionsRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns ListConnectionsResponse + */ + async listConnectionsWithOptions(request: ListConnectionsRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.connectionNamePrefix)) { + body["connectionNamePrefix"] = request.connectionNamePrefix; + } + + if (!Util.isUnset(request.maxResults)) { + body["maxResults"] = request.maxResults; + } + + if (!Util.isUnset(request.nextToken)) { + body["nextToken"] = request.nextToken; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "ListConnections", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/connection/listConnections", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new ListConnectionsResponse({})); + } + + /** + * list connections. + * + * @remarks + * You can call this API operation to list connections. + * + * @param request - ListConnectionsRequest + * @returns ListConnectionsResponse + */ + async listConnections(request: ListConnectionsRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.listConnectionsWithOptions(request, runtime); + } + + /** + * Updates a connection. + * + * @remarks + * You can call this API operation to update a connection. + * @returns ListEnumsResponseResponse + */ + async listEnumsResponse(): Promise { + let runtime = new $Util.RuntimeOptions({ }); + let body : {[key: string ]: any} = { }; + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "listEnumsResponse", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/connection/listEnumsResponse", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new ListEnumsResponseResponse({})); + } + + /** + * Queries the content of an event. + * + * @remarks + * You can call this API operation to query the content of an event. + * + * @param request - PutEventsRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns PutEventsResponse + */ + async putEventsWithOptions(request: PutEventsRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let headers : {[key: string ]: string} = { + 'ce-specversion': "1.0", + 'ce-type': "com.github.pull_request.opened", + 'ce-source': "https://github.com/cloudevents/spec/pull", + 'ce-subject': "demo", + 'ce-id': "1234-1234-1234", + 'ce-datacontenttype': "application/json", + 'ce-time': "2024-07-01T17:31:00Z", + 'ce-eventbusname': "demo-bus", + }; + let body : string = "{}"; + if (!Util.isUnset(request.eventBusName)) { + headers["ce-eventbusname"] = request.eventBusName; + } + + if (!Util.isUnset(request.event)) { + body = request.event; + } + + let req = new $OpenApi.OpenApiRequest({ + body: body, + headers: headers, + }); + let params = new $OpenApi.Params({ + action: "putEvents", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/putEvents", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new PutEventsResponse({})); + } + + /** + * Queries the content of an event. + * + * @remarks + * You can call this API operation to query the content of an event. + * + * @param request - PutEventsRequest + * @returns PutEventsResponse + */ + async putEvents(request: PutEventsRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.putEventsWithOptions(request, runtime); + } + + /** + * Creates an event rule. + * + * @remarks + * You can call this operation to create an event rule. + * + * @param request - CreateEventRuleRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns CreateEventRuleResponse + */ + async createEventRuleWithOptions(request: CreateEventRuleRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.eventRuleName)) { + body["eventRuleName"] = request.eventRuleName; + } + + if (!Util.isUnset(request.description)) { + body["description"] = request.description; + } + + if (!Util.isUnset(request.filterPattern)) { + body["filterPattern"] = request.filterPattern; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "CreateEventRule", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/rule/createEventRule", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new CreateEventRuleResponse({})); + } + + /** + * Creates an event rule. + * + * @remarks + * You can call this operation to create an event rule. + * + * @param request - CreateEventRuleRequest + * @returns CreateEventRuleResponse + */ + async createEventRule(request: CreateEventRuleRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.createEventRuleWithOptions(request, runtime); + } + + /** + * Gets an event rule. + * + * @remarks + * You can call this operation to get an event rule. + * + * @param request - GetEventRuleRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns GetEventRuleResponse + */ + async getEventRuleWithOptions(request: GetEventRuleRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.eventRuleName)) { + body["eventRuleName"] = request.eventRuleName; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "GetEventRule", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/rule/getEventRule", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new GetEventRuleResponse({})); + } + + /** + * Gets an event rule. + * + * @remarks + * You can call this operation to get an event rule. + * + * @param request - GetEventRuleRequest + * @returns GetEventRuleResponse + */ + async getEventRule(request: GetEventRuleRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.getEventRuleWithOptions(request, runtime); + } + + /** + * Deletes an event rule. + * + * @remarks + * You can call this operation to delete an event rule. + * + * @param request - DeleteEventRuleRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns DeleteEventRuleResponse + */ + async deleteEventRuleWithOptions(request: DeleteEventRuleRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.eventRuleName)) { + body["eventRuleName"] = request.eventRuleName; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "DeleteEventRule", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/rule/deleteEventRule", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new DeleteEventRuleResponse({})); + } + + /** + * Deletes an event rule. + * + * @remarks + * You can call this operation to delete an event rule. + * + * @param request - DeleteEventRuleRequest + * @returns DeleteEventRuleResponse + */ + async deleteEventRule(request: DeleteEventRuleRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.deleteEventRuleWithOptions(request, runtime); + } + + /** + * Updates an event rule. + * + * @remarks + * You can call this operation to update an event rule. + * + * @param request - UpdateEventRuleRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns UpdateEventRuleResponse + */ + async updateEventRuleWithOptions(request: UpdateEventRuleRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.eventRuleName)) { + body["eventRuleName"] = request.eventRuleName; + } + + if (!Util.isUnset(request.description)) { + body["description"] = request.description; + } + + if (!Util.isUnset(request.filterPattern)) { + body["filterPattern"] = request.filterPattern; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "UpdateEventRule", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/rule/updateEventRule", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new UpdateEventRuleResponse({})); + } + + /** + * Updates an event rule. + * + * @remarks + * You can call this operation to update an event rule. + * + * @param request - UpdateEventRuleRequest + * @returns UpdateEventRuleResponse + */ + async updateEventRule(request: UpdateEventRuleRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.updateEventRuleWithOptions(request, runtime); + } + + /** + * Lists event rules. + * + * @remarks + * You can call this operation to list event rules. + * + * @param request - ListEventRulesRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns ListEventRulesResponse + */ + async listEventRulesWithOptions(request: ListEventRulesRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.maxResults)) { + body["maxResults"] = request.maxResults; + } + + if (!Util.isUnset(request.nextToken)) { + body["nextToken"] = request.nextToken; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "ListEventRules", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/rule/listEventRules", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new ListEventRulesResponse({})); + } + + /** + * Lists event rules. + * + * @remarks + * You can call this operation to list event rules. + * + * @param request - ListEventRulesRequest + * @returns ListEventRulesResponse + */ + async listEventRules(request: ListEventRulesRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.listEventRulesWithOptions(request, runtime); + } + + /** + * Enables an event rule. + * + * @remarks + * You can call this operation to enable an event rule. + * + * @param request - EnableEventRuleRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns EnableEventRuleResponse + */ + async enableEventRuleWithOptions(request: EnableEventRuleRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.eventRuleName)) { + body["eventRuleName"] = request.eventRuleName; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "EnableEventRule", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/rule/enableEventRule", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new EnableEventRuleResponse({})); + } + + /** + * Enables an event rule. + * + * @remarks + * You can call this operation to enable an event rule. + * + * @param request - EnableEventRuleRequest + * @returns EnableEventRuleResponse + */ + async enableEventRule(request: EnableEventRuleRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.enableEventRuleWithOptions(request, runtime); + } + + /** + * Disables an event rule. + * + * @remarks + * You can call this operation to disable an event rule. + * + * @param request - DisableEventRuleRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns DisableEventRuleResponse + */ + async disableEventRuleWithOptions(request: DisableEventRuleRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.eventRuleName)) { + body["eventRuleName"] = request.eventRuleName; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "DisableEventRule", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/rule/disableEventRule", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new DisableEventRuleResponse({})); + } + + /** + * Disables an event rule. + * + * @remarks + * You can call this operation to disable an event rule. + * + * @param request - DisableEventRuleRequest + * @returns DisableEventRuleResponse + */ + async disableEventRule(request: DisableEventRuleRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.disableEventRuleWithOptions(request, runtime); + } + + /** + * Creates an event source. + * + * @remarks + * You can call this operation to create an event source. + * + * @param request - CreateEventSourceRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns CreateEventSourceResponse + */ + async createEventSourceWithOptions(request: CreateEventSourceRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.description)) { + body["description"] = request.description; + } + + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.eventSourceName)) { + body["eventSourceName"] = request.eventSourceName; + } + + if (!Util.isUnset(request.className)) { + body["className"] = request.className; + } + + if (!Util.isUnset(request.config)) { + body["config"] = request.config; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "CreateEventSource", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/source/createEventSource", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new CreateEventSourceResponse({})); + } + + /** + * Creates an event source. + * + * @remarks + * You can call this operation to create an event source. + * + * @param request - CreateEventSourceRequest + * @returns CreateEventSourceResponse + */ + async createEventSource(request: CreateEventSourceRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.createEventSourceWithOptions(request, runtime); + } + + /** + * Updates an event source. + * + * @remarks + * You can call this operation to update an event source. + * + * @param request - UpdateEventSourceRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns UpdateEventSourceResponse + */ + async updateEventSourceWithOptions(request: UpdateEventSourceRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.eventSourceName)) { + body["eventSourceName"] = request.eventSourceName; + } + + if (!Util.isUnset(request.description)) { + body["description"] = request.description; + } + + if (!Util.isUnset(request.className)) { + body["className"] = request.className; + } + + if (!Util.isUnset(request.status)) { + body["status"] = request.status; + } + + if (!Util.isUnset(request.config)) { + body["config"] = request.config; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "UpdateEventSource", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/source/updateEventSource", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new UpdateEventSourceResponse({})); + } + + /** + * Updates an event source. + * + * @remarks + * You can call this operation to update an event source. + * + * @param request - UpdateEventSourceRequest + * @returns UpdateEventSourceResponse + */ + async updateEventSource(request: UpdateEventSourceRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.updateEventSourceWithOptions(request, runtime); + } + + /** + * Deletes an event source. + * + * @remarks + * You can call this API operation to delete an event source. + * + * @param request - DeleteEventSourceRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns DeleteEventSourceResponse + */ + async deleteEventSourceWithOptions(request: DeleteEventSourceRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.eventSourceName)) { + body["eventSourceName"] = request.eventSourceName; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "DeleteEventSource", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/source/deleteEventSource", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new DeleteEventSourceResponse({})); + } + + /** + * Deletes an event source. + * + * @remarks + * You can call this API operation to delete an event source. + * + * @param request - DeleteEventSourceRequest + * @returns DeleteEventSourceResponse + */ + async deleteEventSource(request: DeleteEventSourceRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.deleteEventSourceWithOptions(request, runtime); + } + + /** + * Gets an event source. + * + * @remarks + * You can call this API operation to get an event source. + * + * @param request - GetEventSourceRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns GetEventSourceResponse + */ + async getEventSourceWithOptions(request: GetEventSourceRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.eventSourceName)) { + body["eventSourceName"] = request.eventSourceName; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "GetEventSource", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/source/getEventSource", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new GetEventSourceResponse({})); + } + + /** + * Gets an event source. + * + * @remarks + * You can call this API operation to get an event source. + * + * @param request - GetEventSourceRequest + * @returns GetEventSourceResponse + */ + async getEventSource(request: GetEventSourceRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.getEventSourceWithOptions(request, runtime); + } + + /** + * Lists event sources. + * + * @remarks + * You can call this API operation to list event sources. + * + * @param request - ListEventSourcesRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns ListEventSourcesResponse + */ + async listEventSourcesWithOptions(request: ListEventSourcesRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.eventSourceType)) { + body["eventSourceType"] = request.eventSourceType; + } + + if (!Util.isUnset(request.maxResults)) { + body["maxResults"] = request.maxResults; + } + + if (!Util.isUnset(request.nextToken)) { + body["nextToken"] = request.nextToken; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "ListEventSources", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/source/listEventSources", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new ListEventSourcesResponse({})); + } + + /** + * Lists event sources. + * + * @remarks + * You can call this API operation to list event sources. + * + * @param request - ListEventSourcesRequest + * @returns ListEventSourcesResponse + */ + async listEventSources(request: ListEventSourcesRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.listEventSourcesWithOptions(request, runtime); + } + + /** + * Creates event targets. + * + * @remarks + * You can call this operation to create event targets. + * + * @param request - CreateEventTargetsRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns CreateEventTargetsResponse + */ + async createEventTargetsWithOptions(request: CreateEventTargetsRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.eventRuleName)) { + body["eventRuleName"] = request.eventRuleName; + } + + if (!Util.isUnset(request.eventTargets)) { + body["eventTargets"] = request.eventTargets; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "CreateEventTargets", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/target/createEventTargets", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new CreateEventTargetsResponse({})); + } + + /** + * Creates event targets. + * + * @remarks + * You can call this operation to create event targets. + * + * @param request - CreateEventTargetsRequest + * @returns CreateEventTargetsResponse + */ + async createEventTargets(request: CreateEventTargetsRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.createEventTargetsWithOptions(request, runtime); + } + + /** + * Updates event targets. + * + * @remarks + * You can call this operation to update event targets. + * + * @param request - UpdateEventTargetsRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns UpdateEventTargetsResponse + */ + async updateEventTargetsWithOptions(request: UpdateEventTargetsRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.eventRuleName)) { + body["eventRuleName"] = request.eventRuleName; + } + + if (!Util.isUnset(request.eventTargets)) { + body["eventTargets"] = request.eventTargets; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "UpdateEventTargets", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/target/updateEventTargets", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new UpdateEventTargetsResponse({})); + } + + /** + * Updates event targets. + * + * @remarks + * You can call this operation to update event targets. + * + * @param request - UpdateEventTargetsRequest + * @returns UpdateEventTargetsResponse + */ + async updateEventTargets(request: UpdateEventTargetsRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.updateEventTargetsWithOptions(request, runtime); + } + + /** + * Deletes event targets. + * + * @remarks + * You can call this operation to delete event targets. + * + * @param request - DeleteEventTargetsRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns DeleteEventTargetsResponse + */ + async deleteEventTargetsWithOptions(request: DeleteEventTargetsRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.eventRuleName)) { + body["eventRuleName"] = request.eventRuleName; + } + + if (!Util.isUnset(request.eventTargetNames)) { + body["eventTargetNames"] = request.eventTargetNames; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "DeleteEventTargets", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/target/deleteEventTargets", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new DeleteEventTargetsResponse({})); + } + + /** + * Deletes event targets. + * + * @remarks + * You can call this operation to delete event targets. + * + * @param request - DeleteEventTargetsRequest + * @returns DeleteEventTargetsResponse + */ + async deleteEventTargets(request: DeleteEventTargetsRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.deleteEventTargetsWithOptions(request, runtime); + } + + /** + * Lists event targets. + * + * @remarks + * You can call this operation to list event targets. + * + * @param request - ListEventTargetsRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns ListEventTargetsResponse + */ + async listEventTargetsWithOptions(request: ListEventTargetsRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.eventRuleName)) { + body["eventRuleName"] = request.eventRuleName; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "ListEventTargets", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/target/listEventTargets", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new ListEventTargetsResponse({})); + } + + /** + * Lists event targets. + * + * @remarks + * You can call this operation to list event targets. + * + * @param request - ListEventTargetsRequest + * @returns ListEventTargetsResponse + */ + async listEventTargets(request: ListEventTargetsRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.listEventTargetsWithOptions(request, runtime); + } + + /** + * Queries all event buses. + * + * @remarks + * You can call this API operation to query all event buses. + * + * @param request - ListEventTypesRequest + * @param runtime - runtime options for this request RuntimeOptions + * @returns ListEventTypesResponse + */ + async listEventTypesWithOptions(request: ListEventTypesRequest, runtime: $Util.RuntimeOptions): Promise { + Util.validateModel(request); + let body : {[key: string ]: any} = { }; + if (!Util.isUnset(request.eventBusName)) { + body["eventBusName"] = request.eventBusName; + } + + if (!Util.isUnset(request.eventSourceName)) { + body["eventSourceName"] = request.eventSourceName; + } + + if (!Util.isUnset(request.maxResults)) { + body["maxResults"] = request.maxResults; + } + + if (!Util.isUnset(request.nextToken)) { + body["nextToken"] = request.nextToken; + } + + let req = new $OpenApi.OpenApiRequest({ + body: Util.toJSONString(body), + }); + let params = new $OpenApi.Params({ + action: "listEventTypes", + version: "2024-07-01", + protocol: "HTTP", + pathname: "/type/listEventTypes", + method: "POST", + authType: "Anonymous", + style: "RPC", + reqBodyType: "json", + bodyType: "json", + }); + return $tea.cast(await this.callApi(params, req, runtime), new ListEventTypesResponse({})); + } + + /** + * Queries all event buses. + * + * @remarks + * You can call this API operation to query all event buses. + * + * @param request - ListEventTypesRequest + * @returns ListEventTypesResponse + */ + async listEventTypes(request: ListEventTypesRequest): Promise { + let runtime = new $Util.RuntimeOptions({ }); + return await this.listEventTypesWithOptions(request, runtime); + } + +} diff --git a/sdk/generated/ts/tsconfig.json b/sdk/generated/ts/tsconfig.json new file mode 100644 index 00000000..ae66f5b6 --- /dev/null +++ b/sdk/generated/ts/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es2017", + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "outDir": "./dist", + "esModuleInterop": true + }, + "include": [ + "src/**/*" + ] +} \ No newline at end of file diff --git a/sdk/main.dara b/sdk/main.dara new file mode 100644 index 00000000..e0046288 --- /dev/null +++ b/sdk/main.dara @@ -0,0 +1,2930 @@ +import Util +import OpenApi + +extends OpenApi; + +function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{ + if (!Util.empty(endpoint)) { + return endpoint; + } + + if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) { + return endpointMap[regionId]; + } + var result: string = ""; + if (!Util.empty(network) && !Util.equalString(network, "public")) { + network = `-${network}`; + } else { + network = ""; + } + if (!Util.isUnset(suffix)) { + suffix = ""; + } else { + suffix = `-${suffix}`; + } + if (Util.equalString(endpointRule, "regional")) { + if (Util.empty(regionId)) { + throw{ + message = "RegionId is empty, please set a valid RegionId" + }; + } + result = `${productId}${suffix}${network}.${regionId}.aliyuncs.com`; + } else { + result = `${productId}${suffix}${network}.aliyuncs.com`; + } + return result; + // return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix); +} + +init(config: OpenApi.Config){ + super(config); + @endpointRule = ''; + + checkConfig(config); + @endpoint = getEndpoint('eventbridge', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint); +} + +/** + EventBus Controller apis: + * createEventBus * + * getEventBus * + * deleteEventBus * + * listEventBuses * +*/ + +model CreateEventBusRequest { + description?: string(name='description', description='The description of the event bus.', example='demo'), + eventBusName?: string(name='eventBusName', description='The name of the event bus. This parameter is required.', example='MyEventBus'), +} + +model CreateEventBusResponseBody { + code?: string(name='code', description='The returned response code. The value Success indicates that the request is successful. Other values indicate that the request failed. For more information about error codes, see Error codes.', example='Success'), + eventBusName?: string(name='eventBusName', description='The name of the event bus. This parameter is required.', example='MyEventBus'), + message?: string(name='message', description='The returned error message.', example='The event bus [xxxx] not existed!'), + requestId?: string(name='requestId', description='The request ID.', example='A995F07C-E503-5881-9962-9CECA8566876'), + success?: boolean(name='success', description='Indicates whether the request is successful. The value true indicates that the request is successful.', example='true'), +} + +model CreateEventBusResponse { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: CreateEventBusResponseBody(name='body'), +} + +/** + * @summary Creates an event bus. + * + * @description You can call this API operation to create an event bus. + * + * @param request CreateEventBusRequest + * @param runtime runtime options for this request RuntimeOptions + * @return CreateEventBusResponse + */ +async function createEventBusWithOptions(request: CreateEventBusRequest, runtime: Util.RuntimeOptions): CreateEventBusResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.description)) { + body['description'] = request.description; + } + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body) + }; + var params = new OpenApi.Params{ + action = 'CreateEventBus', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/bus/createEventBus', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Creates an event bus. + * + * @description You can call this API operation to create an event bus. + * + * @param request CreateEventBusRequest + * @return CreateEventBusResponse + */ +async function createEventBus(request: CreateEventBusRequest): CreateEventBusResponse { + var runtime = new Util.RuntimeOptions{}; + return createEventBusWithOptions(request, runtime); +} + + +model GetEventBusRequest { + eventBusName?: string(name='eventBusName', description='The name of the event bus. This parameter is required.', example='MyEventBus'), +} + +model GetEventBusResponseBody = { + code?: string(name='code', description='The response code. The value Success indicates that the request is successful.', example='Success'), + createTimestamp?: long(name='createTimestamp', description='The timestamp that indicates when the event bus was created.', example='1641781825000'), + description?: string(name='description', description='The description of the event bus.', example='demo'), + eventBusName?: string(name='eventBusName', description='The name of the event bus.', example='MyEventBus'), + message?: string(name='message', description='The error message that is returned if the request failed.', example='EventBusNotExist'), + requestId?: string(name='requestId', description='The request ID.', example='d5bfc188-4452-4ba7-b73a-a9005e522439'), +} + +model GetEventBusResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: GetEventBusResponseBody(name='body'), +} + +/** + * @summary Queries the detailed information about an event bus. + * + * @description You can call this API operation to query the detailed information about an event bus. + * + * @param request GetEventBusRequest + * @param runtime runtime options for this request RuntimeOptions + * @return GetEventBusResponse + */ +async function getEventBusWithOptions(request: GetEventBusRequest, runtime: Util.RuntimeOptions): GetEventBusResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body) + }; + var params = new OpenApi.Params{ + action = 'GetEventBus', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/bus/getEventBus', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Queries the detailed information about an event bus. + * + * @description You can call this API operation to query the detailed information about an event bus. + * + * @param request GetEventBusRequest + * @return GetEventBusResponse + */ +async function getEventBus(request: GetEventBusRequest): GetEventBusResponse { + var runtime = new Util.RuntimeOptions{}; + return getEventBusWithOptions(request, runtime); +} + +model ListEventBusesRequest { + maxResults?: int32(name='maxResults', description='The maximum number of entries to be returned in a call. You can use this parameter and NextToken to implement paging. Note: Up to 100 entries can be returned in a call.', example='10'), + nextToken?: string(name='nextToken', description='If you set Limit and excess return values exist, this parameter is returned.', example='10'), +} + +model ListEventBusesResponseBody { + code?: string(name='code', description='The returned HTTP status code. The HTTP status code 200 indicates that the request is successful.', example='200'), + eventBuses?: [ + { + description?: string(name='description', description='The description of the queried event bus.', example='bus_description'), + eventBusName?: string(name='eventBusName', description='The name of the queried event bus.', example='default'), + } + ](name='eventBuses', description='The timestamp that indicates when the event bus was created.'), + message?: string(name='message', description='The returned error message.', example='InvalidArgument'), + requestId?: string(name='requestId', description='The request ID.', example='D1DCF64A-3F2C-5323-ADCB-3F4DF30FAD2D'), + nextToken?: string(name='nextToken', description='If excess return values exist, this parameter is returned.', example='10'), + total?: integer(name='total', description='The total number of entries.', example='2'), + maxResults?: int32(name="maxResults", description='If you set Limit and excess return values exist, this parameter is returned.', example='10') +} + +model ListEventBusesResponse { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: ListEventBusesResponseBody(name='body'), +} + +/** + * @summary Queries all event buses. + * + * @description You can call this API operation to query all event buses. + * + * @param request ListEventBusesRequest + * @param runtime runtime options for this request RuntimeOptions + * @return ListEventBusesResponse + */ +async function listEventBusesWithOptions(request: ListEventBusesRequest, runtime: Util.RuntimeOptions): ListEventBusesResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.maxResults)) { + body['maxResults'] = request.maxResults; + } + if (!Util.isUnset(request.nextToken)) { + body['nextToken'] = request.nextToken; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body) + }; + + var params = new OpenApi.Params{ + action = 'ListEventBuses', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/bus/listEventBuses', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Queries all event buses. + * + * @description You can call this API operation to query all event buses. + * + * @param request ListEventBusesRequest + * @return ListEventBusesResponse + */ +async function listEventBuses(request: ListEventBusesRequest): ListEventBusesResponse { + var runtime = new Util.RuntimeOptions{}; + return listEventBusesWithOptions(request, runtime); +} + +model DeleteEventBusRequest { + eventBusName?: string(name='eventBusName', description='The name of the event bus. This parameter is required.', example='MyEventBus'), +} + +model DeleteEventBusResponseBody = { + code?: string(name='code', description='The returned HTTP status code. The HTTP status code 200 indicates that the request is successful.', example='200'), + message?: string(name='message', description='The returned error message.', example='EventBusNotExist'), + requestId?: string(name='requestId', description='The request ID.', example='C229E140-1A5C-5D55-8904-CFC5BA4CAA98'), +} + +model DeleteEventBusResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: DeleteEventBusResponseBody(name='body'), +} + +/** + * @summary Deletes an event bus. + * + * @description You can call this API operation to delete an event bus. + * + * @param request DeleteEventBusRequest + * @param runtime runtime options for this request RuntimeOptions + * @return DeleteEventBusResponse + */ +async function deleteEventBusWithOptions(request: DeleteEventBusRequest, runtime: Util.RuntimeOptions): DeleteEventBusResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body) + }; + var params = new OpenApi.Params{ + action = 'DeleteEventBus', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/bus/deleteEventBus', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Deletes an event bus. + * + * @description You can call this API operation to delete an event bus. + * + * @param request DeleteEventBusRequest + * @return DeleteEventBusResponse + */ +async function deleteEventBus(request: DeleteEventBusRequest): DeleteEventBusResponse { + var runtime = new Util.RuntimeOptions{}; + return deleteEventBusWithOptions(request, runtime); +} + + + +/** + ApiDestination Controller apis: + * createApiDestination * + * updateApiDestination * + * getApiDestination * + * deleteApiDestination * + * listApiDestinations * +*/ + +model CreateApiDestinationRequest { + apiDestinationName?: string(name='apiDestinationName', description='The name of the API destination. The name must be 2 to 127 characters in length. This parameter is required.', example='api-destination-name'), + connectionName?: string(name='connectionName', description='The name of the connection. The name must be 2 to 127 characters in length. Before you configure this parameter, you must call the CreateConnection operation to create a connection. Then, set this parameter to the name of the connection that you created. This parameter is required.', example='connection-name'), + description?: string(name='description', description='The description of the API destination. The description can be up to 255 characters in length.'), + httpApiParameters?: { + endpoint?: string(name='endpoint', description='The endpoint of the API destination. The endpoint can be up to 127 characters in length. This parameter is required.', example='http://127.0.0.1:8001/api'), + method?: string(name='method', description='The HTTP request method. Valid values: \n + + * GET \n + * POST \n + * HEAD \n + * DELETE \n + * PUT \n + * PATCH \n + + This parameter is required.', example='POST'), + apiParameters?: [ + { + name?: string(name='name'), + description?: string(name='description', description='The description of the API destination. The description can be up to 255 characters in length.'), + type?: string(name='type'), + defaultValue?: string(name='defaultValue'), + in?: string(name='in') + } + ](name='apiParameters', description='TODO') + }(name='httpApiParameters', description='The parameters that are configured for the API destination. This parameter is required.'), + invocationRateLimitPerSecond?: integer(name='invocationRateLimitPerSecond', description='TODO') +} + +model CreateApiDestinationResponseBody = { + code?: string(name='code', description='The returned response code. The value Success indicates that the request is successful.', example='Success'), + apiDestinationName?: string(name='apiDestinationName', description='The name of the API destination.', example='ApiDestinationName'), + message?: string(name='message', description='The returned message.', example='success'), + requestId?: string(name='requestId', description='The request ID.', example='5DAF96FB-A4B6-548C-B999-0BFDCB2261B9'), +} + +model CreateApiDestinationResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: CreateApiDestinationResponseBody(name='body'), +} + +/** + * @summary Creates an API destination. + * + * @description You can call this API operation to create an API destination. + * + * @param request CreateApiDestinationRequest (tmpReq before) + * @param runtime runtime options for this request RuntimeOptions + * @return CreateApiDestinationResponse + */ +async function createApiDestinationWithOptions(request: CreateApiDestinationRequest, runtime: Util.RuntimeOptions): CreateApiDestinationResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.apiDestinationName)) { + body['apiDestinationName'] = request.apiDestinationName; + } + if (!Util.isUnset(request.connectionName)) { + body['connectionName'] = request.connectionName; + } + if (!Util.isUnset(request.description)) { + body['description'] = request.description; + } + if (!Util.isUnset(request.httpApiParameters)) { + body['httpApiParameters'] = request.httpApiParameters; + } + if (!Util.isUnset(request.invocationRateLimitPerSecond)) { + body['invocationRateLimitPerSecond'] = request.invocationRateLimitPerSecond; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'CreateApiDestination', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/api-destination/createApiDestination', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Creates an API destination. + * + * @description You can call this API operation to create an API destination. + * + * @param request CreateApiDestinationRequest + * @return CreateApiDestinationResponse + */ +async function createApiDestination(request: CreateApiDestinationRequest): CreateApiDestinationResponse { + var runtime = new Util.RuntimeOptions{}; + return createApiDestinationWithOptions(request, runtime); +} + +model UpdateApiDestinationRequest { + apiDestinationName?: string(name='apiDestinationName', description='The name of the API destination. The name must be 2 to 127 characters in length. This parameter is required.', example='api-destination-name'), + connectionName?: string(name='connectionName', description='The name of the connection. The name must be 2 to 127 characters in length. Before you configure this parameter, you must call the CreateConnection operation to create a connection. Then, set this parameter to the name of the connection that you created. This parameter is required.', example='connection-name'), + description?: string(name='description', description='The description of the API destination. The description can be up to 255 characters in length.'), + httpApiParameters?: { + endpoint?: string(name='endpoint', description='The endpoint of the API destination. The endpoint can be up to 127 characters in length. This parameter is required.', example='http://127.0.0.1:8001/api'), + method?: string(name='method', description='The HTTP request method. Valid values: \n + + * GET \n + * POST \n + * HEAD \n + * DELETE \n + * PUT \n + * PATCH \n + + This parameter is required.', example='POST'), + apiParameters?: [ + { + name?: string(name='name'), + description?: string(name='description', description='The description of the API destination. The description can be up to 255 characters in length.'), + type?: string(name='type'), + defaultValue?: string(name='defaultValue'), + in?: string(name='in') + } + ](name='apiParameters', description='TODO') + }(name='httpApiParameters', description='The parameters that are configured for the API destination. This parameter is required.'), + invocationRateLimitPerSecond?: integer(name='invocationRateLimitPerSecond', description='TODO') +} + +model UpdateApiDestinationResponseBody = { + code?: string(name='code', description='The returned response code. The value Success indicates that the request is successful.', example='Success'), + message?: string(name='message', description='The returned message.', example='success'), + requestId?: string(name='requestId', description='The request ID.', example='5DAF96FB-A4B6-548C-B999-0BFDCB2261B9'), +} + +model UpdateApiDestinationResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: UpdateApiDestinationResponseBody(name='body'), +} + +/** + * @summary Updates an API destination. + * + * @description You can call this API operation to update an API destination. + * + * @param request UpdateApiDestinationRequest + * @param runtime runtime options for this request RuntimeOptions + * @return UpdateApiDestinationResponse + */ +async function updateApiDestinationWithOptions(request: UpdateApiDestinationRequest, runtime: Util.RuntimeOptions): UpdateApiDestinationResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.apiDestinationName)) { + body['apiDestinationName'] = request.apiDestinationName; + } + if (!Util.isUnset(request.connectionName)) { + body['connectionName'] = request.connectionName; + } + if (!Util.isUnset(request.description)) { + body['description'] = request.description; + } + if (!Util.isUnset(request.httpApiParameters)) { + body['httpApiParameters'] = request.httpApiParameters; + } + if (!Util.isUnset(request.invocationRateLimitPerSecond)) { + body['invocationRateLimitPerSecond'] = request.invocationRateLimitPerSecond; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'UpdateApiDestination', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/api-destination/updateApiDestination', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Updates an API destination. + * + * @description You can call this API operation to update an API destination. + * + * @param request UpdateApiDestinationRequest + * @return UpdateApiDestinationResponse + */ +async function updateApiDestination(request: UpdateApiDestinationRequest): UpdateApiDestinationResponse { + var runtime = new Util.RuntimeOptions{}; + return updateApiDestinationWithOptions(request, runtime); +} + +model GetApiDestinationRequest { + apiDestinationName?: string(name='apiDestinationName', description='The name of the API destination. This parameter is required.', example='api-destination-name'), +} + +model GetApiDestinationResponseBody = { + code?: string(name='code', description='The returned response code. The value Success indicates that the request is successful.', example='Success'), + apiDestinationName?: string(name='apiDestinationName', description='The name of the API destination.', example='api-destination-2'), + connectionName?: string(name='connectionName', description='The connection name.', example='connection-name'), + description?: string(name='description', description='The description of the connection.', example='demo'), + gmtCreate?: long(name='gmtCreate', description='The time when the API destination was created.', example='1665223213000'), + httpApiParameters?: { + endpoint?: string(name='endpoint', description='The endpoint of the API destination.', example='http://127.0.0.1:8001/api'), + method?: string(name='method', description='The HTTP request method. Valid values:\n + - POST\n + - GET\n + - DELETE\n + - PUT\n + - HEAD\n + - TRACE\n + - PATCH', example='POST'), + apiParameters?: [ + { + name?: string(name='name'), + description?: string(name='description', description='The description of the API destination. The description can be up to 255 characters in length.'), + type?: string(name='type'), + defaultValue?: string(name='defaultValue'), + in?: string(name='in') + } + ](name="apiParameters", description="TODO") + }(name='httpApiParameters', description='The request parameters that are configured for the API destination.'), + invocationRateLimitPerSecond?: integer(name="invocationRateLimitPerSecond", description="TODO"), + message?: string(name='message', description='The returned message. If the request is successful, success is returned. If the request failed, an error code is returned.', example='success'), + requestId?: string(name='requestId', description='The request ID.', example='B896B484-F16D-59DE-9E23-DD0E5C361108'), +} + +model GetApiDestinationResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: GetApiDestinationResponseBody(name='body'), +} + +/** + * @summary Queries the information about an API destination. + * + * @description You can call this API operation to query the information about an API destination. + * + * @param request GetApiDestinationRequest + * @param runtime runtime options for this request RuntimeOptions + * @return GetApiDestinationResponse + */ +async function getApiDestinationWithOptions(request: GetApiDestinationRequest, runtime: Util.RuntimeOptions): GetApiDestinationResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.apiDestinationName)) { + body['apiDestinationName'] = request.apiDestinationName; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'GetApiDestination', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/api-destination/getApiDestination', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Queries the information about an API destination. + * + * @description You can call this API operation to query the information about an API destination. + * + * @param request GetApiDestinationRequest + * @return GetApiDestinationResponse + */ +async function getApiDestination(request: GetApiDestinationRequest): GetApiDestinationResponse { + var runtime = new Util.RuntimeOptions{}; + return getApiDestinationWithOptions(request, runtime); +} + +model DeleteApiDestinationRequest { + apiDestinationName?: string(name='apiDestinationName', description='The name of the API destination. This parameter is required.', example='ApiDestinationName'), +} + +model DeleteApiDestinationResponseBody = { + code?: string(name='code', description='The returned response code. The value Success indicates that the request is successful.', example='Success'), + message?: string(name='message', description='The returned message. If the request is successful, success is returned. If the request failed, an error code is returned.', example='success'), + requestId?: string(name='requestId', description='The request ID.', example='382E6272-8E9C-5681-AC96-A8AF0BFAC1A5'), +} + +model DeleteApiDestinationResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: DeleteApiDestinationResponseBody(name='body'), +} + +/** + * @summary Deletes an API destination. + * + * @description You can call this API operation to delete an API destination. + * + * @param request DeleteApiDestinationRequest + * @param runtime runtime options for this request RuntimeOptions + * @return DeleteApiDestinationResponse + */ +async function deleteApiDestinationWithOptions(request: DeleteApiDestinationRequest, runtime: Util.RuntimeOptions): DeleteApiDestinationResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.apiDestinationName)) { + body['apiDestinationName'] = request.apiDestinationName; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'DeleteApiDestination', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/api-destination/deleteApiDestination', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Deletes an API destination. + * + * @description You can call this API operation to delete an API destination. + * + * @param request DeleteApiDestinationRequest + * @return DeleteApiDestinationResponse + */ +async function deleteApiDestination(request: DeleteApiDestinationRequest): DeleteApiDestinationResponse { + var runtime = new Util.RuntimeOptions{}; + return deleteApiDestinationWithOptions(request, runtime); +} + +model ListApiDestinationsRequest { + apiDestinationNamePrefix?: string(name='apiDestinationNamePrefix', description='The prefix of the API destination name.', example='api-demo'), + connectionName?: string(name='connectionName', description='The connection name.', example='connection-name'), + maxResults?: int32(name='maxResults', description='The maximum number of entries to be returned in a call. You can use this parameter and NextToken to implement paging. \n + * Default value: 10.', example='10'), + nextToken?: string(name='nextToken', description='If you set Limit and excess return values exist, this parameter is returned.\n + * Default value: 0.', example='0'), +} + +model ListApiDestinationsResponseBody = { + code?: string(name='code', description='The returned response code. The value Success indicates that the request is successful.', example='Success'), + apiDestinations?: [ + { + apiDestinationName?: string(name='apiDestinationName', description='The name of the API destination.', example='api-destination-2'), + connectionName?: string(name='connectionName', description='The connection name.', example='connection-name'), + description?: string(name='description', description='The description of the connection.', example='demo'), + gmtCreate?: long(name='gmtCreate', description='The time when the API destination was created.', example='1665223213000'), + httpApiParameters?: { + endpoint?: string(name='endpoint', description='The endpoint of the API destination.', example='http://127.0.0.1:8001/api'), + method?: string(name='method', description='The HTTP request method. Valid values:\n + - POST\n + - GET\n + - DELETE\n + - PUT\n + - HEAD\n + - TRACE\n + - PATCH', example='POST'), + apiParameters?: [ + { + name?: string(name='name'), + description?: string(name='description', description='The description of the API destination. The description can be up to 255 characters in length.'), + type?: string(name='type'), + defaultValue?: string(name='defaultValue'), + in?: string(name='in') + } + ](name="apiParameters", description="TODO") + }(name='httpApiParameters', description='The request parameters that are configured for the API destination.'), + invocationRateLimitPerSecond?: integer(name="invocationRateLimitPerSecond", description="TODO") + } + ](name='apiDestinations', description='The API destinations.'), + maxResults?: int32(name='maxResults', description='The maximum number of entries returned per page.', example='10'), + nextToken?: string(name='nextToken', description='If excess return values exist, this parameter is returned.', example='1'), + total?: integer(name='total', description='The total number of entries returned.', example='2'), + message?: string(name='message', description='The returned message. If the request is successful, success is returned. If the request failed, an error code is returned.', example='success'), + requestId?: string(name='requestId', description='The request ID.', example='96D7C0AB-DCE5-5E82-96B8-4725E1706BB1'), +} + +model ListApiDestinationsResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: ListApiDestinationsResponseBody(name='body'), +} + +/** + * @summary Queries a list of API destinations. + * + * @description You can use this API operation to query a list of API destinations. + * + * @param request ListApiDestinationsRequest + * @param runtime runtime options for this request RuntimeOptions + * @return ListApiDestinationsResponse + */ +async function listApiDestinationsWithOptions(request: ListApiDestinationsRequest, runtime: Util.RuntimeOptions): ListApiDestinationsResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.apiDestinationNamePrefix)) { + body['apiDestinationNamePrefix'] = request.apiDestinationNamePrefix; + } + if (!Util.isUnset(request.connectionName)) { + body['connectionName'] = request.connectionName; + } + if (!Util.isUnset(request.maxResults)) { + body['maxResults'] = request.maxResults; + } + if (!Util.isUnset(request.nextToken)) { + body['nextToken'] = request.nextToken; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'ListApiDestinations', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/api-destination/listApiDestinations', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Queries a list of API destinations. + * + * @description You can use this API operation to query a list of API destinations. + * + * @param request ListApiDestinationsRequest + * @return ListApiDestinationsResponse + */ +async function listApiDestinations(request: ListApiDestinationsRequest): ListApiDestinationsResponse { + var runtime = new Util.RuntimeOptions{}; + return listApiDestinationsWithOptions(request, runtime); +} + + + + +/** + Connection Controller apis: + * createConnection * + * deleteConnection * + * updateConnection * + * getConnection * + * selectOneConnection * + * listConnections * + * listEnumsResponse * +*/ + +model CreateConnectionRequest { + authParameters?: { + apiKeyAuthParameters?: { + apiKeyName?: string(name='apiKeyName', description='The key of the API key.', example='Token'), + apiKeyValue?: string(name='apiKeyValue', description='The value of the API key.', example='adkjnakddh****'), + }(name='apiKeyAuthParameters', description='The parameters that are configured for API key authentication.'), + authorizationType?: string(name='authorizationType', description='The authentication type. Valid values:\n + BASIC_AUTH: basic authentication.\n + Introduction: Basic authentication is a simple authentication scheme built into the HTTP protocol. When you use the HTTP protocol for communications, the authentication method that the HTTP server uses to authenticate user identities on the client is defined in the protocol. The request header is in the Authorization: Basic Base64-encoded string (Username:Password) format.\n + 1. Username and Password are required\n + API_KEY_AUTH: API key authentication.\n + Introduction: The request header is in the Token: Token value format.\n + * ApiKeyName and ApiKeyValue are required.\n + OAUTH_AUTH: OAuth authentication.\n + Introduction: OAuth2.0 is an authentication mechanism. In normal cases, a system that does not use OAuth2.0 can access the resources of the server from the client. To ensure access security, access tokens are used to authenticate users in OAuth 2.0. The client must use an access token to access protected resources. This way, OAuth 2.0 protects resources from being accessed from malicious clients and improves system security.\n + * AuthorizationEndpoint, OAuthHttpParameters, and HttpMethod are required.', example='BASIC_AUTH'), + basicAuthParameters?: { + password?: string(name='password', description='The password for basic authentication.', example='*******'), + username?: string(name='username', description='The username for basic authentication.', example='admin'), + }(name='basicAuthParameters', description='The parameters that are configured for basic authentication.'), + oauthParameters?: { + authorizationEndpoint?: string(name='authorizationEndpoint', description='The endpoint that is used to obtain the OAuth token.', example='http://localhost:8080/oauth/token'), + clientParameters?: { + clientID?: string(name='clientID', description='The client ID.', example='ClientID'), + clientSecret?: string(name='clientSecret', description='The client key secret of the application.', example='ClientSecret'), + }(name='clientParameters', description='The parameters that are configured for the client.'), + httpMethod?: string(name='httpMethod', description='The HTTP request method. Valid values:\n + - GET\n + - POST\n + - HEAD', example='POST'), + oauthHttpParameters?: { + bodyParameters?: [ + { + isValueSecret?: string(name='isValueSecret', description='Indicates whether authentication is enabled.', example='false'), + key?: string(name='key', description='The key in the request body.', example='name'), + value?: string(name='value', description='The value of the key in the request body.', example='demo'), + } + ](name='bodyParameters', description='The parameters that are configured for the request.'), + headerParameters?: [ + { + isValueSecret?: string(name='isValueSecret', description='Indicates whether authentication is enabled.', example='false'), + key?: string(name='key', description='The key in the request header.', example='name'), + value?: string(name='value', description='The value of the key in the request header.', example='demo'), + } + ](name='headerParameters', description='The parameters that are configured for the request header.'), + queryStringParameters?: [ + { + isValueSecret?: string(name='isValueSecret', description='Indicates whether authentication is enabled.', example='false'), + key?: string(name='key', description='The key in the request path.', example='name'), + value?: string(name='value', description='The value of the key in the request path.', example='demo'), + } + ](name='queryStringParameters', description='The parameters that are configured for the request path.'), + }(name='oauthHttpParameters', description='The request parameters for OAuth authentication.'), + }(name='oauthParameters', description='The parameters that are configured for OAuth authentication.'), + }(name='authParameters', description='The parameters that are configured for authentication.'), + connectionName?: string(name='connectionName', description='The name of the connection. The name must be 2 to 127 characters in length.\n + This parameter is required.', example='connection-name'), + description?: string(name='description', description='The description of the connection. The description can be up to 255 characters in length.', example='demo'), + networkParameters?: { + networkType?: string(name='networkType', description='The network type. Valid values:\n + PublicNetwork and PrivateNetwork.\n + * Note: If you set this parameter to PrivateNetwork, you must configure VpcId, VswitcheId, and SecurityGroupId.\n + This parameter is required.', example='PublicNetwork'), + securityGroupId?: string(name='securityGroupId', description='The ID of the security group.', example='eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9****'), + vpcId?: string(name='vpcId', description='The VPC. ID', example='eb-test/vpc-bp1symadadwnwg****'), + vswitcheId?: string(name='vswitcheId', description='The vSwitch ID.', example='vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeq****'), + }(name='networkParameters', description='The parameters that are configured for the network. This parameter is required.'), +} + +model CreateConnectionResponseBody = { + code?: string(name='code', description='The returned response code. The value Success indicates that the request is successful.', example='Success'), + connectionName?: string(name='connectionName', description='The connection name.', example='connection-demo'), + message?: string(name='message', description='The returned message. If the request is successful, success is returned. If the request failed, an error code is returned.', example='success'), + requestId?: string(name='requestId', description='The request ID.', example='7DA60DED-CD36-5837-B848-C01A23D2****'), +} + +model CreateConnectionResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: CreateConnectionResponseBody(name='body'), +} + +/** + * @summary Creates a connection. + * + * @description You can call this API operation to create a connection. + * + * @param request CreateConnectionRequest + * @param runtime runtime options for this request RuntimeOptions + * @return CreateConnectionResponse + */ +async function createConnectionWithOptions(request: CreateConnectionRequest, runtime: Util.RuntimeOptions): CreateConnectionResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.authParameters)) { + body['authParameters'] = request.authParameters; + } + if (!Util.isUnset(request.connectionName)) { + body['connectionName'] = request.connectionName; + } + if (!Util.isUnset(request.description)) { + body['description'] = request.description; + } + if (!Util.isUnset(request.networkParameters)) { + body['networkParameters'] = request.networkParameters; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'CreateConnection', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/connection/createConnection', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Creates a connection. + * + * @description You can call this API operation to create a connection. + * + * @param request CreateConnectionRequest + * @return CreateConnectionResponse + */ +async function createConnection(request: CreateConnectionRequest): CreateConnectionResponse { + var runtime = new Util.RuntimeOptions{}; + return createConnectionWithOptions(request, runtime); +} + +model DeleteConnectionRequest { + connectionName?: string(name='connectionName', description='The name of the connection that you want to delete. This parameter is required.', example='connection-name'), +} + +model DeleteConnectionResponseBody = { + code?: string(name='code', description='The returned response code. The value Success indicates that the request is successful.', example='Success'), + message?: string(name='message', description='The returned message. If the request is successful, success is returned. If the request failed, an error code is returned.', example='success'), + requestId?: string(name='requestId', description='The request ID.', example='8EF25E37-1750-5D7A-BA56-F8AE081A69C8'), +} + +model DeleteConnectionResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: DeleteConnectionResponseBody(name='body'), +} + +/** + * @summary Deletes a connection. + * + * @description You can call this API operation to delete a connection. + * + * @param request DeleteConnectionRequest + * @param runtime runtime options for this request RuntimeOptions + * @return DeleteConnectionResponse + */ +async function deleteConnectionWithOptions(request: DeleteConnectionRequest, runtime: Util.RuntimeOptions): DeleteConnectionResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.connectionName)) { + body['connectionName'] = request.connectionName; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body) + }; + var params = new OpenApi.Params{ + action = 'DeleteConnection', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/connection/deleteConnection', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Deletes a connection. + * + * @description You can call this API operation to delete a connection. + * + * @param request DeleteConnectionRequest + * @return DeleteConnectionResponse + */ +async function deleteConnection(request: DeleteConnectionRequest): DeleteConnectionResponse { + var runtime = new Util.RuntimeOptions{}; + return deleteConnectionWithOptions(request, runtime); +} + +model UpdateConnectionRequest { + authParameters?: { + apiKeyAuthParameters?: { + apiKeyName?: string(name='apiKeyName', description='The key of the API key.', example='Token'), + apiKeyValue?: string(name='apiKeyValue', description='The value of the API key.', example='adkjnakddh****'), + }(name='apiKeyAuthParameters', description='The parameters that are configured for API key authentication.'), + authorizationType?: string(name='authorizationType', description='The authentication type. Valid values:\n + BASIC_AUTH: basic authentication.\n + Introduction: Basic authentication is a simple authentication scheme built into the HTTP protocol. When you use the HTTP protocol for communications, the authentication method that the HTTP server uses to authenticate user identities on the client is defined in the protocol. The request header is in the Authorization: Basic Base64-encoded string (Username:Password) format.\n + 1. Username and Password are required\n + API_KEY_AUTH: API key authentication.\n + Introduction: The request header is in the Token: Token value format.\n + * ApiKeyName and ApiKeyValue are required.\n + OAUTH_AUTH: OAuth authentication.\n + Introduction: OAuth2.0 is an authentication mechanism. In normal cases, a system that does not use OAuth2.0 can access the resources of the server from the client. To ensure access security, access tokens are used to authenticate users in OAuth 2.0. The client must use an access token to access protected resources. This way, OAuth 2.0 protects resources from being accessed from malicious clients and improves system security.\n + * AuthorizationEndpoint, OAuthHttpParameters, and HttpMethod are required.', example='BASIC_AUTH'), + basicAuthParameters?: { + password?: string(name='password', description='The password for basic authentication.', example='*******'), + username?: string(name='username', description='The username for basic authentication.', example='admin'), + }(name='basicAuthParameters', description='The parameters that are configured for basic authentication.'), + oauthParameters?: { + authorizationEndpoint?: string(name='authorizationEndpoint', description='The endpoint that is used to obtain the OAuth token.', example='http://localhost:8080/oauth/token'), + clientParameters?: { + clientID?: string(name='clientID', description='The client ID.', example='ClientID'), + clientSecret?: string(name='clientSecret', description='The client key secret of the application.', example='ClientSecret'), + }(name='clientParameters', description='The parameters that are configured for the client.'), + httpMethod?: string(name='httpMethod', description='The HTTP request method. Valid values:\n + - GET\n + - POST\n + - HEAD', example='POST'), + oauthHttpParameters?: { + bodyParameters?: [ + { + isValueSecret?: string(name='isValueSecret', description='Indicates whether authentication is enabled.', example='false'), + key?: string(name='key', description='The key in the request body.', example='name'), + value?: string(name='value', description='The value of the key in the request body.', example='demo'), + } + ](name='bodyParameters', description='The parameters that are configured for the request.'), + headerParameters?: [ + { + isValueSecret?: string(name='isValueSecret', description='Indicates whether authentication is enabled.', example='false'), + key?: string(name='key', description='The key in the request header.', example='name'), + value?: string(name='value', description='The value of the key in the request header.', example='demo'), + } + ](name='headerParameters', description='The parameters that are configured for the request header.'), + queryStringParameters?: [ + { + isValueSecret?: string(name='isValueSecret', description='Indicates whether authentication is enabled.', example='false'), + key?: string(name='key', description='The key in the request path.', example='name'), + value?: string(name='value', description='The value of the key in the request path.', example='demo'), + } + ](name='queryStringParameters', description='The parameters that are configured for the request path.'), + }(name='oauthHttpParameters', description='The request parameters for OAuth authentication.'), + }(name='oauthParameters', description='The parameters that are configured for OAuth authentication.'), + }(name='authParameters', description='The parameters that are configured for authentication.'), + connectionName?: string(name='connectionName', description='The name of the connection. The name must be 2 to 127 characters in length.\n + This parameter is required.', example='connection-name'), + description?: string(name='description', description='The description of the connection. The description can be up to 255 characters in length.', example='demo'), + networkParameters?: { + networkType?: string(name='networkType', description='The network type. Valid values:\n + PublicNetwork and PrivateNetwork.\n + * Note: If you set this parameter to PrivateNetwork, you must configure VpcId, VswitcheId, and SecurityGroupId.\n + This parameter is required.', example='PublicNetwork'), + securityGroupId?: string(name='securityGroupId', description='The ID of the security group.', example='eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9****'), + vpcId?: string(name='vpcId', description='The VPC. ID', example='eb-test/vpc-bp1symadadwnwg****'), + vswitcheId?: string(name='vswitcheId', description='The vSwitch ID.', example='vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeq****'), + }(name='networkParameters', description='The parameters that are configured for the network. This parameter is required.'), +} + +model UpdateConnectionResponseBody = { + code?: string(name='code', description='The returned response code.', example='Success'), + message?: string(name='message', description='The returned message.', example='success'), + requestId?: string(name='requestId', description='The request ID.', example='8346BE8F-40F3-533D-A0B8-1359C31BD5BA'), +} + +model UpdateConnectionResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: UpdateConnectionResponseBody(name='body'), +} + +/** + * @summary Updates a connection. + * + * @description You can call this API operation to update a connection. + * + * @param request UpdateConnectionRequest + * @param runtime runtime options for this request RuntimeOptions + * @return UpdateConnectionResponse + */ +async function updateConnectionWithOptions(request: UpdateConnectionRequest, runtime: Util.RuntimeOptions): UpdateConnectionResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.authParameters)) { + body['authParameters'] = request.authParameters; + } + if (!Util.isUnset(request.connectionName)) { + body['connectionName'] = request.connectionName; + } + if (!Util.isUnset(request.description)) { + body['description'] = request.description; + } + if (!Util.isUnset(request.networkParameters)) { + body['networkParameters'] = request.networkParameters; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'UpdateConnection', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/connection/updateConnection', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Updates a connection. + * + * @description You can call this API operation to update a connection. + * + * @param request UpdateConnectionRequest + * @return UpdateConnectionResponse + */ +async function updateConnection(request: UpdateConnectionRequest): UpdateConnectionResponse { + var runtime = new Util.RuntimeOptions{}; + return updateConnectionWithOptions(request, runtime); +} + +model GetConnectionRequest { + connectionName?: string(name='connectionName', description='The connection name. This parameter is required.', example='connection-name'), +} + +model GetConnectionResponseBody = { + code?: string(name='code', description='The returned response code. The value Success indicates that the request is successful.', example='Success'), + connections?: [ + { + authParameters?: { + apiKeyAuthParameters?: { + apiKeyName?: string(name='apiKeyName', description='The API key.', example='Token'), + apiKeyValue?: string(name='apiKeyValue', description='The value of the API key.', example='asdkjnqkwejooa'), + }(name='apiKeyAuthParameters', description='The parameters that are configured for API key authentication.'), + authorizationType?: string(name='authorizationType', description='The authentication type. Valid values:\n + + - BASIC_AUTH: basic authentication.\n + + - API_KEY_AUTH: API key authentication.\n + + - OAUTH_AUTH: OAuth authentication.', example='BASIC_AUTH'), + basicAuthParameters?: { + password?: string(name='password', description='The password for basic authentication.', example='admin'), + username?: string(name='username', description='The username for basic authentication.', example='admin'), + }(name='basicAuthParameters', description='The parameters that are configured for basic authentication.'), + oauthParameters?: { + authorizationEndpoint?: string(name='authorizationEndpoint', description='The endpoint that is used to obtain the OAuth token.', example='http://localhost:8080/oauth/token'), + clientParameters?: { + clientID?: string(name='clientID', description='The client ID.', example='ClientID'), + clientSecret?: string(name='clientSecret', description='The client key secret of the application.', example='ClientSecret'), + }(name='clientParameters', description='The parameters that are configured for the client.'), + httpMethod?: string(name='httpMethod', description='The HTTP request method. Valid values: + + - GET + + - POST + + - HEAD', example='POST'), + oauthHttpParameters?: { + bodyParameters?: [ + { + isValueSecret?: string(name='isValueSecret', description='Indicates whether authentication is enabled.', example='false'), + key?: string(name='key', description='The key in the request body.', example='name'), + value?: string(name='value', description='The value of the key in the request body.', example='demo'), + } + ](name='bodyParameters', description='The parameters that are configured for the request.'), + headerParameters?: [ + { + isValueSecret?: string(name='isValueSecret', description='Indicates whether authentication is enabled.', example='false'), + key?: string(name='key', description='The key in the request header.', example='name'), + value?: string(name='value', description='The value of the key in the request header.', example='demo'), + } + ](name='headerParameters', description='The parameters that are configured for the request header.'), + queryStringParameters?: [ + { + isValueSecret?: string(name='isValueSecret', description='Indicates whether authentication is enabled.', example='false'), + key?: string(name='key', description='The key in the request path.', example='name'), + value?: string(name='value', description='The value of the key in the request path.', example='demo'), + } + ](name='queryStringParameters', description='The parameters that are configured for the request path.'), + }(name='oauthHttpParameters', description='The request parameters for OAuth authentication.'), + }(name='oauthParameters', description='The parameters that are configured for OAuth authentication.'), + }(name='authParameters', description='The parameters that are configured for authentication.'), + connectionName?: string(name='connectionName', description='The connection name.', example='connection-name'), + description?: string(name='description', description='The connection description.', example='The description of the connection.'), + gmtCreate?: long(name='gmtCreate', description='The time when the connection was created.', example='1592838994234'), + id?: integer(name='id', description='The connection ID.', example='1141093'), + networkParameters?: { + networkType?: string(name='networkType', description='The network type. Valid values:PublicNetwork and PrivateNetwork.', example='PublicNetwork'), + securityGroupId?: string(name='securityGroupId', description='The security group ID.', example='eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb'), + vpcId?: string(name='vpcId', description='The virtual private cloud (VPC) ID.', example='eb-test/vpc-bp1symadadwnwgmqud'), + vswitcheId?: string(name='vswitcheId', description='The vSwitch ID.', example='vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c'), + }(name='networkParameters'), + } + ](name='connections', description='The value of the key in the request path.'), + message?: string(name='message', description='The returned message.', example='success'), + requestId?: string(name='requestId', description='The returned request ID.', example='34AD682D-5B91-5773-8132-AA38C130****'), +} + +model GetConnectionResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: GetConnectionResponseBody(name='body'), +} + +/** + * @summary Queries the configurations of a connection. + * + * @description You can call this API operation to query the configurations of a connection. + * + * @param request GetConnectionRequest + * @param runtime runtime options for this request RuntimeOptions + * @return GetConnectionResponse + */ +async function getConnectionWithOptions(request: GetConnectionRequest, runtime: Util.RuntimeOptions): GetConnectionResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.connectionName)) { + body['connectionName'] = request.connectionName; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'GetConnection', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/connection/getConnection', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Queries the configurations of a connection. + * + * @description You can call this API operation to query the configurations of a connection. + * + * @param request GetConnectionRequest + * @return GetConnectionResponse + */ +async function getConnection(request: GetConnectionRequest): GetConnectionResponse { + var runtime = new Util.RuntimeOptions{}; + return getConnectionWithOptions(request, runtime); +} + +/** + * @summary Queries the configurations of a connection. + * + * @description You can call this API operation to query the configurations of a connection. + * + * @param request GetConnectionRequest + * @param runtime runtime options for this request RuntimeOptions + * @return GetConnectionResponse + */ +async function selectOneConnectionWithOptions(request: GetConnectionRequest, runtime: Util.RuntimeOptions): GetConnectionResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.connectionName)) { + body['connectionName'] = request.connectionName; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'selectOneConnection', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/connection/selectOneConnection', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Queries the configurations of a connection. + * + * @description You can call this API operation to query the configurations of a connection. + * + * @param request GetConnectionRequest + * @return GetConnectionResponse + */ +async function selectOneConnection(request: GetConnectionRequest): GetConnectionResponse { + var runtime = new Util.RuntimeOptions{}; + return selectOneConnectionWithOptions(request, runtime); +} + +model ListConnectionsRequest { + connectionNamePrefix?: string(name='connectionNamePrefix', description='The key word that you specify to query connections. Connections can be queried by prefixes.', example='connection-name'), + maxResults?: int32(name='maxResults', description='The maximum number of entries to be returned in a single call. You can use this parameter and the NextToken parameter to implement paging.\n + * Default value: 10.', example='10'), + nextToken?: string(name='nextToken', description='If you set the Limit parameter and excess return values exist, this parameter is returned.\n + * Default value: 0.', example='0'), +} + +model ListConnectionsResponseBody = { + code?: string(name='code', description='The HTTP status code. The value Success indicates that the request is successful.', example='Success'), + connections?: [ + { + authParameters?: { + apiKeyAuthParameters?: { + apiKeyName?: string(name='apiKeyName', description='The API key.', example='Token'), + apiKeyValue?: string(name='apiKeyValue', description='The value of the API key.', example='asdkjnqkwejooa'), + }(name='apiKeyAuthParameters', description='The parameters that are configured for API key authentication.'), + authorizationType?: string(name='authorizationType', description='The authentication type. Valid values:\n + + - BASIC_AUTH: basic authentication.\n + + - API_KEY_AUTH: API key authentication.\n + + - OAUTH_AUTH: OAuth authentication.', example='BASIC_AUTH'), + basicAuthParameters?: { + password?: string(name='password', description='The password for basic authentication.', example='admin'), + username?: string(name='username', description='The username for basic authentication.', example='admin'), + }(name='basicAuthParameters', description='The parameters that are configured for basic authentication.'), + oauthParameters?: { + authorizationEndpoint?: string(name='authorizationEndpoint', description='The endpoint that is used to obtain the OAuth token.', example='http://localhost:8080/oauth/token'), + clientParameters?: { + clientID?: string(name='clientID', description='The client ID.', example='ClientID'), + clientSecret?: string(name='clientSecret', description='The client key secret of the application.', example='ClientSecret'), + }(name='clientParameters', description='The parameters that are configured for the client.'), + httpMethod?: string(name='httpMethod', description='The HTTP request method. Valid values: + + - GET + + - POST + + - HEAD', example='POST'), + oauthHttpParameters?: { + bodyParameters?: [ + { + isValueSecret?: string(name='isValueSecret', description='Indicates whether authentication is enabled.', example='false'), + key?: string(name='key', description='The key in the request body.', example='name'), + value?: string(name='value', description='The value of the key in the request body.', example='demo'), + } + ](name='bodyParameters', description='The parameters that are configured for the request.'), + headerParameters?: [ + { + isValueSecret?: string(name='isValueSecret', description='Indicates whether authentication is enabled.', example='false'), + key?: string(name='key', description='The key in the request header.', example='name'), + value?: string(name='value', description='The value of the key in the request header.', example='demo'), + } + ](name='headerParameters', description='The parameters that are configured for the request header.'), + queryStringParameters?: [ + { + isValueSecret?: string(name='isValueSecret', description='Indicates whether authentication is enabled.', example='false'), + key?: string(name='key', description='The key in the request path.', example='name'), + value?: string(name='value', description='The value of the key in the request path.', example='demo'), + } + ](name='queryStringParameters', description='The parameters that are configured for the request path.'), + }(name='oauthHttpParameters', description='The request parameters for OAuth authentication.'), + }(name='oauthParameters', description='The parameters that are configured for OAuth authentication.'), + }(name='authParameters', description='The parameters that are configured for authentication.'), + connectionName?: string(name='connectionName', description='The connection name.', example='connection-name'), + description?: string(name='description', description='The connection description.', example='The description of the connection.'), + gmtCreate?: long(name='gmtCreate', description='The time when the connection was created.', example='1592838994234'), + id?: integer(name='id', description='The connection ID.', example='1141093'), + networkParameters?: { + networkType?: string(name='networkType', description='The network type. Valid values:PublicNetwork and PrivateNetwork.', example='PublicNetwork'), + securityGroupId?: string(name='securityGroupId', description='The security group ID.', example='eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb'), + vpcId?: string(name='vpcId', description='The virtual private cloud (VPC) ID.', example='eb-test/vpc-bp1symadadwnwgmqud'), + vswitcheId?: string(name='vswitcheId', description='The vSwitch ID.', example='vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c'), + }(name='networkParameters'), + } + ](name='connections', description='The value of the key in the request path.'), + maxResults?: int32(name='maxResults', description='The number of entries returned per page.', example='10'), + nextToken?: string(name='nextToken', description='If excess return values exist, this parameter is returned.', example='0'), + total?: integer(name='total', description='The total number of entries returned.', example='1'), + message?: string(name='message', description='The message returned.', example='success'), + requestId?: string(name='requestId', description='The ID of the request. This parameter is a common parameter. Each request has a unique ID. You can use the ID to troubleshoot issues.', example='E3619976-8714-5D88-BBA2-6983D798A8BB'), +} + +model ListConnectionsResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: ListConnectionsResponseBody(name='body'), +} + +/** + * @summary Queries connections. + * + * @description You can call this API operation to query connections. + * + * @param request ListConnectionsRequest + * @param runtime runtime options for this request RuntimeOptions + * @return ListConnectionsResponse + */ +async function listConnectionsWithOptions(request: ListConnectionsRequest, runtime: Util.RuntimeOptions): ListConnectionsResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.connectionNamePrefix)) { + body['connectionNamePrefix'] = request.connectionNamePrefix; + } + if (!Util.isUnset(request.maxResults)) { + body['maxResults'] = request.maxResults; + } + if (!Util.isUnset(request.nextToken)) { + body['nextToken'] = request.nextToken; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'ListConnections', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/connection/listConnections', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary list connections. + * + * @description You can call this API operation to list connections. + * + * @param request ListConnectionsRequest + * @return ListConnectionsResponse + */ +async function listConnections(request: ListConnectionsRequest): ListConnectionsResponse { + var runtime = new Util.RuntimeOptions{}; + return listConnectionsWithOptions(request, runtime); +} + +// enum AuthorizationTypeEnums : string { +// API_KEY_AUTH(name="API_KEY_AUTH", value="API_KEY_AUTH"), +// BASIC_AUTH(name="BASIC_AUTH", value="BASIC_AUTH"), +// OAUTH_AUTH(name="OAUTH_AUTH", value="OAUTH_AUTH"), +// } + +// enum NetworkTypeEnum : string { +// PUBLIC_NETWORK(name="PUBLIC_NETWORK", value="PublicNetwork"), +// PRIVATE_NETWORK(name="PRIVATE_NETWORK", value="PrivateNetwork") +// } + +model ListEnumsResponseResponseBody = { + authorizationTypeEnums?: string(name='authorizationTypeEnums'), + networkTypeEnums?: string(name='networkTypeEnums'), + code?: string(name='code', description='The returned response code.', example='Success'), + message?: string(name='message', description='The returned message.', example='success'), + requestId?: string(name='requestId', description='The request ID.', example='8346BE8F-40F3-533D-A0B8-1359C31BD5BA'), +} + +model ListEnumsResponseResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: UpdateConnectionResponseBody(name='body'), +} + +/** + * @summary Updates a connection. + * + * @description You can call this API operation to update a connection. + * + * @return ListEnumsResponseResponse + */ +async function listEnumsResponse(): ListEnumsResponseResponse { + var runtime = new Util.RuntimeOptions{}; + var body : map[string]any = {}; + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'listEnumsResponse', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/connection/listEnumsResponse', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + EventData Controller apis: + * putEvents +*/ + +model PutEventsRequest { + eventBusName?: string(name='eventBusName', description='The name of the event bus.\nThis parameter is required.', example='demo'), + event?: string(name='event', description='The content of the event.', example='The description of the event.'), +} + +model PutEventsResponseBody = { + failedEntryCount?: integer(name='failedEntryCount'), + entryList?: [ + { + eventId?: string(name='eventId', description='The event ID.', example='a5747e4f-2af2-40b6-b262-d0140e995bf7'), + errorCode?: string(name='errorCode', description='The returned error code.'), + errorMessage?: string(name='errorMessage', description='The returned error message.'), + } + ](name='entryList'), + code?: string(name='code', description='The status code returned. The status code 200 indicates that the request was successful.', example='200'), + message?: string(name='message', description='The error message that is returned if the request failed.', example='EventBusNotExist'), + requestId?: string(name='requestId', description='The request ID.', example='580A938B-6107-586C-8EC7-F22EEBEDA9E6'), +} + +model PutEventsResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: PutEventsResponseBody(name='body'), +} + +/** + * @summary Queries the content of an event. + * + * @description You can call this API operation to query the content of an event. + * + * @param request PutEventsRequest + * @param runtime runtime options for this request RuntimeOptions + * @return PutEventsResponse + */ +async function putEventsWithOptions(request: PutEventsRequest, runtime: Util.RuntimeOptions): PutEventsResponse { + Util.validateModel(request); + var headers : map[string]string = { + ce-specversion = "1.0", + ce-type = "com.github.pull_request.opened", + ce-source = "https://github.com/cloudevents/spec/pull", + ce-subject = "demo", + ce-id = "1234-1234-1234", + ce-datacontenttype = "application/json", + ce-time = "2024-07-01T17:31:00Z", + ce-eventbusname = "demo-bus" + }; + var body : string = "{}"; + if (!Util.isUnset(request.eventBusName)) { + headers['ce-eventbusname'] = request.eventBusName; + } + if (!Util.isUnset(request.event)) { + body = request.event; + } + var req = new OpenApi.OpenApiRequest{ + body = body, + headers = headers + }; + var params = new OpenApi.Params{ + action = 'putEvents', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/putEvents', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Queries the content of an event. + * + * @description You can call this API operation to query the content of an event. + * + * @param request PutEventsRequest + * @return PutEventsResponse + */ +async function putEvents(request: PutEventsRequest): PutEventsResponse { + var runtime = new Util.RuntimeOptions{}; + return putEventsWithOptions(request, runtime); +} + +/** + EventRule Controller apis: + * createEventRule * + * getEventRule * + * deleteEventRule * + * updateEventRule * + * listEventRules * + * enableEventRule * + * disableEventRule * +*/ + +model CreateEventRuleRequest { + eventBusName?: string(name='eventBusName', description='The name of the event bus with which the event source is associated.\nThis parameter is required.', example='my-event-bus'), + eventRuleName?: string(name='eventRuleName', description='The name of the event rule.\nThis parameter is required.', example='myrabbitmq.sourc'), + description?: string(name='description'), + filterPattern?: string(name='filterPattern', description='The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field.\n + You can specify up to five expressions in the map data structure in each field.', example='{\\"source\\": [{\\"prefix\\": \\"acs.\\"}],\\"type\\": [{\\"prefix\\":\\"oss:ObjectReplication\\"}],\\"subject\\":[{\\"prefix\\":\\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\\", \\"suffix\\":\\".txt\\"}]}'), +} + +model CreateEventRuleResponseBody = { + code?: string(name='code', description='The returned response code. Valid values:\n + * Success: The request is successful.\n + * Other codes: The request failed. For more information about error codes, see Error codes.', example='Success'), + eventRuleName?: string(name='eventRuleName', description='The name of the event rule.', example='myrabbitmq.sourc'), + message?: string(name='message', description='The returned error message.', example='Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\\\r\\\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]'), + requestId?: string(name='requestId', description='The request ID.', example='2922208e-e1c6-43ee-bfd1-aca50263bc8a'), +} + +model CreateEventRuleResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: CreateEventRuleResponseBody(name='body'), +} + +/** + * @summary Creates an event rule. + * + * @description You can call this operation to create an event rule. + * + * @param request CreateEventRuleRequest + * @param runtime runtime options for this request RuntimeOptions + * @return CreateEventRuleResponse + */ +async function createEventRuleWithOptions(request: CreateEventRuleRequest, runtime: Util.RuntimeOptions): CreateEventRuleResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.eventRuleName)) { + body['eventRuleName'] = request.eventRuleName; + } + if (!Util.isUnset(request.description)) { + body['description'] = request.description; + } + if (!Util.isUnset(request.filterPattern)) { + body['filterPattern'] = request.filterPattern; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'CreateEventRule', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/rule/createEventRule', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Creates an event rule. + * + * @description You can call this operation to create an event rule. + * + * @param request CreateEventRuleRequest + * @return CreateEventRuleResponse + */ +async function createEventRule(request: CreateEventRuleRequest): CreateEventRuleResponse { + var runtime = new Util.RuntimeOptions{}; + return createEventRuleWithOptions(request, runtime); +} + +model GetEventRuleRequest { + eventBusName?: string(name='eventBusName', description='The name of the event bus with which the event source is associated.\nThis parameter is required.', example='my-event-bus'), + eventRuleName?: string(name='eventRuleName', description='The name of the event rule.\nThis parameter is required.', example='myrabbitmq.sourc'), +} + +model GetEventRuleResponseBody = { + code?: string(name='code', description='The returned response code. Valid values:\n + * Success: The request is successful.\n + * Other codes: The request failed. For more information about error codes, see Error codes.', example='Success'), + eventBusName?: string(name='eventBusName', description='The name of the event bus with which the event source is associated.\nThis parameter is required.', example='my-event-bus'), + eventRuleName?: string(name='eventRuleName', description='The name of the event rule.\nThis parameter is required.', example='myrabbitmq.sourc'), + description?: string(name='description'), + filterPattern?: string(name='filterPattern', description='The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field.\n + You can specify up to five expressions in the map data structure in each field.', example='{\\"source\\": [{\\"prefix\\": \\"acs.\\"}],\\"type\\": [{\\"prefix\\":\\"oss:ObjectReplication\\"}],\\"subject\\":[{\\"prefix\\":\\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\\", \\"suffix\\":\\".txt\\"}]}'), + status?: string(name='status', description='The status of the event rule. Valid values: ENABLE (default): The event rule is enabled. DISABLE: The event rule is disabled.', example='ENABLE'), + gmtCreate?: string(name='gmtCreate'), + gmtModify?: string(name='gmtModify'), + eventTargets?: [ + { + eventTargetName?: string(name='eventTargetName'), + className?: string(name='className'), + config?: map[string]any (name='config'), + runOptions?: { + errorsTolerance?: string(name='errorsTolerance'), + retryStrategy?: { + pushRetryStrategy?: string(name='pushRetryStrategy'), + maximumEventAgeInSeconds?: int32(name='maximumEventAgeInSeconds'), + maximumRetryAttempts?: int32(name='maximumRetryAttempts') + }(name='retryStrategy'), + deadLetterQueue?: { + type?: string(name='type'), + config?: map[string]any (name='config') + }(name='deadLetterQueue') + }(name='runOptions') + } + ](name='eventTargets'), + message?: string(name='message', description='The returned error message.', example='Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\\\r\\\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]'), + requestId?: string(name='requestId', description='The request ID.', example='2922208e-e1c6-43ee-bfd1-aca50263bc8a'), +} + +model GetEventRuleResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: GetEventRuleResponseBody(name='body'), +} + +/** + * @summary Gets an event rule. + * + * @description You can call this operation to get an event rule. + * + * @param request GetEventRuleRequest + * @param runtime runtime options for this request RuntimeOptions + * @return GetEventRuleResponse + */ +async function getEventRuleWithOptions(request: GetEventRuleRequest, runtime: Util.RuntimeOptions): GetEventRuleResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.eventRuleName)) { + body['eventRuleName'] = request.eventRuleName; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'GetEventRule', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/rule/getEventRule', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Gets an event rule. + * + * @description You can call this operation to get an event rule. + * + * @param request GetEventRuleRequest + * @return GetEventRuleResponse + */ +async function getEventRule(request: GetEventRuleRequest): GetEventRuleResponse { + var runtime = new Util.RuntimeOptions{}; + return getEventRuleWithOptions(request, runtime); +} + +model DeleteEventRuleRequest { + eventBusName?: string(name='eventBusName', description='The name of the event bus with which the event source is associated.\nThis parameter is required.', example='my-event-bus'), + eventRuleName?: string(name='eventRuleName', description='The name of the event rule.\nThis parameter is required.', example='myrabbitmq.sourc'), +} + +model DeleteEventRuleResponseBody = { + code?: string(name='code', description='The returned response code. Valid values:\n + * Success: The request is successful.\n + * Other codes: The request failed. For more information about error codes, see Error codes.', example='Success'), + message?: string(name='message', description='The returned error message.', example='Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\\\r\\\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]'), + requestId?: string(name='requestId', description='The request ID.', example='2922208e-e1c6-43ee-bfd1-aca50263bc8a'), +} + +model DeleteEventRuleResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: DeleteEventRuleResponseBody(name='body'), +} + +/** + * @summary Deletes an event rule. + * + * @description You can call this operation to delete an event rule. + * + * @param request DeleteEventRuleRequest + * @param runtime runtime options for this request RuntimeOptions + * @return DeleteEventRuleResponse + */ +async function deleteEventRuleWithOptions(request: DeleteEventRuleRequest, runtime: Util.RuntimeOptions): DeleteEventRuleResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.eventRuleName)) { + body['eventRuleName'] = request.eventRuleName; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'DeleteEventRule', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/rule/deleteEventRule', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Deletes an event rule. + * + * @description You can call this operation to delete an event rule. + * + * @param request DeleteEventRuleRequest + * @return DeleteEventRuleResponse + */ +async function deleteEventRule(request: DeleteEventRuleRequest): DeleteEventRuleResponse { + var runtime = new Util.RuntimeOptions{}; + return deleteEventRuleWithOptions(request, runtime); +} + +model UpdateEventRuleRequest { + eventBusName?: string(name='eventBusName', description='The name of the event bus with which the event source is associated.\nThis parameter is required.', example='my-event-bus'), + eventRuleName?: string(name='eventRuleName', description='The name of the event rule.\nThis parameter is required.', example='myrabbitmq.sourc'), + description?: string(name='description'), + filterPattern?: string(name='filterPattern', description='The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field.\n + You can specify up to five expressions in the map data structure in each field.\nThis parameter is required.', example='{\\"source\\": [{\\"prefix\\": \\"acs.\\"}],\\"type\\": [{\\"prefix\\":\\"oss:ObjectReplication\\"}],\\"subject\\":[{\\"prefix\\":\\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\\", \\"suffix\\":\\".txt\\"}]}'), +} + +model UpdateEventRuleResponseBody = { + code?: string(name='code', description='The returned response code. Valid values:\n + * Success: The request is successful.\n + * Other codes: The request failed. For more information about error codes, see Error codes.', example='Success'), + message?: string(name='message', description='The returned error message.', example='Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\\\r\\\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]'), + requestId?: string(name='requestId', description='The request ID.', example='2922208e-e1c6-43ee-bfd1-aca50263bc8a'), +} + +model UpdateEventRuleResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: UpdateEventRuleResponseBody(name='body'), +} + +/** + * @summary Updates an event rule. + * + * @description You can call this operation to update an event rule. + * + * @param request UpdateEventRuleRequest + * @param runtime runtime options for this request RuntimeOptions + * @return UpdateEventRuleResponse + */ +async function updateEventRuleWithOptions(request: UpdateEventRuleRequest, runtime: Util.RuntimeOptions): UpdateEventRuleResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.eventRuleName)) { + body['eventRuleName'] = request.eventRuleName; + } + if (!Util.isUnset(request.description)) { + body['description'] = request.description; + } + if (!Util.isUnset(request.filterPattern)) { + body['filterPattern'] = request.filterPattern; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'UpdateEventRule', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/rule/updateEventRule', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Updates an event rule. + * + * @description You can call this operation to update an event rule. + * + * @param request UpdateEventRuleRequest + * @return UpdateEventRuleResponse + */ +async function updateEventRule(request: UpdateEventRuleRequest): UpdateEventRuleResponse { + var runtime = new Util.RuntimeOptions{}; + return updateEventRuleWithOptions(request, runtime); +} + +model ListEventRulesRequest { + eventBusName?: string(name='eventBusName'), + maxResults?: int32(name='maxResults', description='The number of entries returned per page.', example='10'), + nextToken?: string(name='nextToken', description='If excess return values exist, this parameter is returned.', example='0'), +} + +model ListEventRulesResponseBody{ + eventRules?: [ + { + eventBusName?: string(name='eventBusName', description='The name of the event bus with which the event source is associated.\nThis parameter is required.', example='my-event-bus'), + eventRuleName?: string(name='eventRuleName', description='The name of the event rule.\nThis parameter is required.', example='myrabbitmq.sourc'), + description?: string(name='description'), + filterPattern?: string(name='filterPattern', description='The event pattern, in JSON format. Valid values: stringEqual and stringExpression. You can specify up to five expressions in the map data structure in each field.\n + You can specify up to five expressions in the map data structure in each field.', example='{\\"source\\": [{\\"prefix\\": \\"acs.\\"}],\\"type\\": [{\\"prefix\\":\\"oss:ObjectReplication\\"}],\\"subject\\":[{\\"prefix\\":\\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\\", \\"suffix\\":\\".txt\\"}]}'), + status?: string(name='status', description='The status of the event rule. Valid values: ENABLE (default): The event rule is enabled. DISABLE: The event rule is disabled.', example='ENABLE'), + gmtCreate?: string(name='gmtCreate'), + gmtModify?: string(name='gmtModify'), + } + ](name='eventRules'), + total?: integer(name='total', description='The total number of entries.', example='2'), + maxResults?: int32(name='maxResults', description='The number of entries returned per page.', example='10'), + nextToken?: string(name='nextToken', description='If excess return values exist, this parameter is returned.', example='0'), +} + +model ListEventRulesResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: ListEventRulesResponseBody(name='body'), +} + +/** + * @summary Lists event rules. + * + * @description You can call this operation to list event rules. + * + * @param request ListEventRulesRequest + * @param runtime runtime options for this request RuntimeOptions + * @return ListEventRulesResponse + */ +async function listEventRulesWithOptions(request: ListEventRulesRequest, runtime: Util.RuntimeOptions): ListEventRulesResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.maxResults)) { + body['maxResults'] = request.maxResults; + } + if (!Util.isUnset(request.nextToken)) { + body['nextToken'] = request.nextToken; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'ListEventRules', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/rule/listEventRules', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Lists event rules. + * + * @description You can call this operation to list event rules. + * + * @param request ListEventRulesRequest + * @return ListEventRulesResponse + */ +async function listEventRules(request: ListEventRulesRequest): ListEventRulesResponse { + var runtime = new Util.RuntimeOptions{}; + return listEventRulesWithOptions(request, runtime); +} + +model EnableEventRuleRequest { + eventBusName?: string(name='eventBusName', description='The name of the event bus with which the event source is associated.\nThis parameter is required.', example='my-event-bus'), + eventRuleName?: string(name='eventRuleName', description='The name of the event rule.\nThis parameter is required.', example='myrabbitmq.sourc'), +} + +model EnableEventRuleResponseBody = { + code?: string(name='code', description='The returned response code. Valid values:\n + * Success: The request is successful.\n + * Other codes: The request failed. For more information about error codes, see Error codes.', example='Success'), + message?: string(name='message', description='The returned error message.', example='Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\\\r\\\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]'), + requestId?: string(name='requestId', description='The request ID.', example='2922208e-e1c6-43ee-bfd1-aca50263bc8a'), +} + +model EnableEventRuleResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: EnableEventRuleResponseBody(name='body'), +} + +/** + * @summary Enables an event rule. + * + * @description You can call this operation to enable an event rule. + * + * @param request EnableEventRuleRequest + * @param runtime runtime options for this request RuntimeOptions + * @return EnableEventRuleResponse + */ +async function enableEventRuleWithOptions(request: EnableEventRuleRequest, runtime: Util.RuntimeOptions): EnableEventRuleResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.eventRuleName)) { + body['eventRuleName'] = request.eventRuleName; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'EnableEventRule', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/rule/enableEventRule', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Enables an event rule. + * + * @description You can call this operation to enable an event rule. + * + * @param request EnableEventRuleRequest + * @return EnableEventRuleResponse + */ +async function enableEventRule(request: EnableEventRuleRequest): EnableEventRuleResponse { + var runtime = new Util.RuntimeOptions{}; + return enableEventRuleWithOptions(request, runtime); +} + +model DisableEventRuleRequest { + eventBusName?: string(name='eventBusName', description='The name of the event bus with which the event source is associated.\nThis parameter is required.', example='my-event-bus'), + eventRuleName?: string(name='eventRuleName', description='The name of the event rule.\nThis parameter is required.', example='myrabbitmq.sourc'), +} + +model DisableEventRuleResponseBody = { + code?: string(name='code', description='The returned response code. Valid values:\n + * Success: The request is successful.\n + * Other codes: The request failed. For more information about error codes, see Error codes.', example='Success'), + message?: string(name='message', description='The returned error message.', example='Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\\\r\\\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]'), + requestId?: string(name='requestId', description='The request ID.', example='2922208e-e1c6-43ee-bfd1-aca50263bc8a'), +} + +model DisableEventRuleResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: DisableEventRuleResponseBody(name='body'), +} + +/** + * @summary Disables an event rule. + * + * @description You can call this operation to disable an event rule. + * + * @param request DisableEventRuleRequest + * @param runtime runtime options for this request RuntimeOptions + * @return DisableEventRuleResponse + */ +async function disableEventRuleWithOptions(request: DisableEventRuleRequest, runtime: Util.RuntimeOptions): DisableEventRuleResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.eventRuleName)) { + body['eventRuleName'] = request.eventRuleName; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'DisableEventRule', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/rule/disableEventRule', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Disables an event rule. + * + * @description You can call this operation to disable an event rule. + * + * @param request DisableEventRuleRequest + * @return DisableEventRuleResponse + */ +async function disableEventRule(request: DisableEventRuleRequest): DisableEventRuleResponse { + var runtime = new Util.RuntimeOptions{}; + return disableEventRuleWithOptions(request, runtime); +} + + +/** + EventSource Controller apis: + * createEventSource * + * updateEventSource * + * deleteEventSource * + * getEventSource * + * listEventSources * +*/ + +model CreateEventSourceRequest { + description?: string(name='description', description='The description of the event source.'), + eventBusName?: string(name='eventBusName', description='The name of the event bus with which the event source is associated.\nThis parameter is required.', example='my-event-bus'), + eventSourceName?: string(name='eventSourceName', description='The name of the event source.\nThis parameter is required.', example='myrabbitmq.sourc'), + className?: string(name='className'), + config?: map[string]any(name='config') +} + +model CreateEventSourceResponseBody = { + code?: string(name='code', description='The returned response code. Valid values:\n + * Success: The request is successful.\n + * Other codes: The request failed. For more information about error codes, see Error codes.', example='Success'), + eventSourceName?: string(name='eventSourceName', description='The name of the event source.', example='myrabbitmq.sourc'), + message?: string(name='message', description='The returned error message.', example='Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\\\r\\\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]'), + requestId?: string(name='requestId', description='The request ID.', example='2922208e-e1c6-43ee-bfd1-aca50263bc8a'), +} + +model CreateEventSourceResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: CreateEventSourceResponseBody(name='body'), +} + +/** + * @summary Creates an event source. + * + * @description You can call this operation to create an event source. + * + * @param request CreateEventSourceRequest + * @param runtime runtime options for this request RuntimeOptions + * @return CreateEventSourceResponse + */ +async function createEventSourceWithOptions(request: CreateEventSourceRequest, runtime: Util.RuntimeOptions): CreateEventSourceResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.description)) { + body['description'] = request.description; + } + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.eventSourceName)) { + body['eventSourceName'] = request.eventSourceName; + } + if (!Util.isUnset(request.className)) { + body['className'] = request.className; + } + if (!Util.isUnset(request.config)) { + body['config'] = request.config; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'CreateEventSource', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/source/createEventSource', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Creates an event source. + * + * @description You can call this operation to create an event source. + * + * @param request CreateEventSourceRequest + * @return CreateEventSourceResponse + */ +async function createEventSource(request: CreateEventSourceRequest): CreateEventSourceResponse { + var runtime = new Util.RuntimeOptions{}; + return createEventSourceWithOptions(request, runtime); +} + +model UpdateEventSourceRequest { + eventBusName?: string(name='eventBusName', description='The name of the event bus with which the event source is associated.\nThis parameter is required.', example='my-event-bus'), + eventSourceName?: string(name='eventSourceName', description='The name of the event source.\nThis parameter is required.', example='myrabbitmq.sourc'), + description?: string(name='description', description='The description of the event source.'), + className?: string(name='className'), + status?: integer(name="status"), + config?: map[string]any(name='config') +} + +model UpdateEventSourceResponseBody = { + code?: string(name='code', description='The returned response code. Valid values:\n + * Success: The request is successful.\n + * Other codes: The request failed. For more information about error codes, see Error codes.', example='Success'), + message?: string(name='message', description='The returned error message.', example='Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\\\r\\\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]'), + requestId?: string(name='requestId', description='The request ID.', example='2922208e-e1c6-43ee-bfd1-aca50263bc8a'), +} + +model UpdateEventSourceResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: UpdateEventSourceResponseBody(name='body'), +} + +/** + * @summary Updates an event source. + * + * @description You can call this operation to update an event source. + * + * @param request UpdateEventSourceRequest + * @param runtime runtime options for this request RuntimeOptions + * @return UpdateEventSourceResponse + */ +async function updateEventSourceWithOptions(request: UpdateEventSourceRequest, runtime: Util.RuntimeOptions): UpdateEventSourceResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.eventSourceName)) { + body['eventSourceName'] = request.eventSourceName; + } + if (!Util.isUnset(request.description)) { + body['description'] = request.description; + } + if (!Util.isUnset(request.className)) { + body['className'] = request.className; + } + if (!Util.isUnset(request.status)) { + body['status'] = request.status; + } + if (!Util.isUnset(request.config)) { + body['config'] = request.config; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'UpdateEventSource', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/source/updateEventSource', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Updates an event source. + * + * @description You can call this operation to update an event source. + * + * @param request UpdateEventSourceRequest + * @return UpdateEventSourceResponse + */ +async function updateEventSource(request: UpdateEventSourceRequest): UpdateEventSourceResponse { + var runtime = new Util.RuntimeOptions{}; + return updateEventSourceWithOptions(request, runtime); +} + +model DeleteEventSourceRequest { + eventBusName?: string(name='eventBusName'), + eventSourceName?: string(name='eventSourceName', description='The name of the event source.\nThis parameter is required.', example='myrabbitmq.source'), +} + +model DeleteEventSourceResponseBody = { + code?: string(name='code', description='The returned response code. The value Success indicates that the request is successful. Other values indicate that the request failed. For more information about error codes, see Error codes.', example='Success'), + message?: string(name='message', description='The returned error message.', example='Remote error. requestId: [78B66E68-E778-1F33-84BD-xxxx], error code: [EventSourceNotExist], message: [The event source in request is not exist! ]'), + requestId?: string(name='requestId', description='The request ID.', example='5f80e9b3-98d5-4f51-8412-c758818a03e4'), +} + +model DeleteEventSourceResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: DeleteEventSourceResponseBody(name='body'), +} + +/** + * @summary Deletes an event source. + * + * @description You can call this API operation to delete an event source. + * + * @param request DeleteEventSourceRequest + * @param runtime runtime options for this request RuntimeOptions + * @return DeleteEventSourceResponse + */ +async function deleteEventSourceWithOptions(request: DeleteEventSourceRequest, runtime: Util.RuntimeOptions): DeleteEventSourceResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.eventSourceName)) { + body['eventSourceName'] = request.eventSourceName; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'DeleteEventSource', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/source/deleteEventSource', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Deletes an event source. + * + * @description You can call this API operation to delete an event source. + * + * @param request DeleteEventSourceRequest + * @return DeleteEventSourceResponse + */ +async function deleteEventSource(request: DeleteEventSourceRequest): DeleteEventSourceResponse { + var runtime = new Util.RuntimeOptions{}; + return deleteEventSourceWithOptions(request, runtime); +} + +model GetEventSourceRequest { + eventBusName?: string(name='eventBusName'), + eventSourceName?: string(name='eventSourceName', description='The name of the event source.\nThis parameter is required.', example='myrabbitmq.source'), +} + +model GetEventSourceResponseBody = { + eventBusName?: string(name='eventBusName', description='The name of the event bus with which the event source is associated.\nThis parameter is required.', example='my-event-bus'), + eventSourceName?: string(name='eventSourceName', description='The name of the event source.\nThis parameter is required.', example='myrabbitmq.sourc'), + description?: string(name='description', description='The description of the event source.'), + className?: string(name='className'), + config?: map[string]any(name='config') +} + +model GetEventSourceResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: GetEventSourceResponseBody(name='body'), +} + +/** + * @summary Gets an event source. + * + * @description You can call this API operation to get an event source. + * + * @param request GetEventSourceRequest + * @param runtime runtime options for this request RuntimeOptions + * @return GetEventSourceResponse + */ +async function getEventSourceWithOptions(request: GetEventSourceRequest, runtime: Util.RuntimeOptions): GetEventSourceResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.eventSourceName)) { + body['eventSourceName'] = request.eventSourceName; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'GetEventSource', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/source/getEventSource', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Gets an event source. + * + * @description You can call this API operation to get an event source. + * + * @param request GetEventSourceRequest + * @return GetEventSourceResponse + */ +async function getEventSource(request: GetEventSourceRequest): GetEventSourceResponse { + var runtime = new Util.RuntimeOptions{}; + return getEventSourceWithOptions(request, runtime); +} + +model ListEventSourcesRequest { + eventBusName?: string(name='eventBusName'), + eventSourceType?: string(name='eventSourceType', description='The type of the event source.\nThis parameter is required.', example='USER_DEFINED'), + maxResults?: int32(name='maxResults', description='The number of entries returned per page.', example='10'), + nextToken?: string(name='nextToken', description='If excess return values exist, this parameter is returned.', example='0'), +} + +model ListEventSourcesResponseBody = { + eventSources?: [ + { + eventBusName?: string(name='eventBusName', description='The name of the event bus.\nThis parameter is required.', example='demo'), + eventSourceName?: string(name='eventSourceName', description='EventSource is required for querying default bus events.', example='testEventSourceName'), + description?: string(name='description', description='The description of the event type.', example='The description of the event type.'), + className?: string(name='className'), + config?: map[string]any(name='config'), + gmtCreate?: string(name='gmtCreate'), + gmtModify?: string(name='gmtModify') + } + ](name='eventSources'), + total?: integer(name='total', description='The total number of entries.', example='2'), + maxResults?: int32(name='maxResults', description='The number of entries returned per page.', example='10'), + nextToken?: string(name='nextToken', description='If excess return values exist, this parameter is returned.', example='0'), +} + +model ListEventSourcesResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: ListEventSourcesResponseBody(name='body'), +} + +/** + * @summary Lists event sources. + * + * @description You can call this API operation to list event sources. + * + * @param request ListEventSourcesRequest + * @param runtime runtime options for this request RuntimeOptions + * @return ListEventSourcesResponse + */ +async function listEventSourcesWithOptions(request: ListEventSourcesRequest, runtime: Util.RuntimeOptions): ListEventSourcesResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.eventSourceType)) { + body['eventSourceType'] = request.eventSourceType; + } + if (!Util.isUnset(request.maxResults)) { + body['maxResults'] = request.maxResults; + } + if (!Util.isUnset(request.nextToken)) { + body['nextToken'] = request.nextToken; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'ListEventSources', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/source/listEventSources', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Lists event sources. + * + * @description You can call this API operation to list event sources. + * + * @param request ListEventSourcesRequest + * @return ListEventSourcesResponse + */ +async function listEventSources(request: ListEventSourcesRequest): ListEventSourcesResponse { + var runtime = new Util.RuntimeOptions{}; + return listEventSourcesWithOptions(request, runtime); +} + +/** + EventTarget Controller apis: + * createEventTargets * + * updateEventTargets * + * deleteEventTargets * + * listEventTargets * +*/ + +model EventTarget { + eventTargetName?: string(name='eventTargetName'), + className?: string(name='className'), + config?: map[string]any (name='config'), + runOptions?: { + errorsTolerance?: string(name='errorsTolerance'), + retryStrategy?: { + pushRetryStrategy?: string(name='pushRetryStrategy'), + maximumEventAgeInSeconds?: int32(name='maximumEventAgeInSeconds'), + maximumRetryAttempts?: int32(name='maximumRetryAttempts') + }(name='retryStrategy'), + deadLetterQueue?: { + type?: string(name='type'), + config?: map[string]any (name='config') + }(name='deadLetterQueue') + }(name='runOptions') +} + +model CreateEventTargetsRequest { + eventBusName?: string(name='eventBusName', description='The name of the event bus with which the event target is associated.\nThis parameter is required.', example='my-event-bus'), + eventRuleName?: string(name='eventRuleName', description='The name of the event rule.\nThis parameter is required.', example='myrabbitmq.sourc'), + eventTargets?: [ EventTarget ](name='eventTargets') +} + +model CreateEventTargetsResponseBody = { + code?: string(name='code', description='The returned response code. Valid values:\n + * Success: The request is successful.\n + * Other codes: The request failed. For more information about error codes, see Error codes.', example='Success'), + message?: string(name='message', description='The returned error message.', example='Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\\\r\\\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]'), + requestId?: string(name='requestId', description='The request ID.', example='2922208e-e1c6-43ee-bfd1-aca50263bc8a'), +} + +model CreateEventTargetsResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: CreateEventTargetsResponseBody(name='body'), +} + +/** + * @summary Creates event targets. + * + * @description You can call this operation to create event targets. + * + * @param request CreateEventTargetsRequest + * @param runtime runtime options for this request RuntimeOptions + * @return CreateEventTargetsResponse + */ +async function createEventTargetsWithOptions(request: CreateEventTargetsRequest, runtime: Util.RuntimeOptions): CreateEventTargetsResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.eventRuleName)) { + body['eventRuleName'] = request.eventRuleName; + } + if (!Util.isUnset(request.eventTargets)) { + body['eventTargets'] = request.eventTargets; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'CreateEventTargets', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/target/createEventTargets', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Creates event targets. + * + * @description You can call this operation to create event targets. + * + * @param request CreateEventTargetsRequest + * @return CreateEventTargetsResponse + */ +async function createEventTargets(request: CreateEventTargetsRequest): CreateEventTargetsResponse { + var runtime = new Util.RuntimeOptions{}; + return createEventTargetsWithOptions(request, runtime); +} + +model UpdateEventTargetsRequest { + eventBusName?: string(name='eventBusName', description='The name of the event bus with which the event target is associated.\nThis parameter is required.', example='my-event-bus'), + eventRuleName?: string(name='eventRuleName', description='The name of the event rule.\nThis parameter is required.', example='myrabbitmq.sourc'), + eventTargets?: [ EventTarget ](name='eventTargets') +} + +model UpdateEventTargetsResponseBody = { + code?: string(name='code', description='The returned response code. Valid values:\n + * Success: The request is successful.\n + * Other codes: The request failed. For more information about error codes, see Error codes.', example='Success'), + message?: string(name='message', description='The returned error message.', example='Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\\\r\\\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]'), + requestId?: string(name='requestId', description='The request ID.', example='2922208e-e1c6-43ee-bfd1-aca50263bc8a'), +} + +model UpdateEventTargetsResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: UpdateEventTargetsResponseBody(name='body'), +} + +/** + * @summary Updates event targets. + * + * @description You can call this operation to update event targets. + * + * @param request UpdateEventTargetsRequest + * @param runtime runtime options for this request RuntimeOptions + * @return UpdateEventTargetsResponse + */ +async function updateEventTargetsWithOptions(request: UpdateEventTargetsRequest, runtime: Util.RuntimeOptions): UpdateEventTargetsResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.eventRuleName)) { + body['eventRuleName'] = request.eventRuleName; + } + if (!Util.isUnset(request.eventTargets)) { + body['eventTargets'] = request.eventTargets; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'UpdateEventTargets', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/target/updateEventTargets', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Updates event targets. + * + * @description You can call this operation to update event targets. + * + * @param request UpdateEventTargetsRequest + * @return UpdateEventTargetsResponse + */ +async function updateEventTargets(request: UpdateEventTargetsRequest): UpdateEventTargetsResponse { + var runtime = new Util.RuntimeOptions{}; + return updateEventTargetsWithOptions(request, runtime); +} + +model DeleteEventTargetsRequest { + eventBusName: string(name='eventBusName', description='The name of the event bus.', example='MyEventBus'), + eventRuleName: string(name='eventRuleName', description='The name of the event rule.', example='ramrolechange-mns'), + eventTargetNames?: [ string ](name='eventTargetNames', description='The names of the event targets that you want to delete.'), +} + +model DeleteEventTargetsResponseBody = { + code?: string(name='code', description='The returned response code. Valid values:\n + * Success: The request is successful.\n + * Other codes: The request failed. For more information about error codes, see Error codes.', example='Success'), + message?: string(name='message', description='The returned error message.', example='Remote error. requestId: [A8EFABD2-95B9-1C46-9E01-xxxx], error code: [CreateRelatedResourceFailed], message: [Create related resource failed, EntityNotExist.Role : The role not exists: xxxx. \\\\r\\\\nRequestId : xxxx-168C-54ED-8FEB-BF11CB70AEB7]'), + requestId?: string(name='requestId', description='The request ID.', example='2922208e-e1c6-43ee-bfd1-aca50263bc8a'), +} + +model DeleteEventTargetsResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: DeleteEventTargetsResponseBody(name='body'), +} + +/** + * @summary Deletes event targets. + * + * @description You can call this operation to delete event targets. + * + * @param request DeleteEventTargetsRequest + * @param runtime runtime options for this request RuntimeOptions + * @return DeleteEventTargetsResponse + */ +async function deleteEventTargetsWithOptions(request: DeleteEventTargetsRequest, runtime: Util.RuntimeOptions): DeleteEventTargetsResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.eventRuleName)) { + body['eventRuleName'] = request.eventRuleName; + } + if (!Util.isUnset(request.eventTargetNames)) { + body['eventTargetNames'] = request.eventTargetNames; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'DeleteEventTargets', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/target/deleteEventTargets', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Deletes event targets. + * + * @description You can call this operation to delete event targets. + * + * @param request DeleteEventTargetsRequest + * @return DeleteEventTargetsResponse + */ +async function deleteEventTargets(request: DeleteEventTargetsRequest): DeleteEventTargetsResponse { + var runtime = new Util.RuntimeOptions{}; + return deleteEventTargetsWithOptions(request, runtime); +} + +model ListEventTargetsRequest { + eventBusName?: string(name='eventBusName', description='The name of the event bus with which the event target is associated.\nThis parameter is required.', example='my-event-bus'), + eventRuleName?: string(name='eventRuleName', description='The name of the event rule.\nThis parameter is required.', example='myrabbitmq.sourc'), +} + +model ListEventTargetsResponseBody { + eventBusName?: string(name='eventBusName', description='The name of the event bus with which the event target is associated.\nThis parameter is required.', example='my-event-bus'), + eventRuleName?: string(name='eventRuleName', description='The name of the event rule.\nThis parameter is required.', example='myrabbitmq.sourc'), + eventTargets?: [ + { + eventTargetName?: string(name='eventTargetName'), + className?: string(name='className'), + config?: map[string]any (name='config'), + runOptions?: { + errorsTolerance?: string(name='errorsTolerance'), + retryStrategy?: { + pushRetryStrategy?: string(name='pushRetryStrategy'), + maximumEventAgeInSeconds?: int32(name='maximumEventAgeInSeconds'), + maximumRetryAttempts?: int32(name='maximumRetryAttempts') + }(name='retryStrategy'), + deadLetterQueue?: { + type?: string(name='type'), + config?: map[string]any (name='config') + }(name='deadLetterQueue') + }(name='runOptions') + } + ](name='eventTargets') +} + +model ListEventTargetsResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: ListEventTargetsResponseBody(name='body'), +} + +/** + * @summary Lists event targets. + * + * @description You can call this operation to list event targets. + * + * @param request ListEventTargetsRequest + * @param runtime runtime options for this request RuntimeOptions + * @return ListEventTargetsResponse + */ +async function listEventTargetsWithOptions(request: ListEventTargetsRequest, runtime: Util.RuntimeOptions): ListEventTargetsResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.eventRuleName)) { + body['eventRuleName'] = request.eventRuleName; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body), + }; + var params = new OpenApi.Params{ + action = 'ListEventTargets', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/target/listEventTargets', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Lists event targets. + * + * @description You can call this operation to list event targets. + * + * @param request ListEventTargetsRequest + * @return ListEventTargetsResponse + */ +async function listEventTargets(request: ListEventTargetsRequest): ListEventTargetsResponse { + var runtime = new Util.RuntimeOptions{}; + return listEventTargetsWithOptions(request, runtime); +} + + +/** + EventType Controller apis: + * listEventTypes * +*/ + +model ListEventTypesRequest { + eventBusName?: string(name='eventBusName', description='The name of the event bus.\nThis parameter is required.', example='demo'), + eventSourceName?: string(name='eventSourceName', description='EventSource is required for querying default bus events.', example='testEventSourceName'), + maxResults?: int32(name='maxResults', description='The number of entries returned per page.', example='10'), + nextToken?: string(name='nextToken', description='If excess return values exist, this parameter is returned.', example='0'), +} + +model ListEventTypesResponseBody = { + eventTypes?: [ + { + eventBusName?: string(name='eventBusName', description='The name of the event bus.\nThis parameter is required.', example='demo'), + eventSourceName?: string(name='eventSourceName', description='EventSource is required for querying default bus events.', example='testEventSourceName'), + eventTypeName?: string(name='eventTypeName', description='The name of the event type.'), + description?: string(name='description', description='The description of the event type.', example='The description of the event type.'), + gmtCreate?: string(name='gmtCreate'), + gmtModify?: string(name='gmtModify') + } + ](name='eventTypes'), + nextToken?: string(name='nextToken', description='If excess return values exist, this parameter is returned.', example='10'), + total?: integer(name='total', description='The total number of entries.', example='2'), + maxResults?: int32(name="maxResults", description='If you set Limit and excess return values exist, this parameter is returned.', example='10'), + code?: string(name='code', description='The status code returned. The status code 200 indicates that the request was successful.', example='200'), + message?: string(name='message', description='The error message that is returned if the request failed.', example='EventBusNotExist'), + requestId?: string(name='requestId', description='The request ID.', example='580A938B-6107-586C-8EC7-F22EEBEDA9E6'), +} + +model ListEventTypesResponse = { + headers?: map[string]string(name='headers'), + statusCode?: int32(name='statusCode'), + body?: ListEventTypesResponseBody(name='body'), +} + +/** + * @summary Queries all event buses. + * + * @description You can call this API operation to query all event buses. + * + * @param request ListEventTypesRequest + * @param runtime runtime options for this request RuntimeOptions + * @return ListEventTypesResponse + */ +async function listEventTypesWithOptions(request: ListEventTypesRequest, runtime: Util.RuntimeOptions): ListEventTypesResponse { + Util.validateModel(request); + var body : map[string]any = {}; + if (!Util.isUnset(request.eventBusName)) { + body['eventBusName'] = request.eventBusName; + } + if (!Util.isUnset(request.eventSourceName)) { + body['eventSourceName'] = request.eventSourceName; + } + if (!Util.isUnset(request.maxResults)) { + body['maxResults'] = request.maxResults; + } + if (!Util.isUnset(request.nextToken)) { + body['nextToken'] = request.nextToken; + } + var req = new OpenApi.OpenApiRequest{ + body = Util.toJSONString(body) + }; + + var params = new OpenApi.Params{ + action = 'listEventTypes', + version = '2024-07-01', + protocol = 'HTTP', + pathname = '/type/listEventTypes', + method = 'POST', + authType = 'Anonymous', + style = 'RPC', + reqBodyType = 'json', + bodyType = 'json', + }; + return callApi(params, req, runtime); +} + +/** + * @summary Queries all event buses. + * + * @description You can call this API operation to query all event buses. + * + * @param request ListEventTypesRequest + * @return ListEventTypesResponse + */ +async function listEventTypes(request: ListEventTypesRequest): ListEventTypesResponse { + var runtime = new Util.RuntimeOptions{}; + return listEventTypesWithOptions(request, runtime); +} \ No newline at end of file