| # -*- 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 |
|