diff --git a/CHANGELOG.md b/CHANGELOG.md index e4c0c0f09f..782cc0bf6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,29 @@ +# 3.0.11-beta 2020-09-09 +## HuaweiCloud SDK DMS + - ### Features + - Support Distributed Message Services, provide Kafka premium instances and RabbitMQ premium instances with dedicated resources. + - ### Bug Fix + - None + - ### Change + - None + +## HuaweiCloud SDK Meeting + - ### Features + - Support more APIs: Meeting Control / Meeting Management. + - ### Bug Fix + - None + - ### Change + - None + +## HuaweiCloud SDK VPC + - ### Features + - None + - ### Bug Fix + - Fix the problem that security group related interfaces have wrong data type. + - ### Change + - None + + # 3.0.10-beta 2020-09-04 ## HuaweiCloud SDK Core - ### Features diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index 892ab156ec..2e73bc7d16 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,29 @@ +# 3.0.11-beta 2020-09-09 +## HuaweiCloud SDK DMS + - ### 新增特性 + - 支持分布式消息服务,提供Kafka专享版和RabbitMQ专享版 + - ### 解决问题 + - 无 + - ### 特性变更 + - 无 + +## HuaweiCloud SDK Meeting + - ### 新增特性 + - 新增支持接口:会议控制/会议管理 + - ### 解决问题 + - 无 + - ### 特性变更 + - 无 + +## HuaweiCloud SDK VPC + - ### 新增特性 + - 无 + - ### 解决问题 + - 修复安全组相关接口类型错误的问题 + - ### 特性变更 + - 无 + + # 3.0.10-beta 2020-09-04 ## HuaweiCloud SDK Core - ### 新增特性 diff --git a/examples/setup.py b/examples/setup.py index eac33cc555..a761468510 100644 --- a/examples/setup.py +++ b/examples/setup.py @@ -21,7 +21,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkexample" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-apig/setup.py b/huaweicloud-sdk-apig/setup.py index 94e62d9e0a..d71f27d34a 100644 --- a/huaweicloud-sdk-apig/setup.py +++ b/huaweicloud-sdk-apig/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkapig" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-as/setup.py b/huaweicloud-sdk-as/setup.py index 100ec80a51..8678f6548e 100644 --- a/huaweicloud-sdk-as/setup.py +++ b/huaweicloud-sdk-as/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkas" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-bss/setup.py b/huaweicloud-sdk-bss/setup.py index b0194a3eba..0d65e81703 100644 --- a/huaweicloud-sdk-bss/setup.py +++ b/huaweicloud-sdk-bss/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkbss" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-bssintl/setup.py b/huaweicloud-sdk-bssintl/setup.py index fa44dd398c..301cad606e 100644 --- a/huaweicloud-sdk-bssintl/setup.py +++ b/huaweicloud-sdk-bssintl/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkbssintl" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/__init__.py b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/__init__.py index ca8fb2a3fa..310f3a715a 100644 --- a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/__init__.py +++ b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/__init__.py @@ -31,6 +31,7 @@ from huaweicloudsdkcbr.v1.model.billing_update import BillingUpdate from huaweicloudsdkcbr.v1.model.checkpoint_create import CheckpointCreate from huaweicloudsdkcbr.v1.model.checkpoint_create_skipped_resource import CheckpointCreateSkippedResource +from huaweicloudsdkcbr.v1.model.checkpoint_extra_info_resp import CheckpointExtraInfoResp from huaweicloudsdkcbr.v1.model.checkpoint_param import CheckpointParam from huaweicloudsdkcbr.v1.model.checkpoint_plan_create import CheckpointPlanCreate from huaweicloudsdkcbr.v1.model.checkpoint_replicate_param import CheckpointReplicateParam diff --git a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/__init__.py b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/__init__.py index cc6b8b35c2..39b1decb02 100644 --- a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/__init__.py +++ b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/__init__.py @@ -28,6 +28,7 @@ from huaweicloudsdkcbr.v1.model.billing_update import BillingUpdate from huaweicloudsdkcbr.v1.model.checkpoint_create import CheckpointCreate from huaweicloudsdkcbr.v1.model.checkpoint_create_skipped_resource import CheckpointCreateSkippedResource +from huaweicloudsdkcbr.v1.model.checkpoint_extra_info_resp import CheckpointExtraInfoResp from huaweicloudsdkcbr.v1.model.checkpoint_param import CheckpointParam from huaweicloudsdkcbr.v1.model.checkpoint_plan_create import CheckpointPlanCreate from huaweicloudsdkcbr.v1.model.checkpoint_replicate_param import CheckpointReplicateParam diff --git a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/checkpoint_create.py b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/checkpoint_create.py index 95d789eafb..72a1dbff4f 100644 --- a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/checkpoint_create.py +++ b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/checkpoint_create.py @@ -28,7 +28,7 @@ class CheckpointCreate: 'project_id': 'str', 'status': 'str', 'vault': 'CheckpointPlanCreate', - 'extra_info': 'BackupExtendInfo' + 'extra_info': 'CheckpointExtraInfoResp' } attribute_map = { @@ -176,7 +176,7 @@ def extra_info(self): :return: The extra_info of this CheckpointCreate. - :rtype: BackupExtendInfo + :rtype: CheckpointExtraInfoResp """ return self._extra_info @@ -186,7 +186,7 @@ def extra_info(self, extra_info): :param extra_info: The extra_info of this CheckpointCreate. - :type: BackupExtendInfo + :type: CheckpointExtraInfoResp """ self._extra_info = extra_info diff --git a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/checkpoint_extra_info_resp.py b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/checkpoint_extra_info_resp.py new file mode 100644 index 0000000000..175029c66e --- /dev/null +++ b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/checkpoint_extra_info_resp.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CheckpointExtraInfoResp: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'description': 'str', + 'retention_duration': 'int' + } + + attribute_map = { + 'name': 'name', + 'description': 'description', + 'retention_duration': 'retention_duration' + } + + def __init__(self, name=None, description=None, retention_duration=None): + """CheckpointExtraInfoResp - a model defined in huaweicloud sdk""" + + + + self._name = None + self._description = None + self._retention_duration = None + self.discriminator = None + + if name is not None: + self.name = name + if description is not None: + self.description = description + if retention_duration is not None: + self.retention_duration = retention_duration + + @property + def name(self): + """Gets the name of this CheckpointExtraInfoResp. + + 备份名称 + + :return: The name of this CheckpointExtraInfoResp. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CheckpointExtraInfoResp. + + 备份名称 + + :param name: The name of this CheckpointExtraInfoResp. + :type: str + """ + self._name = name + + @property + def description(self): + """Gets the description of this CheckpointExtraInfoResp. + + 备份描述 + + :return: The description of this CheckpointExtraInfoResp. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CheckpointExtraInfoResp. + + 备份描述 + + :param description: The description of this CheckpointExtraInfoResp. + :type: str + """ + self._description = description + + @property + def retention_duration(self): + """Gets the retention_duration of this CheckpointExtraInfoResp. + + 备份保留天数 + + :return: The retention_duration of this CheckpointExtraInfoResp. + :rtype: int + """ + return self._retention_duration + + @retention_duration.setter + def retention_duration(self, retention_duration): + """Sets the retention_duration of this CheckpointExtraInfoResp. + + 备份保留天数 + + :param retention_duration: The retention_duration of this CheckpointExtraInfoResp. + :type: int + """ + self._retention_duration = retention_duration + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CheckpointExtraInfoResp): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/checkpoint_plan_create.py b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/checkpoint_plan_create.py index 64510458ce..5d4cbf9118 100644 --- a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/checkpoint_plan_create.py +++ b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/checkpoint_plan_create.py @@ -25,7 +25,7 @@ class CheckpointPlanCreate: openapi_types = { 'id': 'str', 'name': 'str', - 'resources': 'list[Resource]', + 'resources': 'list[ResourceResp]', 'skipped_resources': 'list[CheckpointCreateSkippedResource]' } @@ -105,7 +105,7 @@ def resources(self): 备份对象 :return: The resources of this CheckpointPlanCreate. - :rtype: list[Resource] + :rtype: list[ResourceResp] """ return self._resources @@ -116,7 +116,7 @@ def resources(self, resources): 备份对象 :param resources: The resources of this CheckpointPlanCreate. - :type: list[Resource] + :type: list[ResourceResp] """ self._resources = resources diff --git a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/update_vault_response.py b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/update_vault_response.py index d93eb20380..5e6cb87863 100644 --- a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/update_vault_response.py +++ b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/update_vault_response.py @@ -33,7 +33,8 @@ class UpdateVaultResponse(SdkResponse): 'tags': 'list[TagsResp]', 'enterprise_project_id': 'str', 'auto_bind': 'bool', - 'bind_rules': 'object', + 'bind_rules': 'VaultBindRules', + 'auto_expand': 'bool', 'user_id': 'str', 'created_at': 'str', 'updated_at': 'str', @@ -52,13 +53,14 @@ class UpdateVaultResponse(SdkResponse): 'enterprise_project_id': 'enterprise_project_id', 'auto_bind': 'auto_bind', 'bind_rules': 'bind_rules', + 'auto_expand': 'auto_expand', 'user_id': 'user_id', 'created_at': 'created_at', 'updated_at': 'updated_at', 'version': 'version' } - def __init__(self, billing=None, description=None, id=None, name=None, project_id=None, provider_id=None, resources=None, tags=None, enterprise_project_id=None, auto_bind=None, bind_rules=None, user_id=None, created_at=None, updated_at=None, version=None): + def __init__(self, billing=None, description=None, id=None, name=None, project_id=None, provider_id=None, resources=None, tags=None, enterprise_project_id=None, auto_bind=None, bind_rules=None, auto_expand=None, user_id=None, created_at=None, updated_at=None, version=None): """UpdateVaultResponse - a model defined in huaweicloud sdk""" super().__init__() @@ -74,6 +76,7 @@ def __init__(self, billing=None, description=None, id=None, name=None, project_i self._enterprise_project_id = None self._auto_bind = None self._bind_rules = None + self._auto_expand = None self._user_id = None self._created_at = None self._updated_at = None @@ -96,6 +99,8 @@ def __init__(self, billing=None, description=None, id=None, name=None, project_i self.auto_bind = auto_bind if bind_rules is not None: self.bind_rules = bind_rules + if auto_expand is not None: + self.auto_expand = auto_expand if user_id is not None: self.user_id = user_id self.created_at = created_at @@ -325,10 +330,9 @@ def auto_bind(self, auto_bind): def bind_rules(self): """Gets the bind_rules of this UpdateVaultResponse. - 绑定规则 :return: The bind_rules of this UpdateVaultResponse. - :rtype: object + :rtype: VaultBindRules """ return self._bind_rules @@ -336,13 +340,34 @@ def bind_rules(self): def bind_rules(self, bind_rules): """Sets the bind_rules of this UpdateVaultResponse. - 绑定规则 :param bind_rules: The bind_rules of this UpdateVaultResponse. - :type: object + :type: VaultBindRules """ self._bind_rules = bind_rules + @property + def auto_expand(self): + """Gets the auto_expand of this UpdateVaultResponse. + + 是否开启存储库自动扩容能力(只支持按需存储库)。 + + :return: The auto_expand of this UpdateVaultResponse. + :rtype: bool + """ + return self._auto_expand + + @auto_expand.setter + def auto_expand(self, auto_expand): + """Sets the auto_expand of this UpdateVaultResponse. + + 是否开启存储库自动扩容能力(只支持按需存储库)。 + + :param auto_expand: The auto_expand of this UpdateVaultResponse. + :type: bool + """ + self._auto_expand = auto_expand + @property def user_id(self): """Gets the user_id of this UpdateVaultResponse. diff --git a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault.py b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault.py index 4ba026ee8c..1a23345b27 100644 --- a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault.py +++ b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault.py @@ -33,7 +33,8 @@ class Vault: 'tags': 'list[Tag]', 'enterprise_project_id': 'str', 'auto_bind': 'bool', - 'bind_rules': 'object', + 'bind_rules': 'VaultBindRules', + 'auto_expand': 'bool', 'user_id': 'str', 'created_at': 'str' } @@ -50,11 +51,12 @@ class Vault: 'enterprise_project_id': 'enterprise_project_id', 'auto_bind': 'auto_bind', 'bind_rules': 'bind_rules', + 'auto_expand': 'auto_expand', 'user_id': 'user_id', 'created_at': 'created_at' } - def __init__(self, billing=None, description=None, id=None, name=None, project_id=None, provider_id=None, resources=None, tags=None, enterprise_project_id=None, auto_bind=None, bind_rules=None, user_id=None, created_at=None): + def __init__(self, billing=None, description=None, id=None, name=None, project_id=None, provider_id=None, resources=None, tags=None, enterprise_project_id=None, auto_bind=None, bind_rules=None, auto_expand=None, user_id=None, created_at=None): """Vault - a model defined in huaweicloud sdk""" @@ -70,6 +72,7 @@ def __init__(self, billing=None, description=None, id=None, name=None, project_i self._enterprise_project_id = None self._auto_bind = None self._bind_rules = None + self._auto_expand = None self._user_id = None self._created_at = None self.discriminator = None @@ -90,6 +93,8 @@ def __init__(self, billing=None, description=None, id=None, name=None, project_i self.auto_bind = auto_bind if bind_rules is not None: self.bind_rules = bind_rules + if auto_expand is not None: + self.auto_expand = auto_expand if user_id is not None: self.user_id = user_id if created_at is not None: @@ -317,10 +322,9 @@ def auto_bind(self, auto_bind): def bind_rules(self): """Gets the bind_rules of this Vault. - 绑定规则 :return: The bind_rules of this Vault. - :rtype: object + :rtype: VaultBindRules """ return self._bind_rules @@ -328,13 +332,34 @@ def bind_rules(self): def bind_rules(self, bind_rules): """Sets the bind_rules of this Vault. - 绑定规则 :param bind_rules: The bind_rules of this Vault. - :type: object + :type: VaultBindRules """ self._bind_rules = bind_rules + @property + def auto_expand(self): + """Gets the auto_expand of this Vault. + + 是否开启存储库自动扩容能力(只支持按需存储库)。 + + :return: The auto_expand of this Vault. + :rtype: bool + """ + return self._auto_expand + + @auto_expand.setter + def auto_expand(self, auto_expand): + """Sets the auto_expand of this Vault. + + 是否开启存储库自动扩容能力(只支持按需存储库)。 + + :param auto_expand: The auto_expand of this Vault. + :type: bool + """ + self._auto_expand = auto_expand + @property def user_id(self): """Gets the user_id of this Vault. diff --git a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault_bind_rules.py b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault_bind_rules.py index b5832ca9a6..a196f46c93 100644 --- a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault_bind_rules.py +++ b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault_bind_rules.py @@ -23,71 +23,45 @@ class VaultBindRules: sensitive_list = [] openapi_types = { - 'key': 'str', - 'value': 'str' + 'tags': 'list[Tag]' } attribute_map = { - 'key': 'key', - 'value': 'value' + 'tags': 'tags' } - def __init__(self, key=None, value=None): + def __init__(self, tags=None): """VaultBindRules - a model defined in huaweicloud sdk""" - self._key = None - self._value = None + self._tags = None self.discriminator = None - self.key = key - if value is not None: - self.value = value + if tags is not None: + self.tags = tags @property - def key(self): - """Gets the key of this VaultBindRules. + def tags(self): + """Gets the tags of this VaultBindRules. - 字段key + 按tags过滤自动绑定的资源 - :return: The key of this VaultBindRules. - :rtype: str + :return: The tags of this VaultBindRules. + :rtype: list[Tag] """ - return self._key + return self._tags - @key.setter - def key(self, key): - """Sets the key of this VaultBindRules. + @tags.setter + def tags(self, tags): + """Sets the tags of this VaultBindRules. - 字段key + 按tags过滤自动绑定的资源 - :param key: The key of this VaultBindRules. - :type: str + :param tags: The tags of this VaultBindRules. + :type: list[Tag] """ - self._key = key - - @property - def value(self): - """Gets the value of this VaultBindRules. - - 字段的值 - - :return: The value of this VaultBindRules. - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this VaultBindRules. - - 字段的值 - - :param value: The value of this VaultBindRules. - :type: str - """ - self._value = value + self._tags = tags def to_dict(self): """Returns the model properties as a dict""" diff --git a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault_create.py b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault_create.py index 14334c4a10..987ad876ea 100644 --- a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault_create.py +++ b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault_create.py @@ -31,7 +31,8 @@ class VaultCreate: 'tags': 'list[Tag]', 'enterprise_project_id': 'str', 'auto_bind': 'bool', - 'bind_rules': 'object' + 'bind_rules': 'VaultBindRules', + 'auto_expand': 'bool' } attribute_map = { @@ -43,10 +44,11 @@ class VaultCreate: 'tags': 'tags', 'enterprise_project_id': 'enterprise_project_id', 'auto_bind': 'auto_bind', - 'bind_rules': 'bind_rules' + 'bind_rules': 'bind_rules', + 'auto_expand': 'auto_expand' } - def __init__(self, backup_policy_id=None, billing=None, description=None, name=None, resources=None, tags=None, enterprise_project_id=None, auto_bind=None, bind_rules=None): + def __init__(self, backup_policy_id=None, billing=None, description=None, name=None, resources=None, tags=None, enterprise_project_id=None, auto_bind=None, bind_rules=None, auto_expand=None): """VaultCreate - a model defined in huaweicloud sdk""" @@ -60,6 +62,7 @@ def __init__(self, backup_policy_id=None, billing=None, description=None, name=N self._enterprise_project_id = None self._auto_bind = None self._bind_rules = None + self._auto_expand = None self.discriminator = None if backup_policy_id is not None: @@ -77,6 +80,8 @@ def __init__(self, backup_policy_id=None, billing=None, description=None, name=N self.auto_bind = auto_bind if bind_rules is not None: self.bind_rules = bind_rules + if auto_expand is not None: + self.auto_expand = auto_expand @property def backup_policy_id(self): @@ -256,10 +261,9 @@ def auto_bind(self, auto_bind): def bind_rules(self): """Gets the bind_rules of this VaultCreate. - :return: The bind_rules of this VaultCreate. - :rtype: object + :rtype: VaultBindRules """ return self._bind_rules @@ -267,13 +271,34 @@ def bind_rules(self): def bind_rules(self, bind_rules): """Sets the bind_rules of this VaultCreate. - :param bind_rules: The bind_rules of this VaultCreate. - :type: object + :type: VaultBindRules """ self._bind_rules = bind_rules + @property + def auto_expand(self): + """Gets the auto_expand of this VaultCreate. + + 是否自动扩容。按需存储库支持自动扩容,包周期存储库不支持扩容。 + + :return: The auto_expand of this VaultCreate. + :rtype: bool + """ + return self._auto_expand + + @auto_expand.setter + def auto_expand(self, auto_expand): + """Sets the auto_expand of this VaultCreate. + + 是否自动扩容。按需存储库支持自动扩容,包周期存储库不支持扩容。 + + :param auto_expand: The auto_expand of this VaultCreate. + :type: bool + """ + self._auto_expand = auto_expand + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault_get.py b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault_get.py index 524d0c336a..09dac02cb5 100644 --- a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault_get.py +++ b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault_get.py @@ -33,7 +33,8 @@ class VaultGet: 'tags': 'list[TagsResp]', 'enterprise_project_id': 'str', 'auto_bind': 'bool', - 'bind_rules': 'object', + 'bind_rules': 'VaultBindRules', + 'auto_expand': 'bool', 'user_id': 'str', 'created_at': 'str', 'updated_at': 'str', @@ -52,13 +53,14 @@ class VaultGet: 'enterprise_project_id': 'enterprise_project_id', 'auto_bind': 'auto_bind', 'bind_rules': 'bind_rules', + 'auto_expand': 'auto_expand', 'user_id': 'user_id', 'created_at': 'created_at', 'updated_at': 'updated_at', 'version': 'version' } - def __init__(self, billing=None, description=None, id=None, name=None, project_id=None, provider_id=None, resources=None, tags=None, enterprise_project_id=None, auto_bind=None, bind_rules=None, user_id=None, created_at=None, updated_at=None, version=None): + def __init__(self, billing=None, description=None, id=None, name=None, project_id=None, provider_id=None, resources=None, tags=None, enterprise_project_id=None, auto_bind=None, bind_rules=None, auto_expand=None, user_id=None, created_at=None, updated_at=None, version=None): """VaultGet - a model defined in huaweicloud sdk""" @@ -74,6 +76,7 @@ def __init__(self, billing=None, description=None, id=None, name=None, project_i self._enterprise_project_id = None self._auto_bind = None self._bind_rules = None + self._auto_expand = None self._user_id = None self._created_at = None self._updated_at = None @@ -96,6 +99,8 @@ def __init__(self, billing=None, description=None, id=None, name=None, project_i self.auto_bind = auto_bind if bind_rules is not None: self.bind_rules = bind_rules + if auto_expand is not None: + self.auto_expand = auto_expand if user_id is not None: self.user_id = user_id self.created_at = created_at @@ -325,10 +330,9 @@ def auto_bind(self, auto_bind): def bind_rules(self): """Gets the bind_rules of this VaultGet. - 绑定规则 :return: The bind_rules of this VaultGet. - :rtype: object + :rtype: VaultBindRules """ return self._bind_rules @@ -336,13 +340,34 @@ def bind_rules(self): def bind_rules(self, bind_rules): """Sets the bind_rules of this VaultGet. - 绑定规则 :param bind_rules: The bind_rules of this VaultGet. - :type: object + :type: VaultBindRules """ self._bind_rules = bind_rules + @property + def auto_expand(self): + """Gets the auto_expand of this VaultGet. + + 是否开启存储库自动扩容能力(只支持按需存储库)。 + + :return: The auto_expand of this VaultGet. + :rtype: bool + """ + return self._auto_expand + + @auto_expand.setter + def auto_expand(self, auto_expand): + """Sets the auto_expand of this VaultGet. + + 是否开启存储库自动扩容能力(只支持按需存储库)。 + + :param auto_expand: The auto_expand of this VaultGet. + :type: bool + """ + self._auto_expand = auto_expand + @property def user_id(self): """Gets the user_id of this VaultGet. diff --git a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault_update.py b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault_update.py index 92015c663d..94f0f89b21 100644 --- a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault_update.py +++ b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/model/vault_update.py @@ -26,17 +26,19 @@ class VaultUpdate: 'billing': 'BillingUpdate', 'name': 'str', 'auto_bind': 'bool', - 'bind_rules': 'list[VaultBindRules]' + 'bind_rules': 'VaultBindRules', + 'auto_expand': 'bool' } attribute_map = { 'billing': 'billing', 'name': 'name', 'auto_bind': 'auto_bind', - 'bind_rules': 'bind_rules' + 'bind_rules': 'bind_rules', + 'auto_expand': 'auto_expand' } - def __init__(self, billing=None, name=None, auto_bind=None, bind_rules=None): + def __init__(self, billing=None, name=None, auto_bind=None, bind_rules=None, auto_expand=None): """VaultUpdate - a model defined in huaweicloud sdk""" @@ -45,6 +47,7 @@ def __init__(self, billing=None, name=None, auto_bind=None, bind_rules=None): self._name = None self._auto_bind = None self._bind_rules = None + self._auto_expand = None self.discriminator = None if billing is not None: @@ -55,6 +58,8 @@ def __init__(self, billing=None, name=None, auto_bind=None, bind_rules=None): self.auto_bind = auto_bind if bind_rules is not None: self.bind_rules = bind_rules + if auto_expand is not None: + self.auto_expand = auto_expand @property def billing(self): @@ -124,10 +129,9 @@ def auto_bind(self, auto_bind): def bind_rules(self): """Gets the bind_rules of this VaultUpdate. - :return: The bind_rules of this VaultUpdate. - :rtype: list[VaultBindRules] + :rtype: VaultBindRules """ return self._bind_rules @@ -135,13 +139,34 @@ def bind_rules(self): def bind_rules(self, bind_rules): """Sets the bind_rules of this VaultUpdate. - :param bind_rules: The bind_rules of this VaultUpdate. - :type: list[VaultBindRules] + :type: VaultBindRules """ self._bind_rules = bind_rules + @property + def auto_expand(self): + """Gets the auto_expand of this VaultUpdate. + + 是否自动扩容。按需存储库支持自动扩容,包周期存储库不支持扩容。 + + :return: The auto_expand of this VaultUpdate. + :rtype: bool + """ + return self._auto_expand + + @auto_expand.setter + def auto_expand(self, auto_expand): + """Sets the auto_expand of this VaultUpdate. + + 是否自动扩容。按需存储库支持自动扩容,包周期存储库不支持扩容。 + + :param auto_expand: The auto_expand of this VaultUpdate. + :type: bool + """ + self._auto_expand = auto_expand + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/huaweicloud-sdk-cbr/setup.py b/huaweicloud-sdk-cbr/setup.py index 2c694260a8..1ee2b1f268 100644 --- a/huaweicloud-sdk-cbr/setup.py +++ b/huaweicloud-sdk-cbr/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkcbr" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-ces/setup.py b/huaweicloud-sdk-ces/setup.py index eecc5dc219..94406dee5f 100644 --- a/huaweicloud-sdk-ces/setup.py +++ b/huaweicloud-sdk-ces/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkces" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-classroom/setup.py b/huaweicloud-sdk-classroom/setup.py index 7a9ec428e7..c00744200a 100644 --- a/huaweicloud-sdk-classroom/setup.py +++ b/huaweicloud-sdk-classroom/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkclassroom" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-cloudide/setup.py b/huaweicloud-sdk-cloudide/setup.py index b27113b156..b33289f6ae 100644 --- a/huaweicloud-sdk-cloudide/setup.py +++ b/huaweicloud-sdk-cloudide/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkcloudide" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-cloudpipeline/setup.py b/huaweicloud-sdk-cloudpipeline/setup.py index 5df0543356..cd3826901c 100644 --- a/huaweicloud-sdk-cloudpipeline/setup.py +++ b/huaweicloud-sdk-cloudpipeline/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkcloudpipeline" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-core/setup.py b/huaweicloud-sdk-core/setup.py index 9ffc0fbc92..164c6ea022 100644 --- a/huaweicloud-sdk-core/setup.py +++ b/huaweicloud-sdk-core/setup.py @@ -22,7 +22,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkcore" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-cts/setup.py b/huaweicloud-sdk-cts/setup.py index 6e160c524d..f66f85965d 100644 --- a/huaweicloud-sdk-cts/setup.py +++ b/huaweicloud-sdk-cts/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkcts" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-dcs/setup.py b/huaweicloud-sdk-dcs/setup.py index ed71a7fe1e..f9cca467a1 100644 --- a/huaweicloud-sdk-dcs/setup.py +++ b/huaweicloud-sdk-dcs/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkdcs" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-dds/setup.py b/huaweicloud-sdk-dds/setup.py index cb06775f53..878ae70d7c 100644 --- a/huaweicloud-sdk-dds/setup.py +++ b/huaweicloud-sdk-dds/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkdds" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-devstar/setup.py b/huaweicloud-sdk-devstar/setup.py index 58c5f5bd7c..cfa38f2148 100644 --- a/huaweicloud-sdk-devstar/setup.py +++ b/huaweicloud-sdk-devstar/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkdevstar" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-dms/LICENSE b/huaweicloud-sdk-dms/LICENSE new file mode 100644 index 0000000000..808e3296c0 --- /dev/null +++ b/huaweicloud-sdk-dms/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) Huawei Technologies Co., Ltd. 2020-present. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/huaweicloud-sdk-dms/README_PYPI.md b/huaweicloud-sdk-dms/README_PYPI.md new file mode 100644 index 0000000000..9711543c73 --- /dev/null +++ b/huaweicloud-sdk-dms/README_PYPI.md @@ -0,0 +1 @@ +See detailed information in [huaweicloud-sdk-python-v3](https://github.com/huaweicloud/huaweicloud-sdk-python-v3). \ No newline at end of file diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/__init__.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/__init__.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/__init__.py new file mode 100644 index 0000000000..76d5c5ff0d --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/__init__.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +from __future__ import absolute_import + +# import DmsClient +from huaweicloudsdkdms.v2.dms_client import DmsClient +from huaweicloudsdkdms.v2.dms_async_client import DmsAsyncClient +# import models into sdk package +from huaweicloudsdkdms.v2.model.batch_create_or_delete_queue_tag_request import BatchCreateOrDeleteQueueTagRequest +from huaweicloudsdkdms.v2.model.batch_create_or_delete_queue_tag_response import BatchCreateOrDeleteQueueTagResponse +from huaweicloudsdkdms.v2.model.batch_create_or_delete_tag_req import BatchCreateOrDeleteTagReq +from huaweicloudsdkdms.v2.model.batch_create_or_delete_tag_req_tags import BatchCreateOrDeleteTagReqTags +from huaweicloudsdkdms.v2.model.confirm_consumption_messages_req import ConfirmConsumptionMessagesReq +from huaweicloudsdkdms.v2.model.confirm_consumption_messages_request import ConfirmConsumptionMessagesRequest +from huaweicloudsdkdms.v2.model.confirm_consumption_messages_response import ConfirmConsumptionMessagesResponse +from huaweicloudsdkdms.v2.model.confirm_dead_letters_messages_req import ConfirmDeadLettersMessagesReq +from huaweicloudsdkdms.v2.model.confirm_dead_letters_messages_req_message import ConfirmDeadLettersMessagesReqMessage +from huaweicloudsdkdms.v2.model.confirm_dead_letters_messages_request import ConfirmDeadLettersMessagesRequest +from huaweicloudsdkdms.v2.model.confirm_dead_letters_messages_response import ConfirmDeadLettersMessagesResponse +from huaweicloudsdkdms.v2.model.consume_deadletters_message import ConsumeDeadlettersMessage +from huaweicloudsdkdms.v2.model.consume_deadletters_message_message import ConsumeDeadlettersMessageMessage +from huaweicloudsdkdms.v2.model.consume_deadletters_message_request import ConsumeDeadlettersMessageRequest +from huaweicloudsdkdms.v2.model.consume_deadletters_message_response import ConsumeDeadlettersMessageResponse +from huaweicloudsdkdms.v2.model.consume_message import ConsumeMessage +from huaweicloudsdkdms.v2.model.consume_message_message import ConsumeMessageMessage +from huaweicloudsdkdms.v2.model.consume_messages_request import ConsumeMessagesRequest +from huaweicloudsdkdms.v2.model.consume_messages_response import ConsumeMessagesResponse +from huaweicloudsdkdms.v2.model.create_consumer_group_req import CreateConsumerGroupReq +from huaweicloudsdkdms.v2.model.create_consumer_group_request import CreateConsumerGroupRequest +from huaweicloudsdkdms.v2.model.create_consumer_group_resp_groups import CreateConsumerGroupRespGroups +from huaweicloudsdkdms.v2.model.create_consumer_group_response import CreateConsumerGroupResponse +from huaweicloudsdkdms.v2.model.create_queue_req import CreateQueueReq +from huaweicloudsdkdms.v2.model.create_queue_request import CreateQueueRequest +from huaweicloudsdkdms.v2.model.create_queue_response import CreateQueueResponse +from huaweicloudsdkdms.v2.model.delete_queue_request import DeleteQueueRequest +from huaweicloudsdkdms.v2.model.delete_queue_response import DeleteQueueResponse +from huaweicloudsdkdms.v2.model.delete_specified_consumer_group_request import DeleteSpecifiedConsumerGroupRequest +from huaweicloudsdkdms.v2.model.delete_specified_consumer_group_response import DeleteSpecifiedConsumerGroupResponse +from huaweicloudsdkdms.v2.model.group_entity import GroupEntity +from huaweicloudsdkdms.v2.model.list_consumer_groups_request import ListConsumerGroupsRequest +from huaweicloudsdkdms.v2.model.list_consumer_groups_response import ListConsumerGroupsResponse +from huaweicloudsdkdms.v2.model.list_queue_groups_resp_groups import ListQueueGroupsRespGroups +from huaweicloudsdkdms.v2.model.list_queues_request import ListQueuesRequest +from huaweicloudsdkdms.v2.model.list_queues_resp_queues import ListQueuesRespQueues +from huaweicloudsdkdms.v2.model.list_queues_response import ListQueuesResponse +from huaweicloudsdkdms.v2.model.send_message_entity import SendMessageEntity +from huaweicloudsdkdms.v2.model.send_messages_req import SendMessagesReq +from huaweicloudsdkdms.v2.model.send_messages_request import SendMessagesRequest +from huaweicloudsdkdms.v2.model.send_messages_resp_messages import SendMessagesRespMessages +from huaweicloudsdkdms.v2.model.send_messages_response import SendMessagesResponse +from huaweicloudsdkdms.v2.model.show_project_tags_request import ShowProjectTagsRequest +from huaweicloudsdkdms.v2.model.show_project_tags_resp_tags import ShowProjectTagsRespTags +from huaweicloudsdkdms.v2.model.show_project_tags_response import ShowProjectTagsResponse +from huaweicloudsdkdms.v2.model.show_queue_request import ShowQueueRequest +from huaweicloudsdkdms.v2.model.show_queue_response import ShowQueueResponse +from huaweicloudsdkdms.v2.model.show_queue_tags_request import ShowQueueTagsRequest +from huaweicloudsdkdms.v2.model.show_queue_tags_response import ShowQueueTagsResponse +from huaweicloudsdkdms.v2.model.show_quotas_request import ShowQuotasRequest +from huaweicloudsdkdms.v2.model.show_quotas_resp_quotas import ShowQuotasRespQuotas +from huaweicloudsdkdms.v2.model.show_quotas_resp_quotas_resources import ShowQuotasRespQuotasResources +from huaweicloudsdkdms.v2.model.show_quotas_response import ShowQuotasResponse + diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/dms_async_client.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/dms_async_client.py new file mode 100644 index 0000000000..decc63c877 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/dms_async_client.py @@ -0,0 +1,1059 @@ +# coding: utf-8 + +from __future__ import absolute_import + +import datetime +import re +import importlib + +import six + +from huaweicloudsdkcore.client import Client, ClientBuilder +from huaweicloudsdkcore.exceptions import exceptions +from huaweicloudsdkcore.utils import http_utils +from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest + + +class DmsAsyncClient(Client): + """ + :param configuration: .Configuration object for this client + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self): + super(DmsAsyncClient, self).__init__() + self.model_package = importlib.import_module("huaweicloudsdkdms.v2.model") + self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} + + @staticmethod + def new_builder(clazz): + return ClientBuilder(clazz) + + def batch_create_or_delete_queue_tag_async(self, request): + """批量添加或删除队列标签 + + 批量添加或删除队列标签。 + + :param BatchCreateOrDeleteQueueTagRequest request + :return: BatchCreateOrDeleteQueueTagResponse + """ + return self.batch_create_or_delete_queue_tag_with_http_info(request) + + def batch_create_or_delete_queue_tag_with_http_info(self, request): + """批量添加或删除队列标签 + + 批量添加或删除队列标签。 + + :param BatchCreateOrDeleteQueueTagRequest request + :return: BatchCreateOrDeleteQueueTagResponse + """ + + all_params = ['queue_id', 'batch_create_or_delete_queue_tag_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queue/{queue_id}/tags/action', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='BatchCreateOrDeleteQueueTagResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def confirm_consumption_messages_async(self, request): + """确认已消费指定消息 + + 确认已经消费指定消息。 在消费者消费消息期间,消息仍然停留在队列中,但消息从被消费开始的30秒内不能被该消费组再次消费,若在这30秒内没有被消费者确认消费,则DMS认为消息未消费成功,将可以被继续消费。 如果消息被确认消费成功,消息将不能被该消费组再次消费,但是消息仍然保持在队列中,并且可以被其它消费组消费,消息在队列中的保留时间默认为72小时(除非队列被删除),72小时后会被删除。 消息批量消费确认时,必须严格按照消息消费的顺序提交确认,DMS按顺序判定消息是否消费成功,如果某条消息未确认或消费失败,则不再继续检测,默认后续消息全部消费失败。建议当对某一条消息处理失败时,不再需要继续处理本批消息中的后续消息,直接对已正确处理的消息进行确认。 确认消费失败后,可以再次重新消费和确认。当开启死信时,消息进行多次重复消费仍然失败后,DMS会将该条消息转存到死信队列中,有效期为72小时,用户可以根据需要对死信消息进行重新消费。 + + :param ConfirmConsumptionMessagesRequest request + :return: ConfirmConsumptionMessagesResponse + """ + return self.confirm_consumption_messages_with_http_info(request) + + def confirm_consumption_messages_with_http_info(self, request): + """确认已消费指定消息 + + 确认已经消费指定消息。 在消费者消费消息期间,消息仍然停留在队列中,但消息从被消费开始的30秒内不能被该消费组再次消费,若在这30秒内没有被消费者确认消费,则DMS认为消息未消费成功,将可以被继续消费。 如果消息被确认消费成功,消息将不能被该消费组再次消费,但是消息仍然保持在队列中,并且可以被其它消费组消费,消息在队列中的保留时间默认为72小时(除非队列被删除),72小时后会被删除。 消息批量消费确认时,必须严格按照消息消费的顺序提交确认,DMS按顺序判定消息是否消费成功,如果某条消息未确认或消费失败,则不再继续检测,默认后续消息全部消费失败。建议当对某一条消息处理失败时,不再需要继续处理本批消息中的后续消息,直接对已正确处理的消息进行确认。 确认消费失败后,可以再次重新消费和确认。当开启死信时,消息进行多次重复消费仍然失败后,DMS会将该条消息转存到死信队列中,有效期为72小时,用户可以根据需要对死信消息进行重新消费。 + + :param ConfirmConsumptionMessagesRequest request + :return: ConfirmConsumptionMessagesResponse + """ + + all_params = ['queue_id', 'consumer_group_id', 'confirm_consumption_messages_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + if 'consumer_group_id' in local_var_params: + path_params['consumer_group_id'] = local_var_params['consumer_group_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}/groups/{consumer_group_id}/ack', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ConfirmConsumptionMessagesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def confirm_dead_letters_messages_async(self, request): + """确认已消费死信消息 + + 确认已经消费指定的死信消息。 在消费者消费死信消息期间,死信消息仍然停留在队列中,但死信消息从被消费开始的30秒内不能被该消费组再次消费,若在这30秒内没有被消费者确认消费,则DMS认为死信消息未消费成功,将可以被继续消费。 如果死信消息被确认消费成功,该死信消息将不能被该消费组再次消费,死信消息的保留时间为72小时(除非消费组被删除),72小时后会被删除。 消息批量消费确认时,必须严格按照消息消费的顺序提交确认,DMS按顺序判定消息是否消费成功,如果某条消息未确认或消费失败,则不再继续检测,默认后续消息全部消费失败。建议当对某一条消息处理失败时,不再需要继续处理本批消息中的后续消息,直接对已正确处理的消息进行确认。 仅NORMAL队列和FIFO队列可以开启死信消息,因为只有NORMAL队列和FIFO队列可消费死信消息。 + + :param ConfirmDeadLettersMessagesRequest request + :return: ConfirmDeadLettersMessagesResponse + """ + return self.confirm_dead_letters_messages_with_http_info(request) + + def confirm_dead_letters_messages_with_http_info(self, request): + """确认已消费死信消息 + + 确认已经消费指定的死信消息。 在消费者消费死信消息期间,死信消息仍然停留在队列中,但死信消息从被消费开始的30秒内不能被该消费组再次消费,若在这30秒内没有被消费者确认消费,则DMS认为死信消息未消费成功,将可以被继续消费。 如果死信消息被确认消费成功,该死信消息将不能被该消费组再次消费,死信消息的保留时间为72小时(除非消费组被删除),72小时后会被删除。 消息批量消费确认时,必须严格按照消息消费的顺序提交确认,DMS按顺序判定消息是否消费成功,如果某条消息未确认或消费失败,则不再继续检测,默认后续消息全部消费失败。建议当对某一条消息处理失败时,不再需要继续处理本批消息中的后续消息,直接对已正确处理的消息进行确认。 仅NORMAL队列和FIFO队列可以开启死信消息,因为只有NORMAL队列和FIFO队列可消费死信消息。 + + :param ConfirmDeadLettersMessagesRequest request + :return: ConfirmDeadLettersMessagesResponse + """ + + all_params = ['queue_id', 'consumer_group_id', 'confirm_dead_letters_messages_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + if 'consumer_group_id' in local_var_params: + path_params['consumer_group_id'] = local_var_params['consumer_group_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}/groups/{consumer_group_id}/deadletters/ack', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ConfirmDeadLettersMessagesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def consume_deadletters_message_async(self, request): + """消费死信消息 + + 消费指定消费组产生的死信消息。可同时消费多条消息,每次消费的消息负载不超过512KB。 仅NORMAL队列和FIFO队列可以开启死信消息,因为只有NORMAL队列和FIFO队列可消费死信消息。 + + :param ConsumeDeadlettersMessageRequest request + :return: ConsumeDeadlettersMessageResponse + """ + return self.consume_deadletters_message_with_http_info(request) + + def consume_deadletters_message_with_http_info(self, request): + """消费死信消息 + + 消费指定消费组产生的死信消息。可同时消费多条消息,每次消费的消息负载不超过512KB。 仅NORMAL队列和FIFO队列可以开启死信消息,因为只有NORMAL队列和FIFO队列可消费死信消息。 + + :param ConsumeDeadlettersMessageRequest request + :return: ConsumeDeadlettersMessageResponse + """ + + all_params = ['queue_id', 'consumer_group_id', 'max_msgs', 'time_wait', 'ack_wait'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + if 'consumer_group_id' in local_var_params: + path_params['consumer_group_id'] = local_var_params['consumer_group_id'] + + query_params = [] + if 'max_msgs' in local_var_params: + query_params.append(('max_msgs', local_var_params['max_msgs'])) + if 'time_wait' in local_var_params: + query_params.append(('time_wait', local_var_params['time_wait'])) + if 'ack_wait' in local_var_params: + query_params.append(('ack_wait', local_var_params['ack_wait'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}/groups/{consumer_group_id}/deadletters', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ConsumeDeadlettersMessageResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def consume_messages_async(self, request): + """消费消息 + + 消费指定队列中的消息。可同时消费多条消息,每次消费的消息负载不超过512KB。 当队列中消息较少时,单次消费返回的消息数量可能会少于指定条数,但多次消费最终可获取全部消息,当队列为空时,返回为空。 每个消费组只支持一种Label规则,如果第二次消费更换了Label规则,则消费失败。 + + :param ConsumeMessagesRequest request + :return: ConsumeMessagesResponse + """ + return self.consume_messages_with_http_info(request) + + def consume_messages_with_http_info(self, request): + """消费消息 + + 消费指定队列中的消息。可同时消费多条消息,每次消费的消息负载不超过512KB。 当队列中消息较少时,单次消费返回的消息数量可能会少于指定条数,但多次消费最终可获取全部消息,当队列为空时,返回为空。 每个消费组只支持一种Label规则,如果第二次消费更换了Label规则,则消费失败。 + + :param ConsumeMessagesRequest request + :return: ConsumeMessagesResponse + """ + + all_params = ['queue_id', 'consumer_group_id', 'max_msgs', 'time_wait', 'ack_wait', 'tag', 'tag_type'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + if 'consumer_group_id' in local_var_params: + path_params['consumer_group_id'] = local_var_params['consumer_group_id'] + + query_params = [] + if 'max_msgs' in local_var_params: + query_params.append(('max_msgs', local_var_params['max_msgs'])) + if 'time_wait' in local_var_params: + query_params.append(('time_wait', local_var_params['time_wait'])) + if 'ack_wait' in local_var_params: + query_params.append(('ack_wait', local_var_params['ack_wait'])) + if 'tag' in local_var_params: + query_params.append(('tag', local_var_params['tag'])) + if 'tag_type' in local_var_params: + query_params.append(('tag_type', local_var_params['tag_type'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}/groups/{consumer_group_id}/messages', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ConsumeMessagesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def create_consumer_group_async(self, request): + """创建消费组 + + 创建消费组。 可同时为指定队列创建多个消费组。 > 创建消费组后系统内部完成初始化需要1-3秒,如果创建消费组后立即进行操作,可能会导致消费失败。建议3秒后再操作该队列。 + + :param CreateConsumerGroupRequest request + :return: CreateConsumerGroupResponse + """ + return self.create_consumer_group_with_http_info(request) + + def create_consumer_group_with_http_info(self, request): + """创建消费组 + + 创建消费组。 可同时为指定队列创建多个消费组。 > 创建消费组后系统内部完成初始化需要1-3秒,如果创建消费组后立即进行操作,可能会导致消费失败。建议3秒后再操作该队列。 + + :param CreateConsumerGroupRequest request + :return: CreateConsumerGroupResponse + """ + + all_params = ['queue_id', 'create_consumer_group_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}/groups', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreateConsumerGroupResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def create_queue_async(self, request): + """创建队列 + + 每个project_id默认只能创建30个队列。 > 创建队列时系统内部完成初始化需要1-3秒,如果创建队列后立即进行操作,可能会导致生产消息、消费消息、查询队列详情、创建消费组和删除队列等操作失败。建议3秒后再操作该队列。 + + :param CreateQueueRequest request + :return: CreateQueueResponse + """ + return self.create_queue_with_http_info(request) + + def create_queue_with_http_info(self, request): + """创建队列 + + 每个project_id默认只能创建30个队列。 > 创建队列时系统内部完成初始化需要1-3秒,如果创建队列后立即进行操作,可能会导致生产消息、消费消息、查询队列详情、创建消费组和删除队列等操作失败。建议3秒后再操作该队列。 + + :param CreateQueueRequest request + :return: CreateQueueResponse + """ + + all_params = ['create_queue_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreateQueueResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def delete_queue_async(self, request): + """删除指定队列 + + 删除指定的队列。 + + :param DeleteQueueRequest request + :return: DeleteQueueResponse + """ + return self.delete_queue_with_http_info(request) + + def delete_queue_with_http_info(self, request): + """删除指定队列 + + 删除指定的队列。 + + :param DeleteQueueRequest request + :return: DeleteQueueResponse + """ + + all_params = ['queue_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='DeleteQueueResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def delete_specified_consumer_group_async(self, request): + """删除指定消费组 + + 删除指定消费组。 + + :param DeleteSpecifiedConsumerGroupRequest request + :return: DeleteSpecifiedConsumerGroupResponse + """ + return self.delete_specified_consumer_group_with_http_info(request) + + def delete_specified_consumer_group_with_http_info(self, request): + """删除指定消费组 + + 删除指定消费组。 + + :param DeleteSpecifiedConsumerGroupRequest request + :return: DeleteSpecifiedConsumerGroupResponse + """ + + all_params = ['queue_id', 'group_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + if 'group_id' in local_var_params: + path_params['group_id'] = local_var_params['group_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}/groups/{group_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='DeleteSpecifiedConsumerGroupResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_consumer_groups_async(self, request): + """查看指定队列的所有消费组 + + 获取指定队列的所有消费组。 + + :param ListConsumerGroupsRequest request + :return: ListConsumerGroupsResponse + """ + return self.list_consumer_groups_with_http_info(request) + + def list_consumer_groups_with_http_info(self, request): + """查看指定队列的所有消费组 + + 获取指定队列的所有消费组。 + + :param ListConsumerGroupsRequest request + :return: ListConsumerGroupsResponse + """ + + all_params = ['queue_id', 'include_deadletter', 'include_messages_num', 'page_size', 'current_page'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + + query_params = [] + if 'include_deadletter' in local_var_params: + query_params.append(('include_deadletter', local_var_params['include_deadletter'])) + if 'include_messages_num' in local_var_params: + query_params.append(('include_messages_num', local_var_params['include_messages_num'])) + if 'page_size' in local_var_params: + query_params.append(('page_size', local_var_params['page_size'])) + if 'current_page' in local_var_params: + query_params.append(('current_page', local_var_params['current_page'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}/groups', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListConsumerGroupsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_queues_async(self, request): + """查看所有队列 + + 查看所有队列。 + + :param ListQueuesRequest request + :return: ListQueuesResponse + """ + return self.list_queues_with_http_info(request) + + def list_queues_with_http_info(self, request): + """查看所有队列 + + 查看所有队列。 + + :param ListQueuesRequest request + :return: ListQueuesResponse + """ + + all_params = ['include_deadletter'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'include_deadletter' in local_var_params: + query_params.append(('include_deadletter', local_var_params['include_deadletter'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListQueuesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def send_messages_async(self, request): + """向指定队列发送消息 + + 向指定队列发送消息,可同时发送多条消息。 - 每次最多发送10条。 - 每次发送的消息总负载不超过512KB。 - Kafka队列的消息保存时间在创建队列时可以设置,可设置范围为1~72小时。其他队列的消息最大保存时长为72小时。 + + :param SendMessagesRequest request + :return: SendMessagesResponse + """ + return self.send_messages_with_http_info(request) + + def send_messages_with_http_info(self, request): + """向指定队列发送消息 + + 向指定队列发送消息,可同时发送多条消息。 - 每次最多发送10条。 - 每次发送的消息总负载不超过512KB。 - Kafka队列的消息保存时间在创建队列时可以设置,可设置范围为1~72小时。其他队列的消息最大保存时长为72小时。 + + :param SendMessagesRequest request + :return: SendMessagesResponse + """ + + all_params = ['queue_id', 'send_messages_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}/messages', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='SendMessagesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_project_tags_async(self, request): + """查询项目标签 + + 查询项目标签。 + + :param ShowProjectTagsRequest request + :return: ShowProjectTagsResponse + """ + return self.show_project_tags_with_http_info(request) + + def show_project_tags_with_http_info(self, request): + """查询项目标签 + + 查询项目标签。 + + :param ShowProjectTagsRequest request + :return: ShowProjectTagsResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queue/tags', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowProjectTagsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_queue_async(self, request): + """查看指定队列 + + 查看指定的队列。 + + :param ShowQueueRequest request + :return: ShowQueueResponse + """ + return self.show_queue_with_http_info(request) + + def show_queue_with_http_info(self, request): + """查看指定队列 + + 查看指定的队列。 + + :param ShowQueueRequest request + :return: ShowQueueResponse + """ + + all_params = ['queue_id', 'include_deadletter'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + + query_params = [] + if 'include_deadletter' in local_var_params: + query_params.append(('include_deadletter', local_var_params['include_deadletter'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowQueueResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_queue_tags_async(self, request): + """查询队列标签 + + 查询队列标签。 + + :param ShowQueueTagsRequest request + :return: ShowQueueTagsResponse + """ + return self.show_queue_tags_with_http_info(request) + + def show_queue_tags_with_http_info(self, request): + """查询队列标签 + + 查询队列标签。 + + :param ShowQueueTagsRequest request + :return: ShowQueueTagsResponse + """ + + all_params = ['queue_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queue/{queue_id}/tags', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowQueueTagsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_quotas_async(self, request): + """查看租户配额 + + 查看当前项目的配额。 + + :param ShowQuotasRequest request + :return: ShowQuotasResponse + """ + return self.show_quotas_with_http_info(request) + + def show_quotas_with_http_info(self, request): + """查看租户配额 + + 查看当前项目的配额。 + + :param ShowQuotasRequest request + :return: ShowQuotasResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/quotas', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowQuotasResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, + body=None, post_params=None, response_type=None, auth_settings=None, collection_formats=None, + request_type=None): + """Makes the HTTP request and returns deserialized data. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response_type: Response data type. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :return: + Return the response directly. + """ + return self.do_http_request( + method=method, + resource_path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body, + post_params=post_params, + response_type=response_type, + collection_formats=collection_formats, + request_type=request_type, + async_request=True) diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/dms_client.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/dms_client.py new file mode 100644 index 0000000000..3430866706 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/dms_client.py @@ -0,0 +1,1058 @@ +# coding: utf-8 + +from __future__ import absolute_import + +import datetime +import re +import importlib + +import six + +from huaweicloudsdkcore.client import Client, ClientBuilder +from huaweicloudsdkcore.exceptions import exceptions +from huaweicloudsdkcore.utils import http_utils +from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest + + +class DmsClient(Client): + """ + :param configuration: .Configuration object for this client + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self): + super(DmsClient, self).__init__() + self.model_package = importlib.import_module("huaweicloudsdkdms.v2.model") + self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} + + @staticmethod + def new_builder(clazz): + return ClientBuilder(clazz) + + def batch_create_or_delete_queue_tag(self, request): + """批量添加或删除队列标签 + + 批量添加或删除队列标签。 + + :param BatchCreateOrDeleteQueueTagRequest request + :return: BatchCreateOrDeleteQueueTagResponse + """ + return self.batch_create_or_delete_queue_tag_with_http_info(request) + + def batch_create_or_delete_queue_tag_with_http_info(self, request): + """批量添加或删除队列标签 + + 批量添加或删除队列标签。 + + :param BatchCreateOrDeleteQueueTagRequest request + :return: BatchCreateOrDeleteQueueTagResponse + """ + + all_params = ['queue_id', 'batch_create_or_delete_queue_tag_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queue/{queue_id}/tags/action', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='BatchCreateOrDeleteQueueTagResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def confirm_consumption_messages(self, request): + """确认已消费指定消息 + + 确认已经消费指定消息。 在消费者消费消息期间,消息仍然停留在队列中,但消息从被消费开始的30秒内不能被该消费组再次消费,若在这30秒内没有被消费者确认消费,则DMS认为消息未消费成功,将可以被继续消费。 如果消息被确认消费成功,消息将不能被该消费组再次消费,但是消息仍然保持在队列中,并且可以被其它消费组消费,消息在队列中的保留时间默认为72小时(除非队列被删除),72小时后会被删除。 消息批量消费确认时,必须严格按照消息消费的顺序提交确认,DMS按顺序判定消息是否消费成功,如果某条消息未确认或消费失败,则不再继续检测,默认后续消息全部消费失败。建议当对某一条消息处理失败时,不再需要继续处理本批消息中的后续消息,直接对已正确处理的消息进行确认。 确认消费失败后,可以再次重新消费和确认。当开启死信时,消息进行多次重复消费仍然失败后,DMS会将该条消息转存到死信队列中,有效期为72小时,用户可以根据需要对死信消息进行重新消费。 + + :param ConfirmConsumptionMessagesRequest request + :return: ConfirmConsumptionMessagesResponse + """ + return self.confirm_consumption_messages_with_http_info(request) + + def confirm_consumption_messages_with_http_info(self, request): + """确认已消费指定消息 + + 确认已经消费指定消息。 在消费者消费消息期间,消息仍然停留在队列中,但消息从被消费开始的30秒内不能被该消费组再次消费,若在这30秒内没有被消费者确认消费,则DMS认为消息未消费成功,将可以被继续消费。 如果消息被确认消费成功,消息将不能被该消费组再次消费,但是消息仍然保持在队列中,并且可以被其它消费组消费,消息在队列中的保留时间默认为72小时(除非队列被删除),72小时后会被删除。 消息批量消费确认时,必须严格按照消息消费的顺序提交确认,DMS按顺序判定消息是否消费成功,如果某条消息未确认或消费失败,则不再继续检测,默认后续消息全部消费失败。建议当对某一条消息处理失败时,不再需要继续处理本批消息中的后续消息,直接对已正确处理的消息进行确认。 确认消费失败后,可以再次重新消费和确认。当开启死信时,消息进行多次重复消费仍然失败后,DMS会将该条消息转存到死信队列中,有效期为72小时,用户可以根据需要对死信消息进行重新消费。 + + :param ConfirmConsumptionMessagesRequest request + :return: ConfirmConsumptionMessagesResponse + """ + + all_params = ['queue_id', 'consumer_group_id', 'confirm_consumption_messages_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + if 'consumer_group_id' in local_var_params: + path_params['consumer_group_id'] = local_var_params['consumer_group_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}/groups/{consumer_group_id}/ack', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ConfirmConsumptionMessagesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def confirm_dead_letters_messages(self, request): + """确认已消费死信消息 + + 确认已经消费指定的死信消息。 在消费者消费死信消息期间,死信消息仍然停留在队列中,但死信消息从被消费开始的30秒内不能被该消费组再次消费,若在这30秒内没有被消费者确认消费,则DMS认为死信消息未消费成功,将可以被继续消费。 如果死信消息被确认消费成功,该死信消息将不能被该消费组再次消费,死信消息的保留时间为72小时(除非消费组被删除),72小时后会被删除。 消息批量消费确认时,必须严格按照消息消费的顺序提交确认,DMS按顺序判定消息是否消费成功,如果某条消息未确认或消费失败,则不再继续检测,默认后续消息全部消费失败。建议当对某一条消息处理失败时,不再需要继续处理本批消息中的后续消息,直接对已正确处理的消息进行确认。 仅NORMAL队列和FIFO队列可以开启死信消息,因为只有NORMAL队列和FIFO队列可消费死信消息。 + + :param ConfirmDeadLettersMessagesRequest request + :return: ConfirmDeadLettersMessagesResponse + """ + return self.confirm_dead_letters_messages_with_http_info(request) + + def confirm_dead_letters_messages_with_http_info(self, request): + """确认已消费死信消息 + + 确认已经消费指定的死信消息。 在消费者消费死信消息期间,死信消息仍然停留在队列中,但死信消息从被消费开始的30秒内不能被该消费组再次消费,若在这30秒内没有被消费者确认消费,则DMS认为死信消息未消费成功,将可以被继续消费。 如果死信消息被确认消费成功,该死信消息将不能被该消费组再次消费,死信消息的保留时间为72小时(除非消费组被删除),72小时后会被删除。 消息批量消费确认时,必须严格按照消息消费的顺序提交确认,DMS按顺序判定消息是否消费成功,如果某条消息未确认或消费失败,则不再继续检测,默认后续消息全部消费失败。建议当对某一条消息处理失败时,不再需要继续处理本批消息中的后续消息,直接对已正确处理的消息进行确认。 仅NORMAL队列和FIFO队列可以开启死信消息,因为只有NORMAL队列和FIFO队列可消费死信消息。 + + :param ConfirmDeadLettersMessagesRequest request + :return: ConfirmDeadLettersMessagesResponse + """ + + all_params = ['queue_id', 'consumer_group_id', 'confirm_dead_letters_messages_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + if 'consumer_group_id' in local_var_params: + path_params['consumer_group_id'] = local_var_params['consumer_group_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}/groups/{consumer_group_id}/deadletters/ack', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ConfirmDeadLettersMessagesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def consume_deadletters_message(self, request): + """消费死信消息 + + 消费指定消费组产生的死信消息。可同时消费多条消息,每次消费的消息负载不超过512KB。 仅NORMAL队列和FIFO队列可以开启死信消息,因为只有NORMAL队列和FIFO队列可消费死信消息。 + + :param ConsumeDeadlettersMessageRequest request + :return: ConsumeDeadlettersMessageResponse + """ + return self.consume_deadletters_message_with_http_info(request) + + def consume_deadletters_message_with_http_info(self, request): + """消费死信消息 + + 消费指定消费组产生的死信消息。可同时消费多条消息,每次消费的消息负载不超过512KB。 仅NORMAL队列和FIFO队列可以开启死信消息,因为只有NORMAL队列和FIFO队列可消费死信消息。 + + :param ConsumeDeadlettersMessageRequest request + :return: ConsumeDeadlettersMessageResponse + """ + + all_params = ['queue_id', 'consumer_group_id', 'max_msgs', 'time_wait', 'ack_wait'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + if 'consumer_group_id' in local_var_params: + path_params['consumer_group_id'] = local_var_params['consumer_group_id'] + + query_params = [] + if 'max_msgs' in local_var_params: + query_params.append(('max_msgs', local_var_params['max_msgs'])) + if 'time_wait' in local_var_params: + query_params.append(('time_wait', local_var_params['time_wait'])) + if 'ack_wait' in local_var_params: + query_params.append(('ack_wait', local_var_params['ack_wait'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}/groups/{consumer_group_id}/deadletters', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ConsumeDeadlettersMessageResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def consume_messages(self, request): + """消费消息 + + 消费指定队列中的消息。可同时消费多条消息,每次消费的消息负载不超过512KB。 当队列中消息较少时,单次消费返回的消息数量可能会少于指定条数,但多次消费最终可获取全部消息,当队列为空时,返回为空。 每个消费组只支持一种Label规则,如果第二次消费更换了Label规则,则消费失败。 + + :param ConsumeMessagesRequest request + :return: ConsumeMessagesResponse + """ + return self.consume_messages_with_http_info(request) + + def consume_messages_with_http_info(self, request): + """消费消息 + + 消费指定队列中的消息。可同时消费多条消息,每次消费的消息负载不超过512KB。 当队列中消息较少时,单次消费返回的消息数量可能会少于指定条数,但多次消费最终可获取全部消息,当队列为空时,返回为空。 每个消费组只支持一种Label规则,如果第二次消费更换了Label规则,则消费失败。 + + :param ConsumeMessagesRequest request + :return: ConsumeMessagesResponse + """ + + all_params = ['queue_id', 'consumer_group_id', 'max_msgs', 'time_wait', 'ack_wait', 'tag', 'tag_type'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + if 'consumer_group_id' in local_var_params: + path_params['consumer_group_id'] = local_var_params['consumer_group_id'] + + query_params = [] + if 'max_msgs' in local_var_params: + query_params.append(('max_msgs', local_var_params['max_msgs'])) + if 'time_wait' in local_var_params: + query_params.append(('time_wait', local_var_params['time_wait'])) + if 'ack_wait' in local_var_params: + query_params.append(('ack_wait', local_var_params['ack_wait'])) + if 'tag' in local_var_params: + query_params.append(('tag', local_var_params['tag'])) + if 'tag_type' in local_var_params: + query_params.append(('tag_type', local_var_params['tag_type'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}/groups/{consumer_group_id}/messages', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ConsumeMessagesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def create_consumer_group(self, request): + """创建消费组 + + 创建消费组。 可同时为指定队列创建多个消费组。 > 创建消费组后系统内部完成初始化需要1-3秒,如果创建消费组后立即进行操作,可能会导致消费失败。建议3秒后再操作该队列。 + + :param CreateConsumerGroupRequest request + :return: CreateConsumerGroupResponse + """ + return self.create_consumer_group_with_http_info(request) + + def create_consumer_group_with_http_info(self, request): + """创建消费组 + + 创建消费组。 可同时为指定队列创建多个消费组。 > 创建消费组后系统内部完成初始化需要1-3秒,如果创建消费组后立即进行操作,可能会导致消费失败。建议3秒后再操作该队列。 + + :param CreateConsumerGroupRequest request + :return: CreateConsumerGroupResponse + """ + + all_params = ['queue_id', 'create_consumer_group_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}/groups', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreateConsumerGroupResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def create_queue(self, request): + """创建队列 + + 每个project_id默认只能创建30个队列。 > 创建队列时系统内部完成初始化需要1-3秒,如果创建队列后立即进行操作,可能会导致生产消息、消费消息、查询队列详情、创建消费组和删除队列等操作失败。建议3秒后再操作该队列。 + + :param CreateQueueRequest request + :return: CreateQueueResponse + """ + return self.create_queue_with_http_info(request) + + def create_queue_with_http_info(self, request): + """创建队列 + + 每个project_id默认只能创建30个队列。 > 创建队列时系统内部完成初始化需要1-3秒,如果创建队列后立即进行操作,可能会导致生产消息、消费消息、查询队列详情、创建消费组和删除队列等操作失败。建议3秒后再操作该队列。 + + :param CreateQueueRequest request + :return: CreateQueueResponse + """ + + all_params = ['create_queue_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreateQueueResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def delete_queue(self, request): + """删除指定队列 + + 删除指定的队列。 + + :param DeleteQueueRequest request + :return: DeleteQueueResponse + """ + return self.delete_queue_with_http_info(request) + + def delete_queue_with_http_info(self, request): + """删除指定队列 + + 删除指定的队列。 + + :param DeleteQueueRequest request + :return: DeleteQueueResponse + """ + + all_params = ['queue_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='DeleteQueueResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def delete_specified_consumer_group(self, request): + """删除指定消费组 + + 删除指定消费组。 + + :param DeleteSpecifiedConsumerGroupRequest request + :return: DeleteSpecifiedConsumerGroupResponse + """ + return self.delete_specified_consumer_group_with_http_info(request) + + def delete_specified_consumer_group_with_http_info(self, request): + """删除指定消费组 + + 删除指定消费组。 + + :param DeleteSpecifiedConsumerGroupRequest request + :return: DeleteSpecifiedConsumerGroupResponse + """ + + all_params = ['queue_id', 'group_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + if 'group_id' in local_var_params: + path_params['group_id'] = local_var_params['group_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}/groups/{group_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='DeleteSpecifiedConsumerGroupResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_consumer_groups(self, request): + """查看指定队列的所有消费组 + + 获取指定队列的所有消费组。 + + :param ListConsumerGroupsRequest request + :return: ListConsumerGroupsResponse + """ + return self.list_consumer_groups_with_http_info(request) + + def list_consumer_groups_with_http_info(self, request): + """查看指定队列的所有消费组 + + 获取指定队列的所有消费组。 + + :param ListConsumerGroupsRequest request + :return: ListConsumerGroupsResponse + """ + + all_params = ['queue_id', 'include_deadletter', 'include_messages_num', 'page_size', 'current_page'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + + query_params = [] + if 'include_deadletter' in local_var_params: + query_params.append(('include_deadletter', local_var_params['include_deadletter'])) + if 'include_messages_num' in local_var_params: + query_params.append(('include_messages_num', local_var_params['include_messages_num'])) + if 'page_size' in local_var_params: + query_params.append(('page_size', local_var_params['page_size'])) + if 'current_page' in local_var_params: + query_params.append(('current_page', local_var_params['current_page'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}/groups', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListConsumerGroupsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_queues(self, request): + """查看所有队列 + + 查看所有队列。 + + :param ListQueuesRequest request + :return: ListQueuesResponse + """ + return self.list_queues_with_http_info(request) + + def list_queues_with_http_info(self, request): + """查看所有队列 + + 查看所有队列。 + + :param ListQueuesRequest request + :return: ListQueuesResponse + """ + + all_params = ['include_deadletter'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'include_deadletter' in local_var_params: + query_params.append(('include_deadletter', local_var_params['include_deadletter'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListQueuesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def send_messages(self, request): + """向指定队列发送消息 + + 向指定队列发送消息,可同时发送多条消息。 - 每次最多发送10条。 - 每次发送的消息总负载不超过512KB。 - Kafka队列的消息保存时间在创建队列时可以设置,可设置范围为1~72小时。其他队列的消息最大保存时长为72小时。 + + :param SendMessagesRequest request + :return: SendMessagesResponse + """ + return self.send_messages_with_http_info(request) + + def send_messages_with_http_info(self, request): + """向指定队列发送消息 + + 向指定队列发送消息,可同时发送多条消息。 - 每次最多发送10条。 - 每次发送的消息总负载不超过512KB。 - Kafka队列的消息保存时间在创建队列时可以设置,可设置范围为1~72小时。其他队列的消息最大保存时长为72小时。 + + :param SendMessagesRequest request + :return: SendMessagesResponse + """ + + all_params = ['queue_id', 'send_messages_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}/messages', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='SendMessagesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_project_tags(self, request): + """查询项目标签 + + 查询项目标签。 + + :param ShowProjectTagsRequest request + :return: ShowProjectTagsResponse + """ + return self.show_project_tags_with_http_info(request) + + def show_project_tags_with_http_info(self, request): + """查询项目标签 + + 查询项目标签。 + + :param ShowProjectTagsRequest request + :return: ShowProjectTagsResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queue/tags', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowProjectTagsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_queue(self, request): + """查看指定队列 + + 查看指定的队列。 + + :param ShowQueueRequest request + :return: ShowQueueResponse + """ + return self.show_queue_with_http_info(request) + + def show_queue_with_http_info(self, request): + """查看指定队列 + + 查看指定的队列。 + + :param ShowQueueRequest request + :return: ShowQueueResponse + """ + + all_params = ['queue_id', 'include_deadletter'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + + query_params = [] + if 'include_deadletter' in local_var_params: + query_params.append(('include_deadletter', local_var_params['include_deadletter'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queues/{queue_id}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowQueueResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_queue_tags(self, request): + """查询队列标签 + + 查询队列标签。 + + :param ShowQueueTagsRequest request + :return: ShowQueueTagsResponse + """ + return self.show_queue_tags_with_http_info(request) + + def show_queue_tags_with_http_info(self, request): + """查询队列标签 + + 查询队列标签。 + + :param ShowQueueTagsRequest request + :return: ShowQueueTagsResponse + """ + + all_params = ['queue_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'queue_id' in local_var_params: + path_params['queue_id'] = local_var_params['queue_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/queue/{queue_id}/tags', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowQueueTagsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_quotas(self, request): + """查看租户配额 + + 查看当前项目的配额。 + + :param ShowQuotasRequest request + :return: ShowQuotasResponse + """ + return self.show_quotas_with_http_info(request) + + def show_quotas_with_http_info(self, request): + """查看租户配额 + + 查看当前项目的配额。 + + :param ShowQuotasRequest request + :return: ShowQuotasResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/quotas', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowQuotasResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, + body=None, post_params=None, response_type=None, auth_settings=None, collection_formats=None, + request_type=None): + """Makes the HTTP request and returns deserialized data. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response_type: Response data type. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :return: + Return the response directly. + """ + return self.do_http_request( + method=method, + resource_path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body, + post_params=post_params, + response_type=response_type, + collection_formats=collection_formats, + request_type=request_type) diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/__init__.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/__init__.py new file mode 100644 index 0000000000..d31218c008 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/__init__.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +from __future__ import absolute_import + +# import models into model package +from huaweicloudsdkdms.v2.model.batch_create_or_delete_queue_tag_request import BatchCreateOrDeleteQueueTagRequest +from huaweicloudsdkdms.v2.model.batch_create_or_delete_queue_tag_response import BatchCreateOrDeleteQueueTagResponse +from huaweicloudsdkdms.v2.model.batch_create_or_delete_tag_req import BatchCreateOrDeleteTagReq +from huaweicloudsdkdms.v2.model.batch_create_or_delete_tag_req_tags import BatchCreateOrDeleteTagReqTags +from huaweicloudsdkdms.v2.model.confirm_consumption_messages_req import ConfirmConsumptionMessagesReq +from huaweicloudsdkdms.v2.model.confirm_consumption_messages_request import ConfirmConsumptionMessagesRequest +from huaweicloudsdkdms.v2.model.confirm_consumption_messages_response import ConfirmConsumptionMessagesResponse +from huaweicloudsdkdms.v2.model.confirm_dead_letters_messages_req import ConfirmDeadLettersMessagesReq +from huaweicloudsdkdms.v2.model.confirm_dead_letters_messages_req_message import ConfirmDeadLettersMessagesReqMessage +from huaweicloudsdkdms.v2.model.confirm_dead_letters_messages_request import ConfirmDeadLettersMessagesRequest +from huaweicloudsdkdms.v2.model.confirm_dead_letters_messages_response import ConfirmDeadLettersMessagesResponse +from huaweicloudsdkdms.v2.model.consume_deadletters_message import ConsumeDeadlettersMessage +from huaweicloudsdkdms.v2.model.consume_deadletters_message_message import ConsumeDeadlettersMessageMessage +from huaweicloudsdkdms.v2.model.consume_deadletters_message_request import ConsumeDeadlettersMessageRequest +from huaweicloudsdkdms.v2.model.consume_deadletters_message_response import ConsumeDeadlettersMessageResponse +from huaweicloudsdkdms.v2.model.consume_message import ConsumeMessage +from huaweicloudsdkdms.v2.model.consume_message_message import ConsumeMessageMessage +from huaweicloudsdkdms.v2.model.consume_messages_request import ConsumeMessagesRequest +from huaweicloudsdkdms.v2.model.consume_messages_response import ConsumeMessagesResponse +from huaweicloudsdkdms.v2.model.create_consumer_group_req import CreateConsumerGroupReq +from huaweicloudsdkdms.v2.model.create_consumer_group_request import CreateConsumerGroupRequest +from huaweicloudsdkdms.v2.model.create_consumer_group_resp_groups import CreateConsumerGroupRespGroups +from huaweicloudsdkdms.v2.model.create_consumer_group_response import CreateConsumerGroupResponse +from huaweicloudsdkdms.v2.model.create_queue_req import CreateQueueReq +from huaweicloudsdkdms.v2.model.create_queue_request import CreateQueueRequest +from huaweicloudsdkdms.v2.model.create_queue_response import CreateQueueResponse +from huaweicloudsdkdms.v2.model.delete_queue_request import DeleteQueueRequest +from huaweicloudsdkdms.v2.model.delete_queue_response import DeleteQueueResponse +from huaweicloudsdkdms.v2.model.delete_specified_consumer_group_request import DeleteSpecifiedConsumerGroupRequest +from huaweicloudsdkdms.v2.model.delete_specified_consumer_group_response import DeleteSpecifiedConsumerGroupResponse +from huaweicloudsdkdms.v2.model.group_entity import GroupEntity +from huaweicloudsdkdms.v2.model.list_consumer_groups_request import ListConsumerGroupsRequest +from huaweicloudsdkdms.v2.model.list_consumer_groups_response import ListConsumerGroupsResponse +from huaweicloudsdkdms.v2.model.list_queue_groups_resp_groups import ListQueueGroupsRespGroups +from huaweicloudsdkdms.v2.model.list_queues_request import ListQueuesRequest +from huaweicloudsdkdms.v2.model.list_queues_resp_queues import ListQueuesRespQueues +from huaweicloudsdkdms.v2.model.list_queues_response import ListQueuesResponse +from huaweicloudsdkdms.v2.model.send_message_entity import SendMessageEntity +from huaweicloudsdkdms.v2.model.send_messages_req import SendMessagesReq +from huaweicloudsdkdms.v2.model.send_messages_request import SendMessagesRequest +from huaweicloudsdkdms.v2.model.send_messages_resp_messages import SendMessagesRespMessages +from huaweicloudsdkdms.v2.model.send_messages_response import SendMessagesResponse +from huaweicloudsdkdms.v2.model.show_project_tags_request import ShowProjectTagsRequest +from huaweicloudsdkdms.v2.model.show_project_tags_resp_tags import ShowProjectTagsRespTags +from huaweicloudsdkdms.v2.model.show_project_tags_response import ShowProjectTagsResponse +from huaweicloudsdkdms.v2.model.show_queue_request import ShowQueueRequest +from huaweicloudsdkdms.v2.model.show_queue_response import ShowQueueResponse +from huaweicloudsdkdms.v2.model.show_queue_tags_request import ShowQueueTagsRequest +from huaweicloudsdkdms.v2.model.show_queue_tags_response import ShowQueueTagsResponse +from huaweicloudsdkdms.v2.model.show_quotas_request import ShowQuotasRequest +from huaweicloudsdkdms.v2.model.show_quotas_resp_quotas import ShowQuotasRespQuotas +from huaweicloudsdkdms.v2.model.show_quotas_resp_quotas_resources import ShowQuotasRespQuotasResources +from huaweicloudsdkdms.v2.model.show_quotas_response import ShowQuotasResponse diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/batch_create_or_delete_queue_tag_request.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/batch_create_or_delete_queue_tag_request.py new file mode 100644 index 0000000000..3d54de8f0f --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/batch_create_or_delete_queue_tag_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BatchCreateOrDeleteQueueTagRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'queue_id': 'str', + 'body': 'BatchCreateOrDeleteTagReq' + } + + attribute_map = { + 'queue_id': 'queue_id', + 'body': 'body' + } + + def __init__(self, queue_id=None, body=None): + """BatchCreateOrDeleteQueueTagRequest - a model defined in huaweicloud sdk""" + + + + self._queue_id = None + self._body = None + self.discriminator = None + + self.queue_id = queue_id + if body is not None: + self.body = body + + @property + def queue_id(self): + """Gets the queue_id of this BatchCreateOrDeleteQueueTagRequest. + + + :return: The queue_id of this BatchCreateOrDeleteQueueTagRequest. + :rtype: str + """ + return self._queue_id + + @queue_id.setter + def queue_id(self, queue_id): + """Sets the queue_id of this BatchCreateOrDeleteQueueTagRequest. + + + :param queue_id: The queue_id of this BatchCreateOrDeleteQueueTagRequest. + :type: str + """ + self._queue_id = queue_id + + @property + def body(self): + """Gets the body of this BatchCreateOrDeleteQueueTagRequest. + + + :return: The body of this BatchCreateOrDeleteQueueTagRequest. + :rtype: BatchCreateOrDeleteTagReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this BatchCreateOrDeleteQueueTagRequest. + + + :param body: The body of this BatchCreateOrDeleteQueueTagRequest. + :type: BatchCreateOrDeleteTagReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchCreateOrDeleteQueueTagRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/batch_create_or_delete_queue_tag_response.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/batch_create_or_delete_queue_tag_response.py new file mode 100644 index 0000000000..a4d6ed257f --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/batch_create_or_delete_queue_tag_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class BatchCreateOrDeleteQueueTagResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """BatchCreateOrDeleteQueueTagResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchCreateOrDeleteQueueTagResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/batch_create_or_delete_tag_req.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/batch_create_or_delete_tag_req.py new file mode 100644 index 0000000000..423790db28 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/batch_create_or_delete_tag_req.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BatchCreateOrDeleteTagReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'action': 'str', + 'tags': 'list[BatchCreateOrDeleteTagReqTags]' + } + + attribute_map = { + 'action': 'action', + 'tags': 'tags' + } + + def __init__(self, action=None, tags=None): + """BatchCreateOrDeleteTagReq - a model defined in huaweicloud sdk""" + + + + self._action = None + self._tags = None + self.discriminator = None + + if action is not None: + self.action = action + if tags is not None: + self.tags = tags + + @property + def action(self): + """Gets the action of this BatchCreateOrDeleteTagReq. + + 操作标识(仅支持小写): - create(创建) - delete(删除) + + :return: The action of this BatchCreateOrDeleteTagReq. + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """Sets the action of this BatchCreateOrDeleteTagReq. + + 操作标识(仅支持小写): - create(创建) - delete(删除) + + :param action: The action of this BatchCreateOrDeleteTagReq. + :type: str + """ + self._action = action + + @property + def tags(self): + """Gets the tags of this BatchCreateOrDeleteTagReq. + + 标签列表。 + + :return: The tags of this BatchCreateOrDeleteTagReq. + :rtype: list[BatchCreateOrDeleteTagReqTags] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this BatchCreateOrDeleteTagReq. + + 标签列表。 + + :param tags: The tags of this BatchCreateOrDeleteTagReq. + :type: list[BatchCreateOrDeleteTagReqTags] + """ + self._tags = tags + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchCreateOrDeleteTagReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/batch_create_or_delete_tag_req_tags.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/batch_create_or_delete_tag_req_tags.py new file mode 100644 index 0000000000..65de7a0830 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/batch_create_or_delete_tag_req_tags.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BatchCreateOrDeleteTagReqTags: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'key': 'str', + 'value': 'str' + } + + attribute_map = { + 'key': 'key', + 'value': 'value' + } + + def __init__(self, key=None, value=None): + """BatchCreateOrDeleteTagReqTags - a model defined in huaweicloud sdk""" + + + + self._key = None + self._value = None + self.discriminator = None + + if key is not None: + self.key = key + if value is not None: + self.value = value + + @property + def key(self): + """Gets the key of this BatchCreateOrDeleteTagReqTags. + + 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :return: The key of this BatchCreateOrDeleteTagReqTags. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this BatchCreateOrDeleteTagReqTags. + + 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :param key: The key of this BatchCreateOrDeleteTagReqTags. + :type: str + """ + self._key = key + + @property + def value(self): + """Gets the value of this BatchCreateOrDeleteTagReqTags. + + 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :return: The value of this BatchCreateOrDeleteTagReqTags. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this BatchCreateOrDeleteTagReqTags. + + 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :param value: The value of this BatchCreateOrDeleteTagReqTags. + :type: str + """ + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchCreateOrDeleteTagReqTags): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_consumption_messages_req.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_consumption_messages_req.py new file mode 100644 index 0000000000..a58132f8f9 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_consumption_messages_req.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ConfirmConsumptionMessagesReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'message': 'list[ConfirmDeadLettersMessagesReqMessage]' + } + + attribute_map = { + 'message': 'message' + } + + def __init__(self, message=None): + """ConfirmConsumptionMessagesReq - a model defined in huaweicloud sdk""" + + + + self._message = None + self.discriminator = None + + if message is not None: + self.message = message + + @property + def message(self): + """Gets the message of this ConfirmConsumptionMessagesReq. + + 确认消息数组。 + + :return: The message of this ConfirmConsumptionMessagesReq. + :rtype: list[ConfirmDeadLettersMessagesReqMessage] + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ConfirmConsumptionMessagesReq. + + 确认消息数组。 + + :param message: The message of this ConfirmConsumptionMessagesReq. + :type: list[ConfirmDeadLettersMessagesReqMessage] + """ + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConfirmConsumptionMessagesReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_consumption_messages_request.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_consumption_messages_request.py new file mode 100644 index 0000000000..977f119980 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_consumption_messages_request.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ConfirmConsumptionMessagesRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'queue_id': 'str', + 'consumer_group_id': 'str', + 'body': 'ConfirmConsumptionMessagesReq' + } + + attribute_map = { + 'queue_id': 'queue_id', + 'consumer_group_id': 'consumer_group_id', + 'body': 'body' + } + + def __init__(self, queue_id=None, consumer_group_id=None, body=None): + """ConfirmConsumptionMessagesRequest - a model defined in huaweicloud sdk""" + + + + self._queue_id = None + self._consumer_group_id = None + self._body = None + self.discriminator = None + + self.queue_id = queue_id + self.consumer_group_id = consumer_group_id + if body is not None: + self.body = body + + @property + def queue_id(self): + """Gets the queue_id of this ConfirmConsumptionMessagesRequest. + + + :return: The queue_id of this ConfirmConsumptionMessagesRequest. + :rtype: str + """ + return self._queue_id + + @queue_id.setter + def queue_id(self, queue_id): + """Sets the queue_id of this ConfirmConsumptionMessagesRequest. + + + :param queue_id: The queue_id of this ConfirmConsumptionMessagesRequest. + :type: str + """ + self._queue_id = queue_id + + @property + def consumer_group_id(self): + """Gets the consumer_group_id of this ConfirmConsumptionMessagesRequest. + + + :return: The consumer_group_id of this ConfirmConsumptionMessagesRequest. + :rtype: str + """ + return self._consumer_group_id + + @consumer_group_id.setter + def consumer_group_id(self, consumer_group_id): + """Sets the consumer_group_id of this ConfirmConsumptionMessagesRequest. + + + :param consumer_group_id: The consumer_group_id of this ConfirmConsumptionMessagesRequest. + :type: str + """ + self._consumer_group_id = consumer_group_id + + @property + def body(self): + """Gets the body of this ConfirmConsumptionMessagesRequest. + + + :return: The body of this ConfirmConsumptionMessagesRequest. + :rtype: ConfirmConsumptionMessagesReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ConfirmConsumptionMessagesRequest. + + + :param body: The body of this ConfirmConsumptionMessagesRequest. + :type: ConfirmConsumptionMessagesReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConfirmConsumptionMessagesRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_consumption_messages_response.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_consumption_messages_response.py new file mode 100644 index 0000000000..cca5365f97 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_consumption_messages_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ConfirmConsumptionMessagesResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'success': 'int', + 'fail': 'int' + } + + attribute_map = { + 'success': 'success', + 'fail': 'fail' + } + + def __init__(self, success=None, fail=None): + """ConfirmConsumptionMessagesResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._success = None + self._fail = None + self.discriminator = None + + if success is not None: + self.success = success + if fail is not None: + self.fail = fail + + @property + def success(self): + """Gets the success of this ConfirmConsumptionMessagesResponse. + + 确认成功的数目(如果为N,则表示前N条消息确认成功)。 + + :return: The success of this ConfirmConsumptionMessagesResponse. + :rtype: int + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this ConfirmConsumptionMessagesResponse. + + 确认成功的数目(如果为N,则表示前N条消息确认成功)。 + + :param success: The success of this ConfirmConsumptionMessagesResponse. + :type: int + """ + self._success = success + + @property + def fail(self): + """Gets the fail of this ConfirmConsumptionMessagesResponse. + + 确认失败的数目(如果为N,则表示后N条消息确认失败)。 + + :return: The fail of this ConfirmConsumptionMessagesResponse. + :rtype: int + """ + return self._fail + + @fail.setter + def fail(self, fail): + """Sets the fail of this ConfirmConsumptionMessagesResponse. + + 确认失败的数目(如果为N,则表示后N条消息确认失败)。 + + :param fail: The fail of this ConfirmConsumptionMessagesResponse. + :type: int + """ + self._fail = fail + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConfirmConsumptionMessagesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_dead_letters_messages_req.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_dead_letters_messages_req.py new file mode 100644 index 0000000000..88de730ad5 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_dead_letters_messages_req.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ConfirmDeadLettersMessagesReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'message': 'list[ConfirmDeadLettersMessagesReqMessage]' + } + + attribute_map = { + 'message': 'message' + } + + def __init__(self, message=None): + """ConfirmDeadLettersMessagesReq - a model defined in huaweicloud sdk""" + + + + self._message = None + self.discriminator = None + + if message is not None: + self.message = message + + @property + def message(self): + """Gets the message of this ConfirmDeadLettersMessagesReq. + + 确认消息数组。 + + :return: The message of this ConfirmDeadLettersMessagesReq. + :rtype: list[ConfirmDeadLettersMessagesReqMessage] + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ConfirmDeadLettersMessagesReq. + + 确认消息数组。 + + :param message: The message of this ConfirmDeadLettersMessagesReq. + :type: list[ConfirmDeadLettersMessagesReqMessage] + """ + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConfirmDeadLettersMessagesReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_dead_letters_messages_req_message.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_dead_letters_messages_req_message.py new file mode 100644 index 0000000000..10a02ed1d3 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_dead_letters_messages_req_message.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ConfirmDeadLettersMessagesReqMessage: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'handler': 'str', + 'status': 'str' + } + + attribute_map = { + 'handler': 'handler', + 'status': 'status' + } + + def __init__(self, handler=None, status=None): + """ConfirmDeadLettersMessagesReqMessage - a model defined in huaweicloud sdk""" + + + + self._handler = None + self._status = None + self.discriminator = None + + if handler is not None: + self.handler = handler + if status is not None: + self.status = status + + @property + def handler(self): + """Gets the handler of this ConfirmDeadLettersMessagesReqMessage. + + 消费时返回的ID。 + + :return: The handler of this ConfirmDeadLettersMessagesReqMessage. + :rtype: str + """ + return self._handler + + @handler.setter + def handler(self, handler): + """Sets the handler of this ConfirmDeadLettersMessagesReqMessage. + + 消费时返回的ID。 + + :param handler: The handler of this ConfirmDeadLettersMessagesReqMessage. + :type: str + """ + self._handler = handler + + @property + def status(self): + """Gets the status of this ConfirmDeadLettersMessagesReqMessage. + + 客户端处理数据的状态。 取值为“success”或者“fail”。 + + :return: The status of this ConfirmDeadLettersMessagesReqMessage. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ConfirmDeadLettersMessagesReqMessage. + + 客户端处理数据的状态。 取值为“success”或者“fail”。 + + :param status: The status of this ConfirmDeadLettersMessagesReqMessage. + :type: str + """ + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConfirmDeadLettersMessagesReqMessage): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_dead_letters_messages_request.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_dead_letters_messages_request.py new file mode 100644 index 0000000000..1aa7e7d6c4 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_dead_letters_messages_request.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ConfirmDeadLettersMessagesRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'queue_id': 'str', + 'consumer_group_id': 'str', + 'body': 'ConfirmDeadLettersMessagesReq' + } + + attribute_map = { + 'queue_id': 'queue_id', + 'consumer_group_id': 'consumer_group_id', + 'body': 'body' + } + + def __init__(self, queue_id=None, consumer_group_id=None, body=None): + """ConfirmDeadLettersMessagesRequest - a model defined in huaweicloud sdk""" + + + + self._queue_id = None + self._consumer_group_id = None + self._body = None + self.discriminator = None + + self.queue_id = queue_id + self.consumer_group_id = consumer_group_id + if body is not None: + self.body = body + + @property + def queue_id(self): + """Gets the queue_id of this ConfirmDeadLettersMessagesRequest. + + + :return: The queue_id of this ConfirmDeadLettersMessagesRequest. + :rtype: str + """ + return self._queue_id + + @queue_id.setter + def queue_id(self, queue_id): + """Sets the queue_id of this ConfirmDeadLettersMessagesRequest. + + + :param queue_id: The queue_id of this ConfirmDeadLettersMessagesRequest. + :type: str + """ + self._queue_id = queue_id + + @property + def consumer_group_id(self): + """Gets the consumer_group_id of this ConfirmDeadLettersMessagesRequest. + + + :return: The consumer_group_id of this ConfirmDeadLettersMessagesRequest. + :rtype: str + """ + return self._consumer_group_id + + @consumer_group_id.setter + def consumer_group_id(self, consumer_group_id): + """Sets the consumer_group_id of this ConfirmDeadLettersMessagesRequest. + + + :param consumer_group_id: The consumer_group_id of this ConfirmDeadLettersMessagesRequest. + :type: str + """ + self._consumer_group_id = consumer_group_id + + @property + def body(self): + """Gets the body of this ConfirmDeadLettersMessagesRequest. + + + :return: The body of this ConfirmDeadLettersMessagesRequest. + :rtype: ConfirmDeadLettersMessagesReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ConfirmDeadLettersMessagesRequest. + + + :param body: The body of this ConfirmDeadLettersMessagesRequest. + :type: ConfirmDeadLettersMessagesReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConfirmDeadLettersMessagesRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_dead_letters_messages_response.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_dead_letters_messages_response.py new file mode 100644 index 0000000000..a003e1e2d1 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/confirm_dead_letters_messages_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ConfirmDeadLettersMessagesResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'success': 'int', + 'fail': 'int' + } + + attribute_map = { + 'success': 'success', + 'fail': 'fail' + } + + def __init__(self, success=None, fail=None): + """ConfirmDeadLettersMessagesResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._success = None + self._fail = None + self.discriminator = None + + if success is not None: + self.success = success + if fail is not None: + self.fail = fail + + @property + def success(self): + """Gets the success of this ConfirmDeadLettersMessagesResponse. + + 确认成功的数目(如果为N,则表示前N条消息确认成功)。 + + :return: The success of this ConfirmDeadLettersMessagesResponse. + :rtype: int + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this ConfirmDeadLettersMessagesResponse. + + 确认成功的数目(如果为N,则表示前N条消息确认成功)。 + + :param success: The success of this ConfirmDeadLettersMessagesResponse. + :type: int + """ + self._success = success + + @property + def fail(self): + """Gets the fail of this ConfirmDeadLettersMessagesResponse. + + 确认失败的数目(如果为N,则表示后N条消息确认失败)。 + + :return: The fail of this ConfirmDeadLettersMessagesResponse. + :rtype: int + """ + return self._fail + + @fail.setter + def fail(self, fail): + """Sets the fail of this ConfirmDeadLettersMessagesResponse. + + 确认失败的数目(如果为N,则表示后N条消息确认失败)。 + + :param fail: The fail of this ConfirmDeadLettersMessagesResponse. + :type: int + """ + self._fail = fail + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConfirmDeadLettersMessagesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_deadletters_message.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_deadletters_message.py new file mode 100644 index 0000000000..9267a8fc00 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_deadletters_message.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ConsumeDeadlettersMessage: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'message': 'ConsumeDeadlettersMessageMessage', + 'handler': 'str' + } + + attribute_map = { + 'message': 'message', + 'handler': 'handler' + } + + def __init__(self, message=None, handler=None): + """ConsumeDeadlettersMessage - a model defined in huaweicloud sdk""" + + + + self._message = None + self._handler = None + self.discriminator = None + + if message is not None: + self.message = message + if handler is not None: + self.handler = handler + + @property + def message(self): + """Gets the message of this ConsumeDeadlettersMessage. + + + :return: The message of this ConsumeDeadlettersMessage. + :rtype: ConsumeDeadlettersMessageMessage + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ConsumeDeadlettersMessage. + + + :param message: The message of this ConsumeDeadlettersMessage. + :type: ConsumeDeadlettersMessageMessage + """ + self._message = message + + @property + def handler(self): + """Gets the handler of this ConsumeDeadlettersMessage. + + 消息handler。 + + :return: The handler of this ConsumeDeadlettersMessage. + :rtype: str + """ + return self._handler + + @handler.setter + def handler(self, handler): + """Sets the handler of this ConsumeDeadlettersMessage. + + 消息handler。 + + :param handler: The handler of this ConsumeDeadlettersMessage. + :type: str + """ + self._handler = handler + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConsumeDeadlettersMessage): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_deadletters_message_message.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_deadletters_message_message.py new file mode 100644 index 0000000000..0c9214b789 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_deadletters_message_message.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ConsumeDeadlettersMessageMessage: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'body': 'object', + 'attributes': 'object' + } + + attribute_map = { + 'body': 'body', + 'attributes': 'attributes' + } + + def __init__(self, body=None, attributes=None): + """ConsumeDeadlettersMessageMessage - a model defined in huaweicloud sdk""" + + + + self._body = None + self._attributes = None + self.discriminator = None + + if body is not None: + self.body = body + if attributes is not None: + self.attributes = attributes + + @property + def body(self): + """Gets the body of this ConsumeDeadlettersMessageMessage. + + 消息体的内容。 + + :return: The body of this ConsumeDeadlettersMessageMessage. + :rtype: object + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ConsumeDeadlettersMessageMessage. + + 消息体的内容。 + + :param body: The body of this ConsumeDeadlettersMessageMessage. + :type: object + """ + self._body = body + + @property + def attributes(self): + """Gets the attributes of this ConsumeDeadlettersMessageMessage. + + 属性的列表。 + + :return: The attributes of this ConsumeDeadlettersMessageMessage. + :rtype: object + """ + return self._attributes + + @attributes.setter + def attributes(self, attributes): + """Sets the attributes of this ConsumeDeadlettersMessageMessage. + + 属性的列表。 + + :param attributes: The attributes of this ConsumeDeadlettersMessageMessage. + :type: object + """ + self._attributes = attributes + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConsumeDeadlettersMessageMessage): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_deadletters_message_request.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_deadletters_message_request.py new file mode 100644 index 0000000000..768a1ec5ec --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_deadletters_message_request.py @@ -0,0 +1,206 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ConsumeDeadlettersMessageRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'queue_id': 'str', + 'consumer_group_id': 'str', + 'max_msgs': 'int', + 'time_wait': 'int', + 'ack_wait': 'int' + } + + attribute_map = { + 'queue_id': 'queue_id', + 'consumer_group_id': 'consumer_group_id', + 'max_msgs': 'max_msgs', + 'time_wait': 'time_wait', + 'ack_wait': 'ack_wait' + } + + def __init__(self, queue_id=None, consumer_group_id=None, max_msgs=None, time_wait=None, ack_wait=None): + """ConsumeDeadlettersMessageRequest - a model defined in huaweicloud sdk""" + + + + self._queue_id = None + self._consumer_group_id = None + self._max_msgs = None + self._time_wait = None + self._ack_wait = None + self.discriminator = None + + self.queue_id = queue_id + self.consumer_group_id = consumer_group_id + if max_msgs is not None: + self.max_msgs = max_msgs + if time_wait is not None: + self.time_wait = time_wait + if ack_wait is not None: + self.ack_wait = ack_wait + + @property + def queue_id(self): + """Gets the queue_id of this ConsumeDeadlettersMessageRequest. + + + :return: The queue_id of this ConsumeDeadlettersMessageRequest. + :rtype: str + """ + return self._queue_id + + @queue_id.setter + def queue_id(self, queue_id): + """Sets the queue_id of this ConsumeDeadlettersMessageRequest. + + + :param queue_id: The queue_id of this ConsumeDeadlettersMessageRequest. + :type: str + """ + self._queue_id = queue_id + + @property + def consumer_group_id(self): + """Gets the consumer_group_id of this ConsumeDeadlettersMessageRequest. + + + :return: The consumer_group_id of this ConsumeDeadlettersMessageRequest. + :rtype: str + """ + return self._consumer_group_id + + @consumer_group_id.setter + def consumer_group_id(self, consumer_group_id): + """Sets the consumer_group_id of this ConsumeDeadlettersMessageRequest. + + + :param consumer_group_id: The consumer_group_id of this ConsumeDeadlettersMessageRequest. + :type: str + """ + self._consumer_group_id = consumer_group_id + + @property + def max_msgs(self): + """Gets the max_msgs of this ConsumeDeadlettersMessageRequest. + + + :return: The max_msgs of this ConsumeDeadlettersMessageRequest. + :rtype: int + """ + return self._max_msgs + + @max_msgs.setter + def max_msgs(self, max_msgs): + """Sets the max_msgs of this ConsumeDeadlettersMessageRequest. + + + :param max_msgs: The max_msgs of this ConsumeDeadlettersMessageRequest. + :type: int + """ + self._max_msgs = max_msgs + + @property + def time_wait(self): + """Gets the time_wait of this ConsumeDeadlettersMessageRequest. + + + :return: The time_wait of this ConsumeDeadlettersMessageRequest. + :rtype: int + """ + return self._time_wait + + @time_wait.setter + def time_wait(self, time_wait): + """Sets the time_wait of this ConsumeDeadlettersMessageRequest. + + + :param time_wait: The time_wait of this ConsumeDeadlettersMessageRequest. + :type: int + """ + self._time_wait = time_wait + + @property + def ack_wait(self): + """Gets the ack_wait of this ConsumeDeadlettersMessageRequest. + + + :return: The ack_wait of this ConsumeDeadlettersMessageRequest. + :rtype: int + """ + return self._ack_wait + + @ack_wait.setter + def ack_wait(self, ack_wait): + """Sets the ack_wait of this ConsumeDeadlettersMessageRequest. + + + :param ack_wait: The ack_wait of this ConsumeDeadlettersMessageRequest. + :type: int + """ + self._ack_wait = ack_wait + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConsumeDeadlettersMessageRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_deadletters_message_response.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_deadletters_message_response.py new file mode 100644 index 0000000000..3ff8825a8b --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_deadletters_message_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ConsumeDeadlettersMessageResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'body': 'list[ConsumeDeadlettersMessage]' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): + """ConsumeDeadlettersMessageResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._body = None + self.discriminator = None + + if body is not None: + self.body = body + + @property + def body(self): + """Gets the body of this ConsumeDeadlettersMessageResponse. + + 消息数组。 + + :return: The body of this ConsumeDeadlettersMessageResponse. + :rtype: list[ConsumeDeadlettersMessage] + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ConsumeDeadlettersMessageResponse. + + 消息数组。 + + :param body: The body of this ConsumeDeadlettersMessageResponse. + :type: list[ConsumeDeadlettersMessage] + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConsumeDeadlettersMessageResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_message.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_message.py new file mode 100644 index 0000000000..8d3a07d772 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_message.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ConsumeMessage: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'message': 'ConsumeMessageMessage', + 'handler': 'str' + } + + attribute_map = { + 'message': 'message', + 'handler': 'handler' + } + + def __init__(self, message=None, handler=None): + """ConsumeMessage - a model defined in huaweicloud sdk""" + + + + self._message = None + self._handler = None + self.discriminator = None + + if message is not None: + self.message = message + if handler is not None: + self.handler = handler + + @property + def message(self): + """Gets the message of this ConsumeMessage. + + + :return: The message of this ConsumeMessage. + :rtype: ConsumeMessageMessage + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ConsumeMessage. + + + :param message: The message of this ConsumeMessage. + :type: ConsumeMessageMessage + """ + self._message = message + + @property + def handler(self): + """Gets the handler of this ConsumeMessage. + + 消息handler。 + + :return: The handler of this ConsumeMessage. + :rtype: str + """ + return self._handler + + @handler.setter + def handler(self, handler): + """Sets the handler of this ConsumeMessage. + + 消息handler。 + + :param handler: The handler of this ConsumeMessage. + :type: str + """ + self._handler = handler + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConsumeMessage): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_message_message.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_message_message.py new file mode 100644 index 0000000000..33c4ef3fe0 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_message_message.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ConsumeMessageMessage: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'body': 'object', + 'attributes': 'object', + 'tags': 'list[str]' + } + + attribute_map = { + 'body': 'body', + 'attributes': 'attributes', + 'tags': 'tags' + } + + def __init__(self, body=None, attributes=None, tags=None): + """ConsumeMessageMessage - a model defined in huaweicloud sdk""" + + + + self._body = None + self._attributes = None + self._tags = None + self.discriminator = None + + if body is not None: + self.body = body + if attributes is not None: + self.attributes = attributes + if tags is not None: + self.tags = tags + + @property + def body(self): + """Gets the body of this ConsumeMessageMessage. + + 消息体的内容。 + + :return: The body of this ConsumeMessageMessage. + :rtype: object + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ConsumeMessageMessage. + + 消息体的内容。 + + :param body: The body of this ConsumeMessageMessage. + :type: object + """ + self._body = body + + @property + def attributes(self): + """Gets the attributes of this ConsumeMessageMessage. + + 属性的列表。 + + :return: The attributes of this ConsumeMessageMessage. + :rtype: object + """ + return self._attributes + + @attributes.setter + def attributes(self, attributes): + """Sets the attributes of this ConsumeMessageMessage. + + 属性的列表。 + + :param attributes: The attributes of this ConsumeMessageMessage. + :type: object + """ + self._attributes = attributes + + @property + def tags(self): + """Gets the tags of this ConsumeMessageMessage. + + 标签值。 + + :return: The tags of this ConsumeMessageMessage. + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this ConsumeMessageMessage. + + 标签值。 + + :param tags: The tags of this ConsumeMessageMessage. + :type: list[str] + """ + self._tags = tags + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConsumeMessageMessage): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_messages_request.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_messages_request.py new file mode 100644 index 0000000000..08dfed412f --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_messages_request.py @@ -0,0 +1,256 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ConsumeMessagesRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'queue_id': 'str', + 'consumer_group_id': 'str', + 'max_msgs': 'int', + 'time_wait': 'int', + 'ack_wait': 'int', + 'tag': 'str', + 'tag_type': 'str' + } + + attribute_map = { + 'queue_id': 'queue_id', + 'consumer_group_id': 'consumer_group_id', + 'max_msgs': 'max_msgs', + 'time_wait': 'time_wait', + 'ack_wait': 'ack_wait', + 'tag': 'tag', + 'tag_type': 'tag_type' + } + + def __init__(self, queue_id=None, consumer_group_id=None, max_msgs=None, time_wait=None, ack_wait=None, tag=None, tag_type=None): + """ConsumeMessagesRequest - a model defined in huaweicloud sdk""" + + + + self._queue_id = None + self._consumer_group_id = None + self._max_msgs = None + self._time_wait = None + self._ack_wait = None + self._tag = None + self._tag_type = None + self.discriminator = None + + self.queue_id = queue_id + self.consumer_group_id = consumer_group_id + if max_msgs is not None: + self.max_msgs = max_msgs + if time_wait is not None: + self.time_wait = time_wait + if ack_wait is not None: + self.ack_wait = ack_wait + if tag is not None: + self.tag = tag + if tag_type is not None: + self.tag_type = tag_type + + @property + def queue_id(self): + """Gets the queue_id of this ConsumeMessagesRequest. + + + :return: The queue_id of this ConsumeMessagesRequest. + :rtype: str + """ + return self._queue_id + + @queue_id.setter + def queue_id(self, queue_id): + """Sets the queue_id of this ConsumeMessagesRequest. + + + :param queue_id: The queue_id of this ConsumeMessagesRequest. + :type: str + """ + self._queue_id = queue_id + + @property + def consumer_group_id(self): + """Gets the consumer_group_id of this ConsumeMessagesRequest. + + + :return: The consumer_group_id of this ConsumeMessagesRequest. + :rtype: str + """ + return self._consumer_group_id + + @consumer_group_id.setter + def consumer_group_id(self, consumer_group_id): + """Sets the consumer_group_id of this ConsumeMessagesRequest. + + + :param consumer_group_id: The consumer_group_id of this ConsumeMessagesRequest. + :type: str + """ + self._consumer_group_id = consumer_group_id + + @property + def max_msgs(self): + """Gets the max_msgs of this ConsumeMessagesRequest. + + + :return: The max_msgs of this ConsumeMessagesRequest. + :rtype: int + """ + return self._max_msgs + + @max_msgs.setter + def max_msgs(self, max_msgs): + """Sets the max_msgs of this ConsumeMessagesRequest. + + + :param max_msgs: The max_msgs of this ConsumeMessagesRequest. + :type: int + """ + self._max_msgs = max_msgs + + @property + def time_wait(self): + """Gets the time_wait of this ConsumeMessagesRequest. + + + :return: The time_wait of this ConsumeMessagesRequest. + :rtype: int + """ + return self._time_wait + + @time_wait.setter + def time_wait(self, time_wait): + """Sets the time_wait of this ConsumeMessagesRequest. + + + :param time_wait: The time_wait of this ConsumeMessagesRequest. + :type: int + """ + self._time_wait = time_wait + + @property + def ack_wait(self): + """Gets the ack_wait of this ConsumeMessagesRequest. + + + :return: The ack_wait of this ConsumeMessagesRequest. + :rtype: int + """ + return self._ack_wait + + @ack_wait.setter + def ack_wait(self, ack_wait): + """Sets the ack_wait of this ConsumeMessagesRequest. + + + :param ack_wait: The ack_wait of this ConsumeMessagesRequest. + :type: int + """ + self._ack_wait = ack_wait + + @property + def tag(self): + """Gets the tag of this ConsumeMessagesRequest. + + + :return: The tag of this ConsumeMessagesRequest. + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this ConsumeMessagesRequest. + + + :param tag: The tag of this ConsumeMessagesRequest. + :type: str + """ + self._tag = tag + + @property + def tag_type(self): + """Gets the tag_type of this ConsumeMessagesRequest. + + + :return: The tag_type of this ConsumeMessagesRequest. + :rtype: str + """ + return self._tag_type + + @tag_type.setter + def tag_type(self, tag_type): + """Sets the tag_type of this ConsumeMessagesRequest. + + + :param tag_type: The tag_type of this ConsumeMessagesRequest. + :type: str + """ + self._tag_type = tag_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConsumeMessagesRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_messages_response.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_messages_response.py new file mode 100644 index 0000000000..a5a6e35bd7 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/consume_messages_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ConsumeMessagesResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'body': 'list[ConsumeMessage]' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): + """ConsumeMessagesResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._body = None + self.discriminator = None + + if body is not None: + self.body = body + + @property + def body(self): + """Gets the body of this ConsumeMessagesResponse. + + 消息数组。 + + :return: The body of this ConsumeMessagesResponse. + :rtype: list[ConsumeMessage] + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ConsumeMessagesResponse. + + 消息数组。 + + :param body: The body of this ConsumeMessagesResponse. + :type: list[ConsumeMessage] + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConsumeMessagesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_consumer_group_req.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_consumer_group_req.py new file mode 100644 index 0000000000..e62e15de2a --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_consumer_group_req.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreateConsumerGroupReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'groups': 'list[GroupEntity]' + } + + attribute_map = { + 'groups': 'groups' + } + + def __init__(self, groups=None): + """CreateConsumerGroupReq - a model defined in huaweicloud sdk""" + + + + self._groups = None + self.discriminator = None + + self.groups = groups + + @property + def groups(self): + """Gets the groups of this CreateConsumerGroupReq. + + 消费组信息。 每个队列最多能创建3个消费组,如果请求中的消费组个数超过3个,请求校验不通过,无法创建消费组。 + + :return: The groups of this CreateConsumerGroupReq. + :rtype: list[GroupEntity] + """ + return self._groups + + @groups.setter + def groups(self, groups): + """Sets the groups of this CreateConsumerGroupReq. + + 消费组信息。 每个队列最多能创建3个消费组,如果请求中的消费组个数超过3个,请求校验不通过,无法创建消费组。 + + :param groups: The groups of this CreateConsumerGroupReq. + :type: list[GroupEntity] + """ + self._groups = groups + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateConsumerGroupReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_consumer_group_request.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_consumer_group_request.py new file mode 100644 index 0000000000..1f59b0a966 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_consumer_group_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreateConsumerGroupRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'queue_id': 'str', + 'body': 'CreateConsumerGroupReq' + } + + attribute_map = { + 'queue_id': 'queue_id', + 'body': 'body' + } + + def __init__(self, queue_id=None, body=None): + """CreateConsumerGroupRequest - a model defined in huaweicloud sdk""" + + + + self._queue_id = None + self._body = None + self.discriminator = None + + self.queue_id = queue_id + if body is not None: + self.body = body + + @property + def queue_id(self): + """Gets the queue_id of this CreateConsumerGroupRequest. + + + :return: The queue_id of this CreateConsumerGroupRequest. + :rtype: str + """ + return self._queue_id + + @queue_id.setter + def queue_id(self, queue_id): + """Sets the queue_id of this CreateConsumerGroupRequest. + + + :param queue_id: The queue_id of this CreateConsumerGroupRequest. + :type: str + """ + self._queue_id = queue_id + + @property + def body(self): + """Gets the body of this CreateConsumerGroupRequest. + + + :return: The body of this CreateConsumerGroupRequest. + :rtype: CreateConsumerGroupReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateConsumerGroupRequest. + + + :param body: The body of this CreateConsumerGroupRequest. + :type: CreateConsumerGroupReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateConsumerGroupRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_consumer_group_resp_groups.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_consumer_group_resp_groups.py new file mode 100644 index 0000000000..dd6d52bddc --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_consumer_group_resp_groups.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreateConsumerGroupRespGroups: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'id': 'str', + 'name': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name' + } + + def __init__(self, id=None, name=None): + """CreateConsumerGroupRespGroups - a model defined in huaweicloud sdk""" + + + + self._id = None + self._name = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + + @property + def id(self): + """Gets the id of this CreateConsumerGroupRespGroups. + + 消费组的ID。 + + :return: The id of this CreateConsumerGroupRespGroups. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CreateConsumerGroupRespGroups. + + 消费组的ID。 + + :param id: The id of this CreateConsumerGroupRespGroups. + :type: str + """ + self._id = id + + @property + def name(self): + """Gets the name of this CreateConsumerGroupRespGroups. + + 消费组的名称。 + + :return: The name of this CreateConsumerGroupRespGroups. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateConsumerGroupRespGroups. + + 消费组的名称。 + + :param name: The name of this CreateConsumerGroupRespGroups. + :type: str + """ + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateConsumerGroupRespGroups): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_consumer_group_response.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_consumer_group_response.py new file mode 100644 index 0000000000..2eb8ddad5c --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_consumer_group_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class CreateConsumerGroupResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'groups': 'list[CreateConsumerGroupRespGroups]' + } + + attribute_map = { + 'groups': 'groups' + } + + def __init__(self, groups=None): + """CreateConsumerGroupResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._groups = None + self.discriminator = None + + if groups is not None: + self.groups = groups + + @property + def groups(self): + """Gets the groups of this CreateConsumerGroupResponse. + + 消费组信息。 + + :return: The groups of this CreateConsumerGroupResponse. + :rtype: list[CreateConsumerGroupRespGroups] + """ + return self._groups + + @groups.setter + def groups(self, groups): + """Sets the groups of this CreateConsumerGroupResponse. + + 消费组信息。 + + :param groups: The groups of this CreateConsumerGroupResponse. + :type: list[CreateConsumerGroupRespGroups] + """ + self._groups = groups + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateConsumerGroupResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_queue_req.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_queue_req.py new file mode 100644 index 0000000000..412fe44c54 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_queue_req.py @@ -0,0 +1,244 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreateQueueReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'queue_mode': 'str', + 'description': 'str', + 'redrive_policy': 'str', + 'max_consume_count': 'int', + 'retention_hours': 'int' + } + + attribute_map = { + 'name': 'name', + 'queue_mode': 'queue_mode', + 'description': 'description', + 'redrive_policy': 'redrive_policy', + 'max_consume_count': 'max_consume_count', + 'retention_hours': 'retention_hours' + } + + def __init__(self, name=None, queue_mode=None, description=None, redrive_policy=None, max_consume_count=None, retention_hours=None): + """CreateQueueReq - a model defined in huaweicloud sdk""" + + + + self._name = None + self._queue_mode = None + self._description = None + self._redrive_policy = None + self._max_consume_count = None + self._retention_hours = None + self.discriminator = None + + self.name = name + if queue_mode is not None: + self.queue_mode = queue_mode + if description is not None: + self.description = description + if redrive_policy is not None: + self.redrive_policy = redrive_policy + if max_consume_count is not None: + self.max_consume_count = max_consume_count + if retention_hours is not None: + self.retention_hours = retention_hours + + @property + def name(self): + """Gets the name of this CreateQueueReq. + + 队列的名称,必须唯一。 长度不超过64位的字符串,包含a~z,A~Z,0~9、中划线(-)和下划线(_)。 创建队列后无法修改名称。 + + :return: The name of this CreateQueueReq. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateQueueReq. + + 队列的名称,必须唯一。 长度不超过64位的字符串,包含a~z,A~Z,0~9、中划线(-)和下划线(_)。 创建队列后无法修改名称。 + + :param name: The name of this CreateQueueReq. + :type: str + """ + self._name = name + + @property + def queue_mode(self): + """Gets the queue_mode of this CreateQueueReq. + + 队列类型。 取值范围: - NORMAL:普通队列,更高的并发性能,不保证先入先出(FIFO)的严格顺序。 - FIFO:有序队列,保证消息先入先出(FIFO)的严格顺序。 - KAFKA_HA:高可靠模式的kafka队列。消息多副本同步落盘,保证消息的可靠性。 - KAFKA_HT:高吞吐模式的kafka队列。消息副本异步落盘,具有较高的性能。 默认值:NORMAL + + :return: The queue_mode of this CreateQueueReq. + :rtype: str + """ + return self._queue_mode + + @queue_mode.setter + def queue_mode(self, queue_mode): + """Sets the queue_mode of this CreateQueueReq. + + 队列类型。 取值范围: - NORMAL:普通队列,更高的并发性能,不保证先入先出(FIFO)的严格顺序。 - FIFO:有序队列,保证消息先入先出(FIFO)的严格顺序。 - KAFKA_HA:高可靠模式的kafka队列。消息多副本同步落盘,保证消息的可靠性。 - KAFKA_HT:高吞吐模式的kafka队列。消息副本异步落盘,具有较高的性能。 默认值:NORMAL + + :param queue_mode: The queue_mode of this CreateQueueReq. + :type: str + """ + self._queue_mode = queue_mode + + @property + def description(self): + """Gets the description of this CreateQueueReq. + + 队列的描述信息。 长度不超过160位的字符串,不能包含尖括号<>。 + + :return: The description of this CreateQueueReq. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateQueueReq. + + 队列的描述信息。 长度不超过160位的字符串,不能包含尖括号<>。 + + :param description: The description of this CreateQueueReq. + :type: str + """ + self._description = description + + @property + def redrive_policy(self): + """Gets the redrive_policy of this CreateQueueReq. + + 仅当queue_mode为“NORMAL”或者“FIFO”时,该参数有效。 是否开启死信消息,死信消息是指无法被正常消费的消息。 当达到最大消费次数仍然失败后,DMS会将该条消息转存到死信队列中,有效期为72小时,用户可以根据需要对死信消息进行重新消费。 消费死信消息时,只能消费该消费组产生的死信消息。 有序队列的死信消息依然按照先入先出(FIFO)的顺序存储在死信队列中。 取值范围: - enable:开启 - disable:不开启 默认值:disable + + :return: The redrive_policy of this CreateQueueReq. + :rtype: str + """ + return self._redrive_policy + + @redrive_policy.setter + def redrive_policy(self, redrive_policy): + """Sets the redrive_policy of this CreateQueueReq. + + 仅当queue_mode为“NORMAL”或者“FIFO”时,该参数有效。 是否开启死信消息,死信消息是指无法被正常消费的消息。 当达到最大消费次数仍然失败后,DMS会将该条消息转存到死信队列中,有效期为72小时,用户可以根据需要对死信消息进行重新消费。 消费死信消息时,只能消费该消费组产生的死信消息。 有序队列的死信消息依然按照先入先出(FIFO)的顺序存储在死信队列中。 取值范围: - enable:开启 - disable:不开启 默认值:disable + + :param redrive_policy: The redrive_policy of this CreateQueueReq. + :type: str + """ + self._redrive_policy = redrive_policy + + @property + def max_consume_count(self): + """Gets the max_consume_count of this CreateQueueReq. + + 仅当redrive_policy为enable时,该参数必选。 最大确认消费失败的次数,当达到最大确认失败次数后,DMS会将该条消息转存到死信队列中。 取值范围:1~100 + + :return: The max_consume_count of this CreateQueueReq. + :rtype: int + """ + return self._max_consume_count + + @max_consume_count.setter + def max_consume_count(self, max_consume_count): + """Sets the max_consume_count of this CreateQueueReq. + + 仅当redrive_policy为enable时,该参数必选。 最大确认消费失败的次数,当达到最大确认失败次数后,DMS会将该条消息转存到死信队列中。 取值范围:1~100 + + :param max_consume_count: The max_consume_count of this CreateQueueReq. + :type: int + """ + self._max_consume_count = max_consume_count + + @property + def retention_hours(self): + """Gets the retention_hours of this CreateQueueReq. + + 指定kafka队列的消息保存时间,单位为小时。 仅当queue_mode为KAFKA_HA或者KAFKA_HT才有效。 取值范围: 1-72(小时) + + :return: The retention_hours of this CreateQueueReq. + :rtype: int + """ + return self._retention_hours + + @retention_hours.setter + def retention_hours(self, retention_hours): + """Sets the retention_hours of this CreateQueueReq. + + 指定kafka队列的消息保存时间,单位为小时。 仅当queue_mode为KAFKA_HA或者KAFKA_HT才有效。 取值范围: 1-72(小时) + + :param retention_hours: The retention_hours of this CreateQueueReq. + :type: int + """ + self._retention_hours = retention_hours + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateQueueReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_queue_request.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_queue_request.py new file mode 100644 index 0000000000..4250f02404 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_queue_request.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreateQueueRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'body': 'CreateQueueReq' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): + """CreateQueueRequest - a model defined in huaweicloud sdk""" + + + + self._body = None + self.discriminator = None + + if body is not None: + self.body = body + + @property + def body(self): + """Gets the body of this CreateQueueRequest. + + + :return: The body of this CreateQueueRequest. + :rtype: CreateQueueReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateQueueRequest. + + + :param body: The body of this CreateQueueRequest. + :type: CreateQueueReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateQueueRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_queue_response.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_queue_response.py new file mode 100644 index 0000000000..8d100f0785 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/create_queue_response.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class CreateQueueResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'id': 'str', + 'name': 'str', + 'kafka_topic': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'kafka_topic': 'kafka_topic' + } + + def __init__(self, id=None, name=None, kafka_topic=None): + """CreateQueueResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._id = None + self._name = None + self._kafka_topic = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if kafka_topic is not None: + self.kafka_topic = kafka_topic + + @property + def id(self): + """Gets the id of this CreateQueueResponse. + + 队列ID。 + + :return: The id of this CreateQueueResponse. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CreateQueueResponse. + + 队列ID。 + + :param id: The id of this CreateQueueResponse. + :type: str + """ + self._id = id + + @property + def name(self): + """Gets the name of this CreateQueueResponse. + + 队列的名称。 + + :return: The name of this CreateQueueResponse. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateQueueResponse. + + 队列的名称。 + + :param name: The name of this CreateQueueResponse. + :type: str + """ + self._name = name + + @property + def kafka_topic(self): + """Gets the kafka_topic of this CreateQueueResponse. + + 仅Kafka队列才有该响应参数。 使用Kafka SDK时的Kafka topic的ID。 + + :return: The kafka_topic of this CreateQueueResponse. + :rtype: str + """ + return self._kafka_topic + + @kafka_topic.setter + def kafka_topic(self, kafka_topic): + """Sets the kafka_topic of this CreateQueueResponse. + + 仅Kafka队列才有该响应参数。 使用Kafka SDK时的Kafka topic的ID。 + + :param kafka_topic: The kafka_topic of this CreateQueueResponse. + :type: str + """ + self._kafka_topic = kafka_topic + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateQueueResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/delete_queue_request.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/delete_queue_request.py new file mode 100644 index 0000000000..9dae610cb9 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/delete_queue_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class DeleteQueueRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'queue_id': 'str' + } + + attribute_map = { + 'queue_id': 'queue_id' + } + + def __init__(self, queue_id=None): + """DeleteQueueRequest - a model defined in huaweicloud sdk""" + + + + self._queue_id = None + self.discriminator = None + + self.queue_id = queue_id + + @property + def queue_id(self): + """Gets the queue_id of this DeleteQueueRequest. + + + :return: The queue_id of this DeleteQueueRequest. + :rtype: str + """ + return self._queue_id + + @queue_id.setter + def queue_id(self, queue_id): + """Sets the queue_id of this DeleteQueueRequest. + + + :param queue_id: The queue_id of this DeleteQueueRequest. + :type: str + """ + self._queue_id = queue_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteQueueRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/delete_queue_response.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/delete_queue_response.py new file mode 100644 index 0000000000..84cd7afc57 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/delete_queue_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class DeleteQueueResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """DeleteQueueResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteQueueResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/delete_specified_consumer_group_request.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/delete_specified_consumer_group_request.py new file mode 100644 index 0000000000..5f34ea43fe --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/delete_specified_consumer_group_request.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class DeleteSpecifiedConsumerGroupRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'queue_id': 'str', + 'group_id': 'str' + } + + attribute_map = { + 'queue_id': 'queue_id', + 'group_id': 'group_id' + } + + def __init__(self, queue_id=None, group_id=None): + """DeleteSpecifiedConsumerGroupRequest - a model defined in huaweicloud sdk""" + + + + self._queue_id = None + self._group_id = None + self.discriminator = None + + self.queue_id = queue_id + self.group_id = group_id + + @property + def queue_id(self): + """Gets the queue_id of this DeleteSpecifiedConsumerGroupRequest. + + + :return: The queue_id of this DeleteSpecifiedConsumerGroupRequest. + :rtype: str + """ + return self._queue_id + + @queue_id.setter + def queue_id(self, queue_id): + """Sets the queue_id of this DeleteSpecifiedConsumerGroupRequest. + + + :param queue_id: The queue_id of this DeleteSpecifiedConsumerGroupRequest. + :type: str + """ + self._queue_id = queue_id + + @property + def group_id(self): + """Gets the group_id of this DeleteSpecifiedConsumerGroupRequest. + + + :return: The group_id of this DeleteSpecifiedConsumerGroupRequest. + :rtype: str + """ + return self._group_id + + @group_id.setter + def group_id(self, group_id): + """Sets the group_id of this DeleteSpecifiedConsumerGroupRequest. + + + :param group_id: The group_id of this DeleteSpecifiedConsumerGroupRequest. + :type: str + """ + self._group_id = group_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteSpecifiedConsumerGroupRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/delete_specified_consumer_group_response.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/delete_specified_consumer_group_response.py new file mode 100644 index 0000000000..2516e60983 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/delete_specified_consumer_group_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class DeleteSpecifiedConsumerGroupResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """DeleteSpecifiedConsumerGroupResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteSpecifiedConsumerGroupResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/group_entity.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/group_entity.py new file mode 100644 index 0000000000..62b1ef9694 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/group_entity.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class GroupEntity: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str' + } + + attribute_map = { + 'name': 'name' + } + + def __init__(self, name=None): + """GroupEntity - a model defined in huaweicloud sdk""" + + + + self._name = None + self.discriminator = None + + self.name = name + + @property + def name(self): + """Gets the name of this GroupEntity. + + 消费组的名称。 长度不超过32位的字符串,仅包含a~z,A~Z,0~9、下划线(_)和中划线(-)。 + + :return: The name of this GroupEntity. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this GroupEntity. + + 消费组的名称。 长度不超过32位的字符串,仅包含a~z,A~Z,0~9、下划线(_)和中划线(-)。 + + :param name: The name of this GroupEntity. + :type: str + """ + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GroupEntity): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_consumer_groups_request.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_consumer_groups_request.py new file mode 100644 index 0000000000..316a3cd030 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_consumer_groups_request.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListConsumerGroupsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'queue_id': 'str', + 'include_deadletter': 'bool', + 'include_messages_num': 'bool', + 'page_size': 'int', + 'current_page': 'int' + } + + attribute_map = { + 'queue_id': 'queue_id', + 'include_deadletter': 'include_deadletter', + 'include_messages_num': 'include_messages_num', + 'page_size': 'page_size', + 'current_page': 'current_page' + } + + def __init__(self, queue_id=None, include_deadletter=None, include_messages_num=None, page_size=None, current_page=None): + """ListConsumerGroupsRequest - a model defined in huaweicloud sdk""" + + + + self._queue_id = None + self._include_deadletter = None + self._include_messages_num = None + self._page_size = None + self._current_page = None + self.discriminator = None + + self.queue_id = queue_id + if include_deadletter is not None: + self.include_deadletter = include_deadletter + if include_messages_num is not None: + self.include_messages_num = include_messages_num + if page_size is not None: + self.page_size = page_size + if current_page is not None: + self.current_page = current_page + + @property + def queue_id(self): + """Gets the queue_id of this ListConsumerGroupsRequest. + + + :return: The queue_id of this ListConsumerGroupsRequest. + :rtype: str + """ + return self._queue_id + + @queue_id.setter + def queue_id(self, queue_id): + """Sets the queue_id of this ListConsumerGroupsRequest. + + + :param queue_id: The queue_id of this ListConsumerGroupsRequest. + :type: str + """ + self._queue_id = queue_id + + @property + def include_deadletter(self): + """Gets the include_deadletter of this ListConsumerGroupsRequest. + + + :return: The include_deadletter of this ListConsumerGroupsRequest. + :rtype: bool + """ + return self._include_deadletter + + @include_deadletter.setter + def include_deadletter(self, include_deadletter): + """Sets the include_deadletter of this ListConsumerGroupsRequest. + + + :param include_deadletter: The include_deadletter of this ListConsumerGroupsRequest. + :type: bool + """ + self._include_deadletter = include_deadletter + + @property + def include_messages_num(self): + """Gets the include_messages_num of this ListConsumerGroupsRequest. + + + :return: The include_messages_num of this ListConsumerGroupsRequest. + :rtype: bool + """ + return self._include_messages_num + + @include_messages_num.setter + def include_messages_num(self, include_messages_num): + """Sets the include_messages_num of this ListConsumerGroupsRequest. + + + :param include_messages_num: The include_messages_num of this ListConsumerGroupsRequest. + :type: bool + """ + self._include_messages_num = include_messages_num + + @property + def page_size(self): + """Gets the page_size of this ListConsumerGroupsRequest. + + + :return: The page_size of this ListConsumerGroupsRequest. + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this ListConsumerGroupsRequest. + + + :param page_size: The page_size of this ListConsumerGroupsRequest. + :type: int + """ + self._page_size = page_size + + @property + def current_page(self): + """Gets the current_page of this ListConsumerGroupsRequest. + + + :return: The current_page of this ListConsumerGroupsRequest. + :rtype: int + """ + return self._current_page + + @current_page.setter + def current_page(self, current_page): + """Sets the current_page of this ListConsumerGroupsRequest. + + + :param current_page: The current_page of this ListConsumerGroupsRequest. + :type: int + """ + self._current_page = current_page + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListConsumerGroupsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_consumer_groups_response.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_consumer_groups_response.py new file mode 100644 index 0000000000..0a692f1807 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_consumer_groups_response.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ListConsumerGroupsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'queue_id': 'str', + 'queue_name': 'str', + 'groups': 'list[ListQueueGroupsRespGroups]', + 'redrive_policy': 'str' + } + + attribute_map = { + 'queue_id': 'queue_id', + 'queue_name': 'queue_name', + 'groups': 'groups', + 'redrive_policy': 'redrive_policy' + } + + def __init__(self, queue_id=None, queue_name=None, groups=None, redrive_policy=None): + """ListConsumerGroupsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._queue_id = None + self._queue_name = None + self._groups = None + self._redrive_policy = None + self.discriminator = None + + if queue_id is not None: + self.queue_id = queue_id + if queue_name is not None: + self.queue_name = queue_name + if groups is not None: + self.groups = groups + if redrive_policy is not None: + self.redrive_policy = redrive_policy + + @property + def queue_id(self): + """Gets the queue_id of this ListConsumerGroupsResponse. + + 队列ID。 + + :return: The queue_id of this ListConsumerGroupsResponse. + :rtype: str + """ + return self._queue_id + + @queue_id.setter + def queue_id(self, queue_id): + """Sets the queue_id of this ListConsumerGroupsResponse. + + 队列ID。 + + :param queue_id: The queue_id of this ListConsumerGroupsResponse. + :type: str + """ + self._queue_id = queue_id + + @property + def queue_name(self): + """Gets the queue_name of this ListConsumerGroupsResponse. + + 队列的名称。 + + :return: The queue_name of this ListConsumerGroupsResponse. + :rtype: str + """ + return self._queue_name + + @queue_name.setter + def queue_name(self, queue_name): + """Sets the queue_name of this ListConsumerGroupsResponse. + + 队列的名称。 + + :param queue_name: The queue_name of this ListConsumerGroupsResponse. + :type: str + """ + self._queue_name = queue_name + + @property + def groups(self): + """Gets the groups of this ListConsumerGroupsResponse. + + 消费组列表。 + + :return: The groups of this ListConsumerGroupsResponse. + :rtype: list[ListQueueGroupsRespGroups] + """ + return self._groups + + @groups.setter + def groups(self, groups): + """Sets the groups of this ListConsumerGroupsResponse. + + 消费组列表。 + + :param groups: The groups of this ListConsumerGroupsResponse. + :type: list[ListQueueGroupsRespGroups] + """ + self._groups = groups + + @property + def redrive_policy(self): + """Gets the redrive_policy of this ListConsumerGroupsResponse. + + 该队列是否开启死信消息。仅当include_deadletter为true时,才有该响应参数。 - enable:表示开启。 - disable:表示不开启。 + + :return: The redrive_policy of this ListConsumerGroupsResponse. + :rtype: str + """ + return self._redrive_policy + + @redrive_policy.setter + def redrive_policy(self, redrive_policy): + """Sets the redrive_policy of this ListConsumerGroupsResponse. + + 该队列是否开启死信消息。仅当include_deadletter为true时,才有该响应参数。 - enable:表示开启。 - disable:表示不开启。 + + :param redrive_policy: The redrive_policy of this ListConsumerGroupsResponse. + :type: str + """ + self._redrive_policy = redrive_policy + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListConsumerGroupsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_queue_groups_resp_groups.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_queue_groups_resp_groups.py new file mode 100644 index 0000000000..9144266119 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_queue_groups_resp_groups.py @@ -0,0 +1,272 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListQueueGroupsRespGroups: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'id': 'str', + 'name': 'str', + 'produced_messages': 'int', + 'consumed_messages': 'int', + 'available_messages': 'int', + 'produced_deadletters': 'int', + 'available_deadletters': 'int' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'produced_messages': 'produced_messages', + 'consumed_messages': 'consumed_messages', + 'available_messages': 'available_messages', + 'produced_deadletters': 'produced_deadletters', + 'available_deadletters': 'available_deadletters' + } + + def __init__(self, id=None, name=None, produced_messages=None, consumed_messages=None, available_messages=None, produced_deadletters=None, available_deadletters=None): + """ListQueueGroupsRespGroups - a model defined in huaweicloud sdk""" + + + + self._id = None + self._name = None + self._produced_messages = None + self._consumed_messages = None + self._available_messages = None + self._produced_deadletters = None + self._available_deadletters = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if produced_messages is not None: + self.produced_messages = produced_messages + if consumed_messages is not None: + self.consumed_messages = consumed_messages + if available_messages is not None: + self.available_messages = available_messages + if produced_deadletters is not None: + self.produced_deadletters = produced_deadletters + if available_deadletters is not None: + self.available_deadletters = available_deadletters + + @property + def id(self): + """Gets the id of this ListQueueGroupsRespGroups. + + 队列的名称。 + + :return: The id of this ListQueueGroupsRespGroups. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ListQueueGroupsRespGroups. + + 队列的名称。 + + :param id: The id of this ListQueueGroupsRespGroups. + :type: str + """ + self._id = id + + @property + def name(self): + """Gets the name of this ListQueueGroupsRespGroups. + + 队列的名称。 + + :return: The name of this ListQueueGroupsRespGroups. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListQueueGroupsRespGroups. + + 队列的名称。 + + :param name: The name of this ListQueueGroupsRespGroups. + :type: str + """ + self._name = name + + @property + def produced_messages(self): + """Gets the produced_messages of this ListQueueGroupsRespGroups. + + 队列的消息总数,不包含过期删除的消息数。 + + :return: The produced_messages of this ListQueueGroupsRespGroups. + :rtype: int + """ + return self._produced_messages + + @produced_messages.setter + def produced_messages(self, produced_messages): + """Sets the produced_messages of this ListQueueGroupsRespGroups. + + 队列的消息总数,不包含过期删除的消息数。 + + :param produced_messages: The produced_messages of this ListQueueGroupsRespGroups. + :type: int + """ + self._produced_messages = produced_messages + + @property + def consumed_messages(self): + """Gets the consumed_messages of this ListQueueGroupsRespGroups. + + 已正常消费的消息总数。 + + :return: The consumed_messages of this ListQueueGroupsRespGroups. + :rtype: int + """ + return self._consumed_messages + + @consumed_messages.setter + def consumed_messages(self, consumed_messages): + """Sets the consumed_messages of this ListQueueGroupsRespGroups. + + 已正常消费的消息总数。 + + :param consumed_messages: The consumed_messages of this ListQueueGroupsRespGroups. + :type: int + """ + self._consumed_messages = consumed_messages + + @property + def available_messages(self): + """Gets the available_messages of this ListQueueGroupsRespGroups. + + 该消费组可以消费的普通消息数。 + + :return: The available_messages of this ListQueueGroupsRespGroups. + :rtype: int + """ + return self._available_messages + + @available_messages.setter + def available_messages(self, available_messages): + """Sets the available_messages of this ListQueueGroupsRespGroups. + + 该消费组可以消费的普通消息数。 + + :param available_messages: The available_messages of this ListQueueGroupsRespGroups. + :type: int + """ + self._available_messages = available_messages + + @property + def produced_deadletters(self): + """Gets the produced_deadletters of this ListQueueGroupsRespGroups. + + 该消费组产生的死信息消息总数。仅当include_deadletter为true时,才有该响应参数。 + + :return: The produced_deadletters of this ListQueueGroupsRespGroups. + :rtype: int + """ + return self._produced_deadletters + + @produced_deadletters.setter + def produced_deadletters(self, produced_deadletters): + """Sets the produced_deadletters of this ListQueueGroupsRespGroups. + + 该消费组产生的死信息消息总数。仅当include_deadletter为true时,才有该响应参数。 + + :param produced_deadletters: The produced_deadletters of this ListQueueGroupsRespGroups. + :type: int + """ + self._produced_deadletters = produced_deadletters + + @property + def available_deadletters(self): + """Gets the available_deadletters of this ListQueueGroupsRespGroups. + + 该消费组未消费的死信消息数。仅当include_deadletter为true时,才有该响应参数。 + + :return: The available_deadletters of this ListQueueGroupsRespGroups. + :rtype: int + """ + return self._available_deadletters + + @available_deadletters.setter + def available_deadletters(self, available_deadletters): + """Sets the available_deadletters of this ListQueueGroupsRespGroups. + + 该消费组未消费的死信消息数。仅当include_deadletter为true时,才有该响应参数。 + + :param available_deadletters: The available_deadletters of this ListQueueGroupsRespGroups. + :type: int + """ + self._available_deadletters = available_deadletters + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListQueueGroupsRespGroups): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_queues_request.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_queues_request.py new file mode 100644 index 0000000000..4b56213539 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_queues_request.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListQueuesRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'include_deadletter': 'bool' + } + + attribute_map = { + 'include_deadletter': 'include_deadletter' + } + + def __init__(self, include_deadletter=None): + """ListQueuesRequest - a model defined in huaweicloud sdk""" + + + + self._include_deadletter = None + self.discriminator = None + + if include_deadletter is not None: + self.include_deadletter = include_deadletter + + @property + def include_deadletter(self): + """Gets the include_deadletter of this ListQueuesRequest. + + + :return: The include_deadletter of this ListQueuesRequest. + :rtype: bool + """ + return self._include_deadletter + + @include_deadletter.setter + def include_deadletter(self, include_deadletter): + """Sets the include_deadletter of this ListQueuesRequest. + + + :param include_deadletter: The include_deadletter of this ListQueuesRequest. + :type: bool + """ + self._include_deadletter = include_deadletter + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListQueuesRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_queues_resp_queues.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_queues_resp_queues.py new file mode 100644 index 0000000000..90d21f9e62 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_queues_resp_queues.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListQueuesRespQueues: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'id': 'str', + 'name': 'str', + 'created': 'str', + 'description': 'str', + 'queue_mode': 'str', + 'reservation': 'int', + 'max_msg_size_byte': 'int', + 'produced_messages': 'int', + 'redrive_policy': 'str', + 'max_consume_count': 'int', + 'group_count': 'int', + 'eff_date': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'created': 'created', + 'description': 'description', + 'queue_mode': 'queue_mode', + 'reservation': 'reservation', + 'max_msg_size_byte': 'max_msg_size_byte', + 'produced_messages': 'produced_messages', + 'redrive_policy': 'redrive_policy', + 'max_consume_count': 'max_consume_count', + 'group_count': 'group_count', + 'eff_date': 'eff_date' + } + + def __init__(self, id=None, name=None, created=None, description=None, queue_mode=None, reservation=None, max_msg_size_byte=None, produced_messages=None, redrive_policy=None, max_consume_count=None, group_count=None, eff_date=None): + """ListQueuesRespQueues - a model defined in huaweicloud sdk""" + + + + self._id = None + self._name = None + self._created = None + self._description = None + self._queue_mode = None + self._reservation = None + self._max_msg_size_byte = None + self._produced_messages = None + self._redrive_policy = None + self._max_consume_count = None + self._group_count = None + self._eff_date = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if created is not None: + self.created = created + if description is not None: + self.description = description + if queue_mode is not None: + self.queue_mode = queue_mode + if reservation is not None: + self.reservation = reservation + if max_msg_size_byte is not None: + self.max_msg_size_byte = max_msg_size_byte + if produced_messages is not None: + self.produced_messages = produced_messages + if redrive_policy is not None: + self.redrive_policy = redrive_policy + if max_consume_count is not None: + self.max_consume_count = max_consume_count + if group_count is not None: + self.group_count = group_count + if eff_date is not None: + self.eff_date = eff_date + + @property + def id(self): + """Gets the id of this ListQueuesRespQueues. + + 队列ID。 + + :return: The id of this ListQueuesRespQueues. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ListQueuesRespQueues. + + 队列ID。 + + :param id: The id of this ListQueuesRespQueues. + :type: str + """ + self._id = id + + @property + def name(self): + """Gets the name of this ListQueuesRespQueues. + + 队列的名称。 + + :return: The name of this ListQueuesRespQueues. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListQueuesRespQueues. + + 队列的名称。 + + :param name: The name of this ListQueuesRespQueues. + :type: str + """ + self._name = name + + @property + def created(self): + """Gets the created of this ListQueuesRespQueues. + + 创建队列的时间。 + + :return: The created of this ListQueuesRespQueues. + :rtype: str + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this ListQueuesRespQueues. + + 创建队列的时间。 + + :param created: The created of this ListQueuesRespQueues. + :type: str + """ + self._created = created + + @property + def description(self): + """Gets the description of this ListQueuesRespQueues. + + 队列的描述信息。 + + :return: The description of this ListQueuesRespQueues. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this ListQueuesRespQueues. + + 队列的描述信息。 + + :param description: The description of this ListQueuesRespQueues. + :type: str + """ + self._description = description + + @property + def queue_mode(self): + """Gets the queue_mode of this ListQueuesRespQueues. + + 队列类型。 + + :return: The queue_mode of this ListQueuesRespQueues. + :rtype: str + """ + return self._queue_mode + + @queue_mode.setter + def queue_mode(self, queue_mode): + """Sets the queue_mode of this ListQueuesRespQueues. + + 队列类型。 + + :param queue_mode: The queue_mode of this ListQueuesRespQueues. + :type: str + """ + self._queue_mode = queue_mode + + @property + def reservation(self): + """Gets the reservation of this ListQueuesRespQueues. + + 消息在队列中允许保留的时长(单位分钟)。 + + :return: The reservation of this ListQueuesRespQueues. + :rtype: int + """ + return self._reservation + + @reservation.setter + def reservation(self, reservation): + """Sets the reservation of this ListQueuesRespQueues. + + 消息在队列中允许保留的时长(单位分钟)。 + + :param reservation: The reservation of this ListQueuesRespQueues. + :type: int + """ + self._reservation = reservation + + @property + def max_msg_size_byte(self): + """Gets the max_msg_size_byte of this ListQueuesRespQueues. + + 队列中允许的最大消息大小(单位Byte)。 + + :return: The max_msg_size_byte of this ListQueuesRespQueues. + :rtype: int + """ + return self._max_msg_size_byte + + @max_msg_size_byte.setter + def max_msg_size_byte(self, max_msg_size_byte): + """Sets the max_msg_size_byte of this ListQueuesRespQueues. + + 队列中允许的最大消息大小(单位Byte)。 + + :param max_msg_size_byte: The max_msg_size_byte of this ListQueuesRespQueues. + :type: int + """ + self._max_msg_size_byte = max_msg_size_byte + + @property + def produced_messages(self): + """Gets the produced_messages of this ListQueuesRespQueues. + + 队列的消息总数。 + + :return: The produced_messages of this ListQueuesRespQueues. + :rtype: int + """ + return self._produced_messages + + @produced_messages.setter + def produced_messages(self, produced_messages): + """Sets the produced_messages of this ListQueuesRespQueues. + + 队列的消息总数。 + + :param produced_messages: The produced_messages of this ListQueuesRespQueues. + :type: int + """ + self._produced_messages = produced_messages + + @property + def redrive_policy(self): + """Gets the redrive_policy of this ListQueuesRespQueues. + + 该队列是否开启死信消息。仅当include_deadletter为true时,才有该响应参数。 - enable:表示开启。 - disable:表示不开启。 + + :return: The redrive_policy of this ListQueuesRespQueues. + :rtype: str + """ + return self._redrive_policy + + @redrive_policy.setter + def redrive_policy(self, redrive_policy): + """Sets the redrive_policy of this ListQueuesRespQueues. + + 该队列是否开启死信消息。仅当include_deadletter为true时,才有该响应参数。 - enable:表示开启。 - disable:表示不开启。 + + :param redrive_policy: The redrive_policy of this ListQueuesRespQueues. + :type: str + """ + self._redrive_policy = redrive_policy + + @property + def max_consume_count(self): + """Gets the max_consume_count of this ListQueuesRespQueues. + + 最大确认消费失败的次数,当达到最大确认失败次数后,DMS会将该条消息转存到死信队列中。 仅当include_deadletter为true时,才有该响应参数。 + + :return: The max_consume_count of this ListQueuesRespQueues. + :rtype: int + """ + return self._max_consume_count + + @max_consume_count.setter + def max_consume_count(self, max_consume_count): + """Sets the max_consume_count of this ListQueuesRespQueues. + + 最大确认消费失败的次数,当达到最大确认失败次数后,DMS会将该条消息转存到死信队列中。 仅当include_deadletter为true时,才有该响应参数。 + + :param max_consume_count: The max_consume_count of this ListQueuesRespQueues. + :type: int + """ + self._max_consume_count = max_consume_count + + @property + def group_count(self): + """Gets the group_count of this ListQueuesRespQueues. + + 该队列下的消费组数量。 + + :return: The group_count of this ListQueuesRespQueues. + :rtype: int + """ + return self._group_count + + @group_count.setter + def group_count(self, group_count): + """Sets the group_count of this ListQueuesRespQueues. + + 该队列下的消费组数量。 + + :param group_count: The group_count of this ListQueuesRespQueues. + :type: int + """ + self._group_count = group_count + + @property + def eff_date(self): + """Gets the eff_date of this ListQueuesRespQueues. + + 创建队列的时间。 + + :return: The eff_date of this ListQueuesRespQueues. + :rtype: str + """ + return self._eff_date + + @eff_date.setter + def eff_date(self, eff_date): + """Sets the eff_date of this ListQueuesRespQueues. + + 创建队列的时间。 + + :param eff_date: The eff_date of this ListQueuesRespQueues. + :type: str + """ + self._eff_date = eff_date + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListQueuesRespQueues): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_queues_response.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_queues_response.py new file mode 100644 index 0000000000..22755166b3 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/list_queues_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ListQueuesResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'total': 'int', + 'queues': 'list[ListQueuesRespQueues]' + } + + attribute_map = { + 'total': 'total', + 'queues': 'queues' + } + + def __init__(self, total=None, queues=None): + """ListQueuesResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._total = None + self._queues = None + self.discriminator = None + + if total is not None: + self.total = total + if queues is not None: + self.queues = queues + + @property + def total(self): + """Gets the total of this ListQueuesResponse. + + 该租户的所有队列总数。 + + :return: The total of this ListQueuesResponse. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this ListQueuesResponse. + + 该租户的所有队列总数。 + + :param total: The total of this ListQueuesResponse. + :type: int + """ + self._total = total + + @property + def queues(self): + """Gets the queues of this ListQueuesResponse. + + 该租户的所有队列数组。 + + :return: The queues of this ListQueuesResponse. + :rtype: list[ListQueuesRespQueues] + """ + return self._queues + + @queues.setter + def queues(self, queues): + """Sets the queues of this ListQueuesResponse. + + 该租户的所有队列数组。 + + :param queues: The queues of this ListQueuesResponse. + :type: list[ListQueuesRespQueues] + """ + self._queues = queues + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListQueuesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/send_message_entity.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/send_message_entity.py new file mode 100644 index 0000000000..cd3d6c8750 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/send_message_entity.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class SendMessageEntity: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'body': 'object', + 'attributes': 'object', + 'tags': 'object', + 'delay_time': 'object' + } + + attribute_map = { + 'body': 'body', + 'attributes': 'attributes', + 'tags': 'tags', + 'delay_time': 'delay_time' + } + + def __init__(self, body=None, attributes=None, tags=None, delay_time=None): + """SendMessageEntity - a model defined in huaweicloud sdk""" + + + + self._body = None + self._attributes = None + self._tags = None + self._delay_time = None + self.discriminator = None + + self.body = body + if attributes is not None: + self.attributes = attributes + if tags is not None: + self.tags = tags + if delay_time is not None: + self.delay_time = delay_time + + @property + def body(self): + """Gets the body of this SendMessageEntity. + + 消息正文。 + + :return: The body of this SendMessageEntity. + :rtype: object + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this SendMessageEntity. + + 消息正文。 + + :param body: The body of this SendMessageEntity. + :type: object + """ + self._body = body + + @property + def attributes(self): + """Gets the attributes of this SendMessageEntity. + + 属性列表,包含属性名称和属性值。 同一条消息的属性名称不可重复,否则属性值将被覆盖。 + + :return: The attributes of this SendMessageEntity. + :rtype: object + """ + return self._attributes + + @attributes.setter + def attributes(self, attributes): + """Sets the attributes of this SendMessageEntity. + + 属性列表,包含属性名称和属性值。 同一条消息的属性名称不可重复,否则属性值将被覆盖。 + + :param attributes: The attributes of this SendMessageEntity. + :type: object + """ + self._attributes = attributes + + @property + def tags(self): + """Gets the tags of this SendMessageEntity. + + 消息标签,即Label,是通过对消息增加Label来区分队列中的消息分类,DMS允许消费者按照Label对消息进行过滤,确保消费者最终只消费到他关心的消息类型。 消息标签只能包含a~z,A~Z,0-9,-,_,长度是[1,64]。 最多可添加3个标签。 + + :return: The tags of this SendMessageEntity. + :rtype: object + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this SendMessageEntity. + + 消息标签,即Label,是通过对消息增加Label来区分队列中的消息分类,DMS允许消费者按照Label对消息进行过滤,确保消费者最终只消费到他关心的消息类型。 消息标签只能包含a~z,A~Z,0-9,-,_,长度是[1,64]。 最多可添加3个标签。 + + :param tags: The tags of this SendMessageEntity. + :type: object + """ + self._tags = tags + + @property + def delay_time(self): + """Gets the delay_time of this SendMessageEntity. + + 延时消息的延时时长。 延时消息是指消息发送到DMS服务后,并不期望这条消息立即被消费,而是延迟一段时间后才能被消费。 取值范围:0~604800000 单位:毫秒 不配置该参数或者配置为0,表示无延时。 配置为浮点数时,自动取小数点前面的整数值,比如配置为6000.9,则自动取值为6000。 仅NORMAL队列和FIFO队列可以设置延时消息,Kafka队列不支持延时消息的功能,如果向Kafka队列生产延时消息,提示{\"code\":10540010, \"message\":\"Invalid request format: kafka queue message could not have delayTime.\"}。 + + :return: The delay_time of this SendMessageEntity. + :rtype: object + """ + return self._delay_time + + @delay_time.setter + def delay_time(self, delay_time): + """Sets the delay_time of this SendMessageEntity. + + 延时消息的延时时长。 延时消息是指消息发送到DMS服务后,并不期望这条消息立即被消费,而是延迟一段时间后才能被消费。 取值范围:0~604800000 单位:毫秒 不配置该参数或者配置为0,表示无延时。 配置为浮点数时,自动取小数点前面的整数值,比如配置为6000.9,则自动取值为6000。 仅NORMAL队列和FIFO队列可以设置延时消息,Kafka队列不支持延时消息的功能,如果向Kafka队列生产延时消息,提示{\"code\":10540010, \"message\":\"Invalid request format: kafka queue message could not have delayTime.\"}。 + + :param delay_time: The delay_time of this SendMessageEntity. + :type: object + """ + self._delay_time = delay_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SendMessageEntity): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/send_messages_req.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/send_messages_req.py new file mode 100644 index 0000000000..0faf382f85 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/send_messages_req.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class SendMessagesReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'return_id': 'bool', + 'messages': 'list[SendMessageEntity]' + } + + attribute_map = { + 'return_id': 'return_id', + 'messages': 'messages' + } + + def __init__(self, return_id=None, messages=None): + """SendMessagesReq - a model defined in huaweicloud sdk""" + + + + self._return_id = None + self._messages = None + self.discriminator = None + + if return_id is not None: + self.return_id = return_id + self.messages = messages + + @property + def return_id(self): + """Gets the return_id of this SendMessagesReq. + + 发送消息成功后,是否返回Message ID,默认为false,设置为true时,返回参数才有Message ID。 + + :return: The return_id of this SendMessagesReq. + :rtype: bool + """ + return self._return_id + + @return_id.setter + def return_id(self, return_id): + """Sets the return_id of this SendMessagesReq. + + 发送消息成功后,是否返回Message ID,默认为false,设置为true时,返回参数才有Message ID。 + + :param return_id: The return_id of this SendMessagesReq. + :type: bool + """ + self._return_id = return_id + + @property + def messages(self): + """Gets the messages of this SendMessagesReq. + + 消息列表。 + + :return: The messages of this SendMessagesReq. + :rtype: list[SendMessageEntity] + """ + return self._messages + + @messages.setter + def messages(self, messages): + """Sets the messages of this SendMessagesReq. + + 消息列表。 + + :param messages: The messages of this SendMessagesReq. + :type: list[SendMessageEntity] + """ + self._messages = messages + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SendMessagesReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/send_messages_request.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/send_messages_request.py new file mode 100644 index 0000000000..48b59c0913 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/send_messages_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class SendMessagesRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'queue_id': 'str', + 'body': 'SendMessagesReq' + } + + attribute_map = { + 'queue_id': 'queue_id', + 'body': 'body' + } + + def __init__(self, queue_id=None, body=None): + """SendMessagesRequest - a model defined in huaweicloud sdk""" + + + + self._queue_id = None + self._body = None + self.discriminator = None + + self.queue_id = queue_id + if body is not None: + self.body = body + + @property + def queue_id(self): + """Gets the queue_id of this SendMessagesRequest. + + + :return: The queue_id of this SendMessagesRequest. + :rtype: str + """ + return self._queue_id + + @queue_id.setter + def queue_id(self, queue_id): + """Sets the queue_id of this SendMessagesRequest. + + + :param queue_id: The queue_id of this SendMessagesRequest. + :type: str + """ + self._queue_id = queue_id + + @property + def body(self): + """Gets the body of this SendMessagesRequest. + + + :return: The body of this SendMessagesRequest. + :rtype: SendMessagesReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this SendMessagesRequest. + + + :param body: The body of this SendMessagesRequest. + :type: SendMessagesReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SendMessagesRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/send_messages_resp_messages.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/send_messages_resp_messages.py new file mode 100644 index 0000000000..5acbfff440 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/send_messages_resp_messages.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class SendMessagesRespMessages: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'error': 'str', + 'error_code': 'int', + 'state': 'int', + 'id': 'str' + } + + attribute_map = { + 'error': 'error', + 'error_code': 'error_code', + 'state': 'state', + 'id': 'id' + } + + def __init__(self, error=None, error_code=None, state=None, id=None): + """SendMessagesRespMessages - a model defined in huaweicloud sdk""" + + + + self._error = None + self._error_code = None + self._state = None + self._id = None + self.discriminator = None + + if error is not None: + self.error = error + if error_code is not None: + self.error_code = error_code + if state is not None: + self.state = state + if id is not None: + self.id = id + + @property + def error(self): + """Gets the error of this SendMessagesRespMessages. + + 错误描述信息。 + + :return: The error of this SendMessagesRespMessages. + :rtype: str + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this SendMessagesRespMessages. + + 错误描述信息。 + + :param error: The error of this SendMessagesRespMessages. + :type: str + """ + self._error = error + + @property + def error_code(self): + """Gets the error_code of this SendMessagesRespMessages. + + 错误码。 + + :return: The error_code of this SendMessagesRespMessages. + :rtype: int + """ + return self._error_code + + @error_code.setter + def error_code(self, error_code): + """Sets the error_code of this SendMessagesRespMessages. + + 错误码。 + + :param error_code: The error_code of this SendMessagesRespMessages. + :type: int + """ + self._error_code = error_code + + @property + def state(self): + """Gets the state of this SendMessagesRespMessages. + + 发送消息的状态。 0:表示发送成功。 1:表示发送失败,失败原因参考对应的error和error_code。 + + :return: The state of this SendMessagesRespMessages. + :rtype: int + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this SendMessagesRespMessages. + + 发送消息的状态。 0:表示发送成功。 1:表示发送失败,失败原因参考对应的error和error_code。 + + :param state: The state of this SendMessagesRespMessages. + :type: int + """ + self._state = state + + @property + def id(self): + """Gets the id of this SendMessagesRespMessages. + + 消息ID。 + + :return: The id of this SendMessagesRespMessages. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SendMessagesRespMessages. + + 消息ID。 + + :param id: The id of this SendMessagesRespMessages. + :type: str + """ + self._id = id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SendMessagesRespMessages): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/send_messages_response.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/send_messages_response.py new file mode 100644 index 0000000000..b03f9c74e0 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/send_messages_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class SendMessagesResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'messages': 'list[SendMessagesRespMessages]' + } + + attribute_map = { + 'messages': 'messages' + } + + def __init__(self, messages=None): + """SendMessagesResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._messages = None + self.discriminator = None + + if messages is not None: + self.messages = messages + + @property + def messages(self): + """Gets the messages of this SendMessagesResponse. + + 消息列表。 + + :return: The messages of this SendMessagesResponse. + :rtype: list[SendMessagesRespMessages] + """ + return self._messages + + @messages.setter + def messages(self, messages): + """Sets the messages of this SendMessagesResponse. + + 消息列表。 + + :param messages: The messages of this SendMessagesResponse. + :type: list[SendMessagesRespMessages] + """ + self._messages = messages + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SendMessagesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_project_tags_request.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_project_tags_request.py new file mode 100644 index 0000000000..3f2168564d --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_project_tags_request.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowProjectTagsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ShowProjectTagsRequest - a model defined in huaweicloud sdk""" + + + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowProjectTagsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_project_tags_resp_tags.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_project_tags_resp_tags.py new file mode 100644 index 0000000000..ab06ac5b23 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_project_tags_resp_tags.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowProjectTagsRespTags: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'key': 'str', + 'values': 'list[str]' + } + + attribute_map = { + 'key': 'key', + 'values': 'values' + } + + def __init__(self, key=None, values=None): + """ShowProjectTagsRespTags - a model defined in huaweicloud sdk""" + + + + self._key = None + self._values = None + self.discriminator = None + + if key is not None: + self.key = key + if values is not None: + self.values = values + + @property + def key(self): + """Gets the key of this ShowProjectTagsRespTags. + + 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :return: The key of this ShowProjectTagsRespTags. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this ShowProjectTagsRespTags. + + 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :param key: The key of this ShowProjectTagsRespTags. + :type: str + """ + self._key = key + + @property + def values(self): + """Gets the values of this ShowProjectTagsRespTags. + + 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :return: The values of this ShowProjectTagsRespTags. + :rtype: list[str] + """ + return self._values + + @values.setter + def values(self, values): + """Sets the values of this ShowProjectTagsRespTags. + + 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :param values: The values of this ShowProjectTagsRespTags. + :type: list[str] + """ + self._values = values + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowProjectTagsRespTags): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_project_tags_response.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_project_tags_response.py new file mode 100644 index 0000000000..836a7b7950 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_project_tags_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowProjectTagsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'tags': 'list[ShowProjectTagsRespTags]' + } + + attribute_map = { + 'tags': 'tags' + } + + def __init__(self, tags=None): + """ShowProjectTagsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._tags = None + self.discriminator = None + + if tags is not None: + self.tags = tags + + @property + def tags(self): + """Gets the tags of this ShowProjectTagsResponse. + + 标签列表 + + :return: The tags of this ShowProjectTagsResponse. + :rtype: list[ShowProjectTagsRespTags] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this ShowProjectTagsResponse. + + 标签列表 + + :param tags: The tags of this ShowProjectTagsResponse. + :type: list[ShowProjectTagsRespTags] + """ + self._tags = tags + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowProjectTagsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_queue_request.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_queue_request.py new file mode 100644 index 0000000000..27ef9ade8e --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_queue_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowQueueRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'queue_id': 'str', + 'include_deadletter': 'bool' + } + + attribute_map = { + 'queue_id': 'queue_id', + 'include_deadletter': 'include_deadletter' + } + + def __init__(self, queue_id=None, include_deadletter=None): + """ShowQueueRequest - a model defined in huaweicloud sdk""" + + + + self._queue_id = None + self._include_deadletter = None + self.discriminator = None + + self.queue_id = queue_id + if include_deadletter is not None: + self.include_deadletter = include_deadletter + + @property + def queue_id(self): + """Gets the queue_id of this ShowQueueRequest. + + + :return: The queue_id of this ShowQueueRequest. + :rtype: str + """ + return self._queue_id + + @queue_id.setter + def queue_id(self, queue_id): + """Sets the queue_id of this ShowQueueRequest. + + + :param queue_id: The queue_id of this ShowQueueRequest. + :type: str + """ + self._queue_id = queue_id + + @property + def include_deadletter(self): + """Gets the include_deadletter of this ShowQueueRequest. + + + :return: The include_deadletter of this ShowQueueRequest. + :rtype: bool + """ + return self._include_deadletter + + @include_deadletter.setter + def include_deadletter(self, include_deadletter): + """Sets the include_deadletter of this ShowQueueRequest. + + + :param include_deadletter: The include_deadletter of this ShowQueueRequest. + :type: bool + """ + self._include_deadletter = include_deadletter + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowQueueRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_queue_response.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_queue_response.py new file mode 100644 index 0000000000..da85f2be04 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_queue_response.py @@ -0,0 +1,434 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowQueueResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'id': 'str', + 'name': 'str', + 'created': 'str', + 'description': 'str', + 'queue_mode': 'str', + 'reservation': 'int', + 'max_msg_size_byte': 'int', + 'produced_messages': 'int', + 'redrive_policy': 'str', + 'max_consume_count': 'int', + 'group_count': 'int', + 'kafka_topic': 'str', + 'eff_date': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'created': 'created', + 'description': 'description', + 'queue_mode': 'queue_mode', + 'reservation': 'reservation', + 'max_msg_size_byte': 'max_msg_size_byte', + 'produced_messages': 'produced_messages', + 'redrive_policy': 'redrive_policy', + 'max_consume_count': 'max_consume_count', + 'group_count': 'group_count', + 'kafka_topic': 'kafka_topic', + 'eff_date': 'eff_date' + } + + def __init__(self, id=None, name=None, created=None, description=None, queue_mode=None, reservation=None, max_msg_size_byte=None, produced_messages=None, redrive_policy=None, max_consume_count=None, group_count=None, kafka_topic=None, eff_date=None): + """ShowQueueResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._id = None + self._name = None + self._created = None + self._description = None + self._queue_mode = None + self._reservation = None + self._max_msg_size_byte = None + self._produced_messages = None + self._redrive_policy = None + self._max_consume_count = None + self._group_count = None + self._kafka_topic = None + self._eff_date = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if created is not None: + self.created = created + if description is not None: + self.description = description + if queue_mode is not None: + self.queue_mode = queue_mode + if reservation is not None: + self.reservation = reservation + if max_msg_size_byte is not None: + self.max_msg_size_byte = max_msg_size_byte + if produced_messages is not None: + self.produced_messages = produced_messages + if redrive_policy is not None: + self.redrive_policy = redrive_policy + if max_consume_count is not None: + self.max_consume_count = max_consume_count + if group_count is not None: + self.group_count = group_count + if kafka_topic is not None: + self.kafka_topic = kafka_topic + if eff_date is not None: + self.eff_date = eff_date + + @property + def id(self): + """Gets the id of this ShowQueueResponse. + + 队列ID。 + + :return: The id of this ShowQueueResponse. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ShowQueueResponse. + + 队列ID。 + + :param id: The id of this ShowQueueResponse. + :type: str + """ + self._id = id + + @property + def name(self): + """Gets the name of this ShowQueueResponse. + + 队列的名称。 + + :return: The name of this ShowQueueResponse. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ShowQueueResponse. + + 队列的名称。 + + :param name: The name of this ShowQueueResponse. + :type: str + """ + self._name = name + + @property + def created(self): + """Gets the created of this ShowQueueResponse. + + 创建队列的时间。 + + :return: The created of this ShowQueueResponse. + :rtype: str + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this ShowQueueResponse. + + 创建队列的时间。 + + :param created: The created of this ShowQueueResponse. + :type: str + """ + self._created = created + + @property + def description(self): + """Gets the description of this ShowQueueResponse. + + 队列的描述信息。 + + :return: The description of this ShowQueueResponse. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this ShowQueueResponse. + + 队列的描述信息。 + + :param description: The description of this ShowQueueResponse. + :type: str + """ + self._description = description + + @property + def queue_mode(self): + """Gets the queue_mode of this ShowQueueResponse. + + 队列类型。 + + :return: The queue_mode of this ShowQueueResponse. + :rtype: str + """ + return self._queue_mode + + @queue_mode.setter + def queue_mode(self, queue_mode): + """Sets the queue_mode of this ShowQueueResponse. + + 队列类型。 + + :param queue_mode: The queue_mode of this ShowQueueResponse. + :type: str + """ + self._queue_mode = queue_mode + + @property + def reservation(self): + """Gets the reservation of this ShowQueueResponse. + + 消息在队列中允许保留的时长(单位分钟)。 + + :return: The reservation of this ShowQueueResponse. + :rtype: int + """ + return self._reservation + + @reservation.setter + def reservation(self, reservation): + """Sets the reservation of this ShowQueueResponse. + + 消息在队列中允许保留的时长(单位分钟)。 + + :param reservation: The reservation of this ShowQueueResponse. + :type: int + """ + self._reservation = reservation + + @property + def max_msg_size_byte(self): + """Gets the max_msg_size_byte of this ShowQueueResponse. + + 队列中允许的最大消息大小(单位Byte)。 + + :return: The max_msg_size_byte of this ShowQueueResponse. + :rtype: int + """ + return self._max_msg_size_byte + + @max_msg_size_byte.setter + def max_msg_size_byte(self, max_msg_size_byte): + """Sets the max_msg_size_byte of this ShowQueueResponse. + + 队列中允许的最大消息大小(单位Byte)。 + + :param max_msg_size_byte: The max_msg_size_byte of this ShowQueueResponse. + :type: int + """ + self._max_msg_size_byte = max_msg_size_byte + + @property + def produced_messages(self): + """Gets the produced_messages of this ShowQueueResponse. + + 队列的消息总数。 + + :return: The produced_messages of this ShowQueueResponse. + :rtype: int + """ + return self._produced_messages + + @produced_messages.setter + def produced_messages(self, produced_messages): + """Sets the produced_messages of this ShowQueueResponse. + + 队列的消息总数。 + + :param produced_messages: The produced_messages of this ShowQueueResponse. + :type: int + """ + self._produced_messages = produced_messages + + @property + def redrive_policy(self): + """Gets the redrive_policy of this ShowQueueResponse. + + 该队列是否开启死信消息。仅当include_deadletter为true时,才有该响应参数。 - enable:表示开启。 - disable:表示不开启。 + + :return: The redrive_policy of this ShowQueueResponse. + :rtype: str + """ + return self._redrive_policy + + @redrive_policy.setter + def redrive_policy(self, redrive_policy): + """Sets the redrive_policy of this ShowQueueResponse. + + 该队列是否开启死信消息。仅当include_deadletter为true时,才有该响应参数。 - enable:表示开启。 - disable:表示不开启。 + + :param redrive_policy: The redrive_policy of this ShowQueueResponse. + :type: str + """ + self._redrive_policy = redrive_policy + + @property + def max_consume_count(self): + """Gets the max_consume_count of this ShowQueueResponse. + + 最大确认消费失败的次数,当达到最大确认失败次数后,DMS会将该条消息转存到死信队列中。 仅当include_deadletter为true时,才有该响应参数。 + + :return: The max_consume_count of this ShowQueueResponse. + :rtype: int + """ + return self._max_consume_count + + @max_consume_count.setter + def max_consume_count(self, max_consume_count): + """Sets the max_consume_count of this ShowQueueResponse. + + 最大确认消费失败的次数,当达到最大确认失败次数后,DMS会将该条消息转存到死信队列中。 仅当include_deadletter为true时,才有该响应参数。 + + :param max_consume_count: The max_consume_count of this ShowQueueResponse. + :type: int + """ + self._max_consume_count = max_consume_count + + @property + def group_count(self): + """Gets the group_count of this ShowQueueResponse. + + 该队列下的消费组数量。 + + :return: The group_count of this ShowQueueResponse. + :rtype: int + """ + return self._group_count + + @group_count.setter + def group_count(self, group_count): + """Sets the group_count of this ShowQueueResponse. + + 该队列下的消费组数量。 + + :param group_count: The group_count of this ShowQueueResponse. + :type: int + """ + self._group_count = group_count + + @property + def kafka_topic(self): + """Gets the kafka_topic of this ShowQueueResponse. + + 仅Kafka队列才有该参数。 + + :return: The kafka_topic of this ShowQueueResponse. + :rtype: str + """ + return self._kafka_topic + + @kafka_topic.setter + def kafka_topic(self, kafka_topic): + """Sets the kafka_topic of this ShowQueueResponse. + + 仅Kafka队列才有该参数。 + + :param kafka_topic: The kafka_topic of this ShowQueueResponse. + :type: str + """ + self._kafka_topic = kafka_topic + + @property + def eff_date(self): + """Gets the eff_date of this ShowQueueResponse. + + 创建队列的时间。 + + :return: The eff_date of this ShowQueueResponse. + :rtype: str + """ + return self._eff_date + + @eff_date.setter + def eff_date(self, eff_date): + """Sets the eff_date of this ShowQueueResponse. + + 创建队列的时间。 + + :param eff_date: The eff_date of this ShowQueueResponse. + :type: str + """ + self._eff_date = eff_date + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowQueueResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_queue_tags_request.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_queue_tags_request.py new file mode 100644 index 0000000000..efa6f953e8 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_queue_tags_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowQueueTagsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'queue_id': 'str' + } + + attribute_map = { + 'queue_id': 'queue_id' + } + + def __init__(self, queue_id=None): + """ShowQueueTagsRequest - a model defined in huaweicloud sdk""" + + + + self._queue_id = None + self.discriminator = None + + self.queue_id = queue_id + + @property + def queue_id(self): + """Gets the queue_id of this ShowQueueTagsRequest. + + + :return: The queue_id of this ShowQueueTagsRequest. + :rtype: str + """ + return self._queue_id + + @queue_id.setter + def queue_id(self, queue_id): + """Sets the queue_id of this ShowQueueTagsRequest. + + + :param queue_id: The queue_id of this ShowQueueTagsRequest. + :type: str + """ + self._queue_id = queue_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowQueueTagsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_queue_tags_response.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_queue_tags_response.py new file mode 100644 index 0000000000..81c67c8c96 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_queue_tags_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowQueueTagsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'tags': 'list[BatchCreateOrDeleteTagReqTags]' + } + + attribute_map = { + 'tags': 'tags' + } + + def __init__(self, tags=None): + """ShowQueueTagsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._tags = None + self.discriminator = None + + if tags is not None: + self.tags = tags + + @property + def tags(self): + """Gets the tags of this ShowQueueTagsResponse. + + 标签列表 + + :return: The tags of this ShowQueueTagsResponse. + :rtype: list[BatchCreateOrDeleteTagReqTags] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this ShowQueueTagsResponse. + + 标签列表 + + :param tags: The tags of this ShowQueueTagsResponse. + :type: list[BatchCreateOrDeleteTagReqTags] + """ + self._tags = tags + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowQueueTagsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_quotas_request.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_quotas_request.py new file mode 100644 index 0000000000..c5072ebadd --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_quotas_request.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowQuotasRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ShowQuotasRequest - a model defined in huaweicloud sdk""" + + + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowQuotasRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_quotas_resp_quotas.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_quotas_resp_quotas.py new file mode 100644 index 0000000000..03709b441e --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_quotas_resp_quotas.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowQuotasRespQuotas: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'resources': 'list[ShowQuotasRespQuotasResources]' + } + + attribute_map = { + 'resources': 'resources' + } + + def __init__(self, resources=None): + """ShowQuotasRespQuotas - a model defined in huaweicloud sdk""" + + + + self._resources = None + self.discriminator = None + + if resources is not None: + self.resources = resources + + @property + def resources(self): + """Gets the resources of this ShowQuotasRespQuotas. + + 配额列表。 + + :return: The resources of this ShowQuotasRespQuotas. + :rtype: list[ShowQuotasRespQuotasResources] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this ShowQuotasRespQuotas. + + 配额列表。 + + :param resources: The resources of this ShowQuotasRespQuotas. + :type: list[ShowQuotasRespQuotasResources] + """ + self._resources = resources + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowQuotasRespQuotas): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_quotas_resp_quotas_resources.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_quotas_resp_quotas_resources.py new file mode 100644 index 0000000000..7d18fe51db --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_quotas_resp_quotas_resources.py @@ -0,0 +1,218 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowQuotasRespQuotasResources: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'type': 'str', + 'quota': 'int', + 'used': 'int', + 'min': 'int', + 'max': 'int' + } + + attribute_map = { + 'type': 'type', + 'quota': 'quota', + 'used': 'used', + 'min': 'min', + 'max': 'max' + } + + def __init__(self, type=None, quota=None, used=None, min=None, max=None): + """ShowQuotasRespQuotasResources - a model defined in huaweicloud sdk""" + + + + self._type = None + self._quota = None + self._used = None + self._min = None + self._max = None + self.discriminator = None + + if type is not None: + self.type = type + if quota is not None: + self.quota = quota + if used is not None: + self.used = used + if min is not None: + self.min = min + if max is not None: + self.max = max + + @property + def type(self): + """Gets the type of this ShowQuotasRespQuotasResources. + + 配额名称。 + + :return: The type of this ShowQuotasRespQuotasResources. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ShowQuotasRespQuotasResources. + + 配额名称。 + + :param type: The type of this ShowQuotasRespQuotasResources. + :type: str + """ + self._type = type + + @property + def quota(self): + """Gets the quota of this ShowQuotasRespQuotasResources. + + 配额数量。 + + :return: The quota of this ShowQuotasRespQuotasResources. + :rtype: int + """ + return self._quota + + @quota.setter + def quota(self, quota): + """Sets the quota of this ShowQuotasRespQuotasResources. + + 配额数量。 + + :param quota: The quota of this ShowQuotasRespQuotasResources. + :type: int + """ + self._quota = quota + + @property + def used(self): + """Gets the used of this ShowQuotasRespQuotasResources. + + 已使用的数量。 + + :return: The used of this ShowQuotasRespQuotasResources. + :rtype: int + """ + return self._used + + @used.setter + def used(self, used): + """Sets the used of this ShowQuotasRespQuotasResources. + + 已使用的数量。 + + :param used: The used of this ShowQuotasRespQuotasResources. + :type: int + """ + self._used = used + + @property + def min(self): + """Gets the min of this ShowQuotasRespQuotasResources. + + 配额调整的最小值。 + + :return: The min of this ShowQuotasRespQuotasResources. + :rtype: int + """ + return self._min + + @min.setter + def min(self, min): + """Sets the min of this ShowQuotasRespQuotasResources. + + 配额调整的最小值。 + + :param min: The min of this ShowQuotasRespQuotasResources. + :type: int + """ + self._min = min + + @property + def max(self): + """Gets the max of this ShowQuotasRespQuotasResources. + + 配额调整的最大值。 + + :return: The max of this ShowQuotasRespQuotasResources. + :rtype: int + """ + return self._max + + @max.setter + def max(self, max): + """Sets the max of this ShowQuotasRespQuotasResources. + + 配额调整的最大值。 + + :param max: The max of this ShowQuotasRespQuotasResources. + :type: int + """ + self._max = max + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowQuotasRespQuotasResources): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_quotas_response.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_quotas_response.py new file mode 100644 index 0000000000..4553427968 --- /dev/null +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/model/show_quotas_response.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowQuotasResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'quotas': 'ShowQuotasRespQuotas' + } + + attribute_map = { + 'quotas': 'quotas' + } + + def __init__(self, quotas=None): + """ShowQuotasResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._quotas = None + self.discriminator = None + + if quotas is not None: + self.quotas = quotas + + @property + def quotas(self): + """Gets the quotas of this ShowQuotasResponse. + + + :return: The quotas of this ShowQuotasResponse. + :rtype: ShowQuotasRespQuotas + """ + return self._quotas + + @quotas.setter + def quotas(self, quotas): + """Sets the quotas of this ShowQuotasResponse. + + + :param quotas: The quotas of this ShowQuotasResponse. + :type: ShowQuotasRespQuotas + """ + self._quotas = quotas + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowQuotasResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dms/requirements.txt b/huaweicloud-sdk-dms/requirements.txt new file mode 100644 index 0000000000..bf54e8e3d8 --- /dev/null +++ b/huaweicloud-sdk-dms/requirements.txt @@ -0,0 +1 @@ +huaweicloud-sdk-python-core diff --git a/huaweicloud-sdk-dms/setup.py b/huaweicloud-sdk-dms/setup.py new file mode 100644 index 0000000000..0ef8c98782 --- /dev/null +++ b/huaweicloud-sdk-dms/setup.py @@ -0,0 +1,45 @@ +# coding: utf-8 +from os import path + +from setuptools import setup, find_packages + +NAME = "huaweicloudsdkdms" +VERSION = "3.0.11-beta" +AUTHOR = "HuaweiCloud SDK" +AUTHOR_EMAIL = "hwcloudsdk@huawei.com" +URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" + +DESCRIPTION = "DMS" +this_directory = path.abspath(path.dirname(__file__)) +with open(path.join(this_directory, 'README_PYPI.md'), encoding='utf-8') as f: + LONG_DESCRIPTION = f.read() + +REQUIRES = ["huaweicloudsdkcore"] + +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=["huaweicloud", "sdk", "DMS"], + packages=find_packages(exclude=["tests*"]), + install_requires=REQUIRES, + include_package_data=True, + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache Software License', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Topic :: Software Development' + ] +) diff --git a/huaweicloud-sdk-dms/test-requirements.txt b/huaweicloud-sdk-dms/test-requirements.txt new file mode 100644 index 0000000000..2702246c0e --- /dev/null +++ b/huaweicloud-sdk-dms/test-requirements.txt @@ -0,0 +1,5 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 diff --git a/huaweicloud-sdk-ecs/setup.py b/huaweicloud-sdk-ecs/setup.py index 933610465e..28f33aa16b 100644 --- a/huaweicloud-sdk-ecs/setup.py +++ b/huaweicloud-sdk-ecs/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkecs" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-eps/setup.py b/huaweicloud-sdk-eps/setup.py index 8ebf23c724..c97386f4b4 100644 --- a/huaweicloud-sdk-eps/setup.py +++ b/huaweicloud-sdk-eps/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkeps" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-evs/setup.py b/huaweicloud-sdk-evs/setup.py index be71dbc583..e05dc7cb98 100644 --- a/huaweicloud-sdk-evs/setup.py +++ b/huaweicloud-sdk-evs/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkevs" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-functiongraph/setup.py b/huaweicloud-sdk-functiongraph/setup.py index c0ecfa4fdd..d2f2480a6d 100644 --- a/huaweicloud-sdk-functiongraph/setup.py +++ b/huaweicloud-sdk-functiongraph/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkfunctiongraph" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-iam/setup.py b/huaweicloud-sdk-iam/setup.py index 56e5822cd6..7e2a6e7a1e 100644 --- a/huaweicloud-sdk-iam/setup.py +++ b/huaweicloud-sdk-iam/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkiam" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-image/setup.py b/huaweicloud-sdk-image/setup.py index ba468bdcdd..15a2b604e1 100644 --- a/huaweicloud-sdk-image/setup.py +++ b/huaweicloud-sdk-image/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkimage" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-ims/setup.py b/huaweicloud-sdk-ims/setup.py index 4e60d00bcd..e75cf67939 100644 --- a/huaweicloud-sdk-ims/setup.py +++ b/huaweicloud-sdk-ims/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkims" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-iotda/setup.py b/huaweicloud-sdk-iotda/setup.py index 08407e3dc3..c13f992da5 100644 --- a/huaweicloud-sdk-iotda/setup.py +++ b/huaweicloud-sdk-iotda/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkiotda" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-kafka/LICENSE b/huaweicloud-sdk-kafka/LICENSE new file mode 100644 index 0000000000..808e3296c0 --- /dev/null +++ b/huaweicloud-sdk-kafka/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) Huawei Technologies Co., Ltd. 2020-present. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/huaweicloud-sdk-kafka/README_PYPI.md b/huaweicloud-sdk-kafka/README_PYPI.md new file mode 100644 index 0000000000..9711543c73 --- /dev/null +++ b/huaweicloud-sdk-kafka/README_PYPI.md @@ -0,0 +1 @@ +See detailed information in [huaweicloud-sdk-python-v3](https://github.com/huaweicloud/huaweicloud-sdk-python-v3). \ No newline at end of file diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/__init__.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/__init__.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/__init__.py new file mode 100644 index 0000000000..cdb4ef10b0 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/__init__.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +from __future__ import absolute_import + +# import KafkaClient +from huaweicloudsdkkafka.v2.kafka_client import KafkaClient +from huaweicloudsdkkafka.v2.kafka_async_client import KafkaAsyncClient +# import models into sdk package +from huaweicloudsdkkafka.v2.model.batch_create_or_delete_instance_tag_request import BatchCreateOrDeleteInstanceTagRequest +from huaweicloudsdkkafka.v2.model.batch_create_or_delete_instance_tag_response import BatchCreateOrDeleteInstanceTagResponse +from huaweicloudsdkkafka.v2.model.batch_create_or_delete_tag_req import BatchCreateOrDeleteTagReq +from huaweicloudsdkkafka.v2.model.batch_delete_instance_topic_req import BatchDeleteInstanceTopicReq +from huaweicloudsdkkafka.v2.model.batch_delete_instance_topic_request import BatchDeleteInstanceTopicRequest +from huaweicloudsdkkafka.v2.model.batch_delete_instance_topic_resp_topics import BatchDeleteInstanceTopicRespTopics +from huaweicloudsdkkafka.v2.model.batch_delete_instance_topic_response import BatchDeleteInstanceTopicResponse +from huaweicloudsdkkafka.v2.model.batch_restart_or_delete_instance_req import BatchRestartOrDeleteInstanceReq +from huaweicloudsdkkafka.v2.model.batch_restart_or_delete_instance_resp_results import BatchRestartOrDeleteInstanceRespResults +from huaweicloudsdkkafka.v2.model.batch_restart_or_delete_instances_request import BatchRestartOrDeleteInstancesRequest +from huaweicloudsdkkafka.v2.model.batch_restart_or_delete_instances_response import BatchRestartOrDeleteInstancesResponse +from huaweicloudsdkkafka.v2.model.create_connector_req import CreateConnectorReq +from huaweicloudsdkkafka.v2.model.create_connector_request import CreateConnectorRequest +from huaweicloudsdkkafka.v2.model.create_connector_response import CreateConnectorResponse +from huaweicloudsdkkafka.v2.model.create_instance_topic_req import CreateInstanceTopicReq +from huaweicloudsdkkafka.v2.model.create_instance_topic_request import CreateInstanceTopicRequest +from huaweicloudsdkkafka.v2.model.create_instance_topic_response import CreateInstanceTopicResponse +from huaweicloudsdkkafka.v2.model.create_partition_req import CreatePartitionReq +from huaweicloudsdkkafka.v2.model.create_partition_request import CreatePartitionRequest +from huaweicloudsdkkafka.v2.model.create_partition_response import CreatePartitionResponse +from huaweicloudsdkkafka.v2.model.create_post_paid_instance_req import CreatePostPaidInstanceReq +from huaweicloudsdkkafka.v2.model.create_post_paid_instance_req_tags import CreatePostPaidInstanceReqTags +from huaweicloudsdkkafka.v2.model.create_post_paid_instance_request import CreatePostPaidInstanceRequest +from huaweicloudsdkkafka.v2.model.create_post_paid_instance_response import CreatePostPaidInstanceResponse +from huaweicloudsdkkafka.v2.model.create_sink_task_req import CreateSinkTaskReq +from huaweicloudsdkkafka.v2.model.create_sink_task_request import CreateSinkTaskRequest +from huaweicloudsdkkafka.v2.model.create_sink_task_response import CreateSinkTaskResponse +from huaweicloudsdkkafka.v2.model.delete_background_task_request import DeleteBackgroundTaskRequest +from huaweicloudsdkkafka.v2.model.delete_background_task_response import DeleteBackgroundTaskResponse +from huaweicloudsdkkafka.v2.model.delete_instance_request import DeleteInstanceRequest +from huaweicloudsdkkafka.v2.model.delete_instance_response import DeleteInstanceResponse +from huaweicloudsdkkafka.v2.model.delete_sink_task_request import DeleteSinkTaskRequest +from huaweicloudsdkkafka.v2.model.delete_sink_task_response import DeleteSinkTaskResponse +from huaweicloudsdkkafka.v2.model.list_available_zones_request import ListAvailableZonesRequest +from huaweicloudsdkkafka.v2.model.list_available_zones_resp_available_zones import ListAvailableZonesRespAvailableZones +from huaweicloudsdkkafka.v2.model.list_available_zones_response import ListAvailableZonesResponse +from huaweicloudsdkkafka.v2.model.list_background_tasks_request import ListBackgroundTasksRequest +from huaweicloudsdkkafka.v2.model.list_background_tasks_resp_tasks import ListBackgroundTasksRespTasks +from huaweicloudsdkkafka.v2.model.list_background_tasks_response import ListBackgroundTasksResponse +from huaweicloudsdkkafka.v2.model.list_instance_topics_request import ListInstanceTopicsRequest +from huaweicloudsdkkafka.v2.model.list_instance_topics_resp_topics import ListInstanceTopicsRespTopics +from huaweicloudsdkkafka.v2.model.list_instance_topics_response import ListInstanceTopicsResponse +from huaweicloudsdkkafka.v2.model.list_instances_request import ListInstancesRequest +from huaweicloudsdkkafka.v2.model.list_instances_resp_instances import ListInstancesRespInstances +from huaweicloudsdkkafka.v2.model.list_instances_response import ListInstancesResponse +from huaweicloudsdkkafka.v2.model.list_products_request import ListProductsRequest +from huaweicloudsdkkafka.v2.model.list_products_resp_detail import ListProductsRespDetail +from huaweicloudsdkkafka.v2.model.list_products_resp_hourly import ListProductsRespHourly +from huaweicloudsdkkafka.v2.model.list_products_resp_io import ListProductsRespIo +from huaweicloudsdkkafka.v2.model.list_products_resp_values import ListProductsRespValues +from huaweicloudsdkkafka.v2.model.list_products_response import ListProductsResponse +from huaweicloudsdkkafka.v2.model.list_sink_tasks_request import ListSinkTasksRequest +from huaweicloudsdkkafka.v2.model.list_sink_tasks_resp_tasks import ListSinkTasksRespTasks +from huaweicloudsdkkafka.v2.model.list_sink_tasks_response import ListSinkTasksResponse +from huaweicloudsdkkafka.v2.model.obs_destination_descriptor import ObsDestinationDescriptor +from huaweicloudsdkkafka.v2.model.reset_manager_password_req import ResetManagerPasswordReq +from huaweicloudsdkkafka.v2.model.reset_manager_password_request import ResetManagerPasswordRequest +from huaweicloudsdkkafka.v2.model.reset_manager_password_response import ResetManagerPasswordResponse +from huaweicloudsdkkafka.v2.model.reset_message_offset_req import ResetMessageOffsetReq +from huaweicloudsdkkafka.v2.model.reset_message_offset_request import ResetMessageOffsetRequest +from huaweicloudsdkkafka.v2.model.reset_message_offset_response import ResetMessageOffsetResponse +from huaweicloudsdkkafka.v2.model.reset_password_req import ResetPasswordReq +from huaweicloudsdkkafka.v2.model.reset_password_request import ResetPasswordRequest +from huaweicloudsdkkafka.v2.model.reset_password_response import ResetPasswordResponse +from huaweicloudsdkkafka.v2.model.reset_replica_req import ResetReplicaReq +from huaweicloudsdkkafka.v2.model.reset_replica_req_partitions import ResetReplicaReqPartitions +from huaweicloudsdkkafka.v2.model.resize_instance_req import ResizeInstanceReq +from huaweicloudsdkkafka.v2.model.resize_instance_request import ResizeInstanceRequest +from huaweicloudsdkkafka.v2.model.resize_instance_response import ResizeInstanceResponse +from huaweicloudsdkkafka.v2.model.restart_manager_request import RestartManagerRequest +from huaweicloudsdkkafka.v2.model.restart_manager_response import RestartManagerResponse +from huaweicloudsdkkafka.v2.model.show_background_task_request import ShowBackgroundTaskRequest +from huaweicloudsdkkafka.v2.model.show_background_task_response import ShowBackgroundTaskResponse +from huaweicloudsdkkafka.v2.model.show_ces_hierarchy_request import ShowCesHierarchyRequest +from huaweicloudsdkkafka.v2.model.show_ces_hierarchy_response import ShowCesHierarchyResponse +from huaweicloudsdkkafka.v2.model.show_ceshierarchy_resp_children import ShowCeshierarchyRespChildren +from huaweicloudsdkkafka.v2.model.show_ceshierarchy_resp_dimensions import ShowCeshierarchyRespDimensions +from huaweicloudsdkkafka.v2.model.show_ceshierarchy_resp_instance_ids import ShowCeshierarchyRespInstanceIds +from huaweicloudsdkkafka.v2.model.show_ceshierarchy_resp_nodes import ShowCeshierarchyRespNodes +from huaweicloudsdkkafka.v2.model.show_ceshierarchy_resp_partitions import ShowCeshierarchyRespPartitions +from huaweicloudsdkkafka.v2.model.show_ceshierarchy_resp_queues import ShowCeshierarchyRespQueues +from huaweicloudsdkkafka.v2.model.show_cluster_request import ShowClusterRequest +from huaweicloudsdkkafka.v2.model.show_cluster_resp_cluster import ShowClusterRespCluster +from huaweicloudsdkkafka.v2.model.show_cluster_resp_cluster_brokers import ShowClusterRespClusterBrokers +from huaweicloudsdkkafka.v2.model.show_cluster_response import ShowClusterResponse +from huaweicloudsdkkafka.v2.model.show_coordinators_request import ShowCoordinatorsRequest +from huaweicloudsdkkafka.v2.model.show_coordinators_resp_coordinators import ShowCoordinatorsRespCoordinators +from huaweicloudsdkkafka.v2.model.show_coordinators_response import ShowCoordinatorsResponse +from huaweicloudsdkkafka.v2.model.show_groups_request import ShowGroupsRequest +from huaweicloudsdkkafka.v2.model.show_groups_resp_group import ShowGroupsRespGroup +from huaweicloudsdkkafka.v2.model.show_groups_resp_group_assignment import ShowGroupsRespGroupAssignment +from huaweicloudsdkkafka.v2.model.show_groups_resp_group_group_message_offsets import ShowGroupsRespGroupGroupMessageOffsets +from huaweicloudsdkkafka.v2.model.show_groups_resp_group_members import ShowGroupsRespGroupMembers +from huaweicloudsdkkafka.v2.model.show_groups_response import ShowGroupsResponse +from huaweicloudsdkkafka.v2.model.show_instance_extend_product_info_request import ShowInstanceExtendProductInfoRequest +from huaweicloudsdkkafka.v2.model.show_instance_extend_product_info_response import ShowInstanceExtendProductInfoResponse +from huaweicloudsdkkafka.v2.model.show_instance_request import ShowInstanceRequest +from huaweicloudsdkkafka.v2.model.show_instance_response import ShowInstanceResponse +from huaweicloudsdkkafka.v2.model.show_instance_tags_request import ShowInstanceTagsRequest +from huaweicloudsdkkafka.v2.model.show_instance_tags_response import ShowInstanceTagsResponse +from huaweicloudsdkkafka.v2.model.show_instance_topic_detail_request import ShowInstanceTopicDetailRequest +from huaweicloudsdkkafka.v2.model.show_instance_topic_detail_resp_partitions import ShowInstanceTopicDetailRespPartitions +from huaweicloudsdkkafka.v2.model.show_instance_topic_detail_resp_replicas import ShowInstanceTopicDetailRespReplicas +from huaweicloudsdkkafka.v2.model.show_instance_topic_detail_response import ShowInstanceTopicDetailResponse +from huaweicloudsdkkafka.v2.model.show_maintain_windows_request import ShowMaintainWindowsRequest +from huaweicloudsdkkafka.v2.model.show_maintain_windows_resp_maintain_windows import ShowMaintainWindowsRespMaintainWindows +from huaweicloudsdkkafka.v2.model.show_maintain_windows_response import ShowMaintainWindowsResponse +from huaweicloudsdkkafka.v2.model.show_messages_request import ShowMessagesRequest +from huaweicloudsdkkafka.v2.model.show_messages_resp_messages import ShowMessagesRespMessages +from huaweicloudsdkkafka.v2.model.show_messages_response import ShowMessagesResponse +from huaweicloudsdkkafka.v2.model.show_partition_beginning_message_request import ShowPartitionBeginningMessageRequest +from huaweicloudsdkkafka.v2.model.show_partition_beginning_message_response import ShowPartitionBeginningMessageResponse +from huaweicloudsdkkafka.v2.model.show_partition_end_message_request import ShowPartitionEndMessageRequest +from huaweicloudsdkkafka.v2.model.show_partition_end_message_response import ShowPartitionEndMessageResponse +from huaweicloudsdkkafka.v2.model.show_partition_message_request import ShowPartitionMessageRequest +from huaweicloudsdkkafka.v2.model.show_partition_message_resp_message import ShowPartitionMessageRespMessage +from huaweicloudsdkkafka.v2.model.show_partition_message_response import ShowPartitionMessageResponse +from huaweicloudsdkkafka.v2.model.show_project_tags_request import ShowProjectTagsRequest +from huaweicloudsdkkafka.v2.model.show_project_tags_resp_tags import ShowProjectTagsRespTags +from huaweicloudsdkkafka.v2.model.show_project_tags_response import ShowProjectTagsResponse +from huaweicloudsdkkafka.v2.model.show_sink_task_detail_request import ShowSinkTaskDetailRequest +from huaweicloudsdkkafka.v2.model.show_sink_task_detail_resp_obs_destination_descriptor import ShowSinkTaskDetailRespObsDestinationDescriptor +from huaweicloudsdkkafka.v2.model.show_sink_task_detail_response import ShowSinkTaskDetailResponse +from huaweicloudsdkkafka.v2.model.update_instance_auto_create_topic_req import UpdateInstanceAutoCreateTopicReq +from huaweicloudsdkkafka.v2.model.update_instance_auto_create_topic_request import UpdateInstanceAutoCreateTopicRequest +from huaweicloudsdkkafka.v2.model.update_instance_auto_create_topic_response import UpdateInstanceAutoCreateTopicResponse +from huaweicloudsdkkafka.v2.model.update_instance_cross_vpcip_req import UpdateInstanceCrossVPCIPReq +from huaweicloudsdkkafka.v2.model.update_instance_cross_vpcip_request import UpdateInstanceCrossVPCIPRequest +from huaweicloudsdkkafka.v2.model.update_instance_cross_vpcip_resp_results import UpdateInstanceCrossVPCIPRespResults +from huaweicloudsdkkafka.v2.model.update_instance_cross_vpcip_response import UpdateInstanceCrossVPCIPResponse +from huaweicloudsdkkafka.v2.model.update_instance_req import UpdateInstanceReq +from huaweicloudsdkkafka.v2.model.update_instance_request import UpdateInstanceRequest +from huaweicloudsdkkafka.v2.model.update_instance_response import UpdateInstanceResponse +from huaweicloudsdkkafka.v2.model.update_instance_topic_req import UpdateInstanceTopicReq +from huaweicloudsdkkafka.v2.model.update_instance_topic_req_topics import UpdateInstanceTopicReqTopics +from huaweicloudsdkkafka.v2.model.update_instance_topic_request import UpdateInstanceTopicRequest +from huaweicloudsdkkafka.v2.model.update_instance_topic_response import UpdateInstanceTopicResponse +from huaweicloudsdkkafka.v2.model.update_sink_task_quota_req import UpdateSinkTaskQuotaReq +from huaweicloudsdkkafka.v2.model.update_sink_task_quota_request import UpdateSinkTaskQuotaRequest +from huaweicloudsdkkafka.v2.model.update_sink_task_quota_response import UpdateSinkTaskQuotaResponse +from huaweicloudsdkkafka.v2.model.update_topic_replica_request import UpdateTopicReplicaRequest +from huaweicloudsdkkafka.v2.model.update_topic_replica_response import UpdateTopicReplicaResponse + diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/kafka_async_client.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/kafka_async_client.py new file mode 100644 index 0000000000..0ab559a85b --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/kafka_async_client.py @@ -0,0 +1,2759 @@ +# coding: utf-8 + +from __future__ import absolute_import + +import datetime +import re +import importlib + +import six + +from huaweicloudsdkcore.client import Client, ClientBuilder +from huaweicloudsdkcore.exceptions import exceptions +from huaweicloudsdkcore.utils import http_utils +from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest + + +class KafkaAsyncClient(Client): + """ + :param configuration: .Configuration object for this client + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self): + super(KafkaAsyncClient, self).__init__() + self.model_package = importlib.import_module("huaweicloudsdkkafka.v2.model") + self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} + + @staticmethod + def new_builder(clazz): + return ClientBuilder(clazz) + + def batch_create_or_delete_instance_tag_async(self, request): + """批量添加或删除实例标签 + + 批量添加或删除实例标签。 + + :param BatchCreateOrDeleteInstanceTagRequest request + :return: BatchCreateOrDeleteInstanceTagResponse + """ + return self.batch_create_or_delete_instance_tag_with_http_info(request) + + def batch_create_or_delete_instance_tag_with_http_info(self, request): + """批量添加或删除实例标签 + + 批量添加或删除实例标签。 + + :param BatchCreateOrDeleteInstanceTagRequest request + :return: BatchCreateOrDeleteInstanceTagResponse + """ + + all_params = ['instance_id', 'batch_create_or_delete_instance_tag_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/kafka/{instance_id}/tags/action', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='BatchCreateOrDeleteInstanceTagResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def batch_delete_instance_topic_async(self, request): + """Kafka实例批量删除Topic + + 该接口用于向Kafka实例批量删除Topic。 + + :param BatchDeleteInstanceTopicRequest request + :return: BatchDeleteInstanceTopicResponse + """ + return self.batch_delete_instance_topic_with_http_info(request) + + def batch_delete_instance_topic_with_http_info(self, request): + """Kafka实例批量删除Topic + + 该接口用于向Kafka实例批量删除Topic。 + + :param BatchDeleteInstanceTopicRequest request + :return: BatchDeleteInstanceTopicResponse + """ + + all_params = ['instance_id', 'batch_delete_instance_topic_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/topics/delete', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='BatchDeleteInstanceTopicResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def batch_restart_or_delete_instances_async(self, request): + """批量重启或删除实例 + + 批量重启或删除实例。 在实例重启过程中,客户端的生产与消费消息等请求会被拒绝。 实例删除后,实例中原有的数据将被删除,且没有备份,请谨慎操作。 + + :param BatchRestartOrDeleteInstancesRequest request + :return: BatchRestartOrDeleteInstancesResponse + """ + return self.batch_restart_or_delete_instances_with_http_info(request) + + def batch_restart_or_delete_instances_with_http_info(self, request): + """批量重启或删除实例 + + 批量重启或删除实例。 在实例重启过程中,客户端的生产与消费消息等请求会被拒绝。 实例删除后,实例中原有的数据将被删除,且没有备份,请谨慎操作。 + + :param BatchRestartOrDeleteInstancesRequest request + :return: BatchRestartOrDeleteInstancesResponse + """ + + all_params = ['batch_restart_or_delete_instances_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/action', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='BatchRestartOrDeleteInstancesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def create_connector_async(self, request): + """创建实例的转储节点 + + 创建实例的转储节点。 + + :param CreateConnectorRequest request + :return: CreateConnectorResponse + """ + return self.create_connector_with_http_info(request) + + def create_connector_with_http_info(self, request): + """创建实例的转储节点 + + 创建实例的转储节点。 + + :param CreateConnectorRequest request + :return: CreateConnectorResponse + """ + + all_params = ['instance_id', 'create_connector_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/connector', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreateConnectorResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def create_instance_topic_async(self, request): + """Kafka实例创建Topic + + 该接口用于向Kafka实例创建Topic。 + + :param CreateInstanceTopicRequest request + :return: CreateInstanceTopicResponse + """ + return self.create_instance_topic_with_http_info(request) + + def create_instance_topic_with_http_info(self, request): + """Kafka实例创建Topic + + 该接口用于向Kafka实例创建Topic。 + + :param CreateInstanceTopicRequest request + :return: CreateInstanceTopicResponse + """ + + all_params = ['instance_id', 'create_instance_topic_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/topics', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreateInstanceTopicResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def create_partition_async(self, request): + """新增Kafka实例指定Topic分区 + + 新增Kafka实例指定Topic分区。 + + :param CreatePartitionRequest request + :return: CreatePartitionResponse + """ + return self.create_partition_with_http_info(request) + + def create_partition_with_http_info(self, request): + """新增Kafka实例指定Topic分区 + + 新增Kafka实例指定Topic分区。 + + :param CreatePartitionRequest request + :return: CreatePartitionResponse + """ + + all_params = ['instance_id', 'topic', 'create_partition_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'topic' in local_var_params: + path_params['topic'] = local_var_params['topic'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions-reassignment', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreatePartitionResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def create_post_paid_instance_async(self, request): + """创建实例(按需) + + 创建实例,该接口创建的实例为按需计费的方式。 + + :param CreatePostPaidInstanceRequest request + :return: CreatePostPaidInstanceResponse + """ + return self.create_post_paid_instance_with_http_info(request) + + def create_post_paid_instance_with_http_info(self, request): + """创建实例(按需) + + 创建实例,该接口创建的实例为按需计费的方式。 + + :param CreatePostPaidInstanceRequest request + :return: CreatePostPaidInstanceResponse + """ + + all_params = ['create_post_paid_instance_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreatePostPaidInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def create_sink_task_async(self, request): + """创建转储任务 + + 创建转储任务。 + + :param CreateSinkTaskRequest request + :return: CreateSinkTaskResponse + """ + return self.create_sink_task_with_http_info(request) + + def create_sink_task_with_http_info(self, request): + """创建转储任务 + + 创建转储任务。 + + :param CreateSinkTaskRequest request + :return: CreateSinkTaskResponse + """ + + all_params = ['connector_id', 'create_sink_task_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'connector_id' in local_var_params: + path_params['connector_id'] = local_var_params['connector_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/connectors/{connector_id}/sink-tasks', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreateSinkTaskResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def delete_background_task_async(self, request): + """删除后台任务管理中的指定记录 + + 删除后台任务管理中的指定记录。 + + :param DeleteBackgroundTaskRequest request + :return: DeleteBackgroundTaskResponse + """ + return self.delete_background_task_with_http_info(request) + + def delete_background_task_with_http_info(self, request): + """删除后台任务管理中的指定记录 + + 删除后台任务管理中的指定记录。 + + :param DeleteBackgroundTaskRequest request + :return: DeleteBackgroundTaskResponse + """ + + all_params = ['instance_id', 'task_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/tasks/{task_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='DeleteBackgroundTaskResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def delete_instance_async(self, request): + """删除指定的实例 + + 删除指定的实例,释放该实例的所有资源。 + + :param DeleteInstanceRequest request + :return: DeleteInstanceResponse + """ + return self.delete_instance_with_http_info(request) + + def delete_instance_with_http_info(self, request): + """删除指定的实例 + + 删除指定的实例,释放该实例的所有资源。 + + :param DeleteInstanceRequest request + :return: DeleteInstanceResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='DeleteInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def delete_sink_task_async(self, request): + """删除单个转储任务 + + 删除单个转储任务。 + + :param DeleteSinkTaskRequest request + :return: DeleteSinkTaskResponse + """ + return self.delete_sink_task_with_http_info(request) + + def delete_sink_task_with_http_info(self, request): + """删除单个转储任务 + + 删除单个转储任务。 + + :param DeleteSinkTaskRequest request + :return: DeleteSinkTaskResponse + """ + + all_params = ['connector_id', 'task_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'connector_id' in local_var_params: + path_params['connector_id'] = local_var_params['connector_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/connectors/{connector_id}/sink-tasks/{task_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='DeleteSinkTaskResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_available_zones_async(self, request): + """查询可用区信息 + + 在创建实例时,需要配置实例所在的可用区ID,可通过该接口查询可用区的ID。 + + :param ListAvailableZonesRequest request + :return: ListAvailableZonesResponse + """ + return self.list_available_zones_with_http_info(request) + + def list_available_zones_with_http_info(self, request): + """查询可用区信息 + + 在创建实例时,需要配置实例所在的可用区ID,可通过该接口查询可用区的ID。 + + :param ListAvailableZonesRequest request + :return: ListAvailableZonesResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/available-zones', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListAvailableZonesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_background_tasks_async(self, request): + """查询实例的后台任务列表 + + 查询实例的后台任务列表。 + + :param ListBackgroundTasksRequest request + :return: ListBackgroundTasksResponse + """ + return self.list_background_tasks_with_http_info(request) + + def list_background_tasks_with_http_info(self, request): + """查询实例的后台任务列表 + + 查询实例的后台任务列表。 + + :param ListBackgroundTasksRequest request + :return: ListBackgroundTasksResponse + """ + + all_params = ['instance_id', 'start', 'limit', 'begin_time', 'end_time'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + if 'start' in local_var_params: + query_params.append(('start', local_var_params['start'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + if 'begin_time' in local_var_params: + query_params.append(('begin_time', local_var_params['begin_time'])) + if 'end_time' in local_var_params: + query_params.append(('end_time', local_var_params['end_time'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/tasks', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListBackgroundTasksResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_instance_topics_async(self, request): + """Kafka实例查询Topic + + 该接口用于查询指定Kafka实例的Topic详情。 + + :param ListInstanceTopicsRequest request + :return: ListInstanceTopicsResponse + """ + return self.list_instance_topics_with_http_info(request) + + def list_instance_topics_with_http_info(self, request): + """Kafka实例查询Topic + + 该接口用于查询指定Kafka实例的Topic详情。 + + :param ListInstanceTopicsRequest request + :return: ListInstanceTopicsResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/topics', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListInstanceTopicsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_instances_async(self, request): + """查询所有实例列表 + + 查询租户的实例列表,支持按照条件查询。 + + :param ListInstancesRequest request + :return: ListInstancesResponse + """ + return self.list_instances_with_http_info(request) + + def list_instances_with_http_info(self, request): + """查询所有实例列表 + + 查询租户的实例列表,支持按照条件查询。 + + :param ListInstancesRequest request + :return: ListInstancesResponse + """ + + all_params = ['engine', 'name', 'instance_id', 'status', 'include_failure', 'exact_match_name', 'enterprise_project_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'engine' in local_var_params: + query_params.append(('engine', local_var_params['engine'])) + if 'name' in local_var_params: + query_params.append(('name', local_var_params['name'])) + if 'instance_id' in local_var_params: + query_params.append(('instance_id', local_var_params['instance_id'])) + if 'status' in local_var_params: + query_params.append(('status', local_var_params['status'])) + if 'include_failure' in local_var_params: + query_params.append(('include_failure', local_var_params['include_failure'])) + if 'exact_match_name' in local_var_params: + query_params.append(('exact_match_name', local_var_params['exact_match_name'])) + if 'enterprise_project_id' in local_var_params: + query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListInstancesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_products_async(self, request): + """查询产品规格列表 + + 在创建kafka实例时,需要配置订购的产品ID(即product_id),可通过该接口查询产品规格。 例如,要订购按需计费、基准带宽为100MB的kafka实例,可从接口响应消息中,查找Hourly的消息体,然后找到bandwidth为100MB的记录对应的product_id,该product_id的值即是创建上述kafka实例时需要配置的产品ID。 同时,unavailable_zones字段表示资源不足的可用区列表,如果为空,则表示所有可用区都有资源,如果不为空,则表示字段值的可用区没有资源。所以必须确保您购买的资源所在的可用区有资源,不在该字段列表内。 例如,响应消息中bandwidth字段为1200MB的记录,unavailable_zones字段包含cn-east-2b、cn-east-2a和cn-east-2d,表示在华东-上海2的可用区1、可用区2、可用区3都没有该资源。 + + :param ListProductsRequest request + :return: ListProductsResponse + """ + return self.list_products_with_http_info(request) + + def list_products_with_http_info(self, request): + """查询产品规格列表 + + 在创建kafka实例时,需要配置订购的产品ID(即product_id),可通过该接口查询产品规格。 例如,要订购按需计费、基准带宽为100MB的kafka实例,可从接口响应消息中,查找Hourly的消息体,然后找到bandwidth为100MB的记录对应的product_id,该product_id的值即是创建上述kafka实例时需要配置的产品ID。 同时,unavailable_zones字段表示资源不足的可用区列表,如果为空,则表示所有可用区都有资源,如果不为空,则表示字段值的可用区没有资源。所以必须确保您购买的资源所在的可用区有资源,不在该字段列表内。 例如,响应消息中bandwidth字段为1200MB的记录,unavailable_zones字段包含cn-east-2b、cn-east-2a和cn-east-2d,表示在华东-上海2的可用区1、可用区2、可用区3都没有该资源。 + + :param ListProductsRequest request + :return: ListProductsResponse + """ + + all_params = ['engine'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'engine' in local_var_params: + query_params.append(('engine', local_var_params['engine'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/products', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListProductsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_sink_tasks_async(self, request): + """查询转储任务列表 + + 查询转储任务列表。 + + :param ListSinkTasksRequest request + :return: ListSinkTasksResponse + """ + return self.list_sink_tasks_with_http_info(request) + + def list_sink_tasks_with_http_info(self, request): + """查询转储任务列表 + + 查询转储任务列表。 + + :param ListSinkTasksRequest request + :return: ListSinkTasksResponse + """ + + all_params = ['connector_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'connector_id' in local_var_params: + path_params['connector_id'] = local_var_params['connector_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/connectors/{connector_id}/sink-tasks', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListSinkTasksResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def reset_manager_password_async(self, request): + """重置Manager密码 + + 重置Manager密码。 + + :param ResetManagerPasswordRequest request + :return: ResetManagerPasswordResponse + """ + return self.reset_manager_password_with_http_info(request) + + def reset_manager_password_with_http_info(self, request): + """重置Manager密码 + + 重置Manager密码。 + + :param ResetManagerPasswordRequest request + :return: ResetManagerPasswordResponse + """ + + all_params = ['instance_id', 'reset_manager_password_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/kafka-manager-password', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ResetManagerPasswordResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def reset_message_offset_async(self, request): + """重置消费组消费进度到指定位置 + + Kafka实例不支持在线重置消费进度。在执行重置消费进度之前,必须停止被重置消费组客户端。 > 在停止被重置消费组客户端后,需要经过ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG配置的时间(默认10000毫秒),服务端才认为消费组客户端真正下线。 + + :param ResetMessageOffsetRequest request + :return: ResetMessageOffsetResponse + """ + return self.reset_message_offset_with_http_info(request) + + def reset_message_offset_with_http_info(self, request): + """重置消费组消费进度到指定位置 + + Kafka实例不支持在线重置消费进度。在执行重置消费进度之前,必须停止被重置消费组客户端。 > 在停止被重置消费组客户端后,需要经过ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG配置的时间(默认10000毫秒),服务端才认为消费组客户端真正下线。 + + :param ResetMessageOffsetRequest request + :return: ResetMessageOffsetResponse + """ + + all_params = ['instance_id', 'group', 'reset_message_offset_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'group' in local_var_params: + path_params['group'] = local_var_params['group'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/groups/{group}/reset-message-offset', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ResetMessageOffsetResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def reset_password_async(self, request): + """重置密码 + + 重置密码。 + + :param ResetPasswordRequest request + :return: ResetPasswordResponse + """ + return self.reset_password_with_http_info(request) + + def reset_password_with_http_info(self, request): + """重置密码 + + 重置密码。 + + :param ResetPasswordRequest request + :return: ResetPasswordResponse + """ + + all_params = ['instance_id', 'reset_password_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/password', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ResetPasswordResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def resize_instance_async(self, request): + """实例规格变更 + + 实例规格变更。 + + :param ResizeInstanceRequest request + :return: ResizeInstanceResponse + """ + return self.resize_instance_with_http_info(request) + + def resize_instance_with_http_info(self, request): + """实例规格变更 + + 实例规格变更。 + + :param ResizeInstanceRequest request + :return: ResizeInstanceResponse + """ + + all_params = ['instance_id', 'resize_instance_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/extend', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ResizeInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def restart_manager_async(self, request): + """重启Manager + + 重启Manager。 + + :param RestartManagerRequest request + :return: RestartManagerResponse + """ + return self.restart_manager_with_http_info(request) + + def restart_manager_with_http_info(self, request): + """重启Manager + + 重启Manager。 + + :param RestartManagerRequest request + :return: RestartManagerResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/restart-kafka-manager', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='RestartManagerResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_background_task_async(self, request): + """查询后台任务管理中的指定记录 + + 查询后台任务管理中的指定记录。 + + :param ShowBackgroundTaskRequest request + :return: ShowBackgroundTaskResponse + """ + return self.show_background_task_with_http_info(request) + + def show_background_task_with_http_info(self, request): + """查询后台任务管理中的指定记录 + + 查询后台任务管理中的指定记录。 + + :param ShowBackgroundTaskRequest request + :return: ShowBackgroundTaskResponse + """ + + all_params = ['instance_id', 'task_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/tasks/{task_id}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowBackgroundTaskResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_ces_hierarchy_async(self, request): + """查询实例在CES的监控层级关系 + + 查询实例在CES的监控层级关系。 + + :param ShowCesHierarchyRequest request + :return: ShowCesHierarchyResponse + """ + return self.show_ces_hierarchy_with_http_info(request) + + def show_ces_hierarchy_with_http_info(self, request): + """查询实例在CES的监控层级关系 + + 查询实例在CES的监控层级关系。 + + :param ShowCesHierarchyRequest request + :return: ShowCesHierarchyResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/ces-hierarchy', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowCesHierarchyResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_cluster_async(self, request): + """查询Kafka集群元数据信息 + + 查询Kafka集群元数据信息。 + + :param ShowClusterRequest request + :return: ShowClusterResponse + """ + return self.show_cluster_with_http_info(request) + + def show_cluster_with_http_info(self, request): + """查询Kafka集群元数据信息 + + 查询Kafka集群元数据信息。 + + :param ShowClusterRequest request + :return: ShowClusterResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/cluster', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowClusterResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_coordinators_async(self, request): + """查询Kafka实例的协调器信息 + + 查询Kafka实例的协调器信息。 + + :param ShowCoordinatorsRequest request + :return: ShowCoordinatorsResponse + """ + return self.show_coordinators_with_http_info(request) + + def show_coordinators_with_http_info(self, request): + """查询Kafka实例的协调器信息 + + 查询Kafka实例的协调器信息。 + + :param ShowCoordinatorsRequest request + :return: ShowCoordinatorsResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/coordinators', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowCoordinatorsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_groups_async(self, request): + """查询消费组信息 + + 查询消费组信息。 + + :param ShowGroupsRequest request + :return: ShowGroupsResponse + """ + return self.show_groups_with_http_info(request) + + def show_groups_with_http_info(self, request): + """查询消费组信息 + + 查询消费组信息。 + + :param ShowGroupsRequest request + :return: ShowGroupsResponse + """ + + all_params = ['instance_id', 'group'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'group' in local_var_params: + path_params['group'] = local_var_params['group'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/groups/{group}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowGroupsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_instance_async(self, request): + """查询指定实例 + + 查询指定实例的详细信息。 + + :param ShowInstanceRequest request + :return: ShowInstanceResponse + """ + return self.show_instance_with_http_info(request) + + def show_instance_with_http_info(self, request): + """查询指定实例 + + 查询指定实例的详细信息。 + + :param ShowInstanceRequest request + :return: ShowInstanceResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_instance_extend_product_info_async(self, request): + """查询实例的扩容规格列表 + + 查询实例的扩容规格列表。 + + :param ShowInstanceExtendProductInfoRequest request + :return: ShowInstanceExtendProductInfoResponse + """ + return self.show_instance_extend_product_info_with_http_info(request) + + def show_instance_extend_product_info_with_http_info(self, request): + """查询实例的扩容规格列表 + + 查询实例的扩容规格列表。 + + :param ShowInstanceExtendProductInfoRequest request + :return: ShowInstanceExtendProductInfoResponse + """ + + all_params = ['instance_id', 'type', 'engine'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + if 'type' in local_var_params: + query_params.append(('type', local_var_params['type'])) + if 'engine' in local_var_params: + query_params.append(('engine', local_var_params['engine'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/extend', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowInstanceExtendProductInfoResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_instance_tags_async(self, request): + """查询实例标签 + + 查询实例标签。 + + :param ShowInstanceTagsRequest request + :return: ShowInstanceTagsResponse + """ + return self.show_instance_tags_with_http_info(request) + + def show_instance_tags_with_http_info(self, request): + """查询实例标签 + + 查询实例标签。 + + :param ShowInstanceTagsRequest request + :return: ShowInstanceTagsResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/kafka/{instance_id}/tags', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowInstanceTagsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_instance_topic_detail_async(self, request): + """查询Kafka实例Topic详细信息 + + 查询Kafka实例Topic详细信息。 + + :param ShowInstanceTopicDetailRequest request + :return: ShowInstanceTopicDetailResponse + """ + return self.show_instance_topic_detail_with_http_info(request) + + def show_instance_topic_detail_with_http_info(self, request): + """查询Kafka实例Topic详细信息 + + 查询Kafka实例Topic详细信息。 + + :param ShowInstanceTopicDetailRequest request + :return: ShowInstanceTopicDetailResponse + """ + + all_params = ['instance_id', 'topic'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'topic' in local_var_params: + path_params['topic'] = local_var_params['topic'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/topics/{topic}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowInstanceTopicDetailResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_maintain_windows_async(self, request): + """查询维护时间窗时间段 + + 查询维护时间窗开始时间和结束时间。 + + :param ShowMaintainWindowsRequest request + :return: ShowMaintainWindowsResponse + """ + return self.show_maintain_windows_with_http_info(request) + + def show_maintain_windows_with_http_info(self, request): + """查询维护时间窗时间段 + + 查询维护时间窗开始时间和结束时间。 + + :param ShowMaintainWindowsRequest request + :return: ShowMaintainWindowsResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/instances/maintain-windows', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowMaintainWindowsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_messages_async(self, request): + """查询分区指定时间段的消息 + + 查询分区指定时间段的消息。 + + :param ShowMessagesRequest request + :return: ShowMessagesResponse + """ + return self.show_messages_with_http_info(request) + + def show_messages_with_http_info(self, request): + """查询分区指定时间段的消息 + + 查询分区指定时间段的消息。 + + :param ShowMessagesRequest request + :return: ShowMessagesResponse + """ + + all_params = ['instance_id', 'topic', 'start_time', 'end_time', 'limit', 'offset', 'partition'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'topic' in local_var_params: + path_params['topic'] = local_var_params['topic'] + + query_params = [] + if 'start_time' in local_var_params: + query_params.append(('start_time', local_var_params['start_time'])) + if 'end_time' in local_var_params: + query_params.append(('end_time', local_var_params['end_time'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'partition' in local_var_params: + query_params.append(('partition', local_var_params['partition'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/messages', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowMessagesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_partition_beginning_message_async(self, request): + """查询分区最新消息的位置 + + 查询分区最新消息的位置。 + + :param ShowPartitionBeginningMessageRequest request + :return: ShowPartitionBeginningMessageResponse + """ + return self.show_partition_beginning_message_with_http_info(request) + + def show_partition_beginning_message_with_http_info(self, request): + """查询分区最新消息的位置 + + 查询分区最新消息的位置。 + + :param ShowPartitionBeginningMessageRequest request + :return: ShowPartitionBeginningMessageResponse + """ + + all_params = ['instance_id', 'topic', 'partition'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'topic' in local_var_params: + path_params['topic'] = local_var_params['topic'] + if 'partition' in local_var_params: + path_params['partition'] = local_var_params['partition'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions/{partition}/beginning-message', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowPartitionBeginningMessageResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_partition_end_message_async(self, request): + """查询分区最早消息的位置 + + 查询分区最早消息的位置。 + + :param ShowPartitionEndMessageRequest request + :return: ShowPartitionEndMessageResponse + """ + return self.show_partition_end_message_with_http_info(request) + + def show_partition_end_message_with_http_info(self, request): + """查询分区最早消息的位置 + + 查询分区最早消息的位置。 + + :param ShowPartitionEndMessageRequest request + :return: ShowPartitionEndMessageResponse + """ + + all_params = ['instance_id', 'topic', 'partition'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'topic' in local_var_params: + path_params['topic'] = local_var_params['topic'] + if 'partition' in local_var_params: + path_params['partition'] = local_var_params['partition'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions/{partition}/end-message', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowPartitionEndMessageResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_partition_message_async(self, request): + """查询分区指定偏移量的消息 + + 查询分区指定偏移量的消息。 + + :param ShowPartitionMessageRequest request + :return: ShowPartitionMessageResponse + """ + return self.show_partition_message_with_http_info(request) + + def show_partition_message_with_http_info(self, request): + """查询分区指定偏移量的消息 + + 查询分区指定偏移量的消息。 + + :param ShowPartitionMessageRequest request + :return: ShowPartitionMessageResponse + """ + + all_params = ['instance_id', 'topic', 'partition', 'message_offset'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'topic' in local_var_params: + path_params['topic'] = local_var_params['topic'] + if 'partition' in local_var_params: + path_params['partition'] = local_var_params['partition'] + + query_params = [] + if 'message_offset' in local_var_params: + query_params.append(('message_offset', local_var_params['message_offset'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions/{partition}/message', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowPartitionMessageResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_project_tags_async(self, request): + """查询项目标签 + + 查询项目标签。 + + :param ShowProjectTagsRequest request + :return: ShowProjectTagsResponse + """ + return self.show_project_tags_with_http_info(request) + + def show_project_tags_with_http_info(self, request): + """查询项目标签 + + 查询项目标签。 + + :param ShowProjectTagsRequest request + :return: ShowProjectTagsResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/kafka/tags', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowProjectTagsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_sink_task_detail_async(self, request): + """查询单个转储任务 + + 查询单个转储任务。 + + :param ShowSinkTaskDetailRequest request + :return: ShowSinkTaskDetailResponse + """ + return self.show_sink_task_detail_with_http_info(request) + + def show_sink_task_detail_with_http_info(self, request): + """查询单个转储任务 + + 查询单个转储任务。 + + :param ShowSinkTaskDetailRequest request + :return: ShowSinkTaskDetailResponse + """ + + all_params = ['connector_id', 'task_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'connector_id' in local_var_params: + path_params['connector_id'] = local_var_params['connector_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/connectors/{connector_id}/sink-tasks/{task_id}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowSinkTaskDetailResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_instance_async(self, request): + """修改实例信息 + + 修改实例的名称和描述信息。 + + :param UpdateInstanceRequest request + :return: UpdateInstanceResponse + """ + return self.update_instance_with_http_info(request) + + def update_instance_with_http_info(self, request): + """修改实例信息 + + 修改实例的名称和描述信息。 + + :param UpdateInstanceRequest request + :return: UpdateInstanceResponse + """ + + all_params = ['instance_id', 'update_instance_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdateInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_instance_auto_create_topic_async(self, request): + """开启或关闭实例自动创建topic功能 + + 开启或关闭实例自动创建topic功能。 + + :param UpdateInstanceAutoCreateTopicRequest request + :return: UpdateInstanceAutoCreateTopicResponse + """ + return self.update_instance_auto_create_topic_with_http_info(request) + + def update_instance_auto_create_topic_with_http_info(self, request): + """开启或关闭实例自动创建topic功能 + + 开启或关闭实例自动创建topic功能。 + + :param UpdateInstanceAutoCreateTopicRequest request + :return: UpdateInstanceAutoCreateTopicResponse + """ + + all_params = ['instance_id', 'update_instance_auto_create_topic_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/autotopic', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdateInstanceAutoCreateTopicResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_instance_cross_vpcip_async(self, request): + """修改实例跨VPC访问的内网IP + + 修改实例跨VPC访问的内网IP。 + + :param UpdateInstanceCrossVpcipRequest request + :return: UpdateInstanceCrossVpcipResponse + """ + return self.update_instance_cross_vpcip_with_http_info(request) + + def update_instance_cross_vpcip_with_http_info(self, request): + """修改实例跨VPC访问的内网IP + + 修改实例跨VPC访问的内网IP。 + + :param UpdateInstanceCrossVpcipRequest request + :return: UpdateInstanceCrossVpcipResponse + """ + + all_params = ['instance_id', 'update_instance_cross_vpcip_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/crossvpc/modify', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdateInstanceCrossVpcipResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_instance_topic_async(self, request): + """修改Kafka实例Topic + + 修改Kafka实例Topic + + :param UpdateInstanceTopicRequest request + :return: UpdateInstanceTopicResponse + """ + return self.update_instance_topic_with_http_info(request) + + def update_instance_topic_with_http_info(self, request): + """修改Kafka实例Topic + + 修改Kafka实例Topic + + :param UpdateInstanceTopicRequest request + :return: UpdateInstanceTopicResponse + """ + + all_params = ['instance_id', 'update_instance_topic_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/topics', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdateInstanceTopicResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_sink_task_quota_async(self, request): + """修改转储任务的配额 + + 修改转储任务的配额。 + + :param UpdateSinkTaskQuotaRequest request + :return: UpdateSinkTaskQuotaResponse + """ + return self.update_sink_task_quota_with_http_info(request) + + def update_sink_task_quota_with_http_info(self, request): + """修改转储任务的配额 + + 修改转储任务的配额。 + + :param UpdateSinkTaskQuotaRequest request + :return: UpdateSinkTaskQuotaResponse + """ + + all_params = ['connector_id', 'update_sink_task_quota_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'connector_id' in local_var_params: + path_params['connector_id'] = local_var_params['connector_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/connectors/{connector_id}/sink-tasks', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdateSinkTaskQuotaResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_topic_replica_async(self, request): + """修改Kafka实例Topic分区的副本 + + 修改Kafka实例Topic分区的副本。 + + :param UpdateTopicReplicaRequest request + :return: UpdateTopicReplicaResponse + """ + return self.update_topic_replica_with_http_info(request) + + def update_topic_replica_with_http_info(self, request): + """修改Kafka实例Topic分区的副本 + + 修改Kafka实例Topic分区的副本。 + + :param UpdateTopicReplicaRequest request + :return: UpdateTopicReplicaResponse + """ + + all_params = ['instance_id', 'topic', 'update_topic_replica_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'topic' in local_var_params: + path_params['topic'] = local_var_params['topic'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/replicas-reassignment', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdateTopicReplicaResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, + body=None, post_params=None, response_type=None, auth_settings=None, collection_formats=None, + request_type=None): + """Makes the HTTP request and returns deserialized data. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response_type: Response data type. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :return: + Return the response directly. + """ + return self.do_http_request( + method=method, + resource_path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body, + post_params=post_params, + response_type=response_type, + collection_formats=collection_formats, + request_type=request_type, + async_request=True) diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/kafka_client.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/kafka_client.py new file mode 100644 index 0000000000..3badea0915 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/kafka_client.py @@ -0,0 +1,2758 @@ +# coding: utf-8 + +from __future__ import absolute_import + +import datetime +import re +import importlib + +import six + +from huaweicloudsdkcore.client import Client, ClientBuilder +from huaweicloudsdkcore.exceptions import exceptions +from huaweicloudsdkcore.utils import http_utils +from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest + + +class KafkaClient(Client): + """ + :param configuration: .Configuration object for this client + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self): + super(KafkaClient, self).__init__() + self.model_package = importlib.import_module("huaweicloudsdkkafka.v2.model") + self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} + + @staticmethod + def new_builder(clazz): + return ClientBuilder(clazz) + + def batch_create_or_delete_instance_tag(self, request): + """批量添加或删除实例标签 + + 批量添加或删除实例标签。 + + :param BatchCreateOrDeleteInstanceTagRequest request + :return: BatchCreateOrDeleteInstanceTagResponse + """ + return self.batch_create_or_delete_instance_tag_with_http_info(request) + + def batch_create_or_delete_instance_tag_with_http_info(self, request): + """批量添加或删除实例标签 + + 批量添加或删除实例标签。 + + :param BatchCreateOrDeleteInstanceTagRequest request + :return: BatchCreateOrDeleteInstanceTagResponse + """ + + all_params = ['instance_id', 'batch_create_or_delete_instance_tag_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/kafka/{instance_id}/tags/action', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='BatchCreateOrDeleteInstanceTagResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def batch_delete_instance_topic(self, request): + """Kafka实例批量删除Topic + + 该接口用于向Kafka实例批量删除Topic。 + + :param BatchDeleteInstanceTopicRequest request + :return: BatchDeleteInstanceTopicResponse + """ + return self.batch_delete_instance_topic_with_http_info(request) + + def batch_delete_instance_topic_with_http_info(self, request): + """Kafka实例批量删除Topic + + 该接口用于向Kafka实例批量删除Topic。 + + :param BatchDeleteInstanceTopicRequest request + :return: BatchDeleteInstanceTopicResponse + """ + + all_params = ['instance_id', 'batch_delete_instance_topic_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/topics/delete', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='BatchDeleteInstanceTopicResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def batch_restart_or_delete_instances(self, request): + """批量重启或删除实例 + + 批量重启或删除实例。 在实例重启过程中,客户端的生产与消费消息等请求会被拒绝。 实例删除后,实例中原有的数据将被删除,且没有备份,请谨慎操作。 + + :param BatchRestartOrDeleteInstancesRequest request + :return: BatchRestartOrDeleteInstancesResponse + """ + return self.batch_restart_or_delete_instances_with_http_info(request) + + def batch_restart_or_delete_instances_with_http_info(self, request): + """批量重启或删除实例 + + 批量重启或删除实例。 在实例重启过程中,客户端的生产与消费消息等请求会被拒绝。 实例删除后,实例中原有的数据将被删除,且没有备份,请谨慎操作。 + + :param BatchRestartOrDeleteInstancesRequest request + :return: BatchRestartOrDeleteInstancesResponse + """ + + all_params = ['batch_restart_or_delete_instances_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/action', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='BatchRestartOrDeleteInstancesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def create_connector(self, request): + """创建实例的转储节点 + + 创建实例的转储节点。 + + :param CreateConnectorRequest request + :return: CreateConnectorResponse + """ + return self.create_connector_with_http_info(request) + + def create_connector_with_http_info(self, request): + """创建实例的转储节点 + + 创建实例的转储节点。 + + :param CreateConnectorRequest request + :return: CreateConnectorResponse + """ + + all_params = ['instance_id', 'create_connector_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/connector', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreateConnectorResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def create_instance_topic(self, request): + """Kafka实例创建Topic + + 该接口用于向Kafka实例创建Topic。 + + :param CreateInstanceTopicRequest request + :return: CreateInstanceTopicResponse + """ + return self.create_instance_topic_with_http_info(request) + + def create_instance_topic_with_http_info(self, request): + """Kafka实例创建Topic + + 该接口用于向Kafka实例创建Topic。 + + :param CreateInstanceTopicRequest request + :return: CreateInstanceTopicResponse + """ + + all_params = ['instance_id', 'create_instance_topic_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/topics', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreateInstanceTopicResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def create_partition(self, request): + """新增Kafka实例指定Topic分区 + + 新增Kafka实例指定Topic分区。 + + :param CreatePartitionRequest request + :return: CreatePartitionResponse + """ + return self.create_partition_with_http_info(request) + + def create_partition_with_http_info(self, request): + """新增Kafka实例指定Topic分区 + + 新增Kafka实例指定Topic分区。 + + :param CreatePartitionRequest request + :return: CreatePartitionResponse + """ + + all_params = ['instance_id', 'topic', 'create_partition_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'topic' in local_var_params: + path_params['topic'] = local_var_params['topic'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions-reassignment', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreatePartitionResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def create_post_paid_instance(self, request): + """创建实例(按需) + + 创建实例,该接口创建的实例为按需计费的方式。 + + :param CreatePostPaidInstanceRequest request + :return: CreatePostPaidInstanceResponse + """ + return self.create_post_paid_instance_with_http_info(request) + + def create_post_paid_instance_with_http_info(self, request): + """创建实例(按需) + + 创建实例,该接口创建的实例为按需计费的方式。 + + :param CreatePostPaidInstanceRequest request + :return: CreatePostPaidInstanceResponse + """ + + all_params = ['create_post_paid_instance_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreatePostPaidInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def create_sink_task(self, request): + """创建转储任务 + + 创建转储任务。 + + :param CreateSinkTaskRequest request + :return: CreateSinkTaskResponse + """ + return self.create_sink_task_with_http_info(request) + + def create_sink_task_with_http_info(self, request): + """创建转储任务 + + 创建转储任务。 + + :param CreateSinkTaskRequest request + :return: CreateSinkTaskResponse + """ + + all_params = ['connector_id', 'create_sink_task_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'connector_id' in local_var_params: + path_params['connector_id'] = local_var_params['connector_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/connectors/{connector_id}/sink-tasks', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreateSinkTaskResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def delete_background_task(self, request): + """删除后台任务管理中的指定记录 + + 删除后台任务管理中的指定记录。 + + :param DeleteBackgroundTaskRequest request + :return: DeleteBackgroundTaskResponse + """ + return self.delete_background_task_with_http_info(request) + + def delete_background_task_with_http_info(self, request): + """删除后台任务管理中的指定记录 + + 删除后台任务管理中的指定记录。 + + :param DeleteBackgroundTaskRequest request + :return: DeleteBackgroundTaskResponse + """ + + all_params = ['instance_id', 'task_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/tasks/{task_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='DeleteBackgroundTaskResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def delete_instance(self, request): + """删除指定的实例 + + 删除指定的实例,释放该实例的所有资源。 + + :param DeleteInstanceRequest request + :return: DeleteInstanceResponse + """ + return self.delete_instance_with_http_info(request) + + def delete_instance_with_http_info(self, request): + """删除指定的实例 + + 删除指定的实例,释放该实例的所有资源。 + + :param DeleteInstanceRequest request + :return: DeleteInstanceResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='DeleteInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def delete_sink_task(self, request): + """删除单个转储任务 + + 删除单个转储任务。 + + :param DeleteSinkTaskRequest request + :return: DeleteSinkTaskResponse + """ + return self.delete_sink_task_with_http_info(request) + + def delete_sink_task_with_http_info(self, request): + """删除单个转储任务 + + 删除单个转储任务。 + + :param DeleteSinkTaskRequest request + :return: DeleteSinkTaskResponse + """ + + all_params = ['connector_id', 'task_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'connector_id' in local_var_params: + path_params['connector_id'] = local_var_params['connector_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/connectors/{connector_id}/sink-tasks/{task_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='DeleteSinkTaskResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_available_zones(self, request): + """查询可用区信息 + + 在创建实例时,需要配置实例所在的可用区ID,可通过该接口查询可用区的ID。 + + :param ListAvailableZonesRequest request + :return: ListAvailableZonesResponse + """ + return self.list_available_zones_with_http_info(request) + + def list_available_zones_with_http_info(self, request): + """查询可用区信息 + + 在创建实例时,需要配置实例所在的可用区ID,可通过该接口查询可用区的ID。 + + :param ListAvailableZonesRequest request + :return: ListAvailableZonesResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/available-zones', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListAvailableZonesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_background_tasks(self, request): + """查询实例的后台任务列表 + + 查询实例的后台任务列表。 + + :param ListBackgroundTasksRequest request + :return: ListBackgroundTasksResponse + """ + return self.list_background_tasks_with_http_info(request) + + def list_background_tasks_with_http_info(self, request): + """查询实例的后台任务列表 + + 查询实例的后台任务列表。 + + :param ListBackgroundTasksRequest request + :return: ListBackgroundTasksResponse + """ + + all_params = ['instance_id', 'start', 'limit', 'begin_time', 'end_time'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + if 'start' in local_var_params: + query_params.append(('start', local_var_params['start'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + if 'begin_time' in local_var_params: + query_params.append(('begin_time', local_var_params['begin_time'])) + if 'end_time' in local_var_params: + query_params.append(('end_time', local_var_params['end_time'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/tasks', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListBackgroundTasksResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_instance_topics(self, request): + """Kafka实例查询Topic + + 该接口用于查询指定Kafka实例的Topic详情。 + + :param ListInstanceTopicsRequest request + :return: ListInstanceTopicsResponse + """ + return self.list_instance_topics_with_http_info(request) + + def list_instance_topics_with_http_info(self, request): + """Kafka实例查询Topic + + 该接口用于查询指定Kafka实例的Topic详情。 + + :param ListInstanceTopicsRequest request + :return: ListInstanceTopicsResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/topics', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListInstanceTopicsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_instances(self, request): + """查询所有实例列表 + + 查询租户的实例列表,支持按照条件查询。 + + :param ListInstancesRequest request + :return: ListInstancesResponse + """ + return self.list_instances_with_http_info(request) + + def list_instances_with_http_info(self, request): + """查询所有实例列表 + + 查询租户的实例列表,支持按照条件查询。 + + :param ListInstancesRequest request + :return: ListInstancesResponse + """ + + all_params = ['engine', 'name', 'instance_id', 'status', 'include_failure', 'exact_match_name', 'enterprise_project_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'engine' in local_var_params: + query_params.append(('engine', local_var_params['engine'])) + if 'name' in local_var_params: + query_params.append(('name', local_var_params['name'])) + if 'instance_id' in local_var_params: + query_params.append(('instance_id', local_var_params['instance_id'])) + if 'status' in local_var_params: + query_params.append(('status', local_var_params['status'])) + if 'include_failure' in local_var_params: + query_params.append(('include_failure', local_var_params['include_failure'])) + if 'exact_match_name' in local_var_params: + query_params.append(('exact_match_name', local_var_params['exact_match_name'])) + if 'enterprise_project_id' in local_var_params: + query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListInstancesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_products(self, request): + """查询产品规格列表 + + 在创建kafka实例时,需要配置订购的产品ID(即product_id),可通过该接口查询产品规格。 例如,要订购按需计费、基准带宽为100MB的kafka实例,可从接口响应消息中,查找Hourly的消息体,然后找到bandwidth为100MB的记录对应的product_id,该product_id的值即是创建上述kafka实例时需要配置的产品ID。 同时,unavailable_zones字段表示资源不足的可用区列表,如果为空,则表示所有可用区都有资源,如果不为空,则表示字段值的可用区没有资源。所以必须确保您购买的资源所在的可用区有资源,不在该字段列表内。 例如,响应消息中bandwidth字段为1200MB的记录,unavailable_zones字段包含cn-east-2b、cn-east-2a和cn-east-2d,表示在华东-上海2的可用区1、可用区2、可用区3都没有该资源。 + + :param ListProductsRequest request + :return: ListProductsResponse + """ + return self.list_products_with_http_info(request) + + def list_products_with_http_info(self, request): + """查询产品规格列表 + + 在创建kafka实例时,需要配置订购的产品ID(即product_id),可通过该接口查询产品规格。 例如,要订购按需计费、基准带宽为100MB的kafka实例,可从接口响应消息中,查找Hourly的消息体,然后找到bandwidth为100MB的记录对应的product_id,该product_id的值即是创建上述kafka实例时需要配置的产品ID。 同时,unavailable_zones字段表示资源不足的可用区列表,如果为空,则表示所有可用区都有资源,如果不为空,则表示字段值的可用区没有资源。所以必须确保您购买的资源所在的可用区有资源,不在该字段列表内。 例如,响应消息中bandwidth字段为1200MB的记录,unavailable_zones字段包含cn-east-2b、cn-east-2a和cn-east-2d,表示在华东-上海2的可用区1、可用区2、可用区3都没有该资源。 + + :param ListProductsRequest request + :return: ListProductsResponse + """ + + all_params = ['engine'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'engine' in local_var_params: + query_params.append(('engine', local_var_params['engine'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/products', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListProductsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_sink_tasks(self, request): + """查询转储任务列表 + + 查询转储任务列表。 + + :param ListSinkTasksRequest request + :return: ListSinkTasksResponse + """ + return self.list_sink_tasks_with_http_info(request) + + def list_sink_tasks_with_http_info(self, request): + """查询转储任务列表 + + 查询转储任务列表。 + + :param ListSinkTasksRequest request + :return: ListSinkTasksResponse + """ + + all_params = ['connector_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'connector_id' in local_var_params: + path_params['connector_id'] = local_var_params['connector_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/connectors/{connector_id}/sink-tasks', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListSinkTasksResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def reset_manager_password(self, request): + """重置Manager密码 + + 重置Manager密码。 + + :param ResetManagerPasswordRequest request + :return: ResetManagerPasswordResponse + """ + return self.reset_manager_password_with_http_info(request) + + def reset_manager_password_with_http_info(self, request): + """重置Manager密码 + + 重置Manager密码。 + + :param ResetManagerPasswordRequest request + :return: ResetManagerPasswordResponse + """ + + all_params = ['instance_id', 'reset_manager_password_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/kafka-manager-password', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ResetManagerPasswordResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def reset_message_offset(self, request): + """重置消费组消费进度到指定位置 + + Kafka实例不支持在线重置消费进度。在执行重置消费进度之前,必须停止被重置消费组客户端。 > 在停止被重置消费组客户端后,需要经过ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG配置的时间(默认10000毫秒),服务端才认为消费组客户端真正下线。 + + :param ResetMessageOffsetRequest request + :return: ResetMessageOffsetResponse + """ + return self.reset_message_offset_with_http_info(request) + + def reset_message_offset_with_http_info(self, request): + """重置消费组消费进度到指定位置 + + Kafka实例不支持在线重置消费进度。在执行重置消费进度之前,必须停止被重置消费组客户端。 > 在停止被重置消费组客户端后,需要经过ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG配置的时间(默认10000毫秒),服务端才认为消费组客户端真正下线。 + + :param ResetMessageOffsetRequest request + :return: ResetMessageOffsetResponse + """ + + all_params = ['instance_id', 'group', 'reset_message_offset_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'group' in local_var_params: + path_params['group'] = local_var_params['group'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/groups/{group}/reset-message-offset', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ResetMessageOffsetResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def reset_password(self, request): + """重置密码 + + 重置密码。 + + :param ResetPasswordRequest request + :return: ResetPasswordResponse + """ + return self.reset_password_with_http_info(request) + + def reset_password_with_http_info(self, request): + """重置密码 + + 重置密码。 + + :param ResetPasswordRequest request + :return: ResetPasswordResponse + """ + + all_params = ['instance_id', 'reset_password_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/password', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ResetPasswordResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def resize_instance(self, request): + """实例规格变更 + + 实例规格变更。 + + :param ResizeInstanceRequest request + :return: ResizeInstanceResponse + """ + return self.resize_instance_with_http_info(request) + + def resize_instance_with_http_info(self, request): + """实例规格变更 + + 实例规格变更。 + + :param ResizeInstanceRequest request + :return: ResizeInstanceResponse + """ + + all_params = ['instance_id', 'resize_instance_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/extend', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ResizeInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def restart_manager(self, request): + """重启Manager + + 重启Manager。 + + :param RestartManagerRequest request + :return: RestartManagerResponse + """ + return self.restart_manager_with_http_info(request) + + def restart_manager_with_http_info(self, request): + """重启Manager + + 重启Manager。 + + :param RestartManagerRequest request + :return: RestartManagerResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/restart-kafka-manager', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='RestartManagerResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_background_task(self, request): + """查询后台任务管理中的指定记录 + + 查询后台任务管理中的指定记录。 + + :param ShowBackgroundTaskRequest request + :return: ShowBackgroundTaskResponse + """ + return self.show_background_task_with_http_info(request) + + def show_background_task_with_http_info(self, request): + """查询后台任务管理中的指定记录 + + 查询后台任务管理中的指定记录。 + + :param ShowBackgroundTaskRequest request + :return: ShowBackgroundTaskResponse + """ + + all_params = ['instance_id', 'task_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/tasks/{task_id}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowBackgroundTaskResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_ces_hierarchy(self, request): + """查询实例在CES的监控层级关系 + + 查询实例在CES的监控层级关系。 + + :param ShowCesHierarchyRequest request + :return: ShowCesHierarchyResponse + """ + return self.show_ces_hierarchy_with_http_info(request) + + def show_ces_hierarchy_with_http_info(self, request): + """查询实例在CES的监控层级关系 + + 查询实例在CES的监控层级关系。 + + :param ShowCesHierarchyRequest request + :return: ShowCesHierarchyResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/ces-hierarchy', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowCesHierarchyResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_cluster(self, request): + """查询Kafka集群元数据信息 + + 查询Kafka集群元数据信息。 + + :param ShowClusterRequest request + :return: ShowClusterResponse + """ + return self.show_cluster_with_http_info(request) + + def show_cluster_with_http_info(self, request): + """查询Kafka集群元数据信息 + + 查询Kafka集群元数据信息。 + + :param ShowClusterRequest request + :return: ShowClusterResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/cluster', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowClusterResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_coordinators(self, request): + """查询Kafka实例的协调器信息 + + 查询Kafka实例的协调器信息。 + + :param ShowCoordinatorsRequest request + :return: ShowCoordinatorsResponse + """ + return self.show_coordinators_with_http_info(request) + + def show_coordinators_with_http_info(self, request): + """查询Kafka实例的协调器信息 + + 查询Kafka实例的协调器信息。 + + :param ShowCoordinatorsRequest request + :return: ShowCoordinatorsResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/coordinators', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowCoordinatorsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_groups(self, request): + """查询消费组信息 + + 查询消费组信息。 + + :param ShowGroupsRequest request + :return: ShowGroupsResponse + """ + return self.show_groups_with_http_info(request) + + def show_groups_with_http_info(self, request): + """查询消费组信息 + + 查询消费组信息。 + + :param ShowGroupsRequest request + :return: ShowGroupsResponse + """ + + all_params = ['instance_id', 'group'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'group' in local_var_params: + path_params['group'] = local_var_params['group'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/groups/{group}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowGroupsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_instance(self, request): + """查询指定实例 + + 查询指定实例的详细信息。 + + :param ShowInstanceRequest request + :return: ShowInstanceResponse + """ + return self.show_instance_with_http_info(request) + + def show_instance_with_http_info(self, request): + """查询指定实例 + + 查询指定实例的详细信息。 + + :param ShowInstanceRequest request + :return: ShowInstanceResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_instance_extend_product_info(self, request): + """查询实例的扩容规格列表 + + 查询实例的扩容规格列表。 + + :param ShowInstanceExtendProductInfoRequest request + :return: ShowInstanceExtendProductInfoResponse + """ + return self.show_instance_extend_product_info_with_http_info(request) + + def show_instance_extend_product_info_with_http_info(self, request): + """查询实例的扩容规格列表 + + 查询实例的扩容规格列表。 + + :param ShowInstanceExtendProductInfoRequest request + :return: ShowInstanceExtendProductInfoResponse + """ + + all_params = ['instance_id', 'type', 'engine'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + if 'type' in local_var_params: + query_params.append(('type', local_var_params['type'])) + if 'engine' in local_var_params: + query_params.append(('engine', local_var_params['engine'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/extend', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowInstanceExtendProductInfoResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_instance_tags(self, request): + """查询实例标签 + + 查询实例标签。 + + :param ShowInstanceTagsRequest request + :return: ShowInstanceTagsResponse + """ + return self.show_instance_tags_with_http_info(request) + + def show_instance_tags_with_http_info(self, request): + """查询实例标签 + + 查询实例标签。 + + :param ShowInstanceTagsRequest request + :return: ShowInstanceTagsResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/kafka/{instance_id}/tags', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowInstanceTagsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_instance_topic_detail(self, request): + """查询Kafka实例Topic详细信息 + + 查询Kafka实例Topic详细信息。 + + :param ShowInstanceTopicDetailRequest request + :return: ShowInstanceTopicDetailResponse + """ + return self.show_instance_topic_detail_with_http_info(request) + + def show_instance_topic_detail_with_http_info(self, request): + """查询Kafka实例Topic详细信息 + + 查询Kafka实例Topic详细信息。 + + :param ShowInstanceTopicDetailRequest request + :return: ShowInstanceTopicDetailResponse + """ + + all_params = ['instance_id', 'topic'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'topic' in local_var_params: + path_params['topic'] = local_var_params['topic'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/topics/{topic}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowInstanceTopicDetailResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_maintain_windows(self, request): + """查询维护时间窗时间段 + + 查询维护时间窗开始时间和结束时间。 + + :param ShowMaintainWindowsRequest request + :return: ShowMaintainWindowsResponse + """ + return self.show_maintain_windows_with_http_info(request) + + def show_maintain_windows_with_http_info(self, request): + """查询维护时间窗时间段 + + 查询维护时间窗开始时间和结束时间。 + + :param ShowMaintainWindowsRequest request + :return: ShowMaintainWindowsResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/instances/maintain-windows', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowMaintainWindowsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_messages(self, request): + """查询分区指定时间段的消息 + + 查询分区指定时间段的消息。 + + :param ShowMessagesRequest request + :return: ShowMessagesResponse + """ + return self.show_messages_with_http_info(request) + + def show_messages_with_http_info(self, request): + """查询分区指定时间段的消息 + + 查询分区指定时间段的消息。 + + :param ShowMessagesRequest request + :return: ShowMessagesResponse + """ + + all_params = ['instance_id', 'topic', 'start_time', 'end_time', 'limit', 'offset', 'partition'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'topic' in local_var_params: + path_params['topic'] = local_var_params['topic'] + + query_params = [] + if 'start_time' in local_var_params: + query_params.append(('start_time', local_var_params['start_time'])) + if 'end_time' in local_var_params: + query_params.append(('end_time', local_var_params['end_time'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'partition' in local_var_params: + query_params.append(('partition', local_var_params['partition'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/messages', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowMessagesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_partition_beginning_message(self, request): + """查询分区最新消息的位置 + + 查询分区最新消息的位置。 + + :param ShowPartitionBeginningMessageRequest request + :return: ShowPartitionBeginningMessageResponse + """ + return self.show_partition_beginning_message_with_http_info(request) + + def show_partition_beginning_message_with_http_info(self, request): + """查询分区最新消息的位置 + + 查询分区最新消息的位置。 + + :param ShowPartitionBeginningMessageRequest request + :return: ShowPartitionBeginningMessageResponse + """ + + all_params = ['instance_id', 'topic', 'partition'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'topic' in local_var_params: + path_params['topic'] = local_var_params['topic'] + if 'partition' in local_var_params: + path_params['partition'] = local_var_params['partition'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions/{partition}/beginning-message', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowPartitionBeginningMessageResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_partition_end_message(self, request): + """查询分区最早消息的位置 + + 查询分区最早消息的位置。 + + :param ShowPartitionEndMessageRequest request + :return: ShowPartitionEndMessageResponse + """ + return self.show_partition_end_message_with_http_info(request) + + def show_partition_end_message_with_http_info(self, request): + """查询分区最早消息的位置 + + 查询分区最早消息的位置。 + + :param ShowPartitionEndMessageRequest request + :return: ShowPartitionEndMessageResponse + """ + + all_params = ['instance_id', 'topic', 'partition'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'topic' in local_var_params: + path_params['topic'] = local_var_params['topic'] + if 'partition' in local_var_params: + path_params['partition'] = local_var_params['partition'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions/{partition}/end-message', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowPartitionEndMessageResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_partition_message(self, request): + """查询分区指定偏移量的消息 + + 查询分区指定偏移量的消息。 + + :param ShowPartitionMessageRequest request + :return: ShowPartitionMessageResponse + """ + return self.show_partition_message_with_http_info(request) + + def show_partition_message_with_http_info(self, request): + """查询分区指定偏移量的消息 + + 查询分区指定偏移量的消息。 + + :param ShowPartitionMessageRequest request + :return: ShowPartitionMessageResponse + """ + + all_params = ['instance_id', 'topic', 'partition', 'message_offset'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'topic' in local_var_params: + path_params['topic'] = local_var_params['topic'] + if 'partition' in local_var_params: + path_params['partition'] = local_var_params['partition'] + + query_params = [] + if 'message_offset' in local_var_params: + query_params.append(('message_offset', local_var_params['message_offset'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/partitions/{partition}/message', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowPartitionMessageResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_project_tags(self, request): + """查询项目标签 + + 查询项目标签。 + + :param ShowProjectTagsRequest request + :return: ShowProjectTagsResponse + """ + return self.show_project_tags_with_http_info(request) + + def show_project_tags_with_http_info(self, request): + """查询项目标签 + + 查询项目标签。 + + :param ShowProjectTagsRequest request + :return: ShowProjectTagsResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/kafka/tags', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowProjectTagsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_sink_task_detail(self, request): + """查询单个转储任务 + + 查询单个转储任务。 + + :param ShowSinkTaskDetailRequest request + :return: ShowSinkTaskDetailResponse + """ + return self.show_sink_task_detail_with_http_info(request) + + def show_sink_task_detail_with_http_info(self, request): + """查询单个转储任务 + + 查询单个转储任务。 + + :param ShowSinkTaskDetailRequest request + :return: ShowSinkTaskDetailResponse + """ + + all_params = ['connector_id', 'task_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'connector_id' in local_var_params: + path_params['connector_id'] = local_var_params['connector_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/connectors/{connector_id}/sink-tasks/{task_id}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowSinkTaskDetailResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_instance(self, request): + """修改实例信息 + + 修改实例的名称和描述信息。 + + :param UpdateInstanceRequest request + :return: UpdateInstanceResponse + """ + return self.update_instance_with_http_info(request) + + def update_instance_with_http_info(self, request): + """修改实例信息 + + 修改实例的名称和描述信息。 + + :param UpdateInstanceRequest request + :return: UpdateInstanceResponse + """ + + all_params = ['instance_id', 'update_instance_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdateInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_instance_auto_create_topic(self, request): + """开启或关闭实例自动创建topic功能 + + 开启或关闭实例自动创建topic功能。 + + :param UpdateInstanceAutoCreateTopicRequest request + :return: UpdateInstanceAutoCreateTopicResponse + """ + return self.update_instance_auto_create_topic_with_http_info(request) + + def update_instance_auto_create_topic_with_http_info(self, request): + """开启或关闭实例自动创建topic功能 + + 开启或关闭实例自动创建topic功能。 + + :param UpdateInstanceAutoCreateTopicRequest request + :return: UpdateInstanceAutoCreateTopicResponse + """ + + all_params = ['instance_id', 'update_instance_auto_create_topic_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/autotopic', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdateInstanceAutoCreateTopicResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_instance_cross_vpcip(self, request): + """修改实例跨VPC访问的内网IP + + 修改实例跨VPC访问的内网IP。 + + :param UpdateInstanceCrossVpcipRequest request + :return: UpdateInstanceCrossVpcipResponse + """ + return self.update_instance_cross_vpcip_with_http_info(request) + + def update_instance_cross_vpcip_with_http_info(self, request): + """修改实例跨VPC访问的内网IP + + 修改实例跨VPC访问的内网IP。 + + :param UpdateInstanceCrossVpcipRequest request + :return: UpdateInstanceCrossVpcipResponse + """ + + all_params = ['instance_id', 'update_instance_cross_vpcip_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/crossvpc/modify', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdateInstanceCrossVpcipResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_instance_topic(self, request): + """修改Kafka实例Topic + + 修改Kafka实例Topic + + :param UpdateInstanceTopicRequest request + :return: UpdateInstanceTopicResponse + """ + return self.update_instance_topic_with_http_info(request) + + def update_instance_topic_with_http_info(self, request): + """修改Kafka实例Topic + + 修改Kafka实例Topic + + :param UpdateInstanceTopicRequest request + :return: UpdateInstanceTopicResponse + """ + + all_params = ['instance_id', 'update_instance_topic_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/topics', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdateInstanceTopicResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_sink_task_quota(self, request): + """修改转储任务的配额 + + 修改转储任务的配额。 + + :param UpdateSinkTaskQuotaRequest request + :return: UpdateSinkTaskQuotaResponse + """ + return self.update_sink_task_quota_with_http_info(request) + + def update_sink_task_quota_with_http_info(self, request): + """修改转储任务的配额 + + 修改转储任务的配额。 + + :param UpdateSinkTaskQuotaRequest request + :return: UpdateSinkTaskQuotaResponse + """ + + all_params = ['connector_id', 'update_sink_task_quota_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'connector_id' in local_var_params: + path_params['connector_id'] = local_var_params['connector_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/connectors/{connector_id}/sink-tasks', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdateSinkTaskQuotaResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_topic_replica(self, request): + """修改Kafka实例Topic分区的副本 + + 修改Kafka实例Topic分区的副本。 + + :param UpdateTopicReplicaRequest request + :return: UpdateTopicReplicaResponse + """ + return self.update_topic_replica_with_http_info(request) + + def update_topic_replica_with_http_info(self, request): + """修改Kafka实例Topic分区的副本 + + 修改Kafka实例Topic分区的副本。 + + :param UpdateTopicReplicaRequest request + :return: UpdateTopicReplicaResponse + """ + + all_params = ['instance_id', 'topic', 'update_topic_replica_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'topic' in local_var_params: + path_params['topic'] = local_var_params['topic'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/management/topics/{topic}/replicas-reassignment', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdateTopicReplicaResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, + body=None, post_params=None, response_type=None, auth_settings=None, collection_formats=None, + request_type=None): + """Makes the HTTP request and returns deserialized data. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response_type: Response data type. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :return: + Return the response directly. + """ + return self.do_http_request( + method=method, + resource_path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body, + post_params=post_params, + response_type=response_type, + collection_formats=collection_formats, + request_type=request_type) diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/__init__.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/__init__.py new file mode 100644 index 0000000000..6d67030089 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/__init__.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +from __future__ import absolute_import + +# import models into model package +from huaweicloudsdkkafka.v2.model.batch_create_or_delete_instance_tag_request import BatchCreateOrDeleteInstanceTagRequest +from huaweicloudsdkkafka.v2.model.batch_create_or_delete_instance_tag_response import BatchCreateOrDeleteInstanceTagResponse +from huaweicloudsdkkafka.v2.model.batch_create_or_delete_tag_req import BatchCreateOrDeleteTagReq +from huaweicloudsdkkafka.v2.model.batch_delete_instance_topic_req import BatchDeleteInstanceTopicReq +from huaweicloudsdkkafka.v2.model.batch_delete_instance_topic_request import BatchDeleteInstanceTopicRequest +from huaweicloudsdkkafka.v2.model.batch_delete_instance_topic_resp_topics import BatchDeleteInstanceTopicRespTopics +from huaweicloudsdkkafka.v2.model.batch_delete_instance_topic_response import BatchDeleteInstanceTopicResponse +from huaweicloudsdkkafka.v2.model.batch_restart_or_delete_instance_req import BatchRestartOrDeleteInstanceReq +from huaweicloudsdkkafka.v2.model.batch_restart_or_delete_instance_resp_results import BatchRestartOrDeleteInstanceRespResults +from huaweicloudsdkkafka.v2.model.batch_restart_or_delete_instances_request import BatchRestartOrDeleteInstancesRequest +from huaweicloudsdkkafka.v2.model.batch_restart_or_delete_instances_response import BatchRestartOrDeleteInstancesResponse +from huaweicloudsdkkafka.v2.model.create_connector_req import CreateConnectorReq +from huaweicloudsdkkafka.v2.model.create_connector_request import CreateConnectorRequest +from huaweicloudsdkkafka.v2.model.create_connector_response import CreateConnectorResponse +from huaweicloudsdkkafka.v2.model.create_instance_topic_req import CreateInstanceTopicReq +from huaweicloudsdkkafka.v2.model.create_instance_topic_request import CreateInstanceTopicRequest +from huaweicloudsdkkafka.v2.model.create_instance_topic_response import CreateInstanceTopicResponse +from huaweicloudsdkkafka.v2.model.create_partition_req import CreatePartitionReq +from huaweicloudsdkkafka.v2.model.create_partition_request import CreatePartitionRequest +from huaweicloudsdkkafka.v2.model.create_partition_response import CreatePartitionResponse +from huaweicloudsdkkafka.v2.model.create_post_paid_instance_req import CreatePostPaidInstanceReq +from huaweicloudsdkkafka.v2.model.create_post_paid_instance_req_tags import CreatePostPaidInstanceReqTags +from huaweicloudsdkkafka.v2.model.create_post_paid_instance_request import CreatePostPaidInstanceRequest +from huaweicloudsdkkafka.v2.model.create_post_paid_instance_response import CreatePostPaidInstanceResponse +from huaweicloudsdkkafka.v2.model.create_sink_task_req import CreateSinkTaskReq +from huaweicloudsdkkafka.v2.model.create_sink_task_request import CreateSinkTaskRequest +from huaweicloudsdkkafka.v2.model.create_sink_task_response import CreateSinkTaskResponse +from huaweicloudsdkkafka.v2.model.delete_background_task_request import DeleteBackgroundTaskRequest +from huaweicloudsdkkafka.v2.model.delete_background_task_response import DeleteBackgroundTaskResponse +from huaweicloudsdkkafka.v2.model.delete_instance_request import DeleteInstanceRequest +from huaweicloudsdkkafka.v2.model.delete_instance_response import DeleteInstanceResponse +from huaweicloudsdkkafka.v2.model.delete_sink_task_request import DeleteSinkTaskRequest +from huaweicloudsdkkafka.v2.model.delete_sink_task_response import DeleteSinkTaskResponse +from huaweicloudsdkkafka.v2.model.list_available_zones_request import ListAvailableZonesRequest +from huaweicloudsdkkafka.v2.model.list_available_zones_resp_available_zones import ListAvailableZonesRespAvailableZones +from huaweicloudsdkkafka.v2.model.list_available_zones_response import ListAvailableZonesResponse +from huaweicloudsdkkafka.v2.model.list_background_tasks_request import ListBackgroundTasksRequest +from huaweicloudsdkkafka.v2.model.list_background_tasks_resp_tasks import ListBackgroundTasksRespTasks +from huaweicloudsdkkafka.v2.model.list_background_tasks_response import ListBackgroundTasksResponse +from huaweicloudsdkkafka.v2.model.list_instance_topics_request import ListInstanceTopicsRequest +from huaweicloudsdkkafka.v2.model.list_instance_topics_resp_topics import ListInstanceTopicsRespTopics +from huaweicloudsdkkafka.v2.model.list_instance_topics_response import ListInstanceTopicsResponse +from huaweicloudsdkkafka.v2.model.list_instances_request import ListInstancesRequest +from huaweicloudsdkkafka.v2.model.list_instances_resp_instances import ListInstancesRespInstances +from huaweicloudsdkkafka.v2.model.list_instances_response import ListInstancesResponse +from huaweicloudsdkkafka.v2.model.list_products_request import ListProductsRequest +from huaweicloudsdkkafka.v2.model.list_products_resp_detail import ListProductsRespDetail +from huaweicloudsdkkafka.v2.model.list_products_resp_hourly import ListProductsRespHourly +from huaweicloudsdkkafka.v2.model.list_products_resp_io import ListProductsRespIo +from huaweicloudsdkkafka.v2.model.list_products_resp_values import ListProductsRespValues +from huaweicloudsdkkafka.v2.model.list_products_response import ListProductsResponse +from huaweicloudsdkkafka.v2.model.list_sink_tasks_request import ListSinkTasksRequest +from huaweicloudsdkkafka.v2.model.list_sink_tasks_resp_tasks import ListSinkTasksRespTasks +from huaweicloudsdkkafka.v2.model.list_sink_tasks_response import ListSinkTasksResponse +from huaweicloudsdkkafka.v2.model.obs_destination_descriptor import ObsDestinationDescriptor +from huaweicloudsdkkafka.v2.model.reset_manager_password_req import ResetManagerPasswordReq +from huaweicloudsdkkafka.v2.model.reset_manager_password_request import ResetManagerPasswordRequest +from huaweicloudsdkkafka.v2.model.reset_manager_password_response import ResetManagerPasswordResponse +from huaweicloudsdkkafka.v2.model.reset_message_offset_req import ResetMessageOffsetReq +from huaweicloudsdkkafka.v2.model.reset_message_offset_request import ResetMessageOffsetRequest +from huaweicloudsdkkafka.v2.model.reset_message_offset_response import ResetMessageOffsetResponse +from huaweicloudsdkkafka.v2.model.reset_password_req import ResetPasswordReq +from huaweicloudsdkkafka.v2.model.reset_password_request import ResetPasswordRequest +from huaweicloudsdkkafka.v2.model.reset_password_response import ResetPasswordResponse +from huaweicloudsdkkafka.v2.model.reset_replica_req import ResetReplicaReq +from huaweicloudsdkkafka.v2.model.reset_replica_req_partitions import ResetReplicaReqPartitions +from huaweicloudsdkkafka.v2.model.resize_instance_req import ResizeInstanceReq +from huaweicloudsdkkafka.v2.model.resize_instance_request import ResizeInstanceRequest +from huaweicloudsdkkafka.v2.model.resize_instance_response import ResizeInstanceResponse +from huaweicloudsdkkafka.v2.model.restart_manager_request import RestartManagerRequest +from huaweicloudsdkkafka.v2.model.restart_manager_response import RestartManagerResponse +from huaweicloudsdkkafka.v2.model.show_background_task_request import ShowBackgroundTaskRequest +from huaweicloudsdkkafka.v2.model.show_background_task_response import ShowBackgroundTaskResponse +from huaweicloudsdkkafka.v2.model.show_ces_hierarchy_request import ShowCesHierarchyRequest +from huaweicloudsdkkafka.v2.model.show_ces_hierarchy_response import ShowCesHierarchyResponse +from huaweicloudsdkkafka.v2.model.show_ceshierarchy_resp_children import ShowCeshierarchyRespChildren +from huaweicloudsdkkafka.v2.model.show_ceshierarchy_resp_dimensions import ShowCeshierarchyRespDimensions +from huaweicloudsdkkafka.v2.model.show_ceshierarchy_resp_instance_ids import ShowCeshierarchyRespInstanceIds +from huaweicloudsdkkafka.v2.model.show_ceshierarchy_resp_nodes import ShowCeshierarchyRespNodes +from huaweicloudsdkkafka.v2.model.show_ceshierarchy_resp_partitions import ShowCeshierarchyRespPartitions +from huaweicloudsdkkafka.v2.model.show_ceshierarchy_resp_queues import ShowCeshierarchyRespQueues +from huaweicloudsdkkafka.v2.model.show_cluster_request import ShowClusterRequest +from huaweicloudsdkkafka.v2.model.show_cluster_resp_cluster import ShowClusterRespCluster +from huaweicloudsdkkafka.v2.model.show_cluster_resp_cluster_brokers import ShowClusterRespClusterBrokers +from huaweicloudsdkkafka.v2.model.show_cluster_response import ShowClusterResponse +from huaweicloudsdkkafka.v2.model.show_coordinators_request import ShowCoordinatorsRequest +from huaweicloudsdkkafka.v2.model.show_coordinators_resp_coordinators import ShowCoordinatorsRespCoordinators +from huaweicloudsdkkafka.v2.model.show_coordinators_response import ShowCoordinatorsResponse +from huaweicloudsdkkafka.v2.model.show_groups_request import ShowGroupsRequest +from huaweicloudsdkkafka.v2.model.show_groups_resp_group import ShowGroupsRespGroup +from huaweicloudsdkkafka.v2.model.show_groups_resp_group_assignment import ShowGroupsRespGroupAssignment +from huaweicloudsdkkafka.v2.model.show_groups_resp_group_group_message_offsets import ShowGroupsRespGroupGroupMessageOffsets +from huaweicloudsdkkafka.v2.model.show_groups_resp_group_members import ShowGroupsRespGroupMembers +from huaweicloudsdkkafka.v2.model.show_groups_response import ShowGroupsResponse +from huaweicloudsdkkafka.v2.model.show_instance_extend_product_info_request import ShowInstanceExtendProductInfoRequest +from huaweicloudsdkkafka.v2.model.show_instance_extend_product_info_response import ShowInstanceExtendProductInfoResponse +from huaweicloudsdkkafka.v2.model.show_instance_request import ShowInstanceRequest +from huaweicloudsdkkafka.v2.model.show_instance_response import ShowInstanceResponse +from huaweicloudsdkkafka.v2.model.show_instance_tags_request import ShowInstanceTagsRequest +from huaweicloudsdkkafka.v2.model.show_instance_tags_response import ShowInstanceTagsResponse +from huaweicloudsdkkafka.v2.model.show_instance_topic_detail_request import ShowInstanceTopicDetailRequest +from huaweicloudsdkkafka.v2.model.show_instance_topic_detail_resp_partitions import ShowInstanceTopicDetailRespPartitions +from huaweicloudsdkkafka.v2.model.show_instance_topic_detail_resp_replicas import ShowInstanceTopicDetailRespReplicas +from huaweicloudsdkkafka.v2.model.show_instance_topic_detail_response import ShowInstanceTopicDetailResponse +from huaweicloudsdkkafka.v2.model.show_maintain_windows_request import ShowMaintainWindowsRequest +from huaweicloudsdkkafka.v2.model.show_maintain_windows_resp_maintain_windows import ShowMaintainWindowsRespMaintainWindows +from huaweicloudsdkkafka.v2.model.show_maintain_windows_response import ShowMaintainWindowsResponse +from huaweicloudsdkkafka.v2.model.show_messages_request import ShowMessagesRequest +from huaweicloudsdkkafka.v2.model.show_messages_resp_messages import ShowMessagesRespMessages +from huaweicloudsdkkafka.v2.model.show_messages_response import ShowMessagesResponse +from huaweicloudsdkkafka.v2.model.show_partition_beginning_message_request import ShowPartitionBeginningMessageRequest +from huaweicloudsdkkafka.v2.model.show_partition_beginning_message_response import ShowPartitionBeginningMessageResponse +from huaweicloudsdkkafka.v2.model.show_partition_end_message_request import ShowPartitionEndMessageRequest +from huaweicloudsdkkafka.v2.model.show_partition_end_message_response import ShowPartitionEndMessageResponse +from huaweicloudsdkkafka.v2.model.show_partition_message_request import ShowPartitionMessageRequest +from huaweicloudsdkkafka.v2.model.show_partition_message_resp_message import ShowPartitionMessageRespMessage +from huaweicloudsdkkafka.v2.model.show_partition_message_response import ShowPartitionMessageResponse +from huaweicloudsdkkafka.v2.model.show_project_tags_request import ShowProjectTagsRequest +from huaweicloudsdkkafka.v2.model.show_project_tags_resp_tags import ShowProjectTagsRespTags +from huaweicloudsdkkafka.v2.model.show_project_tags_response import ShowProjectTagsResponse +from huaweicloudsdkkafka.v2.model.show_sink_task_detail_request import ShowSinkTaskDetailRequest +from huaweicloudsdkkafka.v2.model.show_sink_task_detail_resp_obs_destination_descriptor import ShowSinkTaskDetailRespObsDestinationDescriptor +from huaweicloudsdkkafka.v2.model.show_sink_task_detail_response import ShowSinkTaskDetailResponse +from huaweicloudsdkkafka.v2.model.update_instance_auto_create_topic_req import UpdateInstanceAutoCreateTopicReq +from huaweicloudsdkkafka.v2.model.update_instance_auto_create_topic_request import UpdateInstanceAutoCreateTopicRequest +from huaweicloudsdkkafka.v2.model.update_instance_auto_create_topic_response import UpdateInstanceAutoCreateTopicResponse +from huaweicloudsdkkafka.v2.model.update_instance_cross_vpcip_req import UpdateInstanceCrossVPCIPReq +from huaweicloudsdkkafka.v2.model.update_instance_cross_vpcip_request import UpdateInstanceCrossVPCIPRequest +from huaweicloudsdkkafka.v2.model.update_instance_cross_vpcip_resp_results import UpdateInstanceCrossVPCIPRespResults +from huaweicloudsdkkafka.v2.model.update_instance_cross_vpcip_response import UpdateInstanceCrossVPCIPResponse +from huaweicloudsdkkafka.v2.model.update_instance_req import UpdateInstanceReq +from huaweicloudsdkkafka.v2.model.update_instance_request import UpdateInstanceRequest +from huaweicloudsdkkafka.v2.model.update_instance_response import UpdateInstanceResponse +from huaweicloudsdkkafka.v2.model.update_instance_topic_req import UpdateInstanceTopicReq +from huaweicloudsdkkafka.v2.model.update_instance_topic_req_topics import UpdateInstanceTopicReqTopics +from huaweicloudsdkkafka.v2.model.update_instance_topic_request import UpdateInstanceTopicRequest +from huaweicloudsdkkafka.v2.model.update_instance_topic_response import UpdateInstanceTopicResponse +from huaweicloudsdkkafka.v2.model.update_sink_task_quota_req import UpdateSinkTaskQuotaReq +from huaweicloudsdkkafka.v2.model.update_sink_task_quota_request import UpdateSinkTaskQuotaRequest +from huaweicloudsdkkafka.v2.model.update_sink_task_quota_response import UpdateSinkTaskQuotaResponse +from huaweicloudsdkkafka.v2.model.update_topic_replica_request import UpdateTopicReplicaRequest +from huaweicloudsdkkafka.v2.model.update_topic_replica_response import UpdateTopicReplicaResponse diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_create_or_delete_instance_tag_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_create_or_delete_instance_tag_request.py new file mode 100644 index 0000000000..ce8f2bb410 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_create_or_delete_instance_tag_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BatchCreateOrDeleteInstanceTagRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'body': 'BatchCreateOrDeleteTagReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'body': 'body' + } + + def __init__(self, instance_id=None, body=None): + """BatchCreateOrDeleteInstanceTagRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this BatchCreateOrDeleteInstanceTagRequest. + + + :return: The instance_id of this BatchCreateOrDeleteInstanceTagRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this BatchCreateOrDeleteInstanceTagRequest. + + + :param instance_id: The instance_id of this BatchCreateOrDeleteInstanceTagRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def body(self): + """Gets the body of this BatchCreateOrDeleteInstanceTagRequest. + + + :return: The body of this BatchCreateOrDeleteInstanceTagRequest. + :rtype: BatchCreateOrDeleteTagReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this BatchCreateOrDeleteInstanceTagRequest. + + + :param body: The body of this BatchCreateOrDeleteInstanceTagRequest. + :type: BatchCreateOrDeleteTagReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchCreateOrDeleteInstanceTagRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_create_or_delete_instance_tag_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_create_or_delete_instance_tag_response.py new file mode 100644 index 0000000000..40a40d396c --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_create_or_delete_instance_tag_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class BatchCreateOrDeleteInstanceTagResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """BatchCreateOrDeleteInstanceTagResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchCreateOrDeleteInstanceTagResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_create_or_delete_tag_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_create_or_delete_tag_req.py new file mode 100644 index 0000000000..651a7445c9 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_create_or_delete_tag_req.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BatchCreateOrDeleteTagReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'action': 'str', + 'tags': 'list[CreatePostPaidInstanceReqTags]' + } + + attribute_map = { + 'action': 'action', + 'tags': 'tags' + } + + def __init__(self, action=None, tags=None): + """BatchCreateOrDeleteTagReq - a model defined in huaweicloud sdk""" + + + + self._action = None + self._tags = None + self.discriminator = None + + if action is not None: + self.action = action + if tags is not None: + self.tags = tags + + @property + def action(self): + """Gets the action of this BatchCreateOrDeleteTagReq. + + 操作标识(仅支持小写): - create(创建) - delete(删除) + + :return: The action of this BatchCreateOrDeleteTagReq. + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """Sets the action of this BatchCreateOrDeleteTagReq. + + 操作标识(仅支持小写): - create(创建) - delete(删除) + + :param action: The action of this BatchCreateOrDeleteTagReq. + :type: str + """ + self._action = action + + @property + def tags(self): + """Gets the tags of this BatchCreateOrDeleteTagReq. + + 标签列表。 + + :return: The tags of this BatchCreateOrDeleteTagReq. + :rtype: list[CreatePostPaidInstanceReqTags] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this BatchCreateOrDeleteTagReq. + + 标签列表。 + + :param tags: The tags of this BatchCreateOrDeleteTagReq. + :type: list[CreatePostPaidInstanceReqTags] + """ + self._tags = tags + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchCreateOrDeleteTagReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_delete_instance_topic_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_delete_instance_topic_req.py new file mode 100644 index 0000000000..f5a46f2849 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_delete_instance_topic_req.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BatchDeleteInstanceTopicReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'topics': 'list[str]' + } + + attribute_map = { + 'topics': 'topics' + } + + def __init__(self, topics=None): + """BatchDeleteInstanceTopicReq - a model defined in huaweicloud sdk""" + + + + self._topics = None + self.discriminator = None + + if topics is not None: + self.topics = topics + + @property + def topics(self): + """Gets the topics of this BatchDeleteInstanceTopicReq. + + 待删除的topic列表。 + + :return: The topics of this BatchDeleteInstanceTopicReq. + :rtype: list[str] + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this BatchDeleteInstanceTopicReq. + + 待删除的topic列表。 + + :param topics: The topics of this BatchDeleteInstanceTopicReq. + :type: list[str] + """ + self._topics = topics + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchDeleteInstanceTopicReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_delete_instance_topic_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_delete_instance_topic_request.py new file mode 100644 index 0000000000..39394f26b2 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_delete_instance_topic_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BatchDeleteInstanceTopicRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'body': 'BatchDeleteInstanceTopicReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'body': 'body' + } + + def __init__(self, instance_id=None, body=None): + """BatchDeleteInstanceTopicRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this BatchDeleteInstanceTopicRequest. + + + :return: The instance_id of this BatchDeleteInstanceTopicRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this BatchDeleteInstanceTopicRequest. + + + :param instance_id: The instance_id of this BatchDeleteInstanceTopicRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def body(self): + """Gets the body of this BatchDeleteInstanceTopicRequest. + + + :return: The body of this BatchDeleteInstanceTopicRequest. + :rtype: BatchDeleteInstanceTopicReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this BatchDeleteInstanceTopicRequest. + + + :param body: The body of this BatchDeleteInstanceTopicRequest. + :type: BatchDeleteInstanceTopicReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchDeleteInstanceTopicRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_delete_instance_topic_resp_topics.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_delete_instance_topic_resp_topics.py new file mode 100644 index 0000000000..9373a57fcf --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_delete_instance_topic_resp_topics.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BatchDeleteInstanceTopicRespTopics: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'id': 'str', + 'success': 'str' + } + + attribute_map = { + 'id': 'id', + 'success': 'success' + } + + def __init__(self, id=None, success=None): + """BatchDeleteInstanceTopicRespTopics - a model defined in huaweicloud sdk""" + + + + self._id = None + self._success = None + self.discriminator = None + + if id is not None: + self.id = id + if success is not None: + self.success = success + + @property + def id(self): + """Gets the id of this BatchDeleteInstanceTopicRespTopics. + + Topic名称。 + + :return: The id of this BatchDeleteInstanceTopicRespTopics. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this BatchDeleteInstanceTopicRespTopics. + + Topic名称。 + + :param id: The id of this BatchDeleteInstanceTopicRespTopics. + :type: str + """ + self._id = id + + @property + def success(self): + """Gets the success of this BatchDeleteInstanceTopicRespTopics. + + topic名称。 + + :return: The success of this BatchDeleteInstanceTopicRespTopics. + :rtype: str + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this BatchDeleteInstanceTopicRespTopics. + + topic名称。 + + :param success: The success of this BatchDeleteInstanceTopicRespTopics. + :type: str + """ + self._success = success + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchDeleteInstanceTopicRespTopics): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_delete_instance_topic_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_delete_instance_topic_response.py new file mode 100644 index 0000000000..cd40f1ee87 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_delete_instance_topic_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class BatchDeleteInstanceTopicResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'topics': 'list[BatchDeleteInstanceTopicRespTopics]' + } + + attribute_map = { + 'topics': 'topics' + } + + def __init__(self, topics=None): + """BatchDeleteInstanceTopicResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._topics = None + self.discriminator = None + + if topics is not None: + self.topics = topics + + @property + def topics(self): + """Gets the topics of this BatchDeleteInstanceTopicResponse. + + Topic列表。 + + :return: The topics of this BatchDeleteInstanceTopicResponse. + :rtype: list[BatchDeleteInstanceTopicRespTopics] + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this BatchDeleteInstanceTopicResponse. + + Topic列表。 + + :param topics: The topics of this BatchDeleteInstanceTopicResponse. + :type: list[BatchDeleteInstanceTopicRespTopics] + """ + self._topics = topics + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchDeleteInstanceTopicResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_restart_or_delete_instance_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_restart_or_delete_instance_req.py new file mode 100644 index 0000000000..aa8d3bd01e --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_restart_or_delete_instance_req.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BatchRestartOrDeleteInstanceReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instances': 'list[str]', + 'action': 'str', + 'all_failure': 'str' + } + + attribute_map = { + 'instances': 'instances', + 'action': 'action', + 'all_failure': 'all_failure' + } + + def __init__(self, instances=None, action=None, all_failure=None): + """BatchRestartOrDeleteInstanceReq - a model defined in huaweicloud sdk""" + + + + self._instances = None + self._action = None + self._all_failure = None + self.discriminator = None + + if instances is not None: + self.instances = instances + self.action = action + if all_failure is not None: + self.all_failure = all_failure + + @property + def instances(self): + """Gets the instances of this BatchRestartOrDeleteInstanceReq. + + 实例的ID列表。 + + :return: The instances of this BatchRestartOrDeleteInstanceReq. + :rtype: list[str] + """ + return self._instances + + @instances.setter + def instances(self, instances): + """Sets the instances of this BatchRestartOrDeleteInstanceReq. + + 实例的ID列表。 + + :param instances: The instances of this BatchRestartOrDeleteInstanceReq. + :type: list[str] + """ + self._instances = instances + + @property + def action(self): + """Gets the action of this BatchRestartOrDeleteInstanceReq. + + 对实例的操作:restart、delete + + :return: The action of this BatchRestartOrDeleteInstanceReq. + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """Sets the action of this BatchRestartOrDeleteInstanceReq. + + 对实例的操作:restart、delete + + :param action: The action of this BatchRestartOrDeleteInstanceReq. + :type: str + """ + self._action = action + + @property + def all_failure(self): + """Gets the all_failure of this BatchRestartOrDeleteInstanceReq. + + 参数值为kafka,表示删除租户所有创建失败的Kafka实例。 + + :return: The all_failure of this BatchRestartOrDeleteInstanceReq. + :rtype: str + """ + return self._all_failure + + @all_failure.setter + def all_failure(self, all_failure): + """Sets the all_failure of this BatchRestartOrDeleteInstanceReq. + + 参数值为kafka,表示删除租户所有创建失败的Kafka实例。 + + :param all_failure: The all_failure of this BatchRestartOrDeleteInstanceReq. + :type: str + """ + self._all_failure = all_failure + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchRestartOrDeleteInstanceReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_restart_or_delete_instance_resp_results.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_restart_or_delete_instance_resp_results.py new file mode 100644 index 0000000000..fe88adec31 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_restart_or_delete_instance_resp_results.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BatchRestartOrDeleteInstanceRespResults: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'result': 'str', + 'instance': 'str' + } + + attribute_map = { + 'result': 'result', + 'instance': 'instance' + } + + def __init__(self, result=None, instance=None): + """BatchRestartOrDeleteInstanceRespResults - a model defined in huaweicloud sdk""" + + + + self._result = None + self._instance = None + self.discriminator = None + + if result is not None: + self.result = result + if instance is not None: + self.instance = instance + + @property + def result(self): + """Gets the result of this BatchRestartOrDeleteInstanceRespResults. + + 操作结果。 - 'success: 操作成功' - 'failed: 操作失败' + + :return: The result of this BatchRestartOrDeleteInstanceRespResults. + :rtype: str + """ + return self._result + + @result.setter + def result(self, result): + """Sets the result of this BatchRestartOrDeleteInstanceRespResults. + + 操作结果。 - 'success: 操作成功' - 'failed: 操作失败' + + :param result: The result of this BatchRestartOrDeleteInstanceRespResults. + :type: str + """ + self._result = result + + @property + def instance(self): + """Gets the instance of this BatchRestartOrDeleteInstanceRespResults. + + 实例ID。 + + :return: The instance of this BatchRestartOrDeleteInstanceRespResults. + :rtype: str + """ + return self._instance + + @instance.setter + def instance(self, instance): + """Sets the instance of this BatchRestartOrDeleteInstanceRespResults. + + 实例ID。 + + :param instance: The instance of this BatchRestartOrDeleteInstanceRespResults. + :type: str + """ + self._instance = instance + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchRestartOrDeleteInstanceRespResults): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_restart_or_delete_instances_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_restart_or_delete_instances_request.py new file mode 100644 index 0000000000..5eafbe1b5e --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_restart_or_delete_instances_request.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BatchRestartOrDeleteInstancesRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'body': 'BatchRestartOrDeleteInstanceReq' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): + """BatchRestartOrDeleteInstancesRequest - a model defined in huaweicloud sdk""" + + + + self._body = None + self.discriminator = None + + if body is not None: + self.body = body + + @property + def body(self): + """Gets the body of this BatchRestartOrDeleteInstancesRequest. + + + :return: The body of this BatchRestartOrDeleteInstancesRequest. + :rtype: BatchRestartOrDeleteInstanceReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this BatchRestartOrDeleteInstancesRequest. + + + :param body: The body of this BatchRestartOrDeleteInstancesRequest. + :type: BatchRestartOrDeleteInstanceReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchRestartOrDeleteInstancesRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_restart_or_delete_instances_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_restart_or_delete_instances_response.py new file mode 100644 index 0000000000..f4bea5803e --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/batch_restart_or_delete_instances_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class BatchRestartOrDeleteInstancesResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'results': 'list[BatchRestartOrDeleteInstanceRespResults]' + } + + attribute_map = { + 'results': 'results' + } + + def __init__(self, results=None): + """BatchRestartOrDeleteInstancesResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._results = None + self.discriminator = None + + if results is not None: + self.results = results + + @property + def results(self): + """Gets the results of this BatchRestartOrDeleteInstancesResponse. + + 修改实例的结果。 + + :return: The results of this BatchRestartOrDeleteInstancesResponse. + :rtype: list[BatchRestartOrDeleteInstanceRespResults] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this BatchRestartOrDeleteInstancesResponse. + + 修改实例的结果。 + + :param results: The results of this BatchRestartOrDeleteInstancesResponse. + :type: list[BatchRestartOrDeleteInstanceRespResults] + """ + self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchRestartOrDeleteInstancesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_connector_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_connector_req.py new file mode 100644 index 0000000000..993e45b727 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_connector_req.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreateConnectorReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'specification': 'str', + 'node_cnt': 'str', + 'spec_code': 'str' + } + + attribute_map = { + 'specification': 'specification', + 'node_cnt': 'node_cnt', + 'spec_code': 'spec_code' + } + + def __init__(self, specification=None, node_cnt=None, spec_code=None): + """CreateConnectorReq - a model defined in huaweicloud sdk""" + + + + self._specification = None + self._node_cnt = None + self._spec_code = None + self.discriminator = None + + if specification is not None: + self.specification = specification + if node_cnt is not None: + self.node_cnt = node_cnt + self.spec_code = spec_code + + @property + def specification(self): + """Gets the specification of this CreateConnectorReq. + + 部署connector的规格,基准带宽,表示单位时间内传送的最大数据量,单位Byte/秒。 取值范围: - 100MB - 300MB - 600MB - 1200MB 可以不填,则默认跟当前实例的规格是一致。 第一阶段实现先不填,保持和当前实例规格一致,后面再扩展可以选择不同的规格。 + + :return: The specification of this CreateConnectorReq. + :rtype: str + """ + return self._specification + + @specification.setter + def specification(self, specification): + """Sets the specification of this CreateConnectorReq. + + 部署connector的规格,基准带宽,表示单位时间内传送的最大数据量,单位Byte/秒。 取值范围: - 100MB - 300MB - 600MB - 1200MB 可以不填,则默认跟当前实例的规格是一致。 第一阶段实现先不填,保持和当前实例规格一致,后面再扩展可以选择不同的规格。 + + :param specification: The specification of this CreateConnectorReq. + :type: str + """ + self._specification = specification + + @property + def node_cnt(self): + """Gets the node_cnt of this CreateConnectorReq. + + 转储节点数量。不能小于2个。 默认是2个。 + + :return: The node_cnt of this CreateConnectorReq. + :rtype: str + """ + return self._node_cnt + + @node_cnt.setter + def node_cnt(self, node_cnt): + """Sets the node_cnt of this CreateConnectorReq. + + 转储节点数量。不能小于2个。 默认是2个。 + + :param node_cnt: The node_cnt of this CreateConnectorReq. + :type: str + """ + self._node_cnt = node_cnt + + @property + def spec_code(self): + """Gets the spec_code of this CreateConnectorReq. + + 转储节点规格编码。 + + :return: The spec_code of this CreateConnectorReq. + :rtype: str + """ + return self._spec_code + + @spec_code.setter + def spec_code(self, spec_code): + """Sets the spec_code of this CreateConnectorReq. + + 转储节点规格编码。 + + :param spec_code: The spec_code of this CreateConnectorReq. + :type: str + """ + self._spec_code = spec_code + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateConnectorReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_connector_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_connector_request.py new file mode 100644 index 0000000000..04c5fd6bd4 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_connector_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreateConnectorRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'body': 'CreateConnectorReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'body': 'body' + } + + def __init__(self, instance_id=None, body=None): + """CreateConnectorRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this CreateConnectorRequest. + + + :return: The instance_id of this CreateConnectorRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this CreateConnectorRequest. + + + :param instance_id: The instance_id of this CreateConnectorRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def body(self): + """Gets the body of this CreateConnectorRequest. + + + :return: The body of this CreateConnectorRequest. + :rtype: CreateConnectorReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateConnectorRequest. + + + :param body: The body of this CreateConnectorRequest. + :type: CreateConnectorReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateConnectorRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_connector_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_connector_response.py new file mode 100644 index 0000000000..868b5c14f0 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_connector_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class CreateConnectorResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'job_id': 'str', + 'connector_id': 'str' + } + + attribute_map = { + 'job_id': 'job_id', + 'connector_id': 'connector_id' + } + + def __init__(self, job_id=None, connector_id=None): + """CreateConnectorResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._job_id = None + self._connector_id = None + self.discriminator = None + + if job_id is not None: + self.job_id = job_id + if connector_id is not None: + self.connector_id = connector_id + + @property + def job_id(self): + """Gets the job_id of this CreateConnectorResponse. + + 任务ID。 + + :return: The job_id of this CreateConnectorResponse. + :rtype: str + """ + return self._job_id + + @job_id.setter + def job_id(self, job_id): + """Sets the job_id of this CreateConnectorResponse. + + 任务ID。 + + :param job_id: The job_id of this CreateConnectorResponse. + :type: str + """ + self._job_id = job_id + + @property + def connector_id(self): + """Gets the connector_id of this CreateConnectorResponse. + + 实例转储ID。 + + :return: The connector_id of this CreateConnectorResponse. + :rtype: str + """ + return self._connector_id + + @connector_id.setter + def connector_id(self, connector_id): + """Sets the connector_id of this CreateConnectorResponse. + + 实例转储ID。 + + :param connector_id: The connector_id of this CreateConnectorResponse. + :type: str + """ + self._connector_id = connector_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateConnectorResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_instance_topic_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_instance_topic_req.py new file mode 100644 index 0000000000..867ecb1248 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_instance_topic_req.py @@ -0,0 +1,244 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreateInstanceTopicReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'replication': 'int', + 'sync_message_flush': 'bool', + 'partition': 'int', + 'sync_replication': 'bool', + 'retention_time': 'int' + } + + attribute_map = { + 'name': 'name', + 'replication': 'replication', + 'sync_message_flush': 'sync_message_flush', + 'partition': 'partition', + 'sync_replication': 'sync_replication', + 'retention_time': 'retention_time' + } + + def __init__(self, name=None, replication=None, sync_message_flush=None, partition=None, sync_replication=None, retention_time=None): + """CreateInstanceTopicReq - a model defined in huaweicloud sdk""" + + + + self._name = None + self._replication = None + self._sync_message_flush = None + self._partition = None + self._sync_replication = None + self._retention_time = None + self.discriminator = None + + self.name = name + if replication is not None: + self.replication = replication + if sync_message_flush is not None: + self.sync_message_flush = sync_message_flush + if partition is not None: + self.partition = partition + if sync_replication is not None: + self.sync_replication = sync_replication + if retention_time is not None: + self.retention_time = retention_time + + @property + def name(self): + """Gets the name of this CreateInstanceTopicReq. + + topic名称,长度为4-64,以字母开头且只支持大小写字母、中横线、下划线以及数字。 + + :return: The name of this CreateInstanceTopicReq. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateInstanceTopicReq. + + topic名称,长度为4-64,以字母开头且只支持大小写字母、中横线、下划线以及数字。 + + :param name: The name of this CreateInstanceTopicReq. + :type: str + """ + self._name = name + + @property + def replication(self): + """Gets the replication of this CreateInstanceTopicReq. + + 副本数,配置数据的可靠性。 取值范围:1-3。 + + :return: The replication of this CreateInstanceTopicReq. + :rtype: int + """ + return self._replication + + @replication.setter + def replication(self, replication): + """Sets the replication of this CreateInstanceTopicReq. + + 副本数,配置数据的可靠性。 取值范围:1-3。 + + :param replication: The replication of this CreateInstanceTopicReq. + :type: int + """ + self._replication = replication + + @property + def sync_message_flush(self): + """Gets the sync_message_flush of this CreateInstanceTopicReq. + + 是否使用同步落盘。默认值为false。同步落盘会导致性能降低。 + + :return: The sync_message_flush of this CreateInstanceTopicReq. + :rtype: bool + """ + return self._sync_message_flush + + @sync_message_flush.setter + def sync_message_flush(self, sync_message_flush): + """Sets the sync_message_flush of this CreateInstanceTopicReq. + + 是否使用同步落盘。默认值为false。同步落盘会导致性能降低。 + + :param sync_message_flush: The sync_message_flush of this CreateInstanceTopicReq. + :type: bool + """ + self._sync_message_flush = sync_message_flush + + @property + def partition(self): + """Gets the partition of this CreateInstanceTopicReq. + + topic分区数,设置消费的并发数。 取值范围:1-20。 + + :return: The partition of this CreateInstanceTopicReq. + :rtype: int + """ + return self._partition + + @partition.setter + def partition(self, partition): + """Sets the partition of this CreateInstanceTopicReq. + + topic分区数,设置消费的并发数。 取值范围:1-20。 + + :param partition: The partition of this CreateInstanceTopicReq. + :type: int + """ + self._partition = partition + + @property + def sync_replication(self): + """Gets the sync_replication of this CreateInstanceTopicReq. + + 是否开启同步复制,开启后,客户端生产消息时相应的也要设置acks=-1,否则不生效,默认关闭。 + + :return: The sync_replication of this CreateInstanceTopicReq. + :rtype: bool + """ + return self._sync_replication + + @sync_replication.setter + def sync_replication(self, sync_replication): + """Sets the sync_replication of this CreateInstanceTopicReq. + + 是否开启同步复制,开启后,客户端生产消息时相应的也要设置acks=-1,否则不生效,默认关闭。 + + :param sync_replication: The sync_replication of this CreateInstanceTopicReq. + :type: bool + """ + self._sync_replication = sync_replication + + @property + def retention_time(self): + """Gets the retention_time of this CreateInstanceTopicReq. + + 消息老化时间。默认值为72。取值范围1~168,单位小时。 + + :return: The retention_time of this CreateInstanceTopicReq. + :rtype: int + """ + return self._retention_time + + @retention_time.setter + def retention_time(self, retention_time): + """Sets the retention_time of this CreateInstanceTopicReq. + + 消息老化时间。默认值为72。取值范围1~168,单位小时。 + + :param retention_time: The retention_time of this CreateInstanceTopicReq. + :type: int + """ + self._retention_time = retention_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateInstanceTopicReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_instance_topic_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_instance_topic_request.py new file mode 100644 index 0000000000..830d25b0db --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_instance_topic_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreateInstanceTopicRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'body': 'CreateInstanceTopicReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'body': 'body' + } + + def __init__(self, instance_id=None, body=None): + """CreateInstanceTopicRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this CreateInstanceTopicRequest. + + + :return: The instance_id of this CreateInstanceTopicRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this CreateInstanceTopicRequest. + + + :param instance_id: The instance_id of this CreateInstanceTopicRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def body(self): + """Gets the body of this CreateInstanceTopicRequest. + + + :return: The body of this CreateInstanceTopicRequest. + :rtype: CreateInstanceTopicReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateInstanceTopicRequest. + + + :param body: The body of this CreateInstanceTopicRequest. + :type: CreateInstanceTopicReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateInstanceTopicRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_instance_topic_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_instance_topic_response.py new file mode 100644 index 0000000000..06f1b62f06 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_instance_topic_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class CreateInstanceTopicResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'id': 'str' + } + + attribute_map = { + 'id': 'id' + } + + def __init__(self, id=None): + """CreateInstanceTopicResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._id = None + self.discriminator = None + + if id is not None: + self.id = id + + @property + def id(self): + """Gets the id of this CreateInstanceTopicResponse. + + topic名称。 + + :return: The id of this CreateInstanceTopicResponse. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CreateInstanceTopicResponse. + + topic名称。 + + :param id: The id of this CreateInstanceTopicResponse. + :type: str + """ + self._id = id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateInstanceTopicResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_partition_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_partition_req.py new file mode 100644 index 0000000000..cb57e9802f --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_partition_req.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreatePartitionReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'partition': 'int' + } + + attribute_map = { + 'partition': 'partition' + } + + def __init__(self, partition=None): + """CreatePartitionReq - a model defined in huaweicloud sdk""" + + + + self._partition = None + self.discriminator = None + + if partition is not None: + self.partition = partition + + @property + def partition(self): + """Gets the partition of this CreatePartitionReq. + + 期望调整分区后的数量,必须大于当前分区数量,小于等于20。 + + :return: The partition of this CreatePartitionReq. + :rtype: int + """ + return self._partition + + @partition.setter + def partition(self, partition): + """Sets the partition of this CreatePartitionReq. + + 期望调整分区后的数量,必须大于当前分区数量,小于等于20。 + + :param partition: The partition of this CreatePartitionReq. + :type: int + """ + self._partition = partition + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreatePartitionReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_partition_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_partition_request.py new file mode 100644 index 0000000000..3c4dc491d9 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_partition_request.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreatePartitionRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'topic': 'str', + 'body': 'CreatePartitionReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'topic': 'topic', + 'body': 'body' + } + + def __init__(self, instance_id=None, topic=None, body=None): + """CreatePartitionRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._topic = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + self.topic = topic + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this CreatePartitionRequest. + + + :return: The instance_id of this CreatePartitionRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this CreatePartitionRequest. + + + :param instance_id: The instance_id of this CreatePartitionRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def topic(self): + """Gets the topic of this CreatePartitionRequest. + + + :return: The topic of this CreatePartitionRequest. + :rtype: str + """ + return self._topic + + @topic.setter + def topic(self, topic): + """Sets the topic of this CreatePartitionRequest. + + + :param topic: The topic of this CreatePartitionRequest. + :type: str + """ + self._topic = topic + + @property + def body(self): + """Gets the body of this CreatePartitionRequest. + + + :return: The body of this CreatePartitionRequest. + :rtype: CreatePartitionReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreatePartitionRequest. + + + :param body: The body of this CreatePartitionRequest. + :type: CreatePartitionReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreatePartitionRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_partition_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_partition_response.py new file mode 100644 index 0000000000..5503b947fa --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_partition_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class CreatePartitionResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """CreatePartitionResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreatePartitionResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_post_paid_instance_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_post_paid_instance_req.py new file mode 100644 index 0000000000..ea9b2125e9 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_post_paid_instance_req.py @@ -0,0 +1,825 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreatePostPaidInstanceReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'description': 'str', + 'engine': 'str', + 'engine_version': 'str', + 'specification': 'str', + 'storage_space': 'int', + 'partition_num': 'int', + 'access_user': 'str', + 'password': 'str', + 'vpc_id': 'str', + 'security_group_id': 'str', + 'subnet_id': 'str', + 'available_zones': 'list[str]', + 'product_id': 'str', + 'kafka_manager_user': 'str', + 'kafka_manager_password': 'str', + 'maintain_begin': 'str', + 'maintain_end': 'str', + 'enable_publicip': 'bool', + 'public_bandwidth': 'int', + 'publicip_id': 'str', + 'ssl_enable': 'bool', + 'retention_policy': 'str', + 'connector_enable': 'bool', + 'enable_auto_topic': 'bool', + 'storage_spec_code': 'str', + 'enterprise_project_id': 'str', + 'tags': 'list[CreatePostPaidInstanceReqTags]' + } + + attribute_map = { + 'name': 'name', + 'description': 'description', + 'engine': 'engine', + 'engine_version': 'engine_version', + 'specification': 'specification', + 'storage_space': 'storage_space', + 'partition_num': 'partition_num', + 'access_user': 'access_user', + 'password': 'password', + 'vpc_id': 'vpc_id', + 'security_group_id': 'security_group_id', + 'subnet_id': 'subnet_id', + 'available_zones': 'available_zones', + 'product_id': 'product_id', + 'kafka_manager_user': 'kafka_manager_user', + 'kafka_manager_password': 'kafka_manager_password', + 'maintain_begin': 'maintain_begin', + 'maintain_end': 'maintain_end', + 'enable_publicip': 'enable_publicip', + 'public_bandwidth': 'public_bandwidth', + 'publicip_id': 'publicip_id', + 'ssl_enable': 'ssl_enable', + 'retention_policy': 'retention_policy', + 'connector_enable': 'connector_enable', + 'enable_auto_topic': 'enable_auto_topic', + 'storage_spec_code': 'storage_spec_code', + 'enterprise_project_id': 'enterprise_project_id', + 'tags': 'tags' + } + + def __init__(self, name=None, description=None, engine=None, engine_version=None, specification=None, storage_space=None, partition_num=None, access_user=None, password=None, vpc_id=None, security_group_id=None, subnet_id=None, available_zones=None, product_id=None, kafka_manager_user=None, kafka_manager_password=None, maintain_begin=None, maintain_end=None, enable_publicip=None, public_bandwidth=None, publicip_id=None, ssl_enable=None, retention_policy=None, connector_enable=None, enable_auto_topic=None, storage_spec_code=None, enterprise_project_id=None, tags=None): + """CreatePostPaidInstanceReq - a model defined in huaweicloud sdk""" + + + + self._name = None + self._description = None + self._engine = None + self._engine_version = None + self._specification = None + self._storage_space = None + self._partition_num = None + self._access_user = None + self._password = None + self._vpc_id = None + self._security_group_id = None + self._subnet_id = None + self._available_zones = None + self._product_id = None + self._kafka_manager_user = None + self._kafka_manager_password = None + self._maintain_begin = None + self._maintain_end = None + self._enable_publicip = None + self._public_bandwidth = None + self._publicip_id = None + self._ssl_enable = None + self._retention_policy = None + self._connector_enable = None + self._enable_auto_topic = None + self._storage_spec_code = None + self._enterprise_project_id = None + self._tags = None + self.discriminator = None + + self.name = name + if description is not None: + self.description = description + self.engine = engine + self.engine_version = engine_version + self.specification = specification + self.storage_space = storage_space + self.partition_num = partition_num + if access_user is not None: + self.access_user = access_user + if password is not None: + self.password = password + self.vpc_id = vpc_id + self.security_group_id = security_group_id + self.subnet_id = subnet_id + self.available_zones = available_zones + self.product_id = product_id + self.kafka_manager_user = kafka_manager_user + self.kafka_manager_password = kafka_manager_password + if maintain_begin is not None: + self.maintain_begin = maintain_begin + if maintain_end is not None: + self.maintain_end = maintain_end + if enable_publicip is not None: + self.enable_publicip = enable_publicip + if public_bandwidth is not None: + self.public_bandwidth = public_bandwidth + if publicip_id is not None: + self.publicip_id = publicip_id + if ssl_enable is not None: + self.ssl_enable = ssl_enable + if retention_policy is not None: + self.retention_policy = retention_policy + if connector_enable is not None: + self.connector_enable = connector_enable + if enable_auto_topic is not None: + self.enable_auto_topic = enable_auto_topic + self.storage_spec_code = storage_spec_code + if enterprise_project_id is not None: + self.enterprise_project_id = enterprise_project_id + if tags is not None: + self.tags = tags + + @property + def name(self): + """Gets the name of this CreatePostPaidInstanceReq. + + 实例名称。 由英文字符开头,只能由英文字母、数字、中划线、下划线组成,长度为4~64的字符。 + + :return: The name of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreatePostPaidInstanceReq. + + 实例名称。 由英文字符开头,只能由英文字母、数字、中划线、下划线组成,长度为4~64的字符。 + + :param name: The name of this CreatePostPaidInstanceReq. + :type: str + """ + self._name = name + + @property + def description(self): + """Gets the description of this CreatePostPaidInstanceReq. + + 实例的描述信息。 长度不超过1024的字符串。 > \\与\"在json报文中属于特殊字符,如果参数值中需要显示\\或者\"字符,请在字符前增加转义字符\\,比如\\\\或者\\\"。 + + :return: The description of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreatePostPaidInstanceReq. + + 实例的描述信息。 长度不超过1024的字符串。 > \\与\"在json报文中属于特殊字符,如果参数值中需要显示\\或者\"字符,请在字符前增加转义字符\\,比如\\\\或者\\\"。 + + :param description: The description of this CreatePostPaidInstanceReq. + :type: str + """ + self._description = description + + @property + def engine(self): + """Gets the engine of this CreatePostPaidInstanceReq. + + 消息引擎。取值填写为:kafka。 + + :return: The engine of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._engine + + @engine.setter + def engine(self, engine): + """Sets the engine of this CreatePostPaidInstanceReq. + + 消息引擎。取值填写为:kafka。 + + :param engine: The engine of this CreatePostPaidInstanceReq. + :type: str + """ + self._engine = engine + + @property + def engine_version(self): + """Gets the engine_version of this CreatePostPaidInstanceReq. + + 消息引擎的版本。取值填写为:1.1.0。 + + :return: The engine_version of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._engine_version + + @engine_version.setter + def engine_version(self, engine_version): + """Sets the engine_version of this CreatePostPaidInstanceReq. + + 消息引擎的版本。取值填写为:1.1.0。 + + :param engine_version: The engine_version of this CreatePostPaidInstanceReq. + :type: str + """ + self._engine_version = engine_version + + @property + def specification(self): + """Gets the specification of this CreatePostPaidInstanceReq. + + Kafka实例的基准带宽,表示单位时间内传送的最大数据量,单位MB。 取值范围: - 100MB - 300MB - 600MB - 1200MB + + :return: The specification of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._specification + + @specification.setter + def specification(self, specification): + """Sets the specification of this CreatePostPaidInstanceReq. + + Kafka实例的基准带宽,表示单位时间内传送的最大数据量,单位MB。 取值范围: - 100MB - 300MB - 600MB - 1200MB + + :param specification: The specification of this CreatePostPaidInstanceReq. + :type: str + """ + self._specification = specification + + @property + def storage_space(self): + """Gets the storage_space of this CreatePostPaidInstanceReq. + + 消息存储空间,单位GB。 - Kafka实例规格为100MB时,存储空间取值范围600GB ~ 90000GB。 - Kafka实例规格为300MB时,存储空间取值范围1200GB ~ 90000GB。 - Kafka实例规格为600MB时,存储空间取值范围2400GB ~ 90000GB。 - Kafka实例规格为1200MB,存储空间取值范围4800GB ~ 90000GB。 + + :return: The storage_space of this CreatePostPaidInstanceReq. + :rtype: int + """ + return self._storage_space + + @storage_space.setter + def storage_space(self, storage_space): + """Sets the storage_space of this CreatePostPaidInstanceReq. + + 消息存储空间,单位GB。 - Kafka实例规格为100MB时,存储空间取值范围600GB ~ 90000GB。 - Kafka实例规格为300MB时,存储空间取值范围1200GB ~ 90000GB。 - Kafka实例规格为600MB时,存储空间取值范围2400GB ~ 90000GB。 - Kafka实例规格为1200MB,存储空间取值范围4800GB ~ 90000GB。 + + :param storage_space: The storage_space of this CreatePostPaidInstanceReq. + :type: int + """ + self._storage_space = storage_space + + @property + def partition_num(self): + """Gets the partition_num of this CreatePostPaidInstanceReq. + + Kafka实例的最大分区数量。 - 参数specification为100MB时,取值300 - 参数specification为300MB时,取值900 - 参数specification为600MB时,取值1800 - 参数specification为1200MB时,取值1800 + + :return: The partition_num of this CreatePostPaidInstanceReq. + :rtype: int + """ + return self._partition_num + + @partition_num.setter + def partition_num(self, partition_num): + """Sets the partition_num of this CreatePostPaidInstanceReq. + + Kafka实例的最大分区数量。 - 参数specification为100MB时,取值300 - 参数specification为300MB时,取值900 - 参数specification为600MB时,取值1800 - 参数specification为1200MB时,取值1800 + + :param partition_num: The partition_num of this CreatePostPaidInstanceReq. + :type: int + """ + self._partition_num = partition_num + + @property + def access_user(self): + """Gets the access_user of this CreatePostPaidInstanceReq. + + 当ssl_enable为true时,该参数必选,ssl_enable为false时,该参数无效。 认证用户名,只能由英文字母、数字、中划线组成,长度为4~64的字符。 + + :return: The access_user of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._access_user + + @access_user.setter + def access_user(self, access_user): + """Sets the access_user of this CreatePostPaidInstanceReq. + + 当ssl_enable为true时,该参数必选,ssl_enable为false时,该参数无效。 认证用户名,只能由英文字母、数字、中划线组成,长度为4~64的字符。 + + :param access_user: The access_user of this CreatePostPaidInstanceReq. + :type: str + """ + self._access_user = access_user + + @property + def password(self): + """Gets the password of this CreatePostPaidInstanceReq. + + 当ssl_enable为true时,该参数必选,ssl_enable为false时,该参数无效。 实例的认证密码。 复杂度要求: - 输入长度为8到32位的字符串。 - 必须包含如下四种字符中的两种组合: - 小写字母 - 大写字母 - 数字 - 特殊字符包括(`~!@#$%^&*()-_=+\\|[{}]:'\",<.>/?) + + :return: The password of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this CreatePostPaidInstanceReq. + + 当ssl_enable为true时,该参数必选,ssl_enable为false时,该参数无效。 实例的认证密码。 复杂度要求: - 输入长度为8到32位的字符串。 - 必须包含如下四种字符中的两种组合: - 小写字母 - 大写字母 - 数字 - 特殊字符包括(`~!@#$%^&*()-_=+\\|[{}]:'\",<.>/?) + + :param password: The password of this CreatePostPaidInstanceReq. + :type: str + """ + self._password = password + + @property + def vpc_id(self): + """Gets the vpc_id of this CreatePostPaidInstanceReq. + + 虚拟私有云ID。 获取方法如下: - 方法1:登录虚拟私有云服务的控制台界面,在虚拟私有云的详情页面查找VPC ID。 - 方法2:通过虚拟私有云服务的API接口查询,具体操作可参考[查询VPC列表](https://support.huaweicloud.com/api-vpc/vpc_api01_0003.html)。 + + :return: The vpc_id of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._vpc_id + + @vpc_id.setter + def vpc_id(self, vpc_id): + """Sets the vpc_id of this CreatePostPaidInstanceReq. + + 虚拟私有云ID。 获取方法如下: - 方法1:登录虚拟私有云服务的控制台界面,在虚拟私有云的详情页面查找VPC ID。 - 方法2:通过虚拟私有云服务的API接口查询,具体操作可参考[查询VPC列表](https://support.huaweicloud.com/api-vpc/vpc_api01_0003.html)。 + + :param vpc_id: The vpc_id of this CreatePostPaidInstanceReq. + :type: str + """ + self._vpc_id = vpc_id + + @property + def security_group_id(self): + """Gets the security_group_id of this CreatePostPaidInstanceReq. + + 指定实例所属的安全组。 获取方法如下: - 方法1:登录虚拟私有云服务的控制台界面,在安全组的详情页面查找安全组ID。 - 方法2:通过虚拟私有云服务的API接口查询,具体操作可参考[查询安全组列表](https://support.huaweicloud.com/api-vpc/vpc_sg01_0002.html)。 + + :return: The security_group_id of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._security_group_id + + @security_group_id.setter + def security_group_id(self, security_group_id): + """Sets the security_group_id of this CreatePostPaidInstanceReq. + + 指定实例所属的安全组。 获取方法如下: - 方法1:登录虚拟私有云服务的控制台界面,在安全组的详情页面查找安全组ID。 - 方法2:通过虚拟私有云服务的API接口查询,具体操作可参考[查询安全组列表](https://support.huaweicloud.com/api-vpc/vpc_sg01_0002.html)。 + + :param security_group_id: The security_group_id of this CreatePostPaidInstanceReq. + :type: str + """ + self._security_group_id = security_group_id + + @property + def subnet_id(self): + """Gets the subnet_id of this CreatePostPaidInstanceReq. + + 子网信息。 获取方法如下: - 方法1:登录虚拟私有云服务的控制台界面,单击VPC下的子网,进入子网详情页面,查找网络ID。 - 方法2:通过虚拟私有云服务的API接口查询,具体操作可参考[查询子网列表](https://support.huaweicloud.com/api-vpc/vpc_subnet01_0003.html)。 + + :return: The subnet_id of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """Sets the subnet_id of this CreatePostPaidInstanceReq. + + 子网信息。 获取方法如下: - 方法1:登录虚拟私有云服务的控制台界面,单击VPC下的子网,进入子网详情页面,查找网络ID。 - 方法2:通过虚拟私有云服务的API接口查询,具体操作可参考[查询子网列表](https://support.huaweicloud.com/api-vpc/vpc_subnet01_0003.html)。 + + :param subnet_id: The subnet_id of this CreatePostPaidInstanceReq. + :type: str + """ + self._subnet_id = subnet_id + + @property + def available_zones(self): + """Gets the available_zones of this CreatePostPaidInstanceReq. + + 创建节点到指定且有资源的可用区ID。该参数不能为空数组或者数组的值为空,详情请参考[查询可用区信息](https://support.huaweicloud.com/api-kafka/ListAvailableZones.html)查询得到。在查询时,请注意查看该可用区是否有资源。 创建Kafka实例,支持节点部署在1个或3个及3个以上的可用区。在为节点指定可用区时,用逗号分隔开。 + + :return: The available_zones of this CreatePostPaidInstanceReq. + :rtype: list[str] + """ + return self._available_zones + + @available_zones.setter + def available_zones(self, available_zones): + """Sets the available_zones of this CreatePostPaidInstanceReq. + + 创建节点到指定且有资源的可用区ID。该参数不能为空数组或者数组的值为空,详情请参考[查询可用区信息](https://support.huaweicloud.com/api-kafka/ListAvailableZones.html)查询得到。在查询时,请注意查看该可用区是否有资源。 创建Kafka实例,支持节点部署在1个或3个及3个以上的可用区。在为节点指定可用区时,用逗号分隔开。 + + :param available_zones: The available_zones of this CreatePostPaidInstanceReq. + :type: list[str] + """ + self._available_zones = available_zones + + @property + def product_id(self): + """Gets the product_id of this CreatePostPaidInstanceReq. + + 产品标识。 获取方法,请参考查询[产品规格列表](https://support.huaweicloud.com/api-kafka/ListProducts.html)。 + + :return: The product_id of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._product_id + + @product_id.setter + def product_id(self, product_id): + """Sets the product_id of this CreatePostPaidInstanceReq. + + 产品标识。 获取方法,请参考查询[产品规格列表](https://support.huaweicloud.com/api-kafka/ListProducts.html)。 + + :param product_id: The product_id of this CreatePostPaidInstanceReq. + :type: str + """ + self._product_id = product_id + + @property + def kafka_manager_user(self): + """Gets the kafka_manager_user of this CreatePostPaidInstanceReq. + + 表示登录Kafka Manager的用户名。只能由英文字母、数字、中划线组成,长度为4~64的字符。 + + :return: The kafka_manager_user of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._kafka_manager_user + + @kafka_manager_user.setter + def kafka_manager_user(self, kafka_manager_user): + """Sets the kafka_manager_user of this CreatePostPaidInstanceReq. + + 表示登录Kafka Manager的用户名。只能由英文字母、数字、中划线组成,长度为4~64的字符。 + + :param kafka_manager_user: The kafka_manager_user of this CreatePostPaidInstanceReq. + :type: str + """ + self._kafka_manager_user = kafka_manager_user + + @property + def kafka_manager_password(self): + """Gets the kafka_manager_password of this CreatePostPaidInstanceReq. + + 表示登录Kafka Manager的密码。 复杂度要求: - 输入长度为8到32位的字符串。 - 必须包含如下四种字符中的两种组合: - 小写字母 - 大写字母 - 数字 - 特殊字符包括(`~!@#$%^&*()-_=+\\|[{}]:'\",<.>/?) + + :return: The kafka_manager_password of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._kafka_manager_password + + @kafka_manager_password.setter + def kafka_manager_password(self, kafka_manager_password): + """Sets the kafka_manager_password of this CreatePostPaidInstanceReq. + + 表示登录Kafka Manager的密码。 复杂度要求: - 输入长度为8到32位的字符串。 - 必须包含如下四种字符中的两种组合: - 小写字母 - 大写字母 - 数字 - 特殊字符包括(`~!@#$%^&*()-_=+\\|[{}]:'\",<.>/?) + + :param kafka_manager_password: The kafka_manager_password of this CreatePostPaidInstanceReq. + :type: str + """ + self._kafka_manager_password = kafka_manager_password + + @property + def maintain_begin(self): + """Gets the maintain_begin of this CreatePostPaidInstanceReq. + + 维护时间窗开始时间,格式为HH:mm。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-kafka/ShowMaintainWindows.html)获取。 - 开始时间必须为22:00、02:00、06:00、10:00、14:00和18:00。 - 该参数不能单独为空,若该值为空,则结束时间也为空。系统分配一个默认开始时间02:00。 + + :return: The maintain_begin of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._maintain_begin + + @maintain_begin.setter + def maintain_begin(self, maintain_begin): + """Sets the maintain_begin of this CreatePostPaidInstanceReq. + + 维护时间窗开始时间,格式为HH:mm。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-kafka/ShowMaintainWindows.html)获取。 - 开始时间必须为22:00、02:00、06:00、10:00、14:00和18:00。 - 该参数不能单独为空,若该值为空,则结束时间也为空。系统分配一个默认开始时间02:00。 + + :param maintain_begin: The maintain_begin of this CreatePostPaidInstanceReq. + :type: str + """ + self._maintain_begin = maintain_begin + + @property + def maintain_end(self): + """Gets the maintain_end of this CreatePostPaidInstanceReq. + + 维护时间窗结束时间,格式为HH:mm。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-kafka/ShowMaintainWindows.html)获取。 - 结束时间在开始时间基础上加四个小时,即当开始时间为22:00时,结束时间为02:00。 - 该参数不能单独为空,若该值为空,则开始时间也为空,系统分配一个默认结束时间06:00。 + + :return: The maintain_end of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._maintain_end + + @maintain_end.setter + def maintain_end(self, maintain_end): + """Sets the maintain_end of this CreatePostPaidInstanceReq. + + 维护时间窗结束时间,格式为HH:mm。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-kafka/ShowMaintainWindows.html)获取。 - 结束时间在开始时间基础上加四个小时,即当开始时间为22:00时,结束时间为02:00。 - 该参数不能单独为空,若该值为空,则开始时间也为空,系统分配一个默认结束时间06:00。 + + :param maintain_end: The maintain_end of this CreatePostPaidInstanceReq. + :type: str + """ + self._maintain_end = maintain_end + + @property + def enable_publicip(self): + """Gets the enable_publicip of this CreatePostPaidInstanceReq. + + 是否开启公网访问功能。默认不开启公网。 - true:开启 - false:不开启 + + :return: The enable_publicip of this CreatePostPaidInstanceReq. + :rtype: bool + """ + return self._enable_publicip + + @enable_publicip.setter + def enable_publicip(self, enable_publicip): + """Sets the enable_publicip of this CreatePostPaidInstanceReq. + + 是否开启公网访问功能。默认不开启公网。 - true:开启 - false:不开启 + + :param enable_publicip: The enable_publicip of this CreatePostPaidInstanceReq. + :type: bool + """ + self._enable_publicip = enable_publicip + + @property + def public_bandwidth(self): + """Gets the public_bandwidth of this CreatePostPaidInstanceReq. + + 表示公网带宽,单位是Mbit/s。 取值范围: - Kafka实例规格为100MB时,公网带宽取值范围3到900,且必须为实例节点个数的倍数。 - Kafka实例规格为300MB时,公网带宽取值范围3到900,且必须为实例节点个数的倍数。 - Kafka实例规格为600MB时,公网带宽取值范围4到1200,且必须为实例节点个数的倍数。 - Kafka实例规格为1200MB时,公网带宽取值范围8到2400,且必须为实例节点个数的倍数。 + + :return: The public_bandwidth of this CreatePostPaidInstanceReq. + :rtype: int + """ + return self._public_bandwidth + + @public_bandwidth.setter + def public_bandwidth(self, public_bandwidth): + """Sets the public_bandwidth of this CreatePostPaidInstanceReq. + + 表示公网带宽,单位是Mbit/s。 取值范围: - Kafka实例规格为100MB时,公网带宽取值范围3到900,且必须为实例节点个数的倍数。 - Kafka实例规格为300MB时,公网带宽取值范围3到900,且必须为实例节点个数的倍数。 - Kafka实例规格为600MB时,公网带宽取值范围4到1200,且必须为实例节点个数的倍数。 - Kafka实例规格为1200MB时,公网带宽取值范围8到2400,且必须为实例节点个数的倍数。 + + :param public_bandwidth: The public_bandwidth of this CreatePostPaidInstanceReq. + :type: int + """ + self._public_bandwidth = public_bandwidth + + @property + def publicip_id(self): + """Gets the publicip_id of this CreatePostPaidInstanceReq. + + 实例绑定的弹性IP地址的ID。 如果开启了公网访问功能(即enable_publicip为true),该字段为必选。 + + :return: The publicip_id of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._publicip_id + + @publicip_id.setter + def publicip_id(self, publicip_id): + """Sets the publicip_id of this CreatePostPaidInstanceReq. + + 实例绑定的弹性IP地址的ID。 如果开启了公网访问功能(即enable_publicip为true),该字段为必选。 + + :param publicip_id: The publicip_id of this CreatePostPaidInstanceReq. + :type: str + """ + self._publicip_id = publicip_id + + @property + def ssl_enable(self): + """Gets the ssl_enable of this CreatePostPaidInstanceReq. + + 是否打开SSL加密访问。 - true:打开SSL加密访问。 - false:不打开SSL加密访问。 + + :return: The ssl_enable of this CreatePostPaidInstanceReq. + :rtype: bool + """ + return self._ssl_enable + + @ssl_enable.setter + def ssl_enable(self, ssl_enable): + """Sets the ssl_enable of this CreatePostPaidInstanceReq. + + 是否打开SSL加密访问。 - true:打开SSL加密访问。 - false:不打开SSL加密访问。 + + :param ssl_enable: The ssl_enable of this CreatePostPaidInstanceReq. + :type: bool + """ + self._ssl_enable = ssl_enable + + @property + def retention_policy(self): + """Gets the retention_policy of this CreatePostPaidInstanceReq. + + 磁盘的容量到达容量阈值后,对于消息的处理策略。 取值如下: - produce_reject:表示拒绝消息写入。 - time_base:表示自动删除最老消息。 + + :return: The retention_policy of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._retention_policy + + @retention_policy.setter + def retention_policy(self, retention_policy): + """Sets the retention_policy of this CreatePostPaidInstanceReq. + + 磁盘的容量到达容量阈值后,对于消息的处理策略。 取值如下: - produce_reject:表示拒绝消息写入。 - time_base:表示自动删除最老消息。 + + :param retention_policy: The retention_policy of this CreatePostPaidInstanceReq. + :type: str + """ + self._retention_policy = retention_policy + + @property + def connector_enable(self): + """Gets the connector_enable of this CreatePostPaidInstanceReq. + + 是否开启消息转储功能。 默认不开启消息转储。 + + :return: The connector_enable of this CreatePostPaidInstanceReq. + :rtype: bool + """ + return self._connector_enable + + @connector_enable.setter + def connector_enable(self, connector_enable): + """Sets the connector_enable of this CreatePostPaidInstanceReq. + + 是否开启消息转储功能。 默认不开启消息转储。 + + :param connector_enable: The connector_enable of this CreatePostPaidInstanceReq. + :type: bool + """ + self._connector_enable = connector_enable + + @property + def enable_auto_topic(self): + """Gets the enable_auto_topic of this CreatePostPaidInstanceReq. + + 是否打开kafka自动创建topic功能。 - true:开启 - false:关闭 当您选择开启,表示生产或消费一个未创建的Topic时,会自动创建一个包含3个分区和3个副本的Topic。 + + :return: The enable_auto_topic of this CreatePostPaidInstanceReq. + :rtype: bool + """ + return self._enable_auto_topic + + @enable_auto_topic.setter + def enable_auto_topic(self, enable_auto_topic): + """Sets the enable_auto_topic of this CreatePostPaidInstanceReq. + + 是否打开kafka自动创建topic功能。 - true:开启 - false:关闭 当您选择开启,表示生产或消费一个未创建的Topic时,会自动创建一个包含3个分区和3个副本的Topic。 + + :param enable_auto_topic: The enable_auto_topic of this CreatePostPaidInstanceReq. + :type: bool + """ + self._enable_auto_topic = enable_auto_topic + + @property + def storage_spec_code(self): + """Gets the storage_spec_code of this CreatePostPaidInstanceReq. + + 存储IO规格。如何选择磁盘类型请参考[磁盘类型及性能介绍](https://support.huaweicloud.com/productdesc-evs/zh-cn_topic_0044524691.html)。 取值范围: - 参数specification为100MB时,取值dms.physical.storage.high或者dms.physical.storage.ultra - 参数specification为300MB时,取值dms.physical.storage.high或者dms.physical.storage.ultra - 参数specification为600MB时,取值dms.physical.storage.ultra - 参数specification为1200MB时,取值dms.physical.storage.ultra存储IO规格。如何选择磁盘类型请参考磁盘类型及性能介绍。 + + :return: The storage_spec_code of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._storage_spec_code + + @storage_spec_code.setter + def storage_spec_code(self, storage_spec_code): + """Sets the storage_spec_code of this CreatePostPaidInstanceReq. + + 存储IO规格。如何选择磁盘类型请参考[磁盘类型及性能介绍](https://support.huaweicloud.com/productdesc-evs/zh-cn_topic_0044524691.html)。 取值范围: - 参数specification为100MB时,取值dms.physical.storage.high或者dms.physical.storage.ultra - 参数specification为300MB时,取值dms.physical.storage.high或者dms.physical.storage.ultra - 参数specification为600MB时,取值dms.physical.storage.ultra - 参数specification为1200MB时,取值dms.physical.storage.ultra存储IO规格。如何选择磁盘类型请参考磁盘类型及性能介绍。 + + :param storage_spec_code: The storage_spec_code of this CreatePostPaidInstanceReq. + :type: str + """ + self._storage_spec_code = storage_spec_code + + @property + def enterprise_project_id(self): + """Gets the enterprise_project_id of this CreatePostPaidInstanceReq. + + 企业项目ID。若为企业项目账号,该参数必填。 + + :return: The enterprise_project_id of this CreatePostPaidInstanceReq. + :rtype: str + """ + return self._enterprise_project_id + + @enterprise_project_id.setter + def enterprise_project_id(self, enterprise_project_id): + """Sets the enterprise_project_id of this CreatePostPaidInstanceReq. + + 企业项目ID。若为企业项目账号,该参数必填。 + + :param enterprise_project_id: The enterprise_project_id of this CreatePostPaidInstanceReq. + :type: str + """ + self._enterprise_project_id = enterprise_project_id + + @property + def tags(self): + """Gets the tags of this CreatePostPaidInstanceReq. + + 标签列表。 + + :return: The tags of this CreatePostPaidInstanceReq. + :rtype: list[CreatePostPaidInstanceReqTags] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this CreatePostPaidInstanceReq. + + 标签列表。 + + :param tags: The tags of this CreatePostPaidInstanceReq. + :type: list[CreatePostPaidInstanceReqTags] + """ + self._tags = tags + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreatePostPaidInstanceReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_post_paid_instance_req_tags.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_post_paid_instance_req_tags.py new file mode 100644 index 0000000000..dfaa72e748 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_post_paid_instance_req_tags.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreatePostPaidInstanceReqTags: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'key': 'str', + 'value': 'str' + } + + attribute_map = { + 'key': 'key', + 'value': 'value' + } + + def __init__(self, key=None, value=None): + """CreatePostPaidInstanceReqTags - a model defined in huaweicloud sdk""" + + + + self._key = None + self._value = None + self.discriminator = None + + if key is not None: + self.key = key + if value is not None: + self.value = value + + @property + def key(self): + """Gets the key of this CreatePostPaidInstanceReqTags. + + 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :return: The key of this CreatePostPaidInstanceReqTags. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this CreatePostPaidInstanceReqTags. + + 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :param key: The key of this CreatePostPaidInstanceReqTags. + :type: str + """ + self._key = key + + @property + def value(self): + """Gets the value of this CreatePostPaidInstanceReqTags. + + 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :return: The value of this CreatePostPaidInstanceReqTags. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this CreatePostPaidInstanceReqTags. + + 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :param value: The value of this CreatePostPaidInstanceReqTags. + :type: str + """ + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreatePostPaidInstanceReqTags): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_post_paid_instance_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_post_paid_instance_request.py new file mode 100644 index 0000000000..3afe61b7b6 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_post_paid_instance_request.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreatePostPaidInstanceRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'body': 'CreatePostPaidInstanceReq' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): + """CreatePostPaidInstanceRequest - a model defined in huaweicloud sdk""" + + + + self._body = None + self.discriminator = None + + if body is not None: + self.body = body + + @property + def body(self): + """Gets the body of this CreatePostPaidInstanceRequest. + + + :return: The body of this CreatePostPaidInstanceRequest. + :rtype: CreatePostPaidInstanceReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreatePostPaidInstanceRequest. + + + :param body: The body of this CreatePostPaidInstanceRequest. + :type: CreatePostPaidInstanceReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreatePostPaidInstanceRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_post_paid_instance_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_post_paid_instance_response.py new file mode 100644 index 0000000000..98d77e5cac --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_post_paid_instance_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class CreatePostPaidInstanceResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id' + } + + def __init__(self, instance_id=None): + """CreatePostPaidInstanceResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._instance_id = None + self.discriminator = None + + if instance_id is not None: + self.instance_id = instance_id + + @property + def instance_id(self): + """Gets the instance_id of this CreatePostPaidInstanceResponse. + + 实例ID + + :return: The instance_id of this CreatePostPaidInstanceResponse. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this CreatePostPaidInstanceResponse. + + 实例ID + + :param instance_id: The instance_id of this CreatePostPaidInstanceResponse. + :type: str + """ + self._instance_id = instance_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreatePostPaidInstanceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_sink_task_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_sink_task_req.py new file mode 100644 index 0000000000..59f25e45a1 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_sink_task_req.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreateSinkTaskReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'source_type': 'str', + 'task_name': 'str', + 'destination_type': 'str', + 'obs_destination_descriptor': 'ObsDestinationDescriptor' + } + + attribute_map = { + 'source_type': 'source_type', + 'task_name': 'task_name', + 'destination_type': 'destination_type', + 'obs_destination_descriptor': 'obs_destination_descriptor' + } + + def __init__(self, source_type=None, task_name=None, destination_type=None, obs_destination_descriptor=None): + """CreateSinkTaskReq - a model defined in huaweicloud sdk""" + + + + self._source_type = None + self._task_name = None + self._destination_type = None + self._obs_destination_descriptor = None + self.discriminator = None + + self.source_type = source_type + self.task_name = task_name + self.destination_type = destination_type + self.obs_destination_descriptor = obs_destination_descriptor + + @property + def source_type(self): + """Gets the source_type of this CreateSinkTaskReq. + + 源数据类型,目前只支持BLOB。 + + :return: The source_type of this CreateSinkTaskReq. + :rtype: str + """ + return self._source_type + + @source_type.setter + def source_type(self, source_type): + """Sets the source_type of this CreateSinkTaskReq. + + 源数据类型,目前只支持BLOB。 + + :param source_type: The source_type of this CreateSinkTaskReq. + :type: str + """ + self._source_type = source_type + + @property + def task_name(self): + """Gets the task_name of this CreateSinkTaskReq. + + 转储任务名称。 + + :return: The task_name of this CreateSinkTaskReq. + :rtype: str + """ + return self._task_name + + @task_name.setter + def task_name(self, task_name): + """Sets the task_name of this CreateSinkTaskReq. + + 转储任务名称。 + + :param task_name: The task_name of this CreateSinkTaskReq. + :type: str + """ + self._task_name = task_name + + @property + def destination_type(self): + """Gets the destination_type of this CreateSinkTaskReq. + + 转存的目标类型,当前只支持OBS。 + + :return: The destination_type of this CreateSinkTaskReq. + :rtype: str + """ + return self._destination_type + + @destination_type.setter + def destination_type(self, destination_type): + """Sets the destination_type of this CreateSinkTaskReq. + + 转存的目标类型,当前只支持OBS。 + + :param destination_type: The destination_type of this CreateSinkTaskReq. + :type: str + """ + self._destination_type = destination_type + + @property + def obs_destination_descriptor(self): + """Gets the obs_destination_descriptor of this CreateSinkTaskReq. + + + :return: The obs_destination_descriptor of this CreateSinkTaskReq. + :rtype: ObsDestinationDescriptor + """ + return self._obs_destination_descriptor + + @obs_destination_descriptor.setter + def obs_destination_descriptor(self, obs_destination_descriptor): + """Sets the obs_destination_descriptor of this CreateSinkTaskReq. + + + :param obs_destination_descriptor: The obs_destination_descriptor of this CreateSinkTaskReq. + :type: ObsDestinationDescriptor + """ + self._obs_destination_descriptor = obs_destination_descriptor + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateSinkTaskReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_sink_task_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_sink_task_request.py new file mode 100644 index 0000000000..6a58394b96 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_sink_task_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreateSinkTaskRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'connector_id': 'str', + 'body': 'CreateSinkTaskReq' + } + + attribute_map = { + 'connector_id': 'connector_id', + 'body': 'body' + } + + def __init__(self, connector_id=None, body=None): + """CreateSinkTaskRequest - a model defined in huaweicloud sdk""" + + + + self._connector_id = None + self._body = None + self.discriminator = None + + self.connector_id = connector_id + if body is not None: + self.body = body + + @property + def connector_id(self): + """Gets the connector_id of this CreateSinkTaskRequest. + + + :return: The connector_id of this CreateSinkTaskRequest. + :rtype: str + """ + return self._connector_id + + @connector_id.setter + def connector_id(self, connector_id): + """Sets the connector_id of this CreateSinkTaskRequest. + + + :param connector_id: The connector_id of this CreateSinkTaskRequest. + :type: str + """ + self._connector_id = connector_id + + @property + def body(self): + """Gets the body of this CreateSinkTaskRequest. + + + :return: The body of this CreateSinkTaskRequest. + :rtype: CreateSinkTaskReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateSinkTaskRequest. + + + :param body: The body of this CreateSinkTaskRequest. + :type: CreateSinkTaskReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateSinkTaskRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_sink_task_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_sink_task_response.py new file mode 100644 index 0000000000..ddd38657cb --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_sink_task_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class CreateSinkTaskResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'task_id': 'str' + } + + attribute_map = { + 'task_id': 'task_id' + } + + def __init__(self, task_id=None): + """CreateSinkTaskResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._task_id = None + self.discriminator = None + + if task_id is not None: + self.task_id = task_id + + @property + def task_id(self): + """Gets the task_id of this CreateSinkTaskResponse. + + 任务ID。 + + :return: The task_id of this CreateSinkTaskResponse. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this CreateSinkTaskResponse. + + 任务ID。 + + :param task_id: The task_id of this CreateSinkTaskResponse. + :type: str + """ + self._task_id = task_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateSinkTaskResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_background_task_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_background_task_request.py new file mode 100644 index 0000000000..fc4c98afe5 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_background_task_request.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class DeleteBackgroundTaskRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'task_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'task_id': 'task_id' + } + + def __init__(self, instance_id=None, task_id=None): + """DeleteBackgroundTaskRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._task_id = None + self.discriminator = None + + self.instance_id = instance_id + self.task_id = task_id + + @property + def instance_id(self): + """Gets the instance_id of this DeleteBackgroundTaskRequest. + + + :return: The instance_id of this DeleteBackgroundTaskRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this DeleteBackgroundTaskRequest. + + + :param instance_id: The instance_id of this DeleteBackgroundTaskRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def task_id(self): + """Gets the task_id of this DeleteBackgroundTaskRequest. + + + :return: The task_id of this DeleteBackgroundTaskRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this DeleteBackgroundTaskRequest. + + + :param task_id: The task_id of this DeleteBackgroundTaskRequest. + :type: str + """ + self._task_id = task_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteBackgroundTaskRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_background_task_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_background_task_response.py new file mode 100644 index 0000000000..f7b5463610 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_background_task_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class DeleteBackgroundTaskResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """DeleteBackgroundTaskResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteBackgroundTaskResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_instance_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_instance_request.py new file mode 100644 index 0000000000..778540d59f --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_instance_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class DeleteInstanceRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id' + } + + def __init__(self, instance_id=None): + """DeleteInstanceRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self.discriminator = None + + self.instance_id = instance_id + + @property + def instance_id(self): + """Gets the instance_id of this DeleteInstanceRequest. + + + :return: The instance_id of this DeleteInstanceRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this DeleteInstanceRequest. + + + :param instance_id: The instance_id of this DeleteInstanceRequest. + :type: str + """ + self._instance_id = instance_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteInstanceRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_instance_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_instance_response.py new file mode 100644 index 0000000000..997326048f --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_instance_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class DeleteInstanceResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """DeleteInstanceResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteInstanceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_sink_task_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_sink_task_request.py new file mode 100644 index 0000000000..f69b8cdf81 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_sink_task_request.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class DeleteSinkTaskRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'connector_id': 'str', + 'task_id': 'str' + } + + attribute_map = { + 'connector_id': 'connector_id', + 'task_id': 'task_id' + } + + def __init__(self, connector_id=None, task_id=None): + """DeleteSinkTaskRequest - a model defined in huaweicloud sdk""" + + + + self._connector_id = None + self._task_id = None + self.discriminator = None + + self.connector_id = connector_id + self.task_id = task_id + + @property + def connector_id(self): + """Gets the connector_id of this DeleteSinkTaskRequest. + + + :return: The connector_id of this DeleteSinkTaskRequest. + :rtype: str + """ + return self._connector_id + + @connector_id.setter + def connector_id(self, connector_id): + """Sets the connector_id of this DeleteSinkTaskRequest. + + + :param connector_id: The connector_id of this DeleteSinkTaskRequest. + :type: str + """ + self._connector_id = connector_id + + @property + def task_id(self): + """Gets the task_id of this DeleteSinkTaskRequest. + + + :return: The task_id of this DeleteSinkTaskRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this DeleteSinkTaskRequest. + + + :param task_id: The task_id of this DeleteSinkTaskRequest. + :type: str + """ + self._task_id = task_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteSinkTaskRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_sink_task_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_sink_task_response.py new file mode 100644 index 0000000000..39340d3f8e --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/delete_sink_task_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class DeleteSinkTaskResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """DeleteSinkTaskResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteSinkTaskResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_available_zones_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_available_zones_request.py new file mode 100644 index 0000000000..eba1687f23 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_available_zones_request.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListAvailableZonesRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ListAvailableZonesRequest - a model defined in huaweicloud sdk""" + + + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListAvailableZonesRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_available_zones_resp_available_zones.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_available_zones_resp_available_zones.py new file mode 100644 index 0000000000..1157a36522 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_available_zones_resp_available_zones.py @@ -0,0 +1,299 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListAvailableZonesRespAvailableZones: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'sold_out': 'bool', + 'id': 'str', + 'code': 'str', + 'name': 'str', + 'port': 'str', + 'resource_availability': 'str', + 'default_az': 'bool', + 'ipv6_enable': 'bool' + } + + attribute_map = { + 'sold_out': 'soldOut', + 'id': 'id', + 'code': 'code', + 'name': 'name', + 'port': 'port', + 'resource_availability': 'resource_availability', + 'default_az': 'default_az', + 'ipv6_enable': 'ipv6_enable' + } + + def __init__(self, sold_out=None, id=None, code=None, name=None, port=None, resource_availability=None, default_az=None, ipv6_enable=None): + """ListAvailableZonesRespAvailableZones - a model defined in huaweicloud sdk""" + + + + self._sold_out = None + self._id = None + self._code = None + self._name = None + self._port = None + self._resource_availability = None + self._default_az = None + self._ipv6_enable = None + self.discriminator = None + + if sold_out is not None: + self.sold_out = sold_out + if id is not None: + self.id = id + if code is not None: + self.code = code + if name is not None: + self.name = name + if port is not None: + self.port = port + if resource_availability is not None: + self.resource_availability = resource_availability + if default_az is not None: + self.default_az = default_az + if ipv6_enable is not None: + self.ipv6_enable = ipv6_enable + + @property + def sold_out(self): + """Gets the sold_out of this ListAvailableZonesRespAvailableZones. + + 是否售罄。 + + :return: The sold_out of this ListAvailableZonesRespAvailableZones. + :rtype: bool + """ + return self._sold_out + + @sold_out.setter + def sold_out(self, sold_out): + """Sets the sold_out of this ListAvailableZonesRespAvailableZones. + + 是否售罄。 + + :param sold_out: The sold_out of this ListAvailableZonesRespAvailableZones. + :type: bool + """ + self._sold_out = sold_out + + @property + def id(self): + """Gets the id of this ListAvailableZonesRespAvailableZones. + + 可用区ID。 + + :return: The id of this ListAvailableZonesRespAvailableZones. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ListAvailableZonesRespAvailableZones. + + 可用区ID。 + + :param id: The id of this ListAvailableZonesRespAvailableZones. + :type: str + """ + self._id = id + + @property + def code(self): + """Gets the code of this ListAvailableZonesRespAvailableZones. + + 可用区编码。 + + :return: The code of this ListAvailableZonesRespAvailableZones. + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ListAvailableZonesRespAvailableZones. + + 可用区编码。 + + :param code: The code of this ListAvailableZonesRespAvailableZones. + :type: str + """ + self._code = code + + @property + def name(self): + """Gets the name of this ListAvailableZonesRespAvailableZones. + + 可用区名称。 + + :return: The name of this ListAvailableZonesRespAvailableZones. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListAvailableZonesRespAvailableZones. + + 可用区名称。 + + :param name: The name of this ListAvailableZonesRespAvailableZones. + :type: str + """ + self._name = name + + @property + def port(self): + """Gets the port of this ListAvailableZonesRespAvailableZones. + + 可用区端口号。 + + :return: The port of this ListAvailableZonesRespAvailableZones. + :rtype: str + """ + return self._port + + @port.setter + def port(self, port): + """Sets the port of this ListAvailableZonesRespAvailableZones. + + 可用区端口号。 + + :param port: The port of this ListAvailableZonesRespAvailableZones. + :type: str + """ + self._port = port + + @property + def resource_availability(self): + """Gets the resource_availability of this ListAvailableZonesRespAvailableZones. + + 分区上是否还有可用资源。 + + :return: The resource_availability of this ListAvailableZonesRespAvailableZones. + :rtype: str + """ + return self._resource_availability + + @resource_availability.setter + def resource_availability(self, resource_availability): + """Sets the resource_availability of this ListAvailableZonesRespAvailableZones. + + 分区上是否还有可用资源。 + + :param resource_availability: The resource_availability of this ListAvailableZonesRespAvailableZones. + :type: str + """ + self._resource_availability = resource_availability + + @property + def default_az(self): + """Gets the default_az of this ListAvailableZonesRespAvailableZones. + + 是否为默认可用区。 + + :return: The default_az of this ListAvailableZonesRespAvailableZones. + :rtype: bool + """ + return self._default_az + + @default_az.setter + def default_az(self, default_az): + """Sets the default_az of this ListAvailableZonesRespAvailableZones. + + 是否为默认可用区。 + + :param default_az: The default_az of this ListAvailableZonesRespAvailableZones. + :type: bool + """ + self._default_az = default_az + + @property + def ipv6_enable(self): + """Gets the ipv6_enable of this ListAvailableZonesRespAvailableZones. + + 是否支持IPv6。 + + :return: The ipv6_enable of this ListAvailableZonesRespAvailableZones. + :rtype: bool + """ + return self._ipv6_enable + + @ipv6_enable.setter + def ipv6_enable(self, ipv6_enable): + """Sets the ipv6_enable of this ListAvailableZonesRespAvailableZones. + + 是否支持IPv6。 + + :param ipv6_enable: The ipv6_enable of this ListAvailableZonesRespAvailableZones. + :type: bool + """ + self._ipv6_enable = ipv6_enable + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListAvailableZonesRespAvailableZones): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_available_zones_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_available_zones_response.py new file mode 100644 index 0000000000..da5901b51b --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_available_zones_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ListAvailableZonesResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'region_id': 'str', + 'available_zones': 'list[ListAvailableZonesRespAvailableZones]' + } + + attribute_map = { + 'region_id': 'region_id', + 'available_zones': 'available_zones' + } + + def __init__(self, region_id=None, available_zones=None): + """ListAvailableZonesResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._region_id = None + self._available_zones = None + self.discriminator = None + + if region_id is not None: + self.region_id = region_id + if available_zones is not None: + self.available_zones = available_zones + + @property + def region_id(self): + """Gets the region_id of this ListAvailableZonesResponse. + + 区域ID。 + + :return: The region_id of this ListAvailableZonesResponse. + :rtype: str + """ + return self._region_id + + @region_id.setter + def region_id(self, region_id): + """Sets the region_id of this ListAvailableZonesResponse. + + 区域ID。 + + :param region_id: The region_id of this ListAvailableZonesResponse. + :type: str + """ + self._region_id = region_id + + @property + def available_zones(self): + """Gets the available_zones of this ListAvailableZonesResponse. + + 可用区数组。 + + :return: The available_zones of this ListAvailableZonesResponse. + :rtype: list[ListAvailableZonesRespAvailableZones] + """ + return self._available_zones + + @available_zones.setter + def available_zones(self, available_zones): + """Sets the available_zones of this ListAvailableZonesResponse. + + 可用区数组。 + + :param available_zones: The available_zones of this ListAvailableZonesResponse. + :type: list[ListAvailableZonesRespAvailableZones] + """ + self._available_zones = available_zones + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListAvailableZonesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_background_tasks_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_background_tasks_request.py new file mode 100644 index 0000000000..ac0f6cd22d --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_background_tasks_request.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListBackgroundTasksRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'start': 'int', + 'limit': 'int', + 'begin_time': 'str', + 'end_time': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'start': 'start', + 'limit': 'limit', + 'begin_time': 'begin_time', + 'end_time': 'end_time' + } + + def __init__(self, instance_id=None, start=None, limit=None, begin_time=None, end_time=None): + """ListBackgroundTasksRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._start = None + self._limit = None + self._begin_time = None + self._end_time = None + self.discriminator = None + + self.instance_id = instance_id + if start is not None: + self.start = start + if limit is not None: + self.limit = limit + if begin_time is not None: + self.begin_time = begin_time + if end_time is not None: + self.end_time = end_time + + @property + def instance_id(self): + """Gets the instance_id of this ListBackgroundTasksRequest. + + + :return: The instance_id of this ListBackgroundTasksRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ListBackgroundTasksRequest. + + + :param instance_id: The instance_id of this ListBackgroundTasksRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def start(self): + """Gets the start of this ListBackgroundTasksRequest. + + + :return: The start of this ListBackgroundTasksRequest. + :rtype: int + """ + return self._start + + @start.setter + def start(self, start): + """Sets the start of this ListBackgroundTasksRequest. + + + :param start: The start of this ListBackgroundTasksRequest. + :type: int + """ + self._start = start + + @property + def limit(self): + """Gets the limit of this ListBackgroundTasksRequest. + + + :return: The limit of this ListBackgroundTasksRequest. + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this ListBackgroundTasksRequest. + + + :param limit: The limit of this ListBackgroundTasksRequest. + :type: int + """ + self._limit = limit + + @property + def begin_time(self): + """Gets the begin_time of this ListBackgroundTasksRequest. + + + :return: The begin_time of this ListBackgroundTasksRequest. + :rtype: str + """ + return self._begin_time + + @begin_time.setter + def begin_time(self, begin_time): + """Sets the begin_time of this ListBackgroundTasksRequest. + + + :param begin_time: The begin_time of this ListBackgroundTasksRequest. + :type: str + """ + self._begin_time = begin_time + + @property + def end_time(self): + """Gets the end_time of this ListBackgroundTasksRequest. + + + :return: The end_time of this ListBackgroundTasksRequest. + :rtype: str + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time): + """Sets the end_time of this ListBackgroundTasksRequest. + + + :param end_time: The end_time of this ListBackgroundTasksRequest. + :type: str + """ + self._end_time = end_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListBackgroundTasksRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_background_tasks_resp_tasks.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_background_tasks_resp_tasks.py new file mode 100644 index 0000000000..5f08b7946f --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_background_tasks_resp_tasks.py @@ -0,0 +1,299 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListBackgroundTasksRespTasks: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'id': 'str', + 'name': 'str', + 'user_name': 'str', + 'user_id': 'str', + 'params': 'str', + 'status': 'str', + 'created_at': 'str', + 'updated_at': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'user_name': 'user_name', + 'user_id': 'user_id', + 'params': 'params', + 'status': 'status', + 'created_at': 'created_at', + 'updated_at': 'updated_at' + } + + def __init__(self, id=None, name=None, user_name=None, user_id=None, params=None, status=None, created_at=None, updated_at=None): + """ListBackgroundTasksRespTasks - a model defined in huaweicloud sdk""" + + + + self._id = None + self._name = None + self._user_name = None + self._user_id = None + self._params = None + self._status = None + self._created_at = None + self._updated_at = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if user_name is not None: + self.user_name = user_name + if user_id is not None: + self.user_id = user_id + if params is not None: + self.params = params + if status is not None: + self.status = status + if created_at is not None: + self.created_at = created_at + if updated_at is not None: + self.updated_at = updated_at + + @property + def id(self): + """Gets the id of this ListBackgroundTasksRespTasks. + + 任务ID。 + + :return: The id of this ListBackgroundTasksRespTasks. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ListBackgroundTasksRespTasks. + + 任务ID。 + + :param id: The id of this ListBackgroundTasksRespTasks. + :type: str + """ + self._id = id + + @property + def name(self): + """Gets the name of this ListBackgroundTasksRespTasks. + + 任务名称。 + + :return: The name of this ListBackgroundTasksRespTasks. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListBackgroundTasksRespTasks. + + 任务名称。 + + :param name: The name of this ListBackgroundTasksRespTasks. + :type: str + """ + self._name = name + + @property + def user_name(self): + """Gets the user_name of this ListBackgroundTasksRespTasks. + + 用户名。 + + :return: The user_name of this ListBackgroundTasksRespTasks. + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """Sets the user_name of this ListBackgroundTasksRespTasks. + + 用户名。 + + :param user_name: The user_name of this ListBackgroundTasksRespTasks. + :type: str + """ + self._user_name = user_name + + @property + def user_id(self): + """Gets the user_id of this ListBackgroundTasksRespTasks. + + 用户ID。 + + :return: The user_id of this ListBackgroundTasksRespTasks. + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this ListBackgroundTasksRespTasks. + + 用户ID。 + + :param user_id: The user_id of this ListBackgroundTasksRespTasks. + :type: str + """ + self._user_id = user_id + + @property + def params(self): + """Gets the params of this ListBackgroundTasksRespTasks. + + 任务参数。 + + :return: The params of this ListBackgroundTasksRespTasks. + :rtype: str + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this ListBackgroundTasksRespTasks. + + 任务参数。 + + :param params: The params of this ListBackgroundTasksRespTasks. + :type: str + """ + self._params = params + + @property + def status(self): + """Gets the status of this ListBackgroundTasksRespTasks. + + 任务状态。 + + :return: The status of this ListBackgroundTasksRespTasks. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ListBackgroundTasksRespTasks. + + 任务状态。 + + :param status: The status of this ListBackgroundTasksRespTasks. + :type: str + """ + self._status = status + + @property + def created_at(self): + """Gets the created_at of this ListBackgroundTasksRespTasks. + + 启动时间。 + + :return: The created_at of this ListBackgroundTasksRespTasks. + :rtype: str + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ListBackgroundTasksRespTasks. + + 启动时间。 + + :param created_at: The created_at of this ListBackgroundTasksRespTasks. + :type: str + """ + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this ListBackgroundTasksRespTasks. + + 结束时间。 + + :return: The updated_at of this ListBackgroundTasksRespTasks. + :rtype: str + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this ListBackgroundTasksRespTasks. + + 结束时间。 + + :param updated_at: The updated_at of this ListBackgroundTasksRespTasks. + :type: str + """ + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListBackgroundTasksRespTasks): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_background_tasks_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_background_tasks_response.py new file mode 100644 index 0000000000..27b7dc9bab --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_background_tasks_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ListBackgroundTasksResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'task_count': 'str', + 'tasks': 'list[ListBackgroundTasksRespTasks]' + } + + attribute_map = { + 'task_count': 'task_count', + 'tasks': 'tasks' + } + + def __init__(self, task_count=None, tasks=None): + """ListBackgroundTasksResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._task_count = None + self._tasks = None + self.discriminator = None + + if task_count is not None: + self.task_count = task_count + if tasks is not None: + self.tasks = tasks + + @property + def task_count(self): + """Gets the task_count of this ListBackgroundTasksResponse. + + 任务数量。 + + :return: The task_count of this ListBackgroundTasksResponse. + :rtype: str + """ + return self._task_count + + @task_count.setter + def task_count(self, task_count): + """Sets the task_count of this ListBackgroundTasksResponse. + + 任务数量。 + + :param task_count: The task_count of this ListBackgroundTasksResponse. + :type: str + """ + self._task_count = task_count + + @property + def tasks(self): + """Gets the tasks of this ListBackgroundTasksResponse. + + 任务列表。 + + :return: The tasks of this ListBackgroundTasksResponse. + :rtype: list[ListBackgroundTasksRespTasks] + """ + return self._tasks + + @tasks.setter + def tasks(self, tasks): + """Sets the tasks of this ListBackgroundTasksResponse. + + 任务列表。 + + :param tasks: The tasks of this ListBackgroundTasksResponse. + :type: list[ListBackgroundTasksRespTasks] + """ + self._tasks = tasks + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListBackgroundTasksResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instance_topics_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instance_topics_request.py new file mode 100644 index 0000000000..d210f934e1 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instance_topics_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListInstanceTopicsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id' + } + + def __init__(self, instance_id=None): + """ListInstanceTopicsRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self.discriminator = None + + self.instance_id = instance_id + + @property + def instance_id(self): + """Gets the instance_id of this ListInstanceTopicsRequest. + + + :return: The instance_id of this ListInstanceTopicsRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ListInstanceTopicsRequest. + + + :param instance_id: The instance_id of this ListInstanceTopicsRequest. + :type: str + """ + self._instance_id = instance_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListInstanceTopicsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instance_topics_resp_topics.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instance_topics_resp_topics.py new file mode 100644 index 0000000000..42d2de7cf5 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instance_topics_resp_topics.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListInstanceTopicsRespTopics: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'id': 'str', + 'replication': 'int', + 'partition': 'int', + 'retention_time': 'int', + 'sync_replication': 'bool', + 'sync_message_flush': 'bool' + } + + attribute_map = { + 'id': 'id', + 'replication': 'replication', + 'partition': 'partition', + 'retention_time': 'retention_time', + 'sync_replication': 'sync_replication', + 'sync_message_flush': 'sync_message_flush' + } + + def __init__(self, id=None, replication=None, partition=None, retention_time=None, sync_replication=None, sync_message_flush=None): + """ListInstanceTopicsRespTopics - a model defined in huaweicloud sdk""" + + + + self._id = None + self._replication = None + self._partition = None + self._retention_time = None + self._sync_replication = None + self._sync_message_flush = None + self.discriminator = None + + if id is not None: + self.id = id + if replication is not None: + self.replication = replication + if partition is not None: + self.partition = partition + if retention_time is not None: + self.retention_time = retention_time + if sync_replication is not None: + self.sync_replication = sync_replication + if sync_message_flush is not None: + self.sync_message_flush = sync_message_flush + + @property + def id(self): + """Gets the id of this ListInstanceTopicsRespTopics. + + topic名称。 + + :return: The id of this ListInstanceTopicsRespTopics. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ListInstanceTopicsRespTopics. + + topic名称。 + + :param id: The id of this ListInstanceTopicsRespTopics. + :type: str + """ + self._id = id + + @property + def replication(self): + """Gets the replication of this ListInstanceTopicsRespTopics. + + 副本数,配置数据的可靠性。 + + :return: The replication of this ListInstanceTopicsRespTopics. + :rtype: int + """ + return self._replication + + @replication.setter + def replication(self, replication): + """Sets the replication of this ListInstanceTopicsRespTopics. + + 副本数,配置数据的可靠性。 + + :param replication: The replication of this ListInstanceTopicsRespTopics. + :type: int + """ + self._replication = replication + + @property + def partition(self): + """Gets the partition of this ListInstanceTopicsRespTopics. + + topic分区数,设置消费的并发数。 + + :return: The partition of this ListInstanceTopicsRespTopics. + :rtype: int + """ + return self._partition + + @partition.setter + def partition(self, partition): + """Sets the partition of this ListInstanceTopicsRespTopics. + + topic分区数,设置消费的并发数。 + + :param partition: The partition of this ListInstanceTopicsRespTopics. + :type: int + """ + self._partition = partition + + @property + def retention_time(self): + """Gets the retention_time of this ListInstanceTopicsRespTopics. + + 消息老化时间。 + + :return: The retention_time of this ListInstanceTopicsRespTopics. + :rtype: int + """ + return self._retention_time + + @retention_time.setter + def retention_time(self, retention_time): + """Sets the retention_time of this ListInstanceTopicsRespTopics. + + 消息老化时间。 + + :param retention_time: The retention_time of this ListInstanceTopicsRespTopics. + :type: int + """ + self._retention_time = retention_time + + @property + def sync_replication(self): + """Gets the sync_replication of this ListInstanceTopicsRespTopics. + + 是否开启同步复制,开启后,客户端生产消息时相应的也要设置acks=-1,否则不生效,默认关闭。 + + :return: The sync_replication of this ListInstanceTopicsRespTopics. + :rtype: bool + """ + return self._sync_replication + + @sync_replication.setter + def sync_replication(self, sync_replication): + """Sets the sync_replication of this ListInstanceTopicsRespTopics. + + 是否开启同步复制,开启后,客户端生产消息时相应的也要设置acks=-1,否则不生效,默认关闭。 + + :param sync_replication: The sync_replication of this ListInstanceTopicsRespTopics. + :type: bool + """ + self._sync_replication = sync_replication + + @property + def sync_message_flush(self): + """Gets the sync_message_flush of this ListInstanceTopicsRespTopics. + + 是否使用同步落盘。默认值为false。同步落盘会导致性能降低。 + + :return: The sync_message_flush of this ListInstanceTopicsRespTopics. + :rtype: bool + """ + return self._sync_message_flush + + @sync_message_flush.setter + def sync_message_flush(self, sync_message_flush): + """Sets the sync_message_flush of this ListInstanceTopicsRespTopics. + + 是否使用同步落盘。默认值为false。同步落盘会导致性能降低。 + + :param sync_message_flush: The sync_message_flush of this ListInstanceTopicsRespTopics. + :type: bool + """ + self._sync_message_flush = sync_message_flush + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListInstanceTopicsRespTopics): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instance_topics_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instance_topics_response.py new file mode 100644 index 0000000000..e90958f4b1 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instance_topics_response.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ListInstanceTopicsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'count': 'int', + 'size': 'int', + 'topics': 'list[ListInstanceTopicsRespTopics]' + } + + attribute_map = { + 'count': 'count', + 'size': 'size', + 'topics': 'topics' + } + + def __init__(self, count=None, size=None, topics=None): + """ListInstanceTopicsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._count = None + self._size = None + self._topics = None + self.discriminator = None + + if count is not None: + self.count = count + if size is not None: + self.size = size + if topics is not None: + self.topics = topics + + @property + def count(self): + """Gets the count of this ListInstanceTopicsResponse. + + topic总数。 + + :return: The count of this ListInstanceTopicsResponse. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this ListInstanceTopicsResponse. + + topic总数。 + + :param count: The count of this ListInstanceTopicsResponse. + :type: int + """ + self._count = count + + @property + def size(self): + """Gets the size of this ListInstanceTopicsResponse. + + 分页查询的大小。 + + :return: The size of this ListInstanceTopicsResponse. + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this ListInstanceTopicsResponse. + + 分页查询的大小。 + + :param size: The size of this ListInstanceTopicsResponse. + :type: int + """ + self._size = size + + @property + def topics(self): + """Gets the topics of this ListInstanceTopicsResponse. + + Topic列表。 + + :return: The topics of this ListInstanceTopicsResponse. + :rtype: list[ListInstanceTopicsRespTopics] + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this ListInstanceTopicsResponse. + + Topic列表。 + + :param topics: The topics of this ListInstanceTopicsResponse. + :type: list[ListInstanceTopicsRespTopics] + """ + self._topics = topics + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListInstanceTopicsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instances_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instances_request.py new file mode 100644 index 0000000000..9a9c31dbbf --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instances_request.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListInstancesRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'engine': 'str', + 'name': 'str', + 'instance_id': 'str', + 'status': 'str', + 'include_failure': 'str', + 'exact_match_name': 'str', + 'enterprise_project_id': 'str' + } + + attribute_map = { + 'engine': 'engine', + 'name': 'name', + 'instance_id': 'instance_id', + 'status': 'status', + 'include_failure': 'include_failure', + 'exact_match_name': 'exact_match_name', + 'enterprise_project_id': 'enterprise_project_id' + } + + def __init__(self, engine=None, name=None, instance_id=None, status=None, include_failure=None, exact_match_name=None, enterprise_project_id=None): + """ListInstancesRequest - a model defined in huaweicloud sdk""" + + + + self._engine = None + self._name = None + self._instance_id = None + self._status = None + self._include_failure = None + self._exact_match_name = None + self._enterprise_project_id = None + self.discriminator = None + + self.engine = engine + if name is not None: + self.name = name + if instance_id is not None: + self.instance_id = instance_id + if status is not None: + self.status = status + if include_failure is not None: + self.include_failure = include_failure + if exact_match_name is not None: + self.exact_match_name = exact_match_name + if enterprise_project_id is not None: + self.enterprise_project_id = enterprise_project_id + + @property + def engine(self): + """Gets the engine of this ListInstancesRequest. + + + :return: The engine of this ListInstancesRequest. + :rtype: str + """ + return self._engine + + @engine.setter + def engine(self, engine): + """Sets the engine of this ListInstancesRequest. + + + :param engine: The engine of this ListInstancesRequest. + :type: str + """ + self._engine = engine + + @property + def name(self): + """Gets the name of this ListInstancesRequest. + + + :return: The name of this ListInstancesRequest. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListInstancesRequest. + + + :param name: The name of this ListInstancesRequest. + :type: str + """ + self._name = name + + @property + def instance_id(self): + """Gets the instance_id of this ListInstancesRequest. + + + :return: The instance_id of this ListInstancesRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ListInstancesRequest. + + + :param instance_id: The instance_id of this ListInstancesRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def status(self): + """Gets the status of this ListInstancesRequest. + + + :return: The status of this ListInstancesRequest. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ListInstancesRequest. + + + :param status: The status of this ListInstancesRequest. + :type: str + """ + self._status = status + + @property + def include_failure(self): + """Gets the include_failure of this ListInstancesRequest. + + + :return: The include_failure of this ListInstancesRequest. + :rtype: str + """ + return self._include_failure + + @include_failure.setter + def include_failure(self, include_failure): + """Sets the include_failure of this ListInstancesRequest. + + + :param include_failure: The include_failure of this ListInstancesRequest. + :type: str + """ + self._include_failure = include_failure + + @property + def exact_match_name(self): + """Gets the exact_match_name of this ListInstancesRequest. + + + :return: The exact_match_name of this ListInstancesRequest. + :rtype: str + """ + return self._exact_match_name + + @exact_match_name.setter + def exact_match_name(self, exact_match_name): + """Sets the exact_match_name of this ListInstancesRequest. + + + :param exact_match_name: The exact_match_name of this ListInstancesRequest. + :type: str + """ + self._exact_match_name = exact_match_name + + @property + def enterprise_project_id(self): + """Gets the enterprise_project_id of this ListInstancesRequest. + + + :return: The enterprise_project_id of this ListInstancesRequest. + :rtype: str + """ + return self._enterprise_project_id + + @enterprise_project_id.setter + def enterprise_project_id(self, enterprise_project_id): + """Sets the enterprise_project_id of this ListInstancesRequest. + + + :param enterprise_project_id: The enterprise_project_id of this ListInstancesRequest. + :type: str + """ + self._enterprise_project_id = enterprise_project_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListInstancesRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instances_resp_instances.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instances_resp_instances.py new file mode 100644 index 0000000000..e35f064ec6 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instances_resp_instances.py @@ -0,0 +1,1703 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListInstancesRespInstances: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'engine': 'str', + 'engine_version': 'str', + 'specification': 'str', + 'storage_space': 'int', + 'partition_num': 'int', + 'used_storage_space': 'int', + 'connect_address': 'str', + 'port': 'int', + 'status': 'str', + 'instance_id': 'str', + 'resource_spec_code': 'str', + 'charging_mode': 'int', + 'vpc_id': 'str', + 'vpc_name': 'str', + 'created_at': 'str', + 'user_id': 'str', + 'user_name': 'str', + 'order_id': 'str', + 'maintain_begin': 'str', + 'maintain_end': 'str', + 'enable_publicip': 'bool', + 'management_connect_address': 'str', + 'ssl_enable': 'bool', + 'enterprise_project_id': 'str', + 'is_logical_volume': 'bool', + 'extend_times': 'int', + 'enable_auto_topic': 'bool', + 'type': 'str', + 'product_id': 'str', + 'security_group_id': 'str', + 'security_group_name': 'str', + 'subnet_id': 'str', + 'available_zones': 'list[str]', + 'total_storage_space': 'int', + 'public_connect_address': 'str', + 'storage_resource_id': 'str', + 'storage_spec_code': 'str', + 'service_type': 'str', + 'storage_type': 'str', + 'retention_policy': 'str', + 'kafka_public_status': 'str', + 'public_bandwidth': 'int', + 'kafka_manager_user': 'str', + 'enable_log_collection': 'bool', + 'cross_vpc_info': 'str', + 'ipv6_enable': 'bool', + 'ipv6_connect_addresses': 'list[str]', + 'connector_enable': 'bool', + 'connector_id': 'str', + 'rest_enable': 'bool', + 'rest_connect_address': 'str', + 'message_query_inst_enable': 'bool', + 'vpc_client_plain': 'bool', + 'support_features': 'str', + 'trace_enable': 'bool', + 'pod_connect_address': 'str', + 'disk_encrypted': 'bool', + 'kafka_private_connect_address': 'str', + 'ces_version': 'str' + } + + attribute_map = { + 'name': 'name', + 'engine': 'engine', + 'engine_version': 'engine_version', + 'specification': 'specification', + 'storage_space': 'storage_space', + 'partition_num': 'partition_num', + 'used_storage_space': 'used_storage_space', + 'connect_address': 'connect_address', + 'port': 'port', + 'status': 'status', + 'instance_id': 'instance_id', + 'resource_spec_code': 'resource_spec_code', + 'charging_mode': 'charging_mode', + 'vpc_id': 'vpc_id', + 'vpc_name': 'vpc_name', + 'created_at': 'created_at', + 'user_id': 'user_id', + 'user_name': 'user_name', + 'order_id': 'order_id', + 'maintain_begin': 'maintain_begin', + 'maintain_end': 'maintain_end', + 'enable_publicip': 'enable_publicip', + 'management_connect_address': 'management_connect_address', + 'ssl_enable': 'ssl_enable', + 'enterprise_project_id': 'enterprise_project_id', + 'is_logical_volume': 'is_logical_volume', + 'extend_times': 'extend_times', + 'enable_auto_topic': 'enable_auto_topic', + 'type': 'type', + 'product_id': 'product_id', + 'security_group_id': 'security_group_id', + 'security_group_name': 'security_group_name', + 'subnet_id': 'subnet_id', + 'available_zones': 'available_zones', + 'total_storage_space': 'total_storage_space', + 'public_connect_address': 'public_connect_address', + 'storage_resource_id': 'storage_resource_id', + 'storage_spec_code': 'storage_spec_code', + 'service_type': 'service_type', + 'storage_type': 'storage_type', + 'retention_policy': 'retention_policy', + 'kafka_public_status': 'kafka_public_status', + 'public_bandwidth': 'public_bandwidth', + 'kafka_manager_user': 'kafka_manager_user', + 'enable_log_collection': 'enable_log_collection', + 'cross_vpc_info': 'cross_vpc_info', + 'ipv6_enable': 'ipv6_enable', + 'ipv6_connect_addresses': 'ipv6_connect_addresses', + 'connector_enable': 'connector_enable', + 'connector_id': 'connector_id', + 'rest_enable': 'rest_enable', + 'rest_connect_address': 'rest_connect_address', + 'message_query_inst_enable': 'message_query_inst_enable', + 'vpc_client_plain': 'vpc_client_plain', + 'support_features': 'support_features', + 'trace_enable': 'trace_enable', + 'pod_connect_address': 'pod_connect_address', + 'disk_encrypted': 'disk_encrypted', + 'kafka_private_connect_address': 'kafka_private_connect_address', + 'ces_version': 'ces_version' + } + + def __init__(self, name=None, engine=None, engine_version=None, specification=None, storage_space=None, partition_num=None, used_storage_space=None, connect_address=None, port=None, status=None, instance_id=None, resource_spec_code=None, charging_mode=None, vpc_id=None, vpc_name=None, created_at=None, user_id=None, user_name=None, order_id=None, maintain_begin=None, maintain_end=None, enable_publicip=None, management_connect_address=None, ssl_enable=None, enterprise_project_id=None, is_logical_volume=None, extend_times=None, enable_auto_topic=None, type=None, product_id=None, security_group_id=None, security_group_name=None, subnet_id=None, available_zones=None, total_storage_space=None, public_connect_address=None, storage_resource_id=None, storage_spec_code=None, service_type=None, storage_type=None, retention_policy=None, kafka_public_status=None, public_bandwidth=None, kafka_manager_user=None, enable_log_collection=None, cross_vpc_info=None, ipv6_enable=None, ipv6_connect_addresses=None, connector_enable=None, connector_id=None, rest_enable=None, rest_connect_address=None, message_query_inst_enable=None, vpc_client_plain=None, support_features=None, trace_enable=None, pod_connect_address=None, disk_encrypted=None, kafka_private_connect_address=None, ces_version=None): + """ListInstancesRespInstances - a model defined in huaweicloud sdk""" + + + + self._name = None + self._engine = None + self._engine_version = None + self._specification = None + self._storage_space = None + self._partition_num = None + self._used_storage_space = None + self._connect_address = None + self._port = None + self._status = None + self._instance_id = None + self._resource_spec_code = None + self._charging_mode = None + self._vpc_id = None + self._vpc_name = None + self._created_at = None + self._user_id = None + self._user_name = None + self._order_id = None + self._maintain_begin = None + self._maintain_end = None + self._enable_publicip = None + self._management_connect_address = None + self._ssl_enable = None + self._enterprise_project_id = None + self._is_logical_volume = None + self._extend_times = None + self._enable_auto_topic = None + self._type = None + self._product_id = None + self._security_group_id = None + self._security_group_name = None + self._subnet_id = None + self._available_zones = None + self._total_storage_space = None + self._public_connect_address = None + self._storage_resource_id = None + self._storage_spec_code = None + self._service_type = None + self._storage_type = None + self._retention_policy = None + self._kafka_public_status = None + self._public_bandwidth = None + self._kafka_manager_user = None + self._enable_log_collection = None + self._cross_vpc_info = None + self._ipv6_enable = None + self._ipv6_connect_addresses = None + self._connector_enable = None + self._connector_id = None + self._rest_enable = None + self._rest_connect_address = None + self._message_query_inst_enable = None + self._vpc_client_plain = None + self._support_features = None + self._trace_enable = None + self._pod_connect_address = None + self._disk_encrypted = None + self._kafka_private_connect_address = None + self._ces_version = None + self.discriminator = None + + if name is not None: + self.name = name + if engine is not None: + self.engine = engine + if engine_version is not None: + self.engine_version = engine_version + if specification is not None: + self.specification = specification + if storage_space is not None: + self.storage_space = storage_space + if partition_num is not None: + self.partition_num = partition_num + if used_storage_space is not None: + self.used_storage_space = used_storage_space + if connect_address is not None: + self.connect_address = connect_address + if port is not None: + self.port = port + if status is not None: + self.status = status + if instance_id is not None: + self.instance_id = instance_id + if resource_spec_code is not None: + self.resource_spec_code = resource_spec_code + if charging_mode is not None: + self.charging_mode = charging_mode + if vpc_id is not None: + self.vpc_id = vpc_id + if vpc_name is not None: + self.vpc_name = vpc_name + if created_at is not None: + self.created_at = created_at + if user_id is not None: + self.user_id = user_id + if user_name is not None: + self.user_name = user_name + if order_id is not None: + self.order_id = order_id + if maintain_begin is not None: + self.maintain_begin = maintain_begin + if maintain_end is not None: + self.maintain_end = maintain_end + if enable_publicip is not None: + self.enable_publicip = enable_publicip + if management_connect_address is not None: + self.management_connect_address = management_connect_address + if ssl_enable is not None: + self.ssl_enable = ssl_enable + if enterprise_project_id is not None: + self.enterprise_project_id = enterprise_project_id + if is_logical_volume is not None: + self.is_logical_volume = is_logical_volume + if extend_times is not None: + self.extend_times = extend_times + if enable_auto_topic is not None: + self.enable_auto_topic = enable_auto_topic + if type is not None: + self.type = type + if product_id is not None: + self.product_id = product_id + if security_group_id is not None: + self.security_group_id = security_group_id + if security_group_name is not None: + self.security_group_name = security_group_name + if subnet_id is not None: + self.subnet_id = subnet_id + if available_zones is not None: + self.available_zones = available_zones + if total_storage_space is not None: + self.total_storage_space = total_storage_space + if public_connect_address is not None: + self.public_connect_address = public_connect_address + if storage_resource_id is not None: + self.storage_resource_id = storage_resource_id + if storage_spec_code is not None: + self.storage_spec_code = storage_spec_code + if service_type is not None: + self.service_type = service_type + if storage_type is not None: + self.storage_type = storage_type + if retention_policy is not None: + self.retention_policy = retention_policy + if kafka_public_status is not None: + self.kafka_public_status = kafka_public_status + if public_bandwidth is not None: + self.public_bandwidth = public_bandwidth + if kafka_manager_user is not None: + self.kafka_manager_user = kafka_manager_user + if enable_log_collection is not None: + self.enable_log_collection = enable_log_collection + if cross_vpc_info is not None: + self.cross_vpc_info = cross_vpc_info + if ipv6_enable is not None: + self.ipv6_enable = ipv6_enable + if ipv6_connect_addresses is not None: + self.ipv6_connect_addresses = ipv6_connect_addresses + if connector_enable is not None: + self.connector_enable = connector_enable + if connector_id is not None: + self.connector_id = connector_id + if rest_enable is not None: + self.rest_enable = rest_enable + if rest_connect_address is not None: + self.rest_connect_address = rest_connect_address + if message_query_inst_enable is not None: + self.message_query_inst_enable = message_query_inst_enable + if vpc_client_plain is not None: + self.vpc_client_plain = vpc_client_plain + if support_features is not None: + self.support_features = support_features + if trace_enable is not None: + self.trace_enable = trace_enable + if pod_connect_address is not None: + self.pod_connect_address = pod_connect_address + if disk_encrypted is not None: + self.disk_encrypted = disk_encrypted + if kafka_private_connect_address is not None: + self.kafka_private_connect_address = kafka_private_connect_address + if ces_version is not None: + self.ces_version = ces_version + + @property + def name(self): + """Gets the name of this ListInstancesRespInstances. + + 实例名称。 + + :return: The name of this ListInstancesRespInstances. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListInstancesRespInstances. + + 实例名称。 + + :param name: The name of this ListInstancesRespInstances. + :type: str + """ + self._name = name + + @property + def engine(self): + """Gets the engine of this ListInstancesRespInstances. + + 引擎。 + + :return: The engine of this ListInstancesRespInstances. + :rtype: str + """ + return self._engine + + @engine.setter + def engine(self, engine): + """Sets the engine of this ListInstancesRespInstances. + + 引擎。 + + :param engine: The engine of this ListInstancesRespInstances. + :type: str + """ + self._engine = engine + + @property + def engine_version(self): + """Gets the engine_version of this ListInstancesRespInstances. + + 版本。 + + :return: The engine_version of this ListInstancesRespInstances. + :rtype: str + """ + return self._engine_version + + @engine_version.setter + def engine_version(self, engine_version): + """Sets the engine_version of this ListInstancesRespInstances. + + 版本。 + + :param engine_version: The engine_version of this ListInstancesRespInstances. + :type: str + """ + self._engine_version = engine_version + + @property + def specification(self): + """Gets the specification of this ListInstancesRespInstances. + + 实例规格。 + + :return: The specification of this ListInstancesRespInstances. + :rtype: str + """ + return self._specification + + @specification.setter + def specification(self, specification): + """Sets the specification of this ListInstancesRespInstances. + + 实例规格。 + + :param specification: The specification of this ListInstancesRespInstances. + :type: str + """ + self._specification = specification + + @property + def storage_space(self): + """Gets the storage_space of this ListInstancesRespInstances. + + 消息存储空间,单位:GB。 + + :return: The storage_space of this ListInstancesRespInstances. + :rtype: int + """ + return self._storage_space + + @storage_space.setter + def storage_space(self, storage_space): + """Sets the storage_space of this ListInstancesRespInstances. + + 消息存储空间,单位:GB。 + + :param storage_space: The storage_space of this ListInstancesRespInstances. + :type: int + """ + self._storage_space = storage_space + + @property + def partition_num(self): + """Gets the partition_num of this ListInstancesRespInstances. + + Kafka实例的最大topic数。 + + :return: The partition_num of this ListInstancesRespInstances. + :rtype: int + """ + return self._partition_num + + @partition_num.setter + def partition_num(self, partition_num): + """Sets the partition_num of this ListInstancesRespInstances. + + Kafka实例的最大topic数。 + + :param partition_num: The partition_num of this ListInstancesRespInstances. + :type: int + """ + self._partition_num = partition_num + + @property + def used_storage_space(self): + """Gets the used_storage_space of this ListInstancesRespInstances. + + 已使用的消息存储空间,单位:GB。 + + :return: The used_storage_space of this ListInstancesRespInstances. + :rtype: int + """ + return self._used_storage_space + + @used_storage_space.setter + def used_storage_space(self, used_storage_space): + """Sets the used_storage_space of this ListInstancesRespInstances. + + 已使用的消息存储空间,单位:GB。 + + :param used_storage_space: The used_storage_space of this ListInstancesRespInstances. + :type: int + """ + self._used_storage_space = used_storage_space + + @property + def connect_address(self): + """Gets the connect_address of this ListInstancesRespInstances. + + 实例连接IP地址。 + + :return: The connect_address of this ListInstancesRespInstances. + :rtype: str + """ + return self._connect_address + + @connect_address.setter + def connect_address(self, connect_address): + """Sets the connect_address of this ListInstancesRespInstances. + + 实例连接IP地址。 + + :param connect_address: The connect_address of this ListInstancesRespInstances. + :type: str + """ + self._connect_address = connect_address + + @property + def port(self): + """Gets the port of this ListInstancesRespInstances. + + 实例连接端口。 + + :return: The port of this ListInstancesRespInstances. + :rtype: int + """ + return self._port + + @port.setter + def port(self, port): + """Sets the port of this ListInstancesRespInstances. + + 实例连接端口。 + + :param port: The port of this ListInstancesRespInstances. + :type: int + """ + self._port = port + + @property + def status(self): + """Gets the status of this ListInstancesRespInstances. + + 实例的状态。详细状态说明见[实例状态说明](https://support.huaweicloud.com/api-kafka/kafka-api-180514012.html)。 + + :return: The status of this ListInstancesRespInstances. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ListInstancesRespInstances. + + 实例的状态。详细状态说明见[实例状态说明](https://support.huaweicloud.com/api-kafka/kafka-api-180514012.html)。 + + :param status: The status of this ListInstancesRespInstances. + :type: str + """ + self._status = status + + @property + def instance_id(self): + """Gets the instance_id of this ListInstancesRespInstances. + + 实例ID。 + + :return: The instance_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ListInstancesRespInstances. + + 实例ID。 + + :param instance_id: The instance_id of this ListInstancesRespInstances. + :type: str + """ + self._instance_id = instance_id + + @property + def resource_spec_code(self): + """Gets the resource_spec_code of this ListInstancesRespInstances. + + 资源规格标识。 - dms.instance.kafka.cluster.c3.mini:Kafka实例的基准带宽为100MB。 - dms.instance.kafka.cluster.c3.small.2:Kafka实例的基准带宽为300MB。 - dms.instance.kafka.cluster.c3.middle.2:Kafka实例的基准带宽为600MB。 - dms.instance.kafka.cluster.c3.high.2:Kafka实例的基准带宽为1200MB。 + + :return: The resource_spec_code of this ListInstancesRespInstances. + :rtype: str + """ + return self._resource_spec_code + + @resource_spec_code.setter + def resource_spec_code(self, resource_spec_code): + """Sets the resource_spec_code of this ListInstancesRespInstances. + + 资源规格标识。 - dms.instance.kafka.cluster.c3.mini:Kafka实例的基准带宽为100MB。 - dms.instance.kafka.cluster.c3.small.2:Kafka实例的基准带宽为300MB。 - dms.instance.kafka.cluster.c3.middle.2:Kafka实例的基准带宽为600MB。 - dms.instance.kafka.cluster.c3.high.2:Kafka实例的基准带宽为1200MB。 + + :param resource_spec_code: The resource_spec_code of this ListInstancesRespInstances. + :type: str + """ + self._resource_spec_code = resource_spec_code + + @property + def charging_mode(self): + """Gets the charging_mode of this ListInstancesRespInstances. + + 付费模式,1表示按需计费,0表示包年/包月计费。 + + :return: The charging_mode of this ListInstancesRespInstances. + :rtype: int + """ + return self._charging_mode + + @charging_mode.setter + def charging_mode(self, charging_mode): + """Sets the charging_mode of this ListInstancesRespInstances. + + 付费模式,1表示按需计费,0表示包年/包月计费。 + + :param charging_mode: The charging_mode of this ListInstancesRespInstances. + :type: int + """ + self._charging_mode = charging_mode + + @property + def vpc_id(self): + """Gets the vpc_id of this ListInstancesRespInstances. + + VPC ID。 + + :return: The vpc_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._vpc_id + + @vpc_id.setter + def vpc_id(self, vpc_id): + """Sets the vpc_id of this ListInstancesRespInstances. + + VPC ID。 + + :param vpc_id: The vpc_id of this ListInstancesRespInstances. + :type: str + """ + self._vpc_id = vpc_id + + @property + def vpc_name(self): + """Gets the vpc_name of this ListInstancesRespInstances. + + VPC的名称。 + + :return: The vpc_name of this ListInstancesRespInstances. + :rtype: str + """ + return self._vpc_name + + @vpc_name.setter + def vpc_name(self, vpc_name): + """Sets the vpc_name of this ListInstancesRespInstances. + + VPC的名称。 + + :param vpc_name: The vpc_name of this ListInstancesRespInstances. + :type: str + """ + self._vpc_name = vpc_name + + @property + def created_at(self): + """Gets the created_at of this ListInstancesRespInstances. + + 完成创建时间。 格式为时间戳,指从格林威治时间 1970年01月01日00时00分00秒起至指定时间的偏差总毫秒数。 + + :return: The created_at of this ListInstancesRespInstances. + :rtype: str + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ListInstancesRespInstances. + + 完成创建时间。 格式为时间戳,指从格林威治时间 1970年01月01日00时00分00秒起至指定时间的偏差总毫秒数。 + + :param created_at: The created_at of this ListInstancesRespInstances. + :type: str + """ + self._created_at = created_at + + @property + def user_id(self): + """Gets the user_id of this ListInstancesRespInstances. + + 用户ID。 + + :return: The user_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this ListInstancesRespInstances. + + 用户ID。 + + :param user_id: The user_id of this ListInstancesRespInstances. + :type: str + """ + self._user_id = user_id + + @property + def user_name(self): + """Gets the user_name of this ListInstancesRespInstances. + + 用户名。 + + :return: The user_name of this ListInstancesRespInstances. + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """Sets the user_name of this ListInstancesRespInstances. + + 用户名。 + + :param user_name: The user_name of this ListInstancesRespInstances. + :type: str + """ + self._user_name = user_name + + @property + def order_id(self): + """Gets the order_id of this ListInstancesRespInstances. + + 订单ID,只有在包周期计费时才会有order_id值,其他计费方式order_id值为空。 + + :return: The order_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this ListInstancesRespInstances. + + 订单ID,只有在包周期计费时才会有order_id值,其他计费方式order_id值为空。 + + :param order_id: The order_id of this ListInstancesRespInstances. + :type: str + """ + self._order_id = order_id + + @property + def maintain_begin(self): + """Gets the maintain_begin of this ListInstancesRespInstances. + + 维护时间窗开始时间,格式为HH:mm:ss。 + + :return: The maintain_begin of this ListInstancesRespInstances. + :rtype: str + """ + return self._maintain_begin + + @maintain_begin.setter + def maintain_begin(self, maintain_begin): + """Sets the maintain_begin of this ListInstancesRespInstances. + + 维护时间窗开始时间,格式为HH:mm:ss。 + + :param maintain_begin: The maintain_begin of this ListInstancesRespInstances. + :type: str + """ + self._maintain_begin = maintain_begin + + @property + def maintain_end(self): + """Gets the maintain_end of this ListInstancesRespInstances. + + 维护时间窗结束时间,格式为HH:mm:ss。 + + :return: The maintain_end of this ListInstancesRespInstances. + :rtype: str + """ + return self._maintain_end + + @maintain_end.setter + def maintain_end(self, maintain_end): + """Sets the maintain_end of this ListInstancesRespInstances. + + 维护时间窗结束时间,格式为HH:mm:ss。 + + :param maintain_end: The maintain_end of this ListInstancesRespInstances. + :type: str + """ + self._maintain_end = maintain_end + + @property + def enable_publicip(self): + """Gets the enable_publicip of this ListInstancesRespInstances. + + 实例是否开启公网访问功能。 - true:开启 - false:未开启 + + :return: The enable_publicip of this ListInstancesRespInstances. + :rtype: bool + """ + return self._enable_publicip + + @enable_publicip.setter + def enable_publicip(self, enable_publicip): + """Sets the enable_publicip of this ListInstancesRespInstances. + + 实例是否开启公网访问功能。 - true:开启 - false:未开启 + + :param enable_publicip: The enable_publicip of this ListInstancesRespInstances. + :type: bool + """ + self._enable_publicip = enable_publicip + + @property + def management_connect_address(self): + """Gets the management_connect_address of this ListInstancesRespInstances. + + Kafka实例的KafkaManager连接地址。 + + :return: The management_connect_address of this ListInstancesRespInstances. + :rtype: str + """ + return self._management_connect_address + + @management_connect_address.setter + def management_connect_address(self, management_connect_address): + """Sets the management_connect_address of this ListInstancesRespInstances. + + Kafka实例的KafkaManager连接地址。 + + :param management_connect_address: The management_connect_address of this ListInstancesRespInstances. + :type: str + """ + self._management_connect_address = management_connect_address + + @property + def ssl_enable(self): + """Gets the ssl_enable of this ListInstancesRespInstances. + + 是否开启安全认证。 - true:开启 - false:未开启 + + :return: The ssl_enable of this ListInstancesRespInstances. + :rtype: bool + """ + return self._ssl_enable + + @ssl_enable.setter + def ssl_enable(self, ssl_enable): + """Sets the ssl_enable of this ListInstancesRespInstances. + + 是否开启安全认证。 - true:开启 - false:未开启 + + :param ssl_enable: The ssl_enable of this ListInstancesRespInstances. + :type: bool + """ + self._ssl_enable = ssl_enable + + @property + def enterprise_project_id(self): + """Gets the enterprise_project_id of this ListInstancesRespInstances. + + 企业项目ID。 + + :return: The enterprise_project_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._enterprise_project_id + + @enterprise_project_id.setter + def enterprise_project_id(self, enterprise_project_id): + """Sets the enterprise_project_id of this ListInstancesRespInstances. + + 企业项目ID。 + + :param enterprise_project_id: The enterprise_project_id of this ListInstancesRespInstances. + :type: str + """ + self._enterprise_project_id = enterprise_project_id + + @property + def is_logical_volume(self): + """Gets the is_logical_volume of this ListInstancesRespInstances. + + 实例扩容时用于区分老实例与新实例。 - true:新创建的实例,允许磁盘动态扩容不需要重启。 - false:老实例 + + :return: The is_logical_volume of this ListInstancesRespInstances. + :rtype: bool + """ + return self._is_logical_volume + + @is_logical_volume.setter + def is_logical_volume(self, is_logical_volume): + """Sets the is_logical_volume of this ListInstancesRespInstances. + + 实例扩容时用于区分老实例与新实例。 - true:新创建的实例,允许磁盘动态扩容不需要重启。 - false:老实例 + + :param is_logical_volume: The is_logical_volume of this ListInstancesRespInstances. + :type: bool + """ + self._is_logical_volume = is_logical_volume + + @property + def extend_times(self): + """Gets the extend_times of this ListInstancesRespInstances. + + 实例扩容磁盘次数,如果超过20次则无法扩容磁盘。 + + :return: The extend_times of this ListInstancesRespInstances. + :rtype: int + """ + return self._extend_times + + @extend_times.setter + def extend_times(self, extend_times): + """Sets the extend_times of this ListInstancesRespInstances. + + 实例扩容磁盘次数,如果超过20次则无法扩容磁盘。 + + :param extend_times: The extend_times of this ListInstancesRespInstances. + :type: int + """ + self._extend_times = extend_times + + @property + def enable_auto_topic(self): + """Gets the enable_auto_topic of this ListInstancesRespInstances. + + 是否打开kafka自动创建topic功能。 - true:开启 - false:关闭 + + :return: The enable_auto_topic of this ListInstancesRespInstances. + :rtype: bool + """ + return self._enable_auto_topic + + @enable_auto_topic.setter + def enable_auto_topic(self, enable_auto_topic): + """Sets the enable_auto_topic of this ListInstancesRespInstances. + + 是否打开kafka自动创建topic功能。 - true:开启 - false:关闭 + + :param enable_auto_topic: The enable_auto_topic of this ListInstancesRespInstances. + :type: bool + """ + self._enable_auto_topic = enable_auto_topic + + @property + def type(self): + """Gets the type of this ListInstancesRespInstances. + + 实例类型:集群,cluster。 + + :return: The type of this ListInstancesRespInstances. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ListInstancesRespInstances. + + 实例类型:集群,cluster。 + + :param type: The type of this ListInstancesRespInstances. + :type: str + """ + self._type = type + + @property + def product_id(self): + """Gets the product_id of this ListInstancesRespInstances. + + 产品标识。 + + :return: The product_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._product_id + + @product_id.setter + def product_id(self, product_id): + """Sets the product_id of this ListInstancesRespInstances. + + 产品标识。 + + :param product_id: The product_id of this ListInstancesRespInstances. + :type: str + """ + self._product_id = product_id + + @property + def security_group_id(self): + """Gets the security_group_id of this ListInstancesRespInstances. + + 安全组ID。 + + :return: The security_group_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._security_group_id + + @security_group_id.setter + def security_group_id(self, security_group_id): + """Sets the security_group_id of this ListInstancesRespInstances. + + 安全组ID。 + + :param security_group_id: The security_group_id of this ListInstancesRespInstances. + :type: str + """ + self._security_group_id = security_group_id + + @property + def security_group_name(self): + """Gets the security_group_name of this ListInstancesRespInstances. + + 租户安全组名称。 + + :return: The security_group_name of this ListInstancesRespInstances. + :rtype: str + """ + return self._security_group_name + + @security_group_name.setter + def security_group_name(self, security_group_name): + """Sets the security_group_name of this ListInstancesRespInstances. + + 租户安全组名称。 + + :param security_group_name: The security_group_name of this ListInstancesRespInstances. + :type: str + """ + self._security_group_name = security_group_name + + @property + def subnet_id(self): + """Gets the subnet_id of this ListInstancesRespInstances. + + 子网ID。 + + :return: The subnet_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """Sets the subnet_id of this ListInstancesRespInstances. + + 子网ID。 + + :param subnet_id: The subnet_id of this ListInstancesRespInstances. + :type: str + """ + self._subnet_id = subnet_id + + @property + def available_zones(self): + """Gets the available_zones of this ListInstancesRespInstances. + + 实例节点所在的可用区,返回“可用区ID”。 + + :return: The available_zones of this ListInstancesRespInstances. + :rtype: list[str] + """ + return self._available_zones + + @available_zones.setter + def available_zones(self, available_zones): + """Sets the available_zones of this ListInstancesRespInstances. + + 实例节点所在的可用区,返回“可用区ID”。 + + :param available_zones: The available_zones of this ListInstancesRespInstances. + :type: list[str] + """ + self._available_zones = available_zones + + @property + def total_storage_space(self): + """Gets the total_storage_space of this ListInstancesRespInstances. + + 总共消息存储空间,单位:GB。 + + :return: The total_storage_space of this ListInstancesRespInstances. + :rtype: int + """ + return self._total_storage_space + + @total_storage_space.setter + def total_storage_space(self, total_storage_space): + """Sets the total_storage_space of this ListInstancesRespInstances. + + 总共消息存储空间,单位:GB。 + + :param total_storage_space: The total_storage_space of this ListInstancesRespInstances. + :type: int + """ + self._total_storage_space = total_storage_space + + @property + def public_connect_address(self): + """Gets the public_connect_address of this ListInstancesRespInstances. + + 实例公网连接IP地址。当实例开启了公网访问,实例才包含该参数。 + + :return: The public_connect_address of this ListInstancesRespInstances. + :rtype: str + """ + return self._public_connect_address + + @public_connect_address.setter + def public_connect_address(self, public_connect_address): + """Sets the public_connect_address of this ListInstancesRespInstances. + + 实例公网连接IP地址。当实例开启了公网访问,实例才包含该参数。 + + :param public_connect_address: The public_connect_address of this ListInstancesRespInstances. + :type: str + """ + self._public_connect_address = public_connect_address + + @property + def storage_resource_id(self): + """Gets the storage_resource_id of this ListInstancesRespInstances. + + 存储资源ID。 + + :return: The storage_resource_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._storage_resource_id + + @storage_resource_id.setter + def storage_resource_id(self, storage_resource_id): + """Sets the storage_resource_id of this ListInstancesRespInstances. + + 存储资源ID。 + + :param storage_resource_id: The storage_resource_id of this ListInstancesRespInstances. + :type: str + """ + self._storage_resource_id = storage_resource_id + + @property + def storage_spec_code(self): + """Gets the storage_spec_code of this ListInstancesRespInstances. + + IO规格。 + + :return: The storage_spec_code of this ListInstancesRespInstances. + :rtype: str + """ + return self._storage_spec_code + + @storage_spec_code.setter + def storage_spec_code(self, storage_spec_code): + """Sets the storage_spec_code of this ListInstancesRespInstances. + + IO规格。 + + :param storage_spec_code: The storage_spec_code of this ListInstancesRespInstances. + :type: str + """ + self._storage_spec_code = storage_spec_code + + @property + def service_type(self): + """Gets the service_type of this ListInstancesRespInstances. + + 服务类型。 + + :return: The service_type of this ListInstancesRespInstances. + :rtype: str + """ + return self._service_type + + @service_type.setter + def service_type(self, service_type): + """Sets the service_type of this ListInstancesRespInstances. + + 服务类型。 + + :param service_type: The service_type of this ListInstancesRespInstances. + :type: str + """ + self._service_type = service_type + + @property + def storage_type(self): + """Gets the storage_type of this ListInstancesRespInstances. + + 存储类型。 + + :return: The storage_type of this ListInstancesRespInstances. + :rtype: str + """ + return self._storage_type + + @storage_type.setter + def storage_type(self, storage_type): + """Sets the storage_type of this ListInstancesRespInstances. + + 存储类型。 + + :param storage_type: The storage_type of this ListInstancesRespInstances. + :type: str + """ + self._storage_type = storage_type + + @property + def retention_policy(self): + """Gets the retention_policy of this ListInstancesRespInstances. + + 消息老化策略。 + + :return: The retention_policy of this ListInstancesRespInstances. + :rtype: str + """ + return self._retention_policy + + @retention_policy.setter + def retention_policy(self, retention_policy): + """Sets the retention_policy of this ListInstancesRespInstances. + + 消息老化策略。 + + :param retention_policy: The retention_policy of this ListInstancesRespInstances. + :type: str + """ + self._retention_policy = retention_policy + + @property + def kafka_public_status(self): + """Gets the kafka_public_status of this ListInstancesRespInstances. + + Kafka公网开启状态。 + + :return: The kafka_public_status of this ListInstancesRespInstances. + :rtype: str + """ + return self._kafka_public_status + + @kafka_public_status.setter + def kafka_public_status(self, kafka_public_status): + """Sets the kafka_public_status of this ListInstancesRespInstances. + + Kafka公网开启状态。 + + :param kafka_public_status: The kafka_public_status of this ListInstancesRespInstances. + :type: str + """ + self._kafka_public_status = kafka_public_status + + @property + def public_bandwidth(self): + """Gets the public_bandwidth of this ListInstancesRespInstances. + + 公网带宽。 + + :return: The public_bandwidth of this ListInstancesRespInstances. + :rtype: int + """ + return self._public_bandwidth + + @public_bandwidth.setter + def public_bandwidth(self, public_bandwidth): + """Sets the public_bandwidth of this ListInstancesRespInstances. + + 公网带宽。 + + :param public_bandwidth: The public_bandwidth of this ListInstancesRespInstances. + :type: int + """ + self._public_bandwidth = public_bandwidth + + @property + def kafka_manager_user(self): + """Gets the kafka_manager_user of this ListInstancesRespInstances. + + 登录Kafka Manager的用户名。 + + :return: The kafka_manager_user of this ListInstancesRespInstances. + :rtype: str + """ + return self._kafka_manager_user + + @kafka_manager_user.setter + def kafka_manager_user(self, kafka_manager_user): + """Sets the kafka_manager_user of this ListInstancesRespInstances. + + 登录Kafka Manager的用户名。 + + :param kafka_manager_user: The kafka_manager_user of this ListInstancesRespInstances. + :type: str + """ + self._kafka_manager_user = kafka_manager_user + + @property + def enable_log_collection(self): + """Gets the enable_log_collection of this ListInstancesRespInstances. + + 是否开启消息收集功能。 + + :return: The enable_log_collection of this ListInstancesRespInstances. + :rtype: bool + """ + return self._enable_log_collection + + @enable_log_collection.setter + def enable_log_collection(self, enable_log_collection): + """Sets the enable_log_collection of this ListInstancesRespInstances. + + 是否开启消息收集功能。 + + :param enable_log_collection: The enable_log_collection of this ListInstancesRespInstances. + :type: bool + """ + self._enable_log_collection = enable_log_collection + + @property + def cross_vpc_info(self): + """Gets the cross_vpc_info of this ListInstancesRespInstances. + + 跨VPC访问信息。 + + :return: The cross_vpc_info of this ListInstancesRespInstances. + :rtype: str + """ + return self._cross_vpc_info + + @cross_vpc_info.setter + def cross_vpc_info(self, cross_vpc_info): + """Sets the cross_vpc_info of this ListInstancesRespInstances. + + 跨VPC访问信息。 + + :param cross_vpc_info: The cross_vpc_info of this ListInstancesRespInstances. + :type: str + """ + self._cross_vpc_info = cross_vpc_info + + @property + def ipv6_enable(self): + """Gets the ipv6_enable of this ListInstancesRespInstances. + + 是否开启ipv6。 + + :return: The ipv6_enable of this ListInstancesRespInstances. + :rtype: bool + """ + return self._ipv6_enable + + @ipv6_enable.setter + def ipv6_enable(self, ipv6_enable): + """Sets the ipv6_enable of this ListInstancesRespInstances. + + 是否开启ipv6。 + + :param ipv6_enable: The ipv6_enable of this ListInstancesRespInstances. + :type: bool + """ + self._ipv6_enable = ipv6_enable + + @property + def ipv6_connect_addresses(self): + """Gets the ipv6_connect_addresses of this ListInstancesRespInstances. + + IPv6的连接地址。 + + :return: The ipv6_connect_addresses of this ListInstancesRespInstances. + :rtype: list[str] + """ + return self._ipv6_connect_addresses + + @ipv6_connect_addresses.setter + def ipv6_connect_addresses(self, ipv6_connect_addresses): + """Sets the ipv6_connect_addresses of this ListInstancesRespInstances. + + IPv6的连接地址。 + + :param ipv6_connect_addresses: The ipv6_connect_addresses of this ListInstancesRespInstances. + :type: list[str] + """ + self._ipv6_connect_addresses = ipv6_connect_addresses + + @property + def connector_enable(self): + """Gets the connector_enable of this ListInstancesRespInstances. + + 是否开启转储。 + + :return: The connector_enable of this ListInstancesRespInstances. + :rtype: bool + """ + return self._connector_enable + + @connector_enable.setter + def connector_enable(self, connector_enable): + """Sets the connector_enable of this ListInstancesRespInstances. + + 是否开启转储。 + + :param connector_enable: The connector_enable of this ListInstancesRespInstances. + :type: bool + """ + self._connector_enable = connector_enable + + @property + def connector_id(self): + """Gets the connector_id of this ListInstancesRespInstances. + + 转储任务ID。 + + :return: The connector_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._connector_id + + @connector_id.setter + def connector_id(self, connector_id): + """Sets the connector_id of this ListInstancesRespInstances. + + 转储任务ID。 + + :param connector_id: The connector_id of this ListInstancesRespInstances. + :type: str + """ + self._connector_id = connector_id + + @property + def rest_enable(self): + """Gets the rest_enable of this ListInstancesRespInstances. + + 是否开启Kafka rest功能。 + + :return: The rest_enable of this ListInstancesRespInstances. + :rtype: bool + """ + return self._rest_enable + + @rest_enable.setter + def rest_enable(self, rest_enable): + """Sets the rest_enable of this ListInstancesRespInstances. + + 是否开启Kafka rest功能。 + + :param rest_enable: The rest_enable of this ListInstancesRespInstances. + :type: bool + """ + self._rest_enable = rest_enable + + @property + def rest_connect_address(self): + """Gets the rest_connect_address of this ListInstancesRespInstances. + + Kafka rest地址。 + + :return: The rest_connect_address of this ListInstancesRespInstances. + :rtype: str + """ + return self._rest_connect_address + + @rest_connect_address.setter + def rest_connect_address(self, rest_connect_address): + """Sets the rest_connect_address of this ListInstancesRespInstances. + + Kafka rest地址。 + + :param rest_connect_address: The rest_connect_address of this ListInstancesRespInstances. + :type: str + """ + self._rest_connect_address = rest_connect_address + + @property + def message_query_inst_enable(self): + """Gets the message_query_inst_enable of this ListInstancesRespInstances. + + 是否开启消息查询功能。 + + :return: The message_query_inst_enable of this ListInstancesRespInstances. + :rtype: bool + """ + return self._message_query_inst_enable + + @message_query_inst_enable.setter + def message_query_inst_enable(self, message_query_inst_enable): + """Sets the message_query_inst_enable of this ListInstancesRespInstances. + + 是否开启消息查询功能。 + + :param message_query_inst_enable: The message_query_inst_enable of this ListInstancesRespInstances. + :type: bool + """ + self._message_query_inst_enable = message_query_inst_enable + + @property + def vpc_client_plain(self): + """Gets the vpc_client_plain of this ListInstancesRespInstances. + + 是否开启VPC明文访问。 + + :return: The vpc_client_plain of this ListInstancesRespInstances. + :rtype: bool + """ + return self._vpc_client_plain + + @vpc_client_plain.setter + def vpc_client_plain(self, vpc_client_plain): + """Sets the vpc_client_plain of this ListInstancesRespInstances. + + 是否开启VPC明文访问。 + + :param vpc_client_plain: The vpc_client_plain of this ListInstancesRespInstances. + :type: bool + """ + self._vpc_client_plain = vpc_client_plain + + @property + def support_features(self): + """Gets the support_features of this ListInstancesRespInstances. + + Kafka实例支持的特性功能。 + + :return: The support_features of this ListInstancesRespInstances. + :rtype: str + """ + return self._support_features + + @support_features.setter + def support_features(self, support_features): + """Sets the support_features of this ListInstancesRespInstances. + + Kafka实例支持的特性功能。 + + :param support_features: The support_features of this ListInstancesRespInstances. + :type: str + """ + self._support_features = support_features + + @property + def trace_enable(self): + """Gets the trace_enable of this ListInstancesRespInstances. + + 是否开启消息轨迹功能。 + + :return: The trace_enable of this ListInstancesRespInstances. + :rtype: bool + """ + return self._trace_enable + + @trace_enable.setter + def trace_enable(self, trace_enable): + """Sets the trace_enable of this ListInstancesRespInstances. + + 是否开启消息轨迹功能。 + + :param trace_enable: The trace_enable of this ListInstancesRespInstances. + :type: bool + """ + self._trace_enable = trace_enable + + @property + def pod_connect_address(self): + """Gets the pod_connect_address of this ListInstancesRespInstances. + + 租户侧连接地址。 + + :return: The pod_connect_address of this ListInstancesRespInstances. + :rtype: str + """ + return self._pod_connect_address + + @pod_connect_address.setter + def pod_connect_address(self, pod_connect_address): + """Sets the pod_connect_address of this ListInstancesRespInstances. + + 租户侧连接地址。 + + :param pod_connect_address: The pod_connect_address of this ListInstancesRespInstances. + :type: str + """ + self._pod_connect_address = pod_connect_address + + @property + def disk_encrypted(self): + """Gets the disk_encrypted of this ListInstancesRespInstances. + + 是否开启磁盘加密。 + + :return: The disk_encrypted of this ListInstancesRespInstances. + :rtype: bool + """ + return self._disk_encrypted + + @disk_encrypted.setter + def disk_encrypted(self, disk_encrypted): + """Sets the disk_encrypted of this ListInstancesRespInstances. + + 是否开启磁盘加密。 + + :param disk_encrypted: The disk_encrypted of this ListInstancesRespInstances. + :type: bool + """ + self._disk_encrypted = disk_encrypted + + @property + def kafka_private_connect_address(self): + """Gets the kafka_private_connect_address of this ListInstancesRespInstances. + + Kafka实例私有连接地址。 + + :return: The kafka_private_connect_address of this ListInstancesRespInstances. + :rtype: str + """ + return self._kafka_private_connect_address + + @kafka_private_connect_address.setter + def kafka_private_connect_address(self, kafka_private_connect_address): + """Sets the kafka_private_connect_address of this ListInstancesRespInstances. + + Kafka实例私有连接地址。 + + :param kafka_private_connect_address: The kafka_private_connect_address of this ListInstancesRespInstances. + :type: str + """ + self._kafka_private_connect_address = kafka_private_connect_address + + @property + def ces_version(self): + """Gets the ces_version of this ListInstancesRespInstances. + + 云监控版本。 + + :return: The ces_version of this ListInstancesRespInstances. + :rtype: str + """ + return self._ces_version + + @ces_version.setter + def ces_version(self, ces_version): + """Sets the ces_version of this ListInstancesRespInstances. + + 云监控版本。 + + :param ces_version: The ces_version of this ListInstancesRespInstances. + :type: str + """ + self._ces_version = ces_version + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListInstancesRespInstances): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instances_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instances_response.py new file mode 100644 index 0000000000..4a78038d75 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_instances_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ListInstancesResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instances': 'list[ListInstancesRespInstances]', + 'instance_num': 'int' + } + + attribute_map = { + 'instances': 'instances', + 'instance_num': 'instance_num' + } + + def __init__(self, instances=None, instance_num=None): + """ListInstancesResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._instances = None + self._instance_num = None + self.discriminator = None + + if instances is not None: + self.instances = instances + if instance_num is not None: + self.instance_num = instance_num + + @property + def instances(self): + """Gets the instances of this ListInstancesResponse. + + 实例列表 + + :return: The instances of this ListInstancesResponse. + :rtype: list[ListInstancesRespInstances] + """ + return self._instances + + @instances.setter + def instances(self, instances): + """Sets the instances of this ListInstancesResponse. + + 实例列表 + + :param instances: The instances of this ListInstancesResponse. + :type: list[ListInstancesRespInstances] + """ + self._instances = instances + + @property + def instance_num(self): + """Gets the instance_num of this ListInstancesResponse. + + 实例数量。 + + :return: The instance_num of this ListInstancesResponse. + :rtype: int + """ + return self._instance_num + + @instance_num.setter + def instance_num(self, instance_num): + """Sets the instance_num of this ListInstancesResponse. + + 实例数量。 + + :param instance_num: The instance_num of this ListInstancesResponse. + :type: int + """ + self._instance_num = instance_num + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListInstancesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_request.py new file mode 100644 index 0000000000..e051cb35ed --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListProductsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'engine': 'str' + } + + attribute_map = { + 'engine': 'engine' + } + + def __init__(self, engine=None): + """ListProductsRequest - a model defined in huaweicloud sdk""" + + + + self._engine = None + self.discriminator = None + + self.engine = engine + + @property + def engine(self): + """Gets the engine of this ListProductsRequest. + + + :return: The engine of this ListProductsRequest. + :rtype: str + """ + return self._engine + + @engine.setter + def engine(self, engine): + """Sets the engine of this ListProductsRequest. + + + :param engine: The engine of this ListProductsRequest. + :type: str + """ + self._engine = engine + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListProductsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_resp_detail.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_resp_detail.py new file mode 100644 index 0000000000..4533f1aac4 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_resp_detail.py @@ -0,0 +1,380 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListProductsRespDetail: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'tps': 'str', + 'storage': 'str', + 'partition_num': 'str', + 'product_id': 'str', + 'spec_code': 'str', + 'io': 'list[ListProductsRespIo]', + 'bandwidth': 'str', + 'unavailable_zones': 'list[str]', + 'available_zones': 'list[str]', + 'ecs_flavor_id': 'str', + 'arch_type': 'str' + } + + attribute_map = { + 'tps': 'tps', + 'storage': 'storage', + 'partition_num': 'partition_num', + 'product_id': 'product_id', + 'spec_code': 'spec_code', + 'io': 'io', + 'bandwidth': 'bandwidth', + 'unavailable_zones': 'unavailable_zones', + 'available_zones': 'available_zones', + 'ecs_flavor_id': 'ecs_flavor_id', + 'arch_type': 'arch_type' + } + + def __init__(self, tps=None, storage=None, partition_num=None, product_id=None, spec_code=None, io=None, bandwidth=None, unavailable_zones=None, available_zones=None, ecs_flavor_id=None, arch_type=None): + """ListProductsRespDetail - a model defined in huaweicloud sdk""" + + + + self._tps = None + self._storage = None + self._partition_num = None + self._product_id = None + self._spec_code = None + self._io = None + self._bandwidth = None + self._unavailable_zones = None + self._available_zones = None + self._ecs_flavor_id = None + self._arch_type = None + self.discriminator = None + + if tps is not None: + self.tps = tps + if storage is not None: + self.storage = storage + if partition_num is not None: + self.partition_num = partition_num + if product_id is not None: + self.product_id = product_id + if spec_code is not None: + self.spec_code = spec_code + if io is not None: + self.io = io + if bandwidth is not None: + self.bandwidth = bandwidth + if unavailable_zones is not None: + self.unavailable_zones = unavailable_zones + if available_zones is not None: + self.available_zones = available_zones + if ecs_flavor_id is not None: + self.ecs_flavor_id = ecs_flavor_id + if arch_type is not None: + self.arch_type = arch_type + + @property + def tps(self): + """Gets the tps of this ListProductsRespDetail. + + 单位时间内的消息量最大值。 + + :return: The tps of this ListProductsRespDetail. + :rtype: str + """ + return self._tps + + @tps.setter + def tps(self, tps): + """Sets the tps of this ListProductsRespDetail. + + 单位时间内的消息量最大值。 + + :param tps: The tps of this ListProductsRespDetail. + :type: str + """ + self._tps = tps + + @property + def storage(self): + """Gets the storage of this ListProductsRespDetail. + + 消息存储空间。 + + :return: The storage of this ListProductsRespDetail. + :rtype: str + """ + return self._storage + + @storage.setter + def storage(self, storage): + """Sets the storage of this ListProductsRespDetail. + + 消息存储空间。 + + :param storage: The storage of this ListProductsRespDetail. + :type: str + """ + self._storage = storage + + @property + def partition_num(self): + """Gets the partition_num of this ListProductsRespDetail. + + Kafka实例的最大Topic数。 + + :return: The partition_num of this ListProductsRespDetail. + :rtype: str + """ + return self._partition_num + + @partition_num.setter + def partition_num(self, partition_num): + """Sets the partition_num of this ListProductsRespDetail. + + Kafka实例的最大Topic数。 + + :param partition_num: The partition_num of this ListProductsRespDetail. + :type: str + """ + self._partition_num = partition_num + + @property + def product_id(self): + """Gets the product_id of this ListProductsRespDetail. + + 产品ID。 + + :return: The product_id of this ListProductsRespDetail. + :rtype: str + """ + return self._product_id + + @product_id.setter + def product_id(self, product_id): + """Sets the product_id of this ListProductsRespDetail. + + 产品ID。 + + :param product_id: The product_id of this ListProductsRespDetail. + :type: str + """ + self._product_id = product_id + + @property + def spec_code(self): + """Gets the spec_code of this ListProductsRespDetail. + + 规格ID。 + + :return: The spec_code of this ListProductsRespDetail. + :rtype: str + """ + return self._spec_code + + @spec_code.setter + def spec_code(self, spec_code): + """Sets the spec_code of this ListProductsRespDetail. + + 规格ID。 + + :param spec_code: The spec_code of this ListProductsRespDetail. + :type: str + """ + self._spec_code = spec_code + + @property + def io(self): + """Gets the io of this ListProductsRespDetail. + + IO信息。 + + :return: The io of this ListProductsRespDetail. + :rtype: list[ListProductsRespIo] + """ + return self._io + + @io.setter + def io(self, io): + """Sets the io of this ListProductsRespDetail. + + IO信息。 + + :param io: The io of this ListProductsRespDetail. + :type: list[ListProductsRespIo] + """ + self._io = io + + @property + def bandwidth(self): + """Gets the bandwidth of this ListProductsRespDetail. + + Kafka实例的基准带宽。 + + :return: The bandwidth of this ListProductsRespDetail. + :rtype: str + """ + return self._bandwidth + + @bandwidth.setter + def bandwidth(self, bandwidth): + """Sets the bandwidth of this ListProductsRespDetail. + + Kafka实例的基准带宽。 + + :param bandwidth: The bandwidth of this ListProductsRespDetail. + :type: str + """ + self._bandwidth = bandwidth + + @property + def unavailable_zones(self): + """Gets the unavailable_zones of this ListProductsRespDetail. + + 资源售罄的可用区列表。 + + :return: The unavailable_zones of this ListProductsRespDetail. + :rtype: list[str] + """ + return self._unavailable_zones + + @unavailable_zones.setter + def unavailable_zones(self, unavailable_zones): + """Sets the unavailable_zones of this ListProductsRespDetail. + + 资源售罄的可用区列表。 + + :param unavailable_zones: The unavailable_zones of this ListProductsRespDetail. + :type: list[str] + """ + self._unavailable_zones = unavailable_zones + + @property + def available_zones(self): + """Gets the available_zones of this ListProductsRespDetail. + + 有可用资源的可用区列表。 + + :return: The available_zones of this ListProductsRespDetail. + :rtype: list[str] + """ + return self._available_zones + + @available_zones.setter + def available_zones(self, available_zones): + """Sets the available_zones of this ListProductsRespDetail. + + 有可用资源的可用区列表。 + + :param available_zones: The available_zones of this ListProductsRespDetail. + :type: list[str] + """ + self._available_zones = available_zones + + @property + def ecs_flavor_id(self): + """Gets the ecs_flavor_id of this ListProductsRespDetail. + + 该产品规格对应的虚拟机规格。 + + :return: The ecs_flavor_id of this ListProductsRespDetail. + :rtype: str + """ + return self._ecs_flavor_id + + @ecs_flavor_id.setter + def ecs_flavor_id(self, ecs_flavor_id): + """Sets the ecs_flavor_id of this ListProductsRespDetail. + + 该产品规格对应的虚拟机规格。 + + :param ecs_flavor_id: The ecs_flavor_id of this ListProductsRespDetail. + :type: str + """ + self._ecs_flavor_id = ecs_flavor_id + + @property + def arch_type(self): + """Gets the arch_type of this ListProductsRespDetail. + + 实例规格架构类型。当前仅支持X86。 + + :return: The arch_type of this ListProductsRespDetail. + :rtype: str + """ + return self._arch_type + + @arch_type.setter + def arch_type(self, arch_type): + """Sets the arch_type of this ListProductsRespDetail. + + 实例规格架构类型。当前仅支持X86。 + + :param arch_type: The arch_type of this ListProductsRespDetail. + :type: str + """ + self._arch_type = arch_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListProductsRespDetail): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_resp_hourly.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_resp_hourly.py new file mode 100644 index 0000000000..f726cf5118 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_resp_hourly.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListProductsRespHourly: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'version': 'str', + 'values': 'list[ListProductsRespValues]' + } + + attribute_map = { + 'name': 'name', + 'version': 'version', + 'values': 'values' + } + + def __init__(self, name=None, version=None, values=None): + """ListProductsRespHourly - a model defined in huaweicloud sdk""" + + + + self._name = None + self._version = None + self._values = None + self.discriminator = None + + if name is not None: + self.name = name + if version is not None: + self.version = version + if values is not None: + self.values = values + + @property + def name(self): + """Gets the name of this ListProductsRespHourly. + + 消息引擎的名称,该字段显示为kafka。 + + :return: The name of this ListProductsRespHourly. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListProductsRespHourly. + + 消息引擎的名称,该字段显示为kafka。 + + :param name: The name of this ListProductsRespHourly. + :type: str + """ + self._name = name + + @property + def version(self): + """Gets the version of this ListProductsRespHourly. + + 消息引擎的版本,当前仅支持1.1.0。 + + :return: The version of this ListProductsRespHourly. + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this ListProductsRespHourly. + + 消息引擎的版本,当前仅支持1.1.0。 + + :param version: The version of this ListProductsRespHourly. + :type: str + """ + self._version = version + + @property + def values(self): + """Gets the values of this ListProductsRespHourly. + + 产品规格列表。 + + :return: The values of this ListProductsRespHourly. + :rtype: list[ListProductsRespValues] + """ + return self._values + + @values.setter + def values(self, values): + """Sets the values of this ListProductsRespHourly. + + 产品规格列表。 + + :param values: The values of this ListProductsRespHourly. + :type: list[ListProductsRespValues] + """ + self._values = values + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListProductsRespHourly): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_resp_io.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_resp_io.py new file mode 100644 index 0000000000..00c9c6b76f --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_resp_io.py @@ -0,0 +1,218 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListProductsRespIo: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'io_type': 'str', + 'storage_spec_code': 'str', + 'available_zones': 'list[str]', + 'unavailable_zones': 'list[str]', + 'volume_type': 'str' + } + + attribute_map = { + 'io_type': 'io_type', + 'storage_spec_code': 'storage_spec_code', + 'available_zones': 'available_zones', + 'unavailable_zones': 'unavailable_zones', + 'volume_type': 'volume_type' + } + + def __init__(self, io_type=None, storage_spec_code=None, available_zones=None, unavailable_zones=None, volume_type=None): + """ListProductsRespIo - a model defined in huaweicloud sdk""" + + + + self._io_type = None + self._storage_spec_code = None + self._available_zones = None + self._unavailable_zones = None + self._volume_type = None + self.discriminator = None + + if io_type is not None: + self.io_type = io_type + if storage_spec_code is not None: + self.storage_spec_code = storage_spec_code + if available_zones is not None: + self.available_zones = available_zones + if unavailable_zones is not None: + self.unavailable_zones = unavailable_zones + if volume_type is not None: + self.volume_type = volume_type + + @property + def io_type(self): + """Gets the io_type of this ListProductsRespIo. + + IO类型。 + + :return: The io_type of this ListProductsRespIo. + :rtype: str + """ + return self._io_type + + @io_type.setter + def io_type(self, io_type): + """Sets the io_type of this ListProductsRespIo. + + IO类型。 + + :param io_type: The io_type of this ListProductsRespIo. + :type: str + """ + self._io_type = io_type + + @property + def storage_spec_code(self): + """Gets the storage_spec_code of this ListProductsRespIo. + + IO规格。 + + :return: The storage_spec_code of this ListProductsRespIo. + :rtype: str + """ + return self._storage_spec_code + + @storage_spec_code.setter + def storage_spec_code(self, storage_spec_code): + """Sets the storage_spec_code of this ListProductsRespIo. + + IO规格。 + + :param storage_spec_code: The storage_spec_code of this ListProductsRespIo. + :type: str + """ + self._storage_spec_code = storage_spec_code + + @property + def available_zones(self): + """Gets the available_zones of this ListProductsRespIo. + + IO未售罄的可用区列表。 + + :return: The available_zones of this ListProductsRespIo. + :rtype: list[str] + """ + return self._available_zones + + @available_zones.setter + def available_zones(self, available_zones): + """Sets the available_zones of this ListProductsRespIo. + + IO未售罄的可用区列表。 + + :param available_zones: The available_zones of this ListProductsRespIo. + :type: list[str] + """ + self._available_zones = available_zones + + @property + def unavailable_zones(self): + """Gets the unavailable_zones of this ListProductsRespIo. + + IO已售罄的不可用区列表。 + + :return: The unavailable_zones of this ListProductsRespIo. + :rtype: list[str] + """ + return self._unavailable_zones + + @unavailable_zones.setter + def unavailable_zones(self, unavailable_zones): + """Sets the unavailable_zones of this ListProductsRespIo. + + IO已售罄的不可用区列表。 + + :param unavailable_zones: The unavailable_zones of this ListProductsRespIo. + :type: list[str] + """ + self._unavailable_zones = unavailable_zones + + @property + def volume_type(self): + """Gets the volume_type of this ListProductsRespIo. + + 磁盘类型。 + + :return: The volume_type of this ListProductsRespIo. + :rtype: str + """ + return self._volume_type + + @volume_type.setter + def volume_type(self, volume_type): + """Sets the volume_type of this ListProductsRespIo. + + 磁盘类型。 + + :param volume_type: The volume_type of this ListProductsRespIo. + :type: str + """ + self._volume_type = volume_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListProductsRespIo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_resp_values.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_resp_values.py new file mode 100644 index 0000000000..2f383c6f7f --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_resp_values.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListProductsRespValues: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'detail': 'list[ListProductsRespDetail]', + 'name': 'str', + 'unavailable_zones': 'list[str]', + 'available_zones': 'list[str]' + } + + attribute_map = { + 'detail': 'detail', + 'name': 'name', + 'unavailable_zones': 'unavailable_zones', + 'available_zones': 'available_zones' + } + + def __init__(self, detail=None, name=None, unavailable_zones=None, available_zones=None): + """ListProductsRespValues - a model defined in huaweicloud sdk""" + + + + self._detail = None + self._name = None + self._unavailable_zones = None + self._available_zones = None + self.discriminator = None + + if detail is not None: + self.detail = detail + if name is not None: + self.name = name + if unavailable_zones is not None: + self.unavailable_zones = unavailable_zones + if available_zones is not None: + self.available_zones = available_zones + + @property + def detail(self): + """Gets the detail of this ListProductsRespValues. + + 规格详情。 + + :return: The detail of this ListProductsRespValues. + :rtype: list[ListProductsRespDetail] + """ + return self._detail + + @detail.setter + def detail(self, detail): + """Sets the detail of this ListProductsRespValues. + + 规格详情。 + + :param detail: The detail of this ListProductsRespValues. + :type: list[ListProductsRespDetail] + """ + self._detail = detail + + @property + def name(self): + """Gets the name of this ListProductsRespValues. + + 实例类型。 + + :return: The name of this ListProductsRespValues. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListProductsRespValues. + + 实例类型。 + + :param name: The name of this ListProductsRespValues. + :type: str + """ + self._name = name + + @property + def unavailable_zones(self): + """Gets the unavailable_zones of this ListProductsRespValues. + + 资源售罄的可用区列表。 + + :return: The unavailable_zones of this ListProductsRespValues. + :rtype: list[str] + """ + return self._unavailable_zones + + @unavailable_zones.setter + def unavailable_zones(self, unavailable_zones): + """Sets the unavailable_zones of this ListProductsRespValues. + + 资源售罄的可用区列表。 + + :param unavailable_zones: The unavailable_zones of this ListProductsRespValues. + :type: list[str] + """ + self._unavailable_zones = unavailable_zones + + @property + def available_zones(self): + """Gets the available_zones of this ListProductsRespValues. + + 有可用资源的可用区列表。 + + :return: The available_zones of this ListProductsRespValues. + :rtype: list[str] + """ + return self._available_zones + + @available_zones.setter + def available_zones(self, available_zones): + """Sets the available_zones of this ListProductsRespValues. + + 有可用资源的可用区列表。 + + :param available_zones: The available_zones of this ListProductsRespValues. + :type: list[str] + """ + self._available_zones = available_zones + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListProductsRespValues): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_response.py new file mode 100644 index 0000000000..750ab994c7 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_products_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ListProductsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'hourly': 'list[ListProductsRespHourly]', + 'monthly': 'list[ListProductsRespHourly]' + } + + attribute_map = { + 'hourly': 'Hourly', + 'monthly': 'Monthly' + } + + def __init__(self, hourly=None, monthly=None): + """ListProductsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._hourly = None + self._monthly = None + self.discriminator = None + + if hourly is not None: + self.hourly = hourly + if monthly is not None: + self.monthly = monthly + + @property + def hourly(self): + """Gets the hourly of this ListProductsResponse. + + 表示按需付费的产品列表。 + + :return: The hourly of this ListProductsResponse. + :rtype: list[ListProductsRespHourly] + """ + return self._hourly + + @hourly.setter + def hourly(self, hourly): + """Sets the hourly of this ListProductsResponse. + + 表示按需付费的产品列表。 + + :param hourly: The hourly of this ListProductsResponse. + :type: list[ListProductsRespHourly] + """ + self._hourly = hourly + + @property + def monthly(self): + """Gets the monthly of this ListProductsResponse. + + 表示包年包月的产品列表。当前暂不支持通过API创建包年包月的Kafka实例。 + + :return: The monthly of this ListProductsResponse. + :rtype: list[ListProductsRespHourly] + """ + return self._monthly + + @monthly.setter + def monthly(self, monthly): + """Sets the monthly of this ListProductsResponse. + + 表示包年包月的产品列表。当前暂不支持通过API创建包年包月的Kafka实例。 + + :param monthly: The monthly of this ListProductsResponse. + :type: list[ListProductsRespHourly] + """ + self._monthly = monthly + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListProductsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_sink_tasks_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_sink_tasks_request.py new file mode 100644 index 0000000000..29c3b1b57d --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_sink_tasks_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListSinkTasksRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'connector_id': 'str' + } + + attribute_map = { + 'connector_id': 'connector_id' + } + + def __init__(self, connector_id=None): + """ListSinkTasksRequest - a model defined in huaweicloud sdk""" + + + + self._connector_id = None + self.discriminator = None + + self.connector_id = connector_id + + @property + def connector_id(self): + """Gets the connector_id of this ListSinkTasksRequest. + + + :return: The connector_id of this ListSinkTasksRequest. + :rtype: str + """ + return self._connector_id + + @connector_id.setter + def connector_id(self, connector_id): + """Sets the connector_id of this ListSinkTasksRequest. + + + :param connector_id: The connector_id of this ListSinkTasksRequest. + :type: str + """ + self._connector_id = connector_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListSinkTasksRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_sink_tasks_resp_tasks.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_sink_tasks_resp_tasks.py new file mode 100644 index 0000000000..248d1c798a --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_sink_tasks_resp_tasks.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListSinkTasksRespTasks: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'task_id': 'str', + 'task_name': 'str', + 'destination_type': 'str', + 'create_time': 'str', + 'status': 'str', + 'topics': 'str' + } + + attribute_map = { + 'task_id': 'task_id', + 'task_name': 'task_name', + 'destination_type': 'destination_type', + 'create_time': 'create_time', + 'status': 'status', + 'topics': 'topics' + } + + def __init__(self, task_id=None, task_name=None, destination_type=None, create_time=None, status=None, topics=None): + """ListSinkTasksRespTasks - a model defined in huaweicloud sdk""" + + + + self._task_id = None + self._task_name = None + self._destination_type = None + self._create_time = None + self._status = None + self._topics = None + self.discriminator = None + + if task_id is not None: + self.task_id = task_id + if task_name is not None: + self.task_name = task_name + if destination_type is not None: + self.destination_type = destination_type + if create_time is not None: + self.create_time = create_time + if status is not None: + self.status = status + if topics is not None: + self.topics = topics + + @property + def task_id(self): + """Gets the task_id of this ListSinkTasksRespTasks. + + 任务ID。 + + :return: The task_id of this ListSinkTasksRespTasks. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ListSinkTasksRespTasks. + + 任务ID。 + + :param task_id: The task_id of this ListSinkTasksRespTasks. + :type: str + """ + self._task_id = task_id + + @property + def task_name(self): + """Gets the task_name of this ListSinkTasksRespTasks. + + 转储任务名称。 + + :return: The task_name of this ListSinkTasksRespTasks. + :rtype: str + """ + return self._task_name + + @task_name.setter + def task_name(self, task_name): + """Sets the task_name of this ListSinkTasksRespTasks. + + 转储任务名称。 + + :param task_name: The task_name of this ListSinkTasksRespTasks. + :type: str + """ + self._task_name = task_name + + @property + def destination_type(self): + """Gets the destination_type of this ListSinkTasksRespTasks. + + 转储任务类型。 + + :return: The destination_type of this ListSinkTasksRespTasks. + :rtype: str + """ + return self._destination_type + + @destination_type.setter + def destination_type(self, destination_type): + """Sets the destination_type of this ListSinkTasksRespTasks. + + 转储任务类型。 + + :param destination_type: The destination_type of this ListSinkTasksRespTasks. + :type: str + """ + self._destination_type = destination_type + + @property + def create_time(self): + """Gets the create_time of this ListSinkTasksRespTasks. + + 转储任务创建时间戳。 + + :return: The create_time of this ListSinkTasksRespTasks. + :rtype: str + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this ListSinkTasksRespTasks. + + 转储任务创建时间戳。 + + :param create_time: The create_time of this ListSinkTasksRespTasks. + :type: str + """ + self._create_time = create_time + + @property + def status(self): + """Gets the status of this ListSinkTasksRespTasks. + + 转储任务状态。 + + :return: The status of this ListSinkTasksRespTasks. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ListSinkTasksRespTasks. + + 转储任务状态。 + + :param status: The status of this ListSinkTasksRespTasks. + :type: str + """ + self._status = status + + @property + def topics(self): + """Gets the topics of this ListSinkTasksRespTasks. + + 返回任务转存的topics列表或者正则表达式。 + + :return: The topics of this ListSinkTasksRespTasks. + :rtype: str + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this ListSinkTasksRespTasks. + + 返回任务转存的topics列表或者正则表达式。 + + :param topics: The topics of this ListSinkTasksRespTasks. + :type: str + """ + self._topics = topics + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListSinkTasksRespTasks): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_sink_tasks_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_sink_tasks_response.py new file mode 100644 index 0000000000..4012d8fff4 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_sink_tasks_response.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ListSinkTasksResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'tasks': 'list[ListSinkTasksRespTasks]', + 'total_number': 'int', + 'max_tasks': 'int', + 'quota_tasks': 'int' + } + + attribute_map = { + 'tasks': 'tasks', + 'total_number': 'total_number', + 'max_tasks': 'max_tasks', + 'quota_tasks': 'quota_tasks' + } + + def __init__(self, tasks=None, total_number=None, max_tasks=None, quota_tasks=None): + """ListSinkTasksResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._tasks = None + self._total_number = None + self._max_tasks = None + self._quota_tasks = None + self.discriminator = None + + if tasks is not None: + self.tasks = tasks + if total_number is not None: + self.total_number = total_number + if max_tasks is not None: + self.max_tasks = max_tasks + if quota_tasks is not None: + self.quota_tasks = quota_tasks + + @property + def tasks(self): + """Gets the tasks of this ListSinkTasksResponse. + + 转储任务列表。 + + :return: The tasks of this ListSinkTasksResponse. + :rtype: list[ListSinkTasksRespTasks] + """ + return self._tasks + + @tasks.setter + def tasks(self, tasks): + """Sets the tasks of this ListSinkTasksResponse. + + 转储任务列表。 + + :param tasks: The tasks of this ListSinkTasksResponse. + :type: list[ListSinkTasksRespTasks] + """ + self._tasks = tasks + + @property + def total_number(self): + """Gets the total_number of this ListSinkTasksResponse. + + 转储任务总数。 + + :return: The total_number of this ListSinkTasksResponse. + :rtype: int + """ + return self._total_number + + @total_number.setter + def total_number(self, total_number): + """Sets the total_number of this ListSinkTasksResponse. + + 转储任务总数。 + + :param total_number: The total_number of this ListSinkTasksResponse. + :type: int + """ + self._total_number = total_number + + @property + def max_tasks(self): + """Gets the max_tasks of this ListSinkTasksResponse. + + 总的支持任务个数。 + + :return: The max_tasks of this ListSinkTasksResponse. + :rtype: int + """ + return self._max_tasks + + @max_tasks.setter + def max_tasks(self, max_tasks): + """Sets the max_tasks of this ListSinkTasksResponse. + + 总的支持任务个数。 + + :param max_tasks: The max_tasks of this ListSinkTasksResponse. + :type: int + """ + self._max_tasks = max_tasks + + @property + def quota_tasks(self): + """Gets the quota_tasks of this ListSinkTasksResponse. + + 任务总数的配额。 + + :return: The quota_tasks of this ListSinkTasksResponse. + :rtype: int + """ + return self._quota_tasks + + @quota_tasks.setter + def quota_tasks(self, quota_tasks): + """Sets the quota_tasks of this ListSinkTasksResponse. + + 任务总数的配额。 + + :param quota_tasks: The quota_tasks of this ListSinkTasksResponse. + :type: int + """ + self._quota_tasks = quota_tasks + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListSinkTasksResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/obs_destination_descriptor.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/obs_destination_descriptor.py new file mode 100644 index 0000000000..527f351a5c --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/obs_destination_descriptor.py @@ -0,0 +1,373 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ObsDestinationDescriptor: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'topics': 'str', + 'topics_regex': 'str', + 'consumer_strategy': 'str', + 'destination_file_type': 'str', + 'access_key': 'str', + 'secret_key': 'str', + 'obs_bucket_name': 'str', + 'obs_path': 'str', + 'partition_format': 'str', + 'record_delimiter': 'str', + 'deliver_time_interval': 'str' + } + + attribute_map = { + 'topics': 'topics', + 'topics_regex': 'topics_regex', + 'consumer_strategy': 'consumer_strategy', + 'destination_file_type': 'destination_file_type', + 'access_key': 'access_key', + 'secret_key': 'secret_key', + 'obs_bucket_name': 'obs_bucket_name', + 'obs_path': 'obs_path', + 'partition_format': 'partition_format', + 'record_delimiter': 'record_delimiter', + 'deliver_time_interval': 'deliver_time_interval' + } + + def __init__(self, topics=None, topics_regex=None, consumer_strategy=None, destination_file_type=None, access_key=None, secret_key=None, obs_bucket_name=None, obs_path=None, partition_format=None, record_delimiter=None, deliver_time_interval=None): + """ObsDestinationDescriptor - a model defined in huaweicloud sdk""" + + + + self._topics = None + self._topics_regex = None + self._consumer_strategy = None + self._destination_file_type = None + self._access_key = None + self._secret_key = None + self._obs_bucket_name = None + self._obs_path = None + self._partition_format = None + self._record_delimiter = None + self._deliver_time_interval = None + self.discriminator = None + + self.topics = topics + if topics_regex is not None: + self.topics_regex = topics_regex + self.consumer_strategy = consumer_strategy + self.destination_file_type = destination_file_type + self.access_key = access_key + self.secret_key = secret_key + self.obs_bucket_name = obs_bucket_name + if obs_path is not None: + self.obs_path = obs_path + if partition_format is not None: + self.partition_format = partition_format + if record_delimiter is not None: + self.record_delimiter = record_delimiter + self.deliver_time_interval = deliver_time_interval + + @property + def topics(self): + """Gets the topics of this ObsDestinationDescriptor. + + 转存的topic列表名称,支持多个topic同时放置,以逗号“,”分隔。同时支持正则表达式。 例如topic1,topic2。 + + :return: The topics of this ObsDestinationDescriptor. + :rtype: str + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this ObsDestinationDescriptor. + + 转存的topic列表名称,支持多个topic同时放置,以逗号“,”分隔。同时支持正则表达式。 例如topic1,topic2。 + + :param topics: The topics of this ObsDestinationDescriptor. + :type: str + """ + self._topics = topics + + @property + def topics_regex(self): + """Gets the topics_regex of this ObsDestinationDescriptor. + + 转存topic的正则表达式,与topics必须二选一,不能同时都设置或者“.*”。 + + :return: The topics_regex of this ObsDestinationDescriptor. + :rtype: str + """ + return self._topics_regex + + @topics_regex.setter + def topics_regex(self, topics_regex): + """Sets the topics_regex of this ObsDestinationDescriptor. + + 转存topic的正则表达式,与topics必须二选一,不能同时都设置或者“.*”。 + + :param topics_regex: The topics_regex of this ObsDestinationDescriptor. + :type: str + """ + self._topics_regex = topics_regex + + @property + def consumer_strategy(self): + """Gets the consumer_strategy of this ObsDestinationDescriptor. + + 转储启动偏移量: - latest: 从Topic最后端开始消费。 - earliest: 从Topic最前端消息开始消费。 默认是latest。 + + :return: The consumer_strategy of this ObsDestinationDescriptor. + :rtype: str + """ + return self._consumer_strategy + + @consumer_strategy.setter + def consumer_strategy(self, consumer_strategy): + """Sets the consumer_strategy of this ObsDestinationDescriptor. + + 转储启动偏移量: - latest: 从Topic最后端开始消费。 - earliest: 从Topic最前端消息开始消费。 默认是latest。 + + :param consumer_strategy: The consumer_strategy of this ObsDestinationDescriptor. + :type: str + """ + self._consumer_strategy = consumer_strategy + + @property + def destination_file_type(self): + """Gets the destination_file_type of this ObsDestinationDescriptor. + + 转储文件格式。当前只支持text。 + + :return: The destination_file_type of this ObsDestinationDescriptor. + :rtype: str + """ + return self._destination_file_type + + @destination_file_type.setter + def destination_file_type(self, destination_file_type): + """Sets the destination_file_type of this ObsDestinationDescriptor. + + 转储文件格式。当前只支持text。 + + :param destination_file_type: The destination_file_type of this ObsDestinationDescriptor. + :type: str + """ + self._destination_file_type = destination_file_type + + @property + def access_key(self): + """Gets the access_key of this ObsDestinationDescriptor. + + 访问密钥AK。 + + :return: The access_key of this ObsDestinationDescriptor. + :rtype: str + """ + return self._access_key + + @access_key.setter + def access_key(self, access_key): + """Sets the access_key of this ObsDestinationDescriptor. + + 访问密钥AK。 + + :param access_key: The access_key of this ObsDestinationDescriptor. + :type: str + """ + self._access_key = access_key + + @property + def secret_key(self): + """Gets the secret_key of this ObsDestinationDescriptor. + + 访问密钥SK。 + + :return: The secret_key of this ObsDestinationDescriptor. + :rtype: str + """ + return self._secret_key + + @secret_key.setter + def secret_key(self, secret_key): + """Sets the secret_key of this ObsDestinationDescriptor. + + 访问密钥SK。 + + :param secret_key: The secret_key of this ObsDestinationDescriptor. + :type: str + """ + self._secret_key = secret_key + + @property + def obs_bucket_name(self): + """Gets the obs_bucket_name of this ObsDestinationDescriptor. + + 存储该通道数据的OBS桶名称。 + + :return: The obs_bucket_name of this ObsDestinationDescriptor. + :rtype: str + """ + return self._obs_bucket_name + + @obs_bucket_name.setter + def obs_bucket_name(self, obs_bucket_name): + """Sets the obs_bucket_name of this ObsDestinationDescriptor. + + 存储该通道数据的OBS桶名称。 + + :param obs_bucket_name: The obs_bucket_name of this ObsDestinationDescriptor. + :type: str + """ + self._obs_bucket_name = obs_bucket_name + + @property + def obs_path(self): + """Gets the obs_path of this ObsDestinationDescriptor. + + 存储在obs的路径,默认可以不填。 取值范围:英文字母、数字、下划线和斜杠,最大长度为50个字符。 默认配置为空。 + + :return: The obs_path of this ObsDestinationDescriptor. + :rtype: str + """ + return self._obs_path + + @obs_path.setter + def obs_path(self, obs_path): + """Sets the obs_path of this ObsDestinationDescriptor. + + 存储在obs的路径,默认可以不填。 取值范围:英文字母、数字、下划线和斜杠,最大长度为50个字符。 默认配置为空。 + + :param obs_path: The obs_path of this ObsDestinationDescriptor. + :type: str + """ + self._obs_path = obs_path + + @property + def partition_format(self): + """Gets the partition_format of this ObsDestinationDescriptor. + + 将转储文件的生成时间使用“yyyy/MM/dd/HH/mm”格式生成分区字符串,用来定义写到OBS的Object文件所在的目录层次结构。 - N/A:置空,不使用日期时间目录。 - yyyy:年 - yyyy/MM:年/月 - yyyy/MM/dd:年/月/日 - yyyy/MM/dd/HH:年/月/日/时 - yyyy/MM/dd/HH/mm:年/月/日/时/分,例如:2017/11/10/14/49,目录结构就是“2017 > 11 > 10 > 14 > 49”,“2017”表示最外层文件夹。 默认值:空 > 数据转储成功后,存储的目录结构为“obs_bucket_path/file_prefix/partition_format”。默认时间是GMT+8 时间 + + :return: The partition_format of this ObsDestinationDescriptor. + :rtype: str + """ + return self._partition_format + + @partition_format.setter + def partition_format(self, partition_format): + """Sets the partition_format of this ObsDestinationDescriptor. + + 将转储文件的生成时间使用“yyyy/MM/dd/HH/mm”格式生成分区字符串,用来定义写到OBS的Object文件所在的目录层次结构。 - N/A:置空,不使用日期时间目录。 - yyyy:年 - yyyy/MM:年/月 - yyyy/MM/dd:年/月/日 - yyyy/MM/dd/HH:年/月/日/时 - yyyy/MM/dd/HH/mm:年/月/日/时/分,例如:2017/11/10/14/49,目录结构就是“2017 > 11 > 10 > 14 > 49”,“2017”表示最外层文件夹。 默认值:空 > 数据转储成功后,存储的目录结构为“obs_bucket_path/file_prefix/partition_format”。默认时间是GMT+8 时间 + + :param partition_format: The partition_format of this ObsDestinationDescriptor. + :type: str + """ + self._partition_format = partition_format + + @property + def record_delimiter(self): + """Gets the record_delimiter of this ObsDestinationDescriptor. + + 转储文件的记录分隔符,用于分隔写入转储文件的用户数据。 取值范围: - 逗号“,” - 分号“;” - 竖线“|” - 换行符“\\n” - NULL 默认值:换行符“\\n”。 + + :return: The record_delimiter of this ObsDestinationDescriptor. + :rtype: str + """ + return self._record_delimiter + + @record_delimiter.setter + def record_delimiter(self, record_delimiter): + """Sets the record_delimiter of this ObsDestinationDescriptor. + + 转储文件的记录分隔符,用于分隔写入转储文件的用户数据。 取值范围: - 逗号“,” - 分号“;” - 竖线“|” - 换行符“\\n” - NULL 默认值:换行符“\\n”。 + + :param record_delimiter: The record_delimiter of this ObsDestinationDescriptor. + :type: str + """ + self._record_delimiter = record_delimiter + + @property + def deliver_time_interval(self): + """Gets the deliver_time_interval of this ObsDestinationDescriptor. + + 根据用户配置的时间,周期性的将数据导入OBS,若某个时间段内无数据,则此时间段不会生成打包文件。 取值范围:30~900 单位:秒。 > 使用OBS通道转储流式数据时该参数为必选配置。 + + :return: The deliver_time_interval of this ObsDestinationDescriptor. + :rtype: str + """ + return self._deliver_time_interval + + @deliver_time_interval.setter + def deliver_time_interval(self, deliver_time_interval): + """Sets the deliver_time_interval of this ObsDestinationDescriptor. + + 根据用户配置的时间,周期性的将数据导入OBS,若某个时间段内无数据,则此时间段不会生成打包文件。 取值范围:30~900 单位:秒。 > 使用OBS通道转储流式数据时该参数为必选配置。 + + :param deliver_time_interval: The deliver_time_interval of this ObsDestinationDescriptor. + :type: str + """ + self._deliver_time_interval = deliver_time_interval + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObsDestinationDescriptor): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_manager_password_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_manager_password_req.py new file mode 100644 index 0000000000..3949161c65 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_manager_password_req.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ResetManagerPasswordReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'new_password': 'str' + } + + attribute_map = { + 'new_password': 'new_password' + } + + def __init__(self, new_password=None): + """ResetManagerPasswordReq - a model defined in huaweicloud sdk""" + + + + self._new_password = None + self.discriminator = None + + if new_password is not None: + self.new_password = new_password + + @property + def new_password(self): + """Gets the new_password of this ResetManagerPasswordReq. + + 8-32个字符。 至少包含以下字符中的3种: - 大写字母 - 小写字母 - 数字 - 特殊字符`~!@#$%^&*()-_=+\\\\|[{}];:\\'\\\",<.>/? 和空格,并且不能以-开头。 + + :return: The new_password of this ResetManagerPasswordReq. + :rtype: str + """ + return self._new_password + + @new_password.setter + def new_password(self, new_password): + """Sets the new_password of this ResetManagerPasswordReq. + + 8-32个字符。 至少包含以下字符中的3种: - 大写字母 - 小写字母 - 数字 - 特殊字符`~!@#$%^&*()-_=+\\\\|[{}];:\\'\\\",<.>/? 和空格,并且不能以-开头。 + + :param new_password: The new_password of this ResetManagerPasswordReq. + :type: str + """ + self._new_password = new_password + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResetManagerPasswordReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_manager_password_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_manager_password_request.py new file mode 100644 index 0000000000..787cd7e9be --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_manager_password_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ResetManagerPasswordRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'body': 'ResetManagerPasswordReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'body': 'body' + } + + def __init__(self, instance_id=None, body=None): + """ResetManagerPasswordRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this ResetManagerPasswordRequest. + + + :return: The instance_id of this ResetManagerPasswordRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ResetManagerPasswordRequest. + + + :param instance_id: The instance_id of this ResetManagerPasswordRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def body(self): + """Gets the body of this ResetManagerPasswordRequest. + + + :return: The body of this ResetManagerPasswordRequest. + :rtype: ResetManagerPasswordReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ResetManagerPasswordRequest. + + + :param body: The body of this ResetManagerPasswordRequest. + :type: ResetManagerPasswordReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResetManagerPasswordRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_manager_password_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_manager_password_response.py new file mode 100644 index 0000000000..f034979ea8 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_manager_password_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ResetManagerPasswordResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ResetManagerPasswordResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResetManagerPasswordResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_message_offset_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_message_offset_req.py new file mode 100644 index 0000000000..8182af41ed --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_message_offset_req.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ResetMessageOffsetReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'topic': 'str', + 'partition': 'int', + 'message_offset': 'int', + 'timestamp': 'int' + } + + attribute_map = { + 'topic': 'topic', + 'partition': 'partition', + 'message_offset': 'message_offset', + 'timestamp': 'timestamp' + } + + def __init__(self, topic=None, partition=None, message_offset=None, timestamp=None): + """ResetMessageOffsetReq - a model defined in huaweicloud sdk""" + + + + self._topic = None + self._partition = None + self._message_offset = None + self._timestamp = None + self.discriminator = None + + self.topic = topic + if partition is not None: + self.partition = partition + if message_offset is not None: + self.message_offset = message_offset + if timestamp is not None: + self.timestamp = timestamp + + @property + def topic(self): + """Gets the topic of this ResetMessageOffsetReq. + + topic名称。 + + :return: The topic of this ResetMessageOffsetReq. + :rtype: str + """ + return self._topic + + @topic.setter + def topic(self, topic): + """Sets the topic of this ResetMessageOffsetReq. + + topic名称。 + + :param topic: The topic of this ResetMessageOffsetReq. + :type: str + """ + self._topic = topic + + @property + def partition(self): + """Gets the partition of this ResetMessageOffsetReq. + + 分区编号,默认值为-1,若传入值为-1,则重置所有分区。 + + :return: The partition of this ResetMessageOffsetReq. + :rtype: int + """ + return self._partition + + @partition.setter + def partition(self, partition): + """Sets the partition of this ResetMessageOffsetReq. + + 分区编号,默认值为-1,若传入值为-1,则重置所有分区。 + + :param partition: The partition of this ResetMessageOffsetReq. + :type: int + """ + self._partition = partition + + @property + def message_offset(self): + """Gets the message_offset of this ResetMessageOffsetReq. + + 重置的消费进度到指定偏移量。 如果传入offset小于当前最小的offset,则重置到最小的offset。 如果大于最大的offset,则重置到最大的offset。 message_offset、timestamp二者必选其一。 + + :return: The message_offset of this ResetMessageOffsetReq. + :rtype: int + """ + return self._message_offset + + @message_offset.setter + def message_offset(self, message_offset): + """Sets the message_offset of this ResetMessageOffsetReq. + + 重置的消费进度到指定偏移量。 如果传入offset小于当前最小的offset,则重置到最小的offset。 如果大于最大的offset,则重置到最大的offset。 message_offset、timestamp二者必选其一。 + + :param message_offset: The message_offset of this ResetMessageOffsetReq. + :type: int + """ + self._message_offset = message_offset + + @property + def timestamp(self): + """Gets the timestamp of this ResetMessageOffsetReq. + + 重置的消费进度到指定时间,格式为unix时间戳。 如果传入timestamp早于当前最早的timestamp,则重置到最早的timestamp。 如果晚于最晚的timestamp,则重置到最晚的timestamp。 message_offset、timestamp二者必选其一。 + + :return: The timestamp of this ResetMessageOffsetReq. + :rtype: int + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ResetMessageOffsetReq. + + 重置的消费进度到指定时间,格式为unix时间戳。 如果传入timestamp早于当前最早的timestamp,则重置到最早的timestamp。 如果晚于最晚的timestamp,则重置到最晚的timestamp。 message_offset、timestamp二者必选其一。 + + :param timestamp: The timestamp of this ResetMessageOffsetReq. + :type: int + """ + self._timestamp = timestamp + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResetMessageOffsetReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_message_offset_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_message_offset_request.py new file mode 100644 index 0000000000..910f66e87c --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_message_offset_request.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ResetMessageOffsetRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'group': 'str', + 'body': 'ResetMessageOffsetReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'group': 'group', + 'body': 'body' + } + + def __init__(self, instance_id=None, group=None, body=None): + """ResetMessageOffsetRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._group = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + self.group = group + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this ResetMessageOffsetRequest. + + + :return: The instance_id of this ResetMessageOffsetRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ResetMessageOffsetRequest. + + + :param instance_id: The instance_id of this ResetMessageOffsetRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def group(self): + """Gets the group of this ResetMessageOffsetRequest. + + + :return: The group of this ResetMessageOffsetRequest. + :rtype: str + """ + return self._group + + @group.setter + def group(self, group): + """Sets the group of this ResetMessageOffsetRequest. + + + :param group: The group of this ResetMessageOffsetRequest. + :type: str + """ + self._group = group + + @property + def body(self): + """Gets the body of this ResetMessageOffsetRequest. + + + :return: The body of this ResetMessageOffsetRequest. + :rtype: ResetMessageOffsetReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ResetMessageOffsetRequest. + + + :param body: The body of this ResetMessageOffsetRequest. + :type: ResetMessageOffsetReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResetMessageOffsetRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_message_offset_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_message_offset_response.py new file mode 100644 index 0000000000..ba594934d5 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_message_offset_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ResetMessageOffsetResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ResetMessageOffsetResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResetMessageOffsetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_password_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_password_req.py new file mode 100644 index 0000000000..87584b57fa --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_password_req.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ResetPasswordReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'new_password': 'str' + } + + attribute_map = { + 'new_password': 'new_password' + } + + def __init__(self, new_password=None): + """ResetPasswordReq - a model defined in huaweicloud sdk""" + + + + self._new_password = None + self.discriminator = None + + if new_password is not None: + self.new_password = new_password + + @property + def new_password(self): + """Gets the new_password of this ResetPasswordReq. + + 8-32个字符。 至少包含以下字符中的3种: - 大写字母 - 小写字母 - 数字 - 特殊字符`~!@#$%^&*()-_=+\\\\|[{}];:\\'\\\",<.>/? 和空格,并且不能以-开头。 + + :return: The new_password of this ResetPasswordReq. + :rtype: str + """ + return self._new_password + + @new_password.setter + def new_password(self, new_password): + """Sets the new_password of this ResetPasswordReq. + + 8-32个字符。 至少包含以下字符中的3种: - 大写字母 - 小写字母 - 数字 - 特殊字符`~!@#$%^&*()-_=+\\\\|[{}];:\\'\\\",<.>/? 和空格,并且不能以-开头。 + + :param new_password: The new_password of this ResetPasswordReq. + :type: str + """ + self._new_password = new_password + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResetPasswordReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_password_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_password_request.py new file mode 100644 index 0000000000..dbd69cff3e --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_password_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ResetPasswordRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'body': 'ResetPasswordReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'body': 'body' + } + + def __init__(self, instance_id=None, body=None): + """ResetPasswordRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this ResetPasswordRequest. + + + :return: The instance_id of this ResetPasswordRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ResetPasswordRequest. + + + :param instance_id: The instance_id of this ResetPasswordRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def body(self): + """Gets the body of this ResetPasswordRequest. + + + :return: The body of this ResetPasswordRequest. + :rtype: ResetPasswordReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ResetPasswordRequest. + + + :param body: The body of this ResetPasswordRequest. + :type: ResetPasswordReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResetPasswordRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_password_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_password_response.py new file mode 100644 index 0000000000..dfc5b511cf --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_password_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ResetPasswordResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ResetPasswordResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResetPasswordResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_replica_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_replica_req.py new file mode 100644 index 0000000000..27e3ecd6a8 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_replica_req.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ResetReplicaReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'partitions': 'list[ResetReplicaReqPartitions]' + } + + attribute_map = { + 'partitions': 'partitions' + } + + def __init__(self, partitions=None): + """ResetReplicaReq - a model defined in huaweicloud sdk""" + + + + self._partitions = None + self.discriminator = None + + if partitions is not None: + self.partitions = partitions + + @property + def partitions(self): + """Gets the partitions of this ResetReplicaReq. + + 期望调整的分区副本分配情况。 + + :return: The partitions of this ResetReplicaReq. + :rtype: list[ResetReplicaReqPartitions] + """ + return self._partitions + + @partitions.setter + def partitions(self, partitions): + """Sets the partitions of this ResetReplicaReq. + + 期望调整的分区副本分配情况。 + + :param partitions: The partitions of this ResetReplicaReq. + :type: list[ResetReplicaReqPartitions] + """ + self._partitions = partitions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResetReplicaReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_replica_req_partitions.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_replica_req_partitions.py new file mode 100644 index 0000000000..c8106bb359 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/reset_replica_req_partitions.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ResetReplicaReqPartitions: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'partition': 'int', + 'replicas': 'list[int]' + } + + attribute_map = { + 'partition': 'partition', + 'replicas': 'replicas' + } + + def __init__(self, partition=None, replicas=None): + """ResetReplicaReqPartitions - a model defined in huaweicloud sdk""" + + + + self._partition = None + self._replicas = None + self.discriminator = None + + if partition is not None: + self.partition = partition + if replicas is not None: + self.replicas = replicas + + @property + def partition(self): + """Gets the partition of this ResetReplicaReqPartitions. + + 分区ID。 + + :return: The partition of this ResetReplicaReqPartitions. + :rtype: int + """ + return self._partition + + @partition.setter + def partition(self, partition): + """Sets the partition of this ResetReplicaReqPartitions. + + 分区ID。 + + :param partition: The partition of this ResetReplicaReqPartitions. + :type: int + """ + self._partition = partition + + @property + def replicas(self): + """Gets the replicas of this ResetReplicaReqPartitions. + + 副本期望所在的broker ID。其中Array首位为leader副本,所有分区需要有同样数量的副本,副本数不能大于总broker的数量。 + + :return: The replicas of this ResetReplicaReqPartitions. + :rtype: list[int] + """ + return self._replicas + + @replicas.setter + def replicas(self, replicas): + """Sets the replicas of this ResetReplicaReqPartitions. + + 副本期望所在的broker ID。其中Array首位为leader副本,所有分区需要有同样数量的副本,副本数不能大于总broker的数量。 + + :param replicas: The replicas of this ResetReplicaReqPartitions. + :type: list[int] + """ + self._replicas = replicas + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResetReplicaReqPartitions): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/resize_instance_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/resize_instance_req.py new file mode 100644 index 0000000000..910e70b000 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/resize_instance_req.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ResizeInstanceReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'new_spec_code': 'str', + 'new_storage_space': 'int' + } + + attribute_map = { + 'new_spec_code': 'new_spec_code', + 'new_storage_space': 'new_storage_space' + } + + def __init__(self, new_spec_code=None, new_storage_space=None): + """ResizeInstanceReq - a model defined in huaweicloud sdk""" + + + + self._new_spec_code = None + self._new_storage_space = None + self.discriminator = None + + if new_spec_code is not None: + self.new_spec_code = new_spec_code + if new_storage_space is not None: + self.new_storage_space = new_storage_space + + @property + def new_spec_code(self): + """Gets the new_spec_code of this ResizeInstanceReq. + + 规格变更后的规格ID。 若只扩展磁盘大小,则规格ID保持和原实例不变。 规格ID请参考[查询实例的扩容规格列表](https://support.huaweicloud.com/api-kafka/ShowInstanceExtendProductInfo.html)接口。 + + :return: The new_spec_code of this ResizeInstanceReq. + :rtype: str + """ + return self._new_spec_code + + @new_spec_code.setter + def new_spec_code(self, new_spec_code): + """Sets the new_spec_code of this ResizeInstanceReq. + + 规格变更后的规格ID。 若只扩展磁盘大小,则规格ID保持和原实例不变。 规格ID请参考[查询实例的扩容规格列表](https://support.huaweicloud.com/api-kafka/ShowInstanceExtendProductInfo.html)接口。 + + :param new_spec_code: The new_spec_code of this ResizeInstanceReq. + :type: str + """ + self._new_spec_code = new_spec_code + + @property + def new_storage_space(self): + """Gets the new_storage_space of this ResizeInstanceReq. + + 规格变更后的消息存储空间,单位:GB。 若扩展实例基准带宽,则new_storage_space不能低于基准带宽规定的最小磁盘大小。 磁盘空间大小请参考[查询实例的扩容规格列表](https://support.huaweicloud.com/api-kafka/ShowInstanceExtendProductInfo.html)接口。 + + :return: The new_storage_space of this ResizeInstanceReq. + :rtype: int + """ + return self._new_storage_space + + @new_storage_space.setter + def new_storage_space(self, new_storage_space): + """Sets the new_storage_space of this ResizeInstanceReq. + + 规格变更后的消息存储空间,单位:GB。 若扩展实例基准带宽,则new_storage_space不能低于基准带宽规定的最小磁盘大小。 磁盘空间大小请参考[查询实例的扩容规格列表](https://support.huaweicloud.com/api-kafka/ShowInstanceExtendProductInfo.html)接口。 + + :param new_storage_space: The new_storage_space of this ResizeInstanceReq. + :type: int + """ + self._new_storage_space = new_storage_space + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResizeInstanceReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/resize_instance_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/resize_instance_request.py new file mode 100644 index 0000000000..731baf034f --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/resize_instance_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ResizeInstanceRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'body': 'ResizeInstanceReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'body': 'body' + } + + def __init__(self, instance_id=None, body=None): + """ResizeInstanceRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this ResizeInstanceRequest. + + + :return: The instance_id of this ResizeInstanceRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ResizeInstanceRequest. + + + :param instance_id: The instance_id of this ResizeInstanceRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def body(self): + """Gets the body of this ResizeInstanceRequest. + + + :return: The body of this ResizeInstanceRequest. + :rtype: ResizeInstanceReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ResizeInstanceRequest. + + + :param body: The body of this ResizeInstanceRequest. + :type: ResizeInstanceReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResizeInstanceRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/resize_instance_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/resize_instance_response.py new file mode 100644 index 0000000000..ffd01cf5f4 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/resize_instance_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ResizeInstanceResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'job_id': 'str' + } + + attribute_map = { + 'job_id': 'job_id' + } + + def __init__(self, job_id=None): + """ResizeInstanceResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._job_id = None + self.discriminator = None + + if job_id is not None: + self.job_id = job_id + + @property + def job_id(self): + """Gets the job_id of this ResizeInstanceResponse. + + 规格变更任务ID。 + + :return: The job_id of this ResizeInstanceResponse. + :rtype: str + """ + return self._job_id + + @job_id.setter + def job_id(self, job_id): + """Sets the job_id of this ResizeInstanceResponse. + + 规格变更任务ID。 + + :param job_id: The job_id of this ResizeInstanceResponse. + :type: str + """ + self._job_id = job_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResizeInstanceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/restart_manager_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/restart_manager_request.py new file mode 100644 index 0000000000..a3e215e3d7 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/restart_manager_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class RestartManagerRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id' + } + + def __init__(self, instance_id=None): + """RestartManagerRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self.discriminator = None + + self.instance_id = instance_id + + @property + def instance_id(self): + """Gets the instance_id of this RestartManagerRequest. + + + :return: The instance_id of this RestartManagerRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this RestartManagerRequest. + + + :param instance_id: The instance_id of this RestartManagerRequest. + :type: str + """ + self._instance_id = instance_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RestartManagerRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/restart_manager_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/restart_manager_response.py new file mode 100644 index 0000000000..963d3b6894 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/restart_manager_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class RestartManagerResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """RestartManagerResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RestartManagerResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_background_task_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_background_task_request.py new file mode 100644 index 0000000000..b0b2461a19 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_background_task_request.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowBackgroundTaskRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'task_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'task_id': 'task_id' + } + + def __init__(self, instance_id=None, task_id=None): + """ShowBackgroundTaskRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._task_id = None + self.discriminator = None + + self.instance_id = instance_id + self.task_id = task_id + + @property + def instance_id(self): + """Gets the instance_id of this ShowBackgroundTaskRequest. + + + :return: The instance_id of this ShowBackgroundTaskRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowBackgroundTaskRequest. + + + :param instance_id: The instance_id of this ShowBackgroundTaskRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def task_id(self): + """Gets the task_id of this ShowBackgroundTaskRequest. + + + :return: The task_id of this ShowBackgroundTaskRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ShowBackgroundTaskRequest. + + + :param task_id: The task_id of this ShowBackgroundTaskRequest. + :type: str + """ + self._task_id = task_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowBackgroundTaskRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_background_task_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_background_task_response.py new file mode 100644 index 0000000000..09a163fbb0 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_background_task_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowBackgroundTaskResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'task_count': 'str', + 'tasks': 'list[ListBackgroundTasksRespTasks]' + } + + attribute_map = { + 'task_count': 'task_count', + 'tasks': 'tasks' + } + + def __init__(self, task_count=None, tasks=None): + """ShowBackgroundTaskResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._task_count = None + self._tasks = None + self.discriminator = None + + if task_count is not None: + self.task_count = task_count + if tasks is not None: + self.tasks = tasks + + @property + def task_count(self): + """Gets the task_count of this ShowBackgroundTaskResponse. + + 任务数量。 + + :return: The task_count of this ShowBackgroundTaskResponse. + :rtype: str + """ + return self._task_count + + @task_count.setter + def task_count(self, task_count): + """Sets the task_count of this ShowBackgroundTaskResponse. + + 任务数量。 + + :param task_count: The task_count of this ShowBackgroundTaskResponse. + :type: str + """ + self._task_count = task_count + + @property + def tasks(self): + """Gets the tasks of this ShowBackgroundTaskResponse. + + 任务列表。 + + :return: The tasks of this ShowBackgroundTaskResponse. + :rtype: list[ListBackgroundTasksRespTasks] + """ + return self._tasks + + @tasks.setter + def tasks(self, tasks): + """Sets the tasks of this ShowBackgroundTaskResponse. + + 任务列表。 + + :param tasks: The tasks of this ShowBackgroundTaskResponse. + :type: list[ListBackgroundTasksRespTasks] + """ + self._tasks = tasks + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowBackgroundTaskResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ces_hierarchy_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ces_hierarchy_request.py new file mode 100644 index 0000000000..e540a7945a --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ces_hierarchy_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowCesHierarchyRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id' + } + + def __init__(self, instance_id=None): + """ShowCesHierarchyRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self.discriminator = None + + self.instance_id = instance_id + + @property + def instance_id(self): + """Gets the instance_id of this ShowCesHierarchyRequest. + + + :return: The instance_id of this ShowCesHierarchyRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowCesHierarchyRequest. + + + :param instance_id: The instance_id of this ShowCesHierarchyRequest. + :type: str + """ + self._instance_id = instance_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowCesHierarchyRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ces_hierarchy_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ces_hierarchy_response.py new file mode 100644 index 0000000000..7ff2d270d8 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ces_hierarchy_response.py @@ -0,0 +1,218 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowCesHierarchyResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'dimensions': 'list[ShowCeshierarchyRespDimensions]', + 'instance_ids': 'list[ShowCeshierarchyRespInstanceIds]', + 'nodes': 'list[ShowCeshierarchyRespNodes]', + 'queues': 'list[ShowCeshierarchyRespQueues]', + 'groups': 'list[str]' + } + + attribute_map = { + 'dimensions': 'dimensions', + 'instance_ids': 'instance_ids', + 'nodes': 'nodes', + 'queues': 'queues', + 'groups': 'groups' + } + + def __init__(self, dimensions=None, instance_ids=None, nodes=None, queues=None, groups=None): + """ShowCesHierarchyResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._dimensions = None + self._instance_ids = None + self._nodes = None + self._queues = None + self._groups = None + self.discriminator = None + + if dimensions is not None: + self.dimensions = dimensions + if instance_ids is not None: + self.instance_ids = instance_ids + if nodes is not None: + self.nodes = nodes + if queues is not None: + self.queues = queues + if groups is not None: + self.groups = groups + + @property + def dimensions(self): + """Gets the dimensions of this ShowCesHierarchyResponse. + + 监控维度。 + + :return: The dimensions of this ShowCesHierarchyResponse. + :rtype: list[ShowCeshierarchyRespDimensions] + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """Sets the dimensions of this ShowCesHierarchyResponse. + + 监控维度。 + + :param dimensions: The dimensions of this ShowCesHierarchyResponse. + :type: list[ShowCeshierarchyRespDimensions] + """ + self._dimensions = dimensions + + @property + def instance_ids(self): + """Gets the instance_ids of this ShowCesHierarchyResponse. + + 实例信息。 + + :return: The instance_ids of this ShowCesHierarchyResponse. + :rtype: list[ShowCeshierarchyRespInstanceIds] + """ + return self._instance_ids + + @instance_ids.setter + def instance_ids(self, instance_ids): + """Sets the instance_ids of this ShowCesHierarchyResponse. + + 实例信息。 + + :param instance_ids: The instance_ids of this ShowCesHierarchyResponse. + :type: list[ShowCeshierarchyRespInstanceIds] + """ + self._instance_ids = instance_ids + + @property + def nodes(self): + """Gets the nodes of this ShowCesHierarchyResponse. + + 节点信息。 + + :return: The nodes of this ShowCesHierarchyResponse. + :rtype: list[ShowCeshierarchyRespNodes] + """ + return self._nodes + + @nodes.setter + def nodes(self, nodes): + """Sets the nodes of this ShowCesHierarchyResponse. + + 节点信息。 + + :param nodes: The nodes of this ShowCesHierarchyResponse. + :type: list[ShowCeshierarchyRespNodes] + """ + self._nodes = nodes + + @property + def queues(self): + """Gets the queues of this ShowCesHierarchyResponse. + + 队列信息。 + + :return: The queues of this ShowCesHierarchyResponse. + :rtype: list[ShowCeshierarchyRespQueues] + """ + return self._queues + + @queues.setter + def queues(self, queues): + """Sets the queues of this ShowCesHierarchyResponse. + + 队列信息。 + + :param queues: The queues of this ShowCesHierarchyResponse. + :type: list[ShowCeshierarchyRespQueues] + """ + self._queues = queues + + @property + def groups(self): + """Gets the groups of this ShowCesHierarchyResponse. + + 消费组信息。 + + :return: The groups of this ShowCesHierarchyResponse. + :rtype: list[str] + """ + return self._groups + + @groups.setter + def groups(self, groups): + """Sets the groups of this ShowCesHierarchyResponse. + + 消费组信息。 + + :param groups: The groups of this ShowCesHierarchyResponse. + :type: list[str] + """ + self._groups = groups + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowCesHierarchyResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_children.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_children.py new file mode 100644 index 0000000000..e57c3aca6f --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_children.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowCeshierarchyRespChildren: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'metrics': 'list[str]', + 'key_name': 'list[str]', + 'dim_router': 'list[str]' + } + + attribute_map = { + 'name': 'name', + 'metrics': 'metrics', + 'key_name': 'key_name', + 'dim_router': 'dim_router' + } + + def __init__(self, name=None, metrics=None, key_name=None, dim_router=None): + """ShowCeshierarchyRespChildren - a model defined in huaweicloud sdk""" + + + + self._name = None + self._metrics = None + self._key_name = None + self._dim_router = None + self.discriminator = None + + if name is not None: + self.name = name + if metrics is not None: + self.metrics = metrics + if key_name is not None: + self.key_name = key_name + if dim_router is not None: + self.dim_router = dim_router + + @property + def name(self): + """Gets the name of this ShowCeshierarchyRespChildren. + + 子维度名称。 + + :return: The name of this ShowCeshierarchyRespChildren. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ShowCeshierarchyRespChildren. + + 子维度名称。 + + :param name: The name of this ShowCeshierarchyRespChildren. + :type: str + """ + self._name = name + + @property + def metrics(self): + """Gets the metrics of this ShowCeshierarchyRespChildren. + + 监控指标名称列表。 + + :return: The metrics of this ShowCeshierarchyRespChildren. + :rtype: list[str] + """ + return self._metrics + + @metrics.setter + def metrics(self, metrics): + """Sets the metrics of this ShowCeshierarchyRespChildren. + + 监控指标名称列表。 + + :param metrics: The metrics of this ShowCeshierarchyRespChildren. + :type: list[str] + """ + self._metrics = metrics + + @property + def key_name(self): + """Gets the key_name of this ShowCeshierarchyRespChildren. + + 监控查询使用的key。 + + :return: The key_name of this ShowCeshierarchyRespChildren. + :rtype: list[str] + """ + return self._key_name + + @key_name.setter + def key_name(self, key_name): + """Sets the key_name of this ShowCeshierarchyRespChildren. + + 监控查询使用的key。 + + :param key_name: The key_name of this ShowCeshierarchyRespChildren. + :type: list[str] + """ + self._key_name = key_name + + @property + def dim_router(self): + """Gets the dim_router of this ShowCeshierarchyRespChildren. + + 监控维度路由。 + + :return: The dim_router of this ShowCeshierarchyRespChildren. + :rtype: list[str] + """ + return self._dim_router + + @dim_router.setter + def dim_router(self, dim_router): + """Sets the dim_router of this ShowCeshierarchyRespChildren. + + 监控维度路由。 + + :param dim_router: The dim_router of this ShowCeshierarchyRespChildren. + :type: list[str] + """ + self._dim_router = dim_router + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowCeshierarchyRespChildren): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_dimensions.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_dimensions.py new file mode 100644 index 0000000000..ac567cf001 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_dimensions.py @@ -0,0 +1,218 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowCeshierarchyRespDimensions: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'metrics': 'list[str]', + 'key_name': 'list[str]', + 'dim_router': 'list[str]', + 'children': 'list[ShowCeshierarchyRespChildren]' + } + + attribute_map = { + 'name': 'name', + 'metrics': 'metrics', + 'key_name': 'key_name', + 'dim_router': 'dim_router', + 'children': 'children' + } + + def __init__(self, name=None, metrics=None, key_name=None, dim_router=None, children=None): + """ShowCeshierarchyRespDimensions - a model defined in huaweicloud sdk""" + + + + self._name = None + self._metrics = None + self._key_name = None + self._dim_router = None + self._children = None + self.discriminator = None + + if name is not None: + self.name = name + if metrics is not None: + self.metrics = metrics + if key_name is not None: + self.key_name = key_name + if dim_router is not None: + self.dim_router = dim_router + if children is not None: + self.children = children + + @property + def name(self): + """Gets the name of this ShowCeshierarchyRespDimensions. + + 监控维度名称。 + + :return: The name of this ShowCeshierarchyRespDimensions. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ShowCeshierarchyRespDimensions. + + 监控维度名称。 + + :param name: The name of this ShowCeshierarchyRespDimensions. + :type: str + """ + self._name = name + + @property + def metrics(self): + """Gets the metrics of this ShowCeshierarchyRespDimensions. + + 监控指标名称。请参考[支持的监控指标](https://support.huaweicloud.com/usermanual-kafka/kafka-ug-180413002.html)。 + + :return: The metrics of this ShowCeshierarchyRespDimensions. + :rtype: list[str] + """ + return self._metrics + + @metrics.setter + def metrics(self, metrics): + """Sets the metrics of this ShowCeshierarchyRespDimensions. + + 监控指标名称。请参考[支持的监控指标](https://support.huaweicloud.com/usermanual-kafka/kafka-ug-180413002.html)。 + + :param metrics: The metrics of this ShowCeshierarchyRespDimensions. + :type: list[str] + """ + self._metrics = metrics + + @property + def key_name(self): + """Gets the key_name of this ShowCeshierarchyRespDimensions. + + 监控查询使用的key。 + + :return: The key_name of this ShowCeshierarchyRespDimensions. + :rtype: list[str] + """ + return self._key_name + + @key_name.setter + def key_name(self, key_name): + """Sets the key_name of this ShowCeshierarchyRespDimensions. + + 监控查询使用的key。 + + :param key_name: The key_name of this ShowCeshierarchyRespDimensions. + :type: list[str] + """ + self._key_name = key_name + + @property + def dim_router(self): + """Gets the dim_router of this ShowCeshierarchyRespDimensions. + + 监控维度路由。 + + :return: The dim_router of this ShowCeshierarchyRespDimensions. + :rtype: list[str] + """ + return self._dim_router + + @dim_router.setter + def dim_router(self, dim_router): + """Sets the dim_router of this ShowCeshierarchyRespDimensions. + + 监控维度路由。 + + :param dim_router: The dim_router of this ShowCeshierarchyRespDimensions. + :type: list[str] + """ + self._dim_router = dim_router + + @property + def children(self): + """Gets the children of this ShowCeshierarchyRespDimensions. + + 子维度列表。 + + :return: The children of this ShowCeshierarchyRespDimensions. + :rtype: list[ShowCeshierarchyRespChildren] + """ + return self._children + + @children.setter + def children(self, children): + """Sets the children of this ShowCeshierarchyRespDimensions. + + 子维度列表。 + + :param children: The children of this ShowCeshierarchyRespDimensions. + :type: list[ShowCeshierarchyRespChildren] + """ + self._children = children + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowCeshierarchyRespDimensions): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_instance_ids.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_instance_ids.py new file mode 100644 index 0000000000..667ac60e5a --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_instance_ids.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowCeshierarchyRespInstanceIds: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str' + } + + attribute_map = { + 'name': 'name' + } + + def __init__(self, name=None): + """ShowCeshierarchyRespInstanceIds - a model defined in huaweicloud sdk""" + + + + self._name = None + self.discriminator = None + + if name is not None: + self.name = name + + @property + def name(self): + """Gets the name of this ShowCeshierarchyRespInstanceIds. + + 实例ID。 + + :return: The name of this ShowCeshierarchyRespInstanceIds. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ShowCeshierarchyRespInstanceIds. + + 实例ID。 + + :param name: The name of this ShowCeshierarchyRespInstanceIds. + :type: str + """ + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowCeshierarchyRespInstanceIds): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_nodes.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_nodes.py new file mode 100644 index 0000000000..4d4a781688 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_nodes.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowCeshierarchyRespNodes: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str' + } + + attribute_map = { + 'name': 'name' + } + + def __init__(self, name=None): + """ShowCeshierarchyRespNodes - a model defined in huaweicloud sdk""" + + + + self._name = None + self.discriminator = None + + if name is not None: + self.name = name + + @property + def name(self): + """Gets the name of this ShowCeshierarchyRespNodes. + + 节点名称。 + + :return: The name of this ShowCeshierarchyRespNodes. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ShowCeshierarchyRespNodes. + + 节点名称。 + + :param name: The name of this ShowCeshierarchyRespNodes. + :type: str + """ + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowCeshierarchyRespNodes): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_partitions.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_partitions.py new file mode 100644 index 0000000000..6b32953571 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_partitions.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowCeshierarchyRespPartitions: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str' + } + + attribute_map = { + 'name': 'name' + } + + def __init__(self, name=None): + """ShowCeshierarchyRespPartitions - a model defined in huaweicloud sdk""" + + + + self._name = None + self.discriminator = None + + if name is not None: + self.name = name + + @property + def name(self): + """Gets the name of this ShowCeshierarchyRespPartitions. + + 分区名称。 + + :return: The name of this ShowCeshierarchyRespPartitions. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ShowCeshierarchyRespPartitions. + + 分区名称。 + + :param name: The name of this ShowCeshierarchyRespPartitions. + :type: str + """ + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowCeshierarchyRespPartitions): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_queues.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_queues.py new file mode 100644 index 0000000000..e8e4806728 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_ceshierarchy_resp_queues.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowCeshierarchyRespQueues: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'partitions': 'list[ShowCeshierarchyRespPartitions]' + } + + attribute_map = { + 'name': 'name', + 'partitions': 'partitions' + } + + def __init__(self, name=None, partitions=None): + """ShowCeshierarchyRespQueues - a model defined in huaweicloud sdk""" + + + + self._name = None + self._partitions = None + self.discriminator = None + + if name is not None: + self.name = name + if partitions is not None: + self.partitions = partitions + + @property + def name(self): + """Gets the name of this ShowCeshierarchyRespQueues. + + topic名称。 + + :return: The name of this ShowCeshierarchyRespQueues. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ShowCeshierarchyRespQueues. + + topic名称。 + + :param name: The name of this ShowCeshierarchyRespQueues. + :type: str + """ + self._name = name + + @property + def partitions(self): + """Gets the partitions of this ShowCeshierarchyRespQueues. + + 分区列表。 + + :return: The partitions of this ShowCeshierarchyRespQueues. + :rtype: list[ShowCeshierarchyRespPartitions] + """ + return self._partitions + + @partitions.setter + def partitions(self, partitions): + """Sets the partitions of this ShowCeshierarchyRespQueues. + + 分区列表。 + + :param partitions: The partitions of this ShowCeshierarchyRespQueues. + :type: list[ShowCeshierarchyRespPartitions] + """ + self._partitions = partitions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowCeshierarchyRespQueues): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_cluster_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_cluster_request.py new file mode 100644 index 0000000000..a878904f00 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_cluster_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowClusterRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id' + } + + def __init__(self, instance_id=None): + """ShowClusterRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self.discriminator = None + + self.instance_id = instance_id + + @property + def instance_id(self): + """Gets the instance_id of this ShowClusterRequest. + + + :return: The instance_id of this ShowClusterRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowClusterRequest. + + + :param instance_id: The instance_id of this ShowClusterRequest. + :type: str + """ + self._instance_id = instance_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowClusterRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_cluster_resp_cluster.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_cluster_resp_cluster.py new file mode 100644 index 0000000000..691724d675 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_cluster_resp_cluster.py @@ -0,0 +1,299 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowClusterRespCluster: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'controller': 'str', + 'brokers': 'list[ShowClusterRespClusterBrokers]', + 'topics_count': 'int', + 'partitions_count': 'int', + 'online_partitions_count': 'int', + 'replicas_count': 'int', + 'isr_replicas_count': 'int', + 'consumers_count': 'int' + } + + attribute_map = { + 'controller': 'controller', + 'brokers': 'brokers', + 'topics_count': 'topics_count', + 'partitions_count': 'partitions_count', + 'online_partitions_count': 'online_partitions_count', + 'replicas_count': 'replicas_count', + 'isr_replicas_count': 'isr_replicas_count', + 'consumers_count': 'consumers_count' + } + + def __init__(self, controller=None, brokers=None, topics_count=None, partitions_count=None, online_partitions_count=None, replicas_count=None, isr_replicas_count=None, consumers_count=None): + """ShowClusterRespCluster - a model defined in huaweicloud sdk""" + + + + self._controller = None + self._brokers = None + self._topics_count = None + self._partitions_count = None + self._online_partitions_count = None + self._replicas_count = None + self._isr_replicas_count = None + self._consumers_count = None + self.discriminator = None + + if controller is not None: + self.controller = controller + if brokers is not None: + self.brokers = brokers + if topics_count is not None: + self.topics_count = topics_count + if partitions_count is not None: + self.partitions_count = partitions_count + if online_partitions_count is not None: + self.online_partitions_count = online_partitions_count + if replicas_count is not None: + self.replicas_count = replicas_count + if isr_replicas_count is not None: + self.isr_replicas_count = isr_replicas_count + if consumers_count is not None: + self.consumers_count = consumers_count + + @property + def controller(self): + """Gets the controller of this ShowClusterRespCluster. + + 控制器ID。 + + :return: The controller of this ShowClusterRespCluster. + :rtype: str + """ + return self._controller + + @controller.setter + def controller(self, controller): + """Sets the controller of this ShowClusterRespCluster. + + 控制器ID。 + + :param controller: The controller of this ShowClusterRespCluster. + :type: str + """ + self._controller = controller + + @property + def brokers(self): + """Gets the brokers of this ShowClusterRespCluster. + + 节点列表。 + + :return: The brokers of this ShowClusterRespCluster. + :rtype: list[ShowClusterRespClusterBrokers] + """ + return self._brokers + + @brokers.setter + def brokers(self, brokers): + """Sets the brokers of this ShowClusterRespCluster. + + 节点列表。 + + :param brokers: The brokers of this ShowClusterRespCluster. + :type: list[ShowClusterRespClusterBrokers] + """ + self._brokers = brokers + + @property + def topics_count(self): + """Gets the topics_count of this ShowClusterRespCluster. + + 主题数量。 + + :return: The topics_count of this ShowClusterRespCluster. + :rtype: int + """ + return self._topics_count + + @topics_count.setter + def topics_count(self, topics_count): + """Sets the topics_count of this ShowClusterRespCluster. + + 主题数量。 + + :param topics_count: The topics_count of this ShowClusterRespCluster. + :type: int + """ + self._topics_count = topics_count + + @property + def partitions_count(self): + """Gets the partitions_count of this ShowClusterRespCluster. + + 分区数量。 + + :return: The partitions_count of this ShowClusterRespCluster. + :rtype: int + """ + return self._partitions_count + + @partitions_count.setter + def partitions_count(self, partitions_count): + """Sets the partitions_count of this ShowClusterRespCluster. + + 分区数量。 + + :param partitions_count: The partitions_count of this ShowClusterRespCluster. + :type: int + """ + self._partitions_count = partitions_count + + @property + def online_partitions_count(self): + """Gets the online_partitions_count of this ShowClusterRespCluster. + + 在线分区数量。 + + :return: The online_partitions_count of this ShowClusterRespCluster. + :rtype: int + """ + return self._online_partitions_count + + @online_partitions_count.setter + def online_partitions_count(self, online_partitions_count): + """Sets the online_partitions_count of this ShowClusterRespCluster. + + 在线分区数量。 + + :param online_partitions_count: The online_partitions_count of this ShowClusterRespCluster. + :type: int + """ + self._online_partitions_count = online_partitions_count + + @property + def replicas_count(self): + """Gets the replicas_count of this ShowClusterRespCluster. + + 副本数量。 + + :return: The replicas_count of this ShowClusterRespCluster. + :rtype: int + """ + return self._replicas_count + + @replicas_count.setter + def replicas_count(self, replicas_count): + """Sets the replicas_count of this ShowClusterRespCluster. + + 副本数量。 + + :param replicas_count: The replicas_count of this ShowClusterRespCluster. + :type: int + """ + self._replicas_count = replicas_count + + @property + def isr_replicas_count(self): + """Gets the isr_replicas_count of this ShowClusterRespCluster. + + ISR(In-Sync Replicas) 副本总数。 + + :return: The isr_replicas_count of this ShowClusterRespCluster. + :rtype: int + """ + return self._isr_replicas_count + + @isr_replicas_count.setter + def isr_replicas_count(self, isr_replicas_count): + """Sets the isr_replicas_count of this ShowClusterRespCluster. + + ISR(In-Sync Replicas) 副本总数。 + + :param isr_replicas_count: The isr_replicas_count of this ShowClusterRespCluster. + :type: int + """ + self._isr_replicas_count = isr_replicas_count + + @property + def consumers_count(self): + """Gets the consumers_count of this ShowClusterRespCluster. + + 消费组数量。 + + :return: The consumers_count of this ShowClusterRespCluster. + :rtype: int + """ + return self._consumers_count + + @consumers_count.setter + def consumers_count(self, consumers_count): + """Sets the consumers_count of this ShowClusterRespCluster. + + 消费组数量。 + + :param consumers_count: The consumers_count of this ShowClusterRespCluster. + :type: int + """ + self._consumers_count = consumers_count + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowClusterRespCluster): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_cluster_resp_cluster_brokers.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_cluster_resp_cluster_brokers.py new file mode 100644 index 0000000000..09a68fc6c7 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_cluster_resp_cluster_brokers.py @@ -0,0 +1,272 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowClusterRespClusterBrokers: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'host': 'str', + 'port': 'int', + 'broker_id': 'str', + 'is_controller': 'bool', + 'version': 'str', + 'register_time': 'str', + 'is_health': 'bool' + } + + attribute_map = { + 'host': 'host', + 'port': 'port', + 'broker_id': 'broker_id', + 'is_controller': 'is_controller', + 'version': 'version', + 'register_time': 'register_time', + 'is_health': 'is_health' + } + + def __init__(self, host=None, port=None, broker_id=None, is_controller=None, version=None, register_time=None, is_health=None): + """ShowClusterRespClusterBrokers - a model defined in huaweicloud sdk""" + + + + self._host = None + self._port = None + self._broker_id = None + self._is_controller = None + self._version = None + self._register_time = None + self._is_health = None + self.discriminator = None + + if host is not None: + self.host = host + if port is not None: + self.port = port + if broker_id is not None: + self.broker_id = broker_id + if is_controller is not None: + self.is_controller = is_controller + if version is not None: + self.version = version + if register_time is not None: + self.register_time = register_time + if is_health is not None: + self.is_health = is_health + + @property + def host(self): + """Gets the host of this ShowClusterRespClusterBrokers. + + 节点IP。 + + :return: The host of this ShowClusterRespClusterBrokers. + :rtype: str + """ + return self._host + + @host.setter + def host(self, host): + """Sets the host of this ShowClusterRespClusterBrokers. + + 节点IP。 + + :param host: The host of this ShowClusterRespClusterBrokers. + :type: str + """ + self._host = host + + @property + def port(self): + """Gets the port of this ShowClusterRespClusterBrokers. + + 端口号。 + + :return: The port of this ShowClusterRespClusterBrokers. + :rtype: int + """ + return self._port + + @port.setter + def port(self, port): + """Sets the port of this ShowClusterRespClusterBrokers. + + 端口号。 + + :param port: The port of this ShowClusterRespClusterBrokers. + :type: int + """ + self._port = port + + @property + def broker_id(self): + """Gets the broker_id of this ShowClusterRespClusterBrokers. + + 节点id。 + + :return: The broker_id of this ShowClusterRespClusterBrokers. + :rtype: str + """ + return self._broker_id + + @broker_id.setter + def broker_id(self, broker_id): + """Sets the broker_id of this ShowClusterRespClusterBrokers. + + 节点id。 + + :param broker_id: The broker_id of this ShowClusterRespClusterBrokers. + :type: str + """ + self._broker_id = broker_id + + @property + def is_controller(self): + """Gets the is_controller of this ShowClusterRespClusterBrokers. + + 是否为contoller节点。 + + :return: The is_controller of this ShowClusterRespClusterBrokers. + :rtype: bool + """ + return self._is_controller + + @is_controller.setter + def is_controller(self, is_controller): + """Sets the is_controller of this ShowClusterRespClusterBrokers. + + 是否为contoller节点。 + + :param is_controller: The is_controller of this ShowClusterRespClusterBrokers. + :type: bool + """ + self._is_controller = is_controller + + @property + def version(self): + """Gets the version of this ShowClusterRespClusterBrokers. + + 服务端版本。 + + :return: The version of this ShowClusterRespClusterBrokers. + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this ShowClusterRespClusterBrokers. + + 服务端版本。 + + :param version: The version of this ShowClusterRespClusterBrokers. + :type: str + """ + self._version = version + + @property + def register_time(self): + """Gets the register_time of this ShowClusterRespClusterBrokers. + + broker注册时间,为unix时间戳格式。 + + :return: The register_time of this ShowClusterRespClusterBrokers. + :rtype: str + """ + return self._register_time + + @register_time.setter + def register_time(self, register_time): + """Sets the register_time of this ShowClusterRespClusterBrokers. + + broker注册时间,为unix时间戳格式。 + + :param register_time: The register_time of this ShowClusterRespClusterBrokers. + :type: str + """ + self._register_time = register_time + + @property + def is_health(self): + """Gets the is_health of this ShowClusterRespClusterBrokers. + + Kafka实例节点的连通性是否正常。 + + :return: The is_health of this ShowClusterRespClusterBrokers. + :rtype: bool + """ + return self._is_health + + @is_health.setter + def is_health(self, is_health): + """Sets the is_health of this ShowClusterRespClusterBrokers. + + Kafka实例节点的连通性是否正常。 + + :param is_health: The is_health of this ShowClusterRespClusterBrokers. + :type: bool + """ + self._is_health = is_health + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowClusterRespClusterBrokers): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_cluster_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_cluster_response.py new file mode 100644 index 0000000000..35e9969f2e --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_cluster_response.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowClusterResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'cluster': 'ShowClusterRespCluster' + } + + attribute_map = { + 'cluster': 'cluster' + } + + def __init__(self, cluster=None): + """ShowClusterResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._cluster = None + self.discriminator = None + + if cluster is not None: + self.cluster = cluster + + @property + def cluster(self): + """Gets the cluster of this ShowClusterResponse. + + + :return: The cluster of this ShowClusterResponse. + :rtype: ShowClusterRespCluster + """ + return self._cluster + + @cluster.setter + def cluster(self, cluster): + """Sets the cluster of this ShowClusterResponse. + + + :param cluster: The cluster of this ShowClusterResponse. + :type: ShowClusterRespCluster + """ + self._cluster = cluster + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowClusterResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_coordinators_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_coordinators_request.py new file mode 100644 index 0000000000..22a31b838a --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_coordinators_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowCoordinatorsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id' + } + + def __init__(self, instance_id=None): + """ShowCoordinatorsRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self.discriminator = None + + self.instance_id = instance_id + + @property + def instance_id(self): + """Gets the instance_id of this ShowCoordinatorsRequest. + + + :return: The instance_id of this ShowCoordinatorsRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowCoordinatorsRequest. + + + :param instance_id: The instance_id of this ShowCoordinatorsRequest. + :type: str + """ + self._instance_id = instance_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowCoordinatorsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_coordinators_resp_coordinators.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_coordinators_resp_coordinators.py new file mode 100644 index 0000000000..69130fb3e9 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_coordinators_resp_coordinators.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowCoordinatorsRespCoordinators: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'group_id': 'str', + 'id': 'int', + 'host': 'str', + 'port': 'int' + } + + attribute_map = { + 'group_id': 'group_id', + 'id': 'id', + 'host': 'host', + 'port': 'port' + } + + def __init__(self, group_id=None, id=None, host=None, port=None): + """ShowCoordinatorsRespCoordinators - a model defined in huaweicloud sdk""" + + + + self._group_id = None + self._id = None + self._host = None + self._port = None + self.discriminator = None + + if group_id is not None: + self.group_id = group_id + if id is not None: + self.id = id + if host is not None: + self.host = host + if port is not None: + self.port = port + + @property + def group_id(self): + """Gets the group_id of this ShowCoordinatorsRespCoordinators. + + 消费组ID。 + + :return: The group_id of this ShowCoordinatorsRespCoordinators. + :rtype: str + """ + return self._group_id + + @group_id.setter + def group_id(self, group_id): + """Sets the group_id of this ShowCoordinatorsRespCoordinators. + + 消费组ID。 + + :param group_id: The group_id of this ShowCoordinatorsRespCoordinators. + :type: str + """ + self._group_id = group_id + + @property + def id(self): + """Gets the id of this ShowCoordinatorsRespCoordinators. + + 对应协调器的broker id。 + + :return: The id of this ShowCoordinatorsRespCoordinators. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ShowCoordinatorsRespCoordinators. + + 对应协调器的broker id。 + + :param id: The id of this ShowCoordinatorsRespCoordinators. + :type: int + """ + self._id = id + + @property + def host(self): + """Gets the host of this ShowCoordinatorsRespCoordinators. + + 对应协调器的地址。 + + :return: The host of this ShowCoordinatorsRespCoordinators. + :rtype: str + """ + return self._host + + @host.setter + def host(self, host): + """Sets the host of this ShowCoordinatorsRespCoordinators. + + 对应协调器的地址。 + + :param host: The host of this ShowCoordinatorsRespCoordinators. + :type: str + """ + self._host = host + + @property + def port(self): + """Gets the port of this ShowCoordinatorsRespCoordinators. + + 端口号。 + + :return: The port of this ShowCoordinatorsRespCoordinators. + :rtype: int + """ + return self._port + + @port.setter + def port(self, port): + """Sets the port of this ShowCoordinatorsRespCoordinators. + + 端口号。 + + :param port: The port of this ShowCoordinatorsRespCoordinators. + :type: int + """ + self._port = port + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowCoordinatorsRespCoordinators): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_coordinators_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_coordinators_response.py new file mode 100644 index 0000000000..8bcd6e1e32 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_coordinators_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowCoordinatorsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'coordinators': 'list[ShowCoordinatorsRespCoordinators]' + } + + attribute_map = { + 'coordinators': 'coordinators' + } + + def __init__(self, coordinators=None): + """ShowCoordinatorsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._coordinators = None + self.discriminator = None + + if coordinators is not None: + self.coordinators = coordinators + + @property + def coordinators(self): + """Gets the coordinators of this ShowCoordinatorsResponse. + + 所有消费组对应的协调器列表。 + + :return: The coordinators of this ShowCoordinatorsResponse. + :rtype: list[ShowCoordinatorsRespCoordinators] + """ + return self._coordinators + + @coordinators.setter + def coordinators(self, coordinators): + """Sets the coordinators of this ShowCoordinatorsResponse. + + 所有消费组对应的协调器列表。 + + :param coordinators: The coordinators of this ShowCoordinatorsResponse. + :type: list[ShowCoordinatorsRespCoordinators] + """ + self._coordinators = coordinators + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowCoordinatorsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_request.py new file mode 100644 index 0000000000..3dc95ff30e --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_request.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowGroupsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'group': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'group': 'group' + } + + def __init__(self, instance_id=None, group=None): + """ShowGroupsRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._group = None + self.discriminator = None + + self.instance_id = instance_id + self.group = group + + @property + def instance_id(self): + """Gets the instance_id of this ShowGroupsRequest. + + + :return: The instance_id of this ShowGroupsRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowGroupsRequest. + + + :param instance_id: The instance_id of this ShowGroupsRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def group(self): + """Gets the group of this ShowGroupsRequest. + + + :return: The group of this ShowGroupsRequest. + :rtype: str + """ + return self._group + + @group.setter + def group(self, group): + """Sets the group of this ShowGroupsRequest. + + + :param group: The group of this ShowGroupsRequest. + :type: str + """ + self._group = group + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowGroupsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_resp_group.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_resp_group.py new file mode 100644 index 0000000000..a2e41f96c0 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_resp_group.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowGroupsRespGroup: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'group_id': 'str', + 'state': 'str', + 'coordinator_id': 'int', + 'members': 'list[ShowGroupsRespGroupMembers]', + 'group_message_offsets': 'list[ShowGroupsRespGroupGroupMessageOffsets]', + 'assignment_strategy': 'str' + } + + attribute_map = { + 'group_id': 'group_id', + 'state': 'state', + 'coordinator_id': 'coordinator_id', + 'members': 'members', + 'group_message_offsets': 'group_message_offsets', + 'assignment_strategy': 'assignment_strategy' + } + + def __init__(self, group_id=None, state=None, coordinator_id=None, members=None, group_message_offsets=None, assignment_strategy=None): + """ShowGroupsRespGroup - a model defined in huaweicloud sdk""" + + + + self._group_id = None + self._state = None + self._coordinator_id = None + self._members = None + self._group_message_offsets = None + self._assignment_strategy = None + self.discriminator = None + + if group_id is not None: + self.group_id = group_id + if state is not None: + self.state = state + if coordinator_id is not None: + self.coordinator_id = coordinator_id + if members is not None: + self.members = members + if group_message_offsets is not None: + self.group_message_offsets = group_message_offsets + if assignment_strategy is not None: + self.assignment_strategy = assignment_strategy + + @property + def group_id(self): + """Gets the group_id of this ShowGroupsRespGroup. + + 消费组名称。 + + :return: The group_id of this ShowGroupsRespGroup. + :rtype: str + """ + return self._group_id + + @group_id.setter + def group_id(self, group_id): + """Sets the group_id of this ShowGroupsRespGroup. + + 消费组名称。 + + :param group_id: The group_id of this ShowGroupsRespGroup. + :type: str + """ + self._group_id = group_id + + @property + def state(self): + """Gets the state of this ShowGroupsRespGroup. + + 消费组状态。包含以下状态: - Dead:消费组内没有任何成员,且没有任何元数据。 - Empty:消费组内没有任何成员,存在元数据。 - PreparingRebalance:准备开启rebalance。 - CompletingRebalance:所有成员加入group。 - Stable:消费组内成员可正常消费。 + + :return: The state of this ShowGroupsRespGroup. + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this ShowGroupsRespGroup. + + 消费组状态。包含以下状态: - Dead:消费组内没有任何成员,且没有任何元数据。 - Empty:消费组内没有任何成员,存在元数据。 - PreparingRebalance:准备开启rebalance。 - CompletingRebalance:所有成员加入group。 - Stable:消费组内成员可正常消费。 + + :param state: The state of this ShowGroupsRespGroup. + :type: str + """ + self._state = state + + @property + def coordinator_id(self): + """Gets the coordinator_id of this ShowGroupsRespGroup. + + 协调器编号。 + + :return: The coordinator_id of this ShowGroupsRespGroup. + :rtype: int + """ + return self._coordinator_id + + @coordinator_id.setter + def coordinator_id(self, coordinator_id): + """Sets the coordinator_id of this ShowGroupsRespGroup. + + 协调器编号。 + + :param coordinator_id: The coordinator_id of this ShowGroupsRespGroup. + :type: int + """ + self._coordinator_id = coordinator_id + + @property + def members(self): + """Gets the members of this ShowGroupsRespGroup. + + 消费者列表。 + + :return: The members of this ShowGroupsRespGroup. + :rtype: list[ShowGroupsRespGroupMembers] + """ + return self._members + + @members.setter + def members(self, members): + """Sets the members of this ShowGroupsRespGroup. + + 消费者列表。 + + :param members: The members of this ShowGroupsRespGroup. + :type: list[ShowGroupsRespGroupMembers] + """ + self._members = members + + @property + def group_message_offsets(self): + """Gets the group_message_offsets of this ShowGroupsRespGroup. + + 消费进度。 + + :return: The group_message_offsets of this ShowGroupsRespGroup. + :rtype: list[ShowGroupsRespGroupGroupMessageOffsets] + """ + return self._group_message_offsets + + @group_message_offsets.setter + def group_message_offsets(self, group_message_offsets): + """Sets the group_message_offsets of this ShowGroupsRespGroup. + + 消费进度。 + + :param group_message_offsets: The group_message_offsets of this ShowGroupsRespGroup. + :type: list[ShowGroupsRespGroupGroupMessageOffsets] + """ + self._group_message_offsets = group_message_offsets + + @property + def assignment_strategy(self): + """Gets the assignment_strategy of this ShowGroupsRespGroup. + + 分区分配策略。 + + :return: The assignment_strategy of this ShowGroupsRespGroup. + :rtype: str + """ + return self._assignment_strategy + + @assignment_strategy.setter + def assignment_strategy(self, assignment_strategy): + """Sets the assignment_strategy of this ShowGroupsRespGroup. + + 分区分配策略。 + + :param assignment_strategy: The assignment_strategy of this ShowGroupsRespGroup. + :type: str + """ + self._assignment_strategy = assignment_strategy + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowGroupsRespGroup): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_resp_group_assignment.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_resp_group_assignment.py new file mode 100644 index 0000000000..690541eb7c --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_resp_group_assignment.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowGroupsRespGroupAssignment: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'topic': 'str', + 'partitions': 'list[str]' + } + + attribute_map = { + 'topic': 'topic', + 'partitions': 'partitions' + } + + def __init__(self, topic=None, partitions=None): + """ShowGroupsRespGroupAssignment - a model defined in huaweicloud sdk""" + + + + self._topic = None + self._partitions = None + self.discriminator = None + + if topic is not None: + self.topic = topic + if partitions is not None: + self.partitions = partitions + + @property + def topic(self): + """Gets the topic of this ShowGroupsRespGroupAssignment. + + topic名称。 + + :return: The topic of this ShowGroupsRespGroupAssignment. + :rtype: str + """ + return self._topic + + @topic.setter + def topic(self, topic): + """Sets the topic of this ShowGroupsRespGroupAssignment. + + topic名称。 + + :param topic: The topic of this ShowGroupsRespGroupAssignment. + :type: str + """ + self._topic = topic + + @property + def partitions(self): + """Gets the partitions of this ShowGroupsRespGroupAssignment. + + 分区列表。 + + :return: The partitions of this ShowGroupsRespGroupAssignment. + :rtype: list[str] + """ + return self._partitions + + @partitions.setter + def partitions(self, partitions): + """Sets the partitions of this ShowGroupsRespGroupAssignment. + + 分区列表。 + + :param partitions: The partitions of this ShowGroupsRespGroupAssignment. + :type: list[str] + """ + self._partitions = partitions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowGroupsRespGroupAssignment): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_resp_group_group_message_offsets.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_resp_group_group_message_offsets.py new file mode 100644 index 0000000000..93743efd0b --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_resp_group_group_message_offsets.py @@ -0,0 +1,218 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowGroupsRespGroupGroupMessageOffsets: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'partition': 'int', + 'lag': 'int', + 'topic': 'str', + 'message_current_offset': 'int', + 'message_log_end_offset': 'int' + } + + attribute_map = { + 'partition': 'partition', + 'lag': 'lag', + 'topic': 'topic', + 'message_current_offset': 'message_current_offset', + 'message_log_end_offset': 'message_log_end_offset' + } + + def __init__(self, partition=None, lag=None, topic=None, message_current_offset=None, message_log_end_offset=None): + """ShowGroupsRespGroupGroupMessageOffsets - a model defined in huaweicloud sdk""" + + + + self._partition = None + self._lag = None + self._topic = None + self._message_current_offset = None + self._message_log_end_offset = None + self.discriminator = None + + if partition is not None: + self.partition = partition + if lag is not None: + self.lag = lag + if topic is not None: + self.topic = topic + if message_current_offset is not None: + self.message_current_offset = message_current_offset + if message_log_end_offset is not None: + self.message_log_end_offset = message_log_end_offset + + @property + def partition(self): + """Gets the partition of this ShowGroupsRespGroupGroupMessageOffsets. + + 分区编号。 + + :return: The partition of this ShowGroupsRespGroupGroupMessageOffsets. + :rtype: int + """ + return self._partition + + @partition.setter + def partition(self, partition): + """Sets the partition of this ShowGroupsRespGroupGroupMessageOffsets. + + 分区编号。 + + :param partition: The partition of this ShowGroupsRespGroupGroupMessageOffsets. + :type: int + """ + self._partition = partition + + @property + def lag(self): + """Gets the lag of this ShowGroupsRespGroupGroupMessageOffsets. + + 剩余可消费消息数,即消息堆积数。 + + :return: The lag of this ShowGroupsRespGroupGroupMessageOffsets. + :rtype: int + """ + return self._lag + + @lag.setter + def lag(self, lag): + """Sets the lag of this ShowGroupsRespGroupGroupMessageOffsets. + + 剩余可消费消息数,即消息堆积数。 + + :param lag: The lag of this ShowGroupsRespGroupGroupMessageOffsets. + :type: int + """ + self._lag = lag + + @property + def topic(self): + """Gets the topic of this ShowGroupsRespGroupGroupMessageOffsets. + + topic名称。 + + :return: The topic of this ShowGroupsRespGroupGroupMessageOffsets. + :rtype: str + """ + return self._topic + + @topic.setter + def topic(self, topic): + """Sets the topic of this ShowGroupsRespGroupGroupMessageOffsets. + + topic名称。 + + :param topic: The topic of this ShowGroupsRespGroupGroupMessageOffsets. + :type: str + """ + self._topic = topic + + @property + def message_current_offset(self): + """Gets the message_current_offset of this ShowGroupsRespGroupGroupMessageOffsets. + + 当前消费进度。 + + :return: The message_current_offset of this ShowGroupsRespGroupGroupMessageOffsets. + :rtype: int + """ + return self._message_current_offset + + @message_current_offset.setter + def message_current_offset(self, message_current_offset): + """Sets the message_current_offset of this ShowGroupsRespGroupGroupMessageOffsets. + + 当前消费进度。 + + :param message_current_offset: The message_current_offset of this ShowGroupsRespGroupGroupMessageOffsets. + :type: int + """ + self._message_current_offset = message_current_offset + + @property + def message_log_end_offset(self): + """Gets the message_log_end_offset of this ShowGroupsRespGroupGroupMessageOffsets. + + 最大消息位置(LEO)。 + + :return: The message_log_end_offset of this ShowGroupsRespGroupGroupMessageOffsets. + :rtype: int + """ + return self._message_log_end_offset + + @message_log_end_offset.setter + def message_log_end_offset(self, message_log_end_offset): + """Sets the message_log_end_offset of this ShowGroupsRespGroupGroupMessageOffsets. + + 最大消息位置(LEO)。 + + :param message_log_end_offset: The message_log_end_offset of this ShowGroupsRespGroupGroupMessageOffsets. + :type: int + """ + self._message_log_end_offset = message_log_end_offset + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowGroupsRespGroupGroupMessageOffsets): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_resp_group_members.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_resp_group_members.py new file mode 100644 index 0000000000..11e18055de --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_resp_group_members.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowGroupsRespGroupMembers: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'host': 'str', + 'assignment': 'list[ShowGroupsRespGroupAssignment]', + 'member_id': 'str', + 'client_id': 'str' + } + + attribute_map = { + 'host': 'host', + 'assignment': 'assignment', + 'member_id': 'member_id', + 'client_id': 'client_id' + } + + def __init__(self, host=None, assignment=None, member_id=None, client_id=None): + """ShowGroupsRespGroupMembers - a model defined in huaweicloud sdk""" + + + + self._host = None + self._assignment = None + self._member_id = None + self._client_id = None + self.discriminator = None + + if host is not None: + self.host = host + if assignment is not None: + self.assignment = assignment + if member_id is not None: + self.member_id = member_id + if client_id is not None: + self.client_id = client_id + + @property + def host(self): + """Gets the host of this ShowGroupsRespGroupMembers. + + 消费组consumer地址。 + + :return: The host of this ShowGroupsRespGroupMembers. + :rtype: str + """ + return self._host + + @host.setter + def host(self, host): + """Sets the host of this ShowGroupsRespGroupMembers. + + 消费组consumer地址。 + + :param host: The host of this ShowGroupsRespGroupMembers. + :type: str + """ + self._host = host + + @property + def assignment(self): + """Gets the assignment of this ShowGroupsRespGroupMembers. + + consumer分配到的分区信息。 + + :return: The assignment of this ShowGroupsRespGroupMembers. + :rtype: list[ShowGroupsRespGroupAssignment] + """ + return self._assignment + + @assignment.setter + def assignment(self, assignment): + """Sets the assignment of this ShowGroupsRespGroupMembers. + + consumer分配到的分区信息。 + + :param assignment: The assignment of this ShowGroupsRespGroupMembers. + :type: list[ShowGroupsRespGroupAssignment] + """ + self._assignment = assignment + + @property + def member_id(self): + """Gets the member_id of this ShowGroupsRespGroupMembers. + + 消费组consumer的ID。 + + :return: The member_id of this ShowGroupsRespGroupMembers. + :rtype: str + """ + return self._member_id + + @member_id.setter + def member_id(self, member_id): + """Sets the member_id of this ShowGroupsRespGroupMembers. + + 消费组consumer的ID。 + + :param member_id: The member_id of this ShowGroupsRespGroupMembers. + :type: str + """ + self._member_id = member_id + + @property + def client_id(self): + """Gets the client_id of this ShowGroupsRespGroupMembers. + + 客户端ID。 + + :return: The client_id of this ShowGroupsRespGroupMembers. + :rtype: str + """ + return self._client_id + + @client_id.setter + def client_id(self, client_id): + """Sets the client_id of this ShowGroupsRespGroupMembers. + + 客户端ID。 + + :param client_id: The client_id of this ShowGroupsRespGroupMembers. + :type: str + """ + self._client_id = client_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowGroupsRespGroupMembers): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_response.py new file mode 100644 index 0000000000..d59bc9a0e0 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_groups_response.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowGroupsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'group': 'ShowGroupsRespGroup' + } + + attribute_map = { + 'group': 'group' + } + + def __init__(self, group=None): + """ShowGroupsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._group = None + self.discriminator = None + + if group is not None: + self.group = group + + @property + def group(self): + """Gets the group of this ShowGroupsResponse. + + + :return: The group of this ShowGroupsResponse. + :rtype: ShowGroupsRespGroup + """ + return self._group + + @group.setter + def group(self, group): + """Sets the group of this ShowGroupsResponse. + + + :param group: The group of this ShowGroupsResponse. + :type: ShowGroupsRespGroup + """ + self._group = group + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowGroupsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_extend_product_info_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_extend_product_info_request.py new file mode 100644 index 0000000000..9dfceef86a --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_extend_product_info_request.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowInstanceExtendProductInfoRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'type': 'str', + 'engine': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'type': 'type', + 'engine': 'engine' + } + + def __init__(self, instance_id=None, type=None, engine=None): + """ShowInstanceExtendProductInfoRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._type = None + self._engine = None + self.discriminator = None + + self.instance_id = instance_id + self.type = type + self.engine = engine + + @property + def instance_id(self): + """Gets the instance_id of this ShowInstanceExtendProductInfoRequest. + + + :return: The instance_id of this ShowInstanceExtendProductInfoRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowInstanceExtendProductInfoRequest. + + + :param instance_id: The instance_id of this ShowInstanceExtendProductInfoRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def type(self): + """Gets the type of this ShowInstanceExtendProductInfoRequest. + + + :return: The type of this ShowInstanceExtendProductInfoRequest. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ShowInstanceExtendProductInfoRequest. + + + :param type: The type of this ShowInstanceExtendProductInfoRequest. + :type: str + """ + self._type = type + + @property + def engine(self): + """Gets the engine of this ShowInstanceExtendProductInfoRequest. + + + :return: The engine of this ShowInstanceExtendProductInfoRequest. + :rtype: str + """ + return self._engine + + @engine.setter + def engine(self, engine): + """Sets the engine of this ShowInstanceExtendProductInfoRequest. + + + :param engine: The engine of this ShowInstanceExtendProductInfoRequest. + :type: str + """ + self._engine = engine + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowInstanceExtendProductInfoRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_extend_product_info_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_extend_product_info_response.py new file mode 100644 index 0000000000..e7c8848108 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_extend_product_info_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowInstanceExtendProductInfoResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'hourly': 'list[ListProductsRespHourly]', + 'monthly': 'list[ListProductsRespHourly]' + } + + attribute_map = { + 'hourly': 'hourly', + 'monthly': 'monthly' + } + + def __init__(self, hourly=None, monthly=None): + """ShowInstanceExtendProductInfoResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._hourly = None + self._monthly = None + self.discriminator = None + + if hourly is not None: + self.hourly = hourly + if monthly is not None: + self.monthly = monthly + + @property + def hourly(self): + """Gets the hourly of this ShowInstanceExtendProductInfoResponse. + + 表示按需付费的产品列表。 + + :return: The hourly of this ShowInstanceExtendProductInfoResponse. + :rtype: list[ListProductsRespHourly] + """ + return self._hourly + + @hourly.setter + def hourly(self, hourly): + """Sets the hourly of this ShowInstanceExtendProductInfoResponse. + + 表示按需付费的产品列表。 + + :param hourly: The hourly of this ShowInstanceExtendProductInfoResponse. + :type: list[ListProductsRespHourly] + """ + self._hourly = hourly + + @property + def monthly(self): + """Gets the monthly of this ShowInstanceExtendProductInfoResponse. + + 表示包年包月的产品列表。当前暂不支持通过API创建包年包月的Kafka实例。 + + :return: The monthly of this ShowInstanceExtendProductInfoResponse. + :rtype: list[ListProductsRespHourly] + """ + return self._monthly + + @monthly.setter + def monthly(self, monthly): + """Sets the monthly of this ShowInstanceExtendProductInfoResponse. + + 表示包年包月的产品列表。当前暂不支持通过API创建包年包月的Kafka实例。 + + :param monthly: The monthly of this ShowInstanceExtendProductInfoResponse. + :type: list[ListProductsRespHourly] + """ + self._monthly = monthly + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowInstanceExtendProductInfoResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_request.py new file mode 100644 index 0000000000..66e39f50e2 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowInstanceRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id' + } + + def __init__(self, instance_id=None): + """ShowInstanceRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self.discriminator = None + + self.instance_id = instance_id + + @property + def instance_id(self): + """Gets the instance_id of this ShowInstanceRequest. + + + :return: The instance_id of this ShowInstanceRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowInstanceRequest. + + + :param instance_id: The instance_id of this ShowInstanceRequest. + :type: str + """ + self._instance_id = instance_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowInstanceRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_response.py new file mode 100644 index 0000000000..2a2adb3656 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_response.py @@ -0,0 +1,1703 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowInstanceResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'engine': 'str', + 'engine_version': 'str', + 'specification': 'str', + 'storage_space': 'int', + 'partition_num': 'int', + 'used_storage_space': 'int', + 'connect_address': 'str', + 'port': 'int', + 'status': 'str', + 'instance_id': 'str', + 'resource_spec_code': 'str', + 'charging_mode': 'int', + 'vpc_id': 'str', + 'vpc_name': 'str', + 'created_at': 'str', + 'user_id': 'str', + 'user_name': 'str', + 'order_id': 'str', + 'maintain_begin': 'str', + 'maintain_end': 'str', + 'enable_publicip': 'bool', + 'management_connect_address': 'str', + 'ssl_enable': 'bool', + 'enterprise_project_id': 'str', + 'is_logical_volume': 'bool', + 'extend_times': 'int', + 'enable_auto_topic': 'bool', + 'type': 'str', + 'product_id': 'str', + 'security_group_id': 'str', + 'security_group_name': 'str', + 'subnet_id': 'str', + 'available_zones': 'list[str]', + 'total_storage_space': 'int', + 'public_connect_address': 'str', + 'storage_resource_id': 'str', + 'storage_spec_code': 'str', + 'service_type': 'str', + 'storage_type': 'str', + 'retention_policy': 'str', + 'kafka_public_status': 'str', + 'public_bandwidth': 'int', + 'kafka_manager_user': 'str', + 'enable_log_collection': 'bool', + 'cross_vpc_info': 'str', + 'ipv6_enable': 'bool', + 'ipv6_connect_addresses': 'list[str]', + 'connector_enable': 'bool', + 'connector_id': 'str', + 'rest_enable': 'bool', + 'rest_connect_address': 'str', + 'message_query_inst_enable': 'bool', + 'vpc_client_plain': 'bool', + 'support_features': 'str', + 'trace_enable': 'bool', + 'pod_connect_address': 'str', + 'disk_encrypted': 'bool', + 'kafka_private_connect_address': 'str', + 'ces_version': 'str' + } + + attribute_map = { + 'name': 'name', + 'engine': 'engine', + 'engine_version': 'engine_version', + 'specification': 'specification', + 'storage_space': 'storage_space', + 'partition_num': 'partition_num', + 'used_storage_space': 'used_storage_space', + 'connect_address': 'connect_address', + 'port': 'port', + 'status': 'status', + 'instance_id': 'instance_id', + 'resource_spec_code': 'resource_spec_code', + 'charging_mode': 'charging_mode', + 'vpc_id': 'vpc_id', + 'vpc_name': 'vpc_name', + 'created_at': 'created_at', + 'user_id': 'user_id', + 'user_name': 'user_name', + 'order_id': 'order_id', + 'maintain_begin': 'maintain_begin', + 'maintain_end': 'maintain_end', + 'enable_publicip': 'enable_publicip', + 'management_connect_address': 'management_connect_address', + 'ssl_enable': 'ssl_enable', + 'enterprise_project_id': 'enterprise_project_id', + 'is_logical_volume': 'is_logical_volume', + 'extend_times': 'extend_times', + 'enable_auto_topic': 'enable_auto_topic', + 'type': 'type', + 'product_id': 'product_id', + 'security_group_id': 'security_group_id', + 'security_group_name': 'security_group_name', + 'subnet_id': 'subnet_id', + 'available_zones': 'available_zones', + 'total_storage_space': 'total_storage_space', + 'public_connect_address': 'public_connect_address', + 'storage_resource_id': 'storage_resource_id', + 'storage_spec_code': 'storage_spec_code', + 'service_type': 'service_type', + 'storage_type': 'storage_type', + 'retention_policy': 'retention_policy', + 'kafka_public_status': 'kafka_public_status', + 'public_bandwidth': 'public_bandwidth', + 'kafka_manager_user': 'kafka_manager_user', + 'enable_log_collection': 'enable_log_collection', + 'cross_vpc_info': 'cross_vpc_info', + 'ipv6_enable': 'ipv6_enable', + 'ipv6_connect_addresses': 'ipv6_connect_addresses', + 'connector_enable': 'connector_enable', + 'connector_id': 'connector_id', + 'rest_enable': 'rest_enable', + 'rest_connect_address': 'rest_connect_address', + 'message_query_inst_enable': 'message_query_inst_enable', + 'vpc_client_plain': 'vpc_client_plain', + 'support_features': 'support_features', + 'trace_enable': 'trace_enable', + 'pod_connect_address': 'pod_connect_address', + 'disk_encrypted': 'disk_encrypted', + 'kafka_private_connect_address': 'kafka_private_connect_address', + 'ces_version': 'ces_version' + } + + def __init__(self, name=None, engine=None, engine_version=None, specification=None, storage_space=None, partition_num=None, used_storage_space=None, connect_address=None, port=None, status=None, instance_id=None, resource_spec_code=None, charging_mode=None, vpc_id=None, vpc_name=None, created_at=None, user_id=None, user_name=None, order_id=None, maintain_begin=None, maintain_end=None, enable_publicip=None, management_connect_address=None, ssl_enable=None, enterprise_project_id=None, is_logical_volume=None, extend_times=None, enable_auto_topic=None, type=None, product_id=None, security_group_id=None, security_group_name=None, subnet_id=None, available_zones=None, total_storage_space=None, public_connect_address=None, storage_resource_id=None, storage_spec_code=None, service_type=None, storage_type=None, retention_policy=None, kafka_public_status=None, public_bandwidth=None, kafka_manager_user=None, enable_log_collection=None, cross_vpc_info=None, ipv6_enable=None, ipv6_connect_addresses=None, connector_enable=None, connector_id=None, rest_enable=None, rest_connect_address=None, message_query_inst_enable=None, vpc_client_plain=None, support_features=None, trace_enable=None, pod_connect_address=None, disk_encrypted=None, kafka_private_connect_address=None, ces_version=None): + """ShowInstanceResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._name = None + self._engine = None + self._engine_version = None + self._specification = None + self._storage_space = None + self._partition_num = None + self._used_storage_space = None + self._connect_address = None + self._port = None + self._status = None + self._instance_id = None + self._resource_spec_code = None + self._charging_mode = None + self._vpc_id = None + self._vpc_name = None + self._created_at = None + self._user_id = None + self._user_name = None + self._order_id = None + self._maintain_begin = None + self._maintain_end = None + self._enable_publicip = None + self._management_connect_address = None + self._ssl_enable = None + self._enterprise_project_id = None + self._is_logical_volume = None + self._extend_times = None + self._enable_auto_topic = None + self._type = None + self._product_id = None + self._security_group_id = None + self._security_group_name = None + self._subnet_id = None + self._available_zones = None + self._total_storage_space = None + self._public_connect_address = None + self._storage_resource_id = None + self._storage_spec_code = None + self._service_type = None + self._storage_type = None + self._retention_policy = None + self._kafka_public_status = None + self._public_bandwidth = None + self._kafka_manager_user = None + self._enable_log_collection = None + self._cross_vpc_info = None + self._ipv6_enable = None + self._ipv6_connect_addresses = None + self._connector_enable = None + self._connector_id = None + self._rest_enable = None + self._rest_connect_address = None + self._message_query_inst_enable = None + self._vpc_client_plain = None + self._support_features = None + self._trace_enable = None + self._pod_connect_address = None + self._disk_encrypted = None + self._kafka_private_connect_address = None + self._ces_version = None + self.discriminator = None + + if name is not None: + self.name = name + if engine is not None: + self.engine = engine + if engine_version is not None: + self.engine_version = engine_version + if specification is not None: + self.specification = specification + if storage_space is not None: + self.storage_space = storage_space + if partition_num is not None: + self.partition_num = partition_num + if used_storage_space is not None: + self.used_storage_space = used_storage_space + if connect_address is not None: + self.connect_address = connect_address + if port is not None: + self.port = port + if status is not None: + self.status = status + if instance_id is not None: + self.instance_id = instance_id + if resource_spec_code is not None: + self.resource_spec_code = resource_spec_code + if charging_mode is not None: + self.charging_mode = charging_mode + if vpc_id is not None: + self.vpc_id = vpc_id + if vpc_name is not None: + self.vpc_name = vpc_name + if created_at is not None: + self.created_at = created_at + if user_id is not None: + self.user_id = user_id + if user_name is not None: + self.user_name = user_name + if order_id is not None: + self.order_id = order_id + if maintain_begin is not None: + self.maintain_begin = maintain_begin + if maintain_end is not None: + self.maintain_end = maintain_end + if enable_publicip is not None: + self.enable_publicip = enable_publicip + if management_connect_address is not None: + self.management_connect_address = management_connect_address + if ssl_enable is not None: + self.ssl_enable = ssl_enable + if enterprise_project_id is not None: + self.enterprise_project_id = enterprise_project_id + if is_logical_volume is not None: + self.is_logical_volume = is_logical_volume + if extend_times is not None: + self.extend_times = extend_times + if enable_auto_topic is not None: + self.enable_auto_topic = enable_auto_topic + if type is not None: + self.type = type + if product_id is not None: + self.product_id = product_id + if security_group_id is not None: + self.security_group_id = security_group_id + if security_group_name is not None: + self.security_group_name = security_group_name + if subnet_id is not None: + self.subnet_id = subnet_id + if available_zones is not None: + self.available_zones = available_zones + if total_storage_space is not None: + self.total_storage_space = total_storage_space + if public_connect_address is not None: + self.public_connect_address = public_connect_address + if storage_resource_id is not None: + self.storage_resource_id = storage_resource_id + if storage_spec_code is not None: + self.storage_spec_code = storage_spec_code + if service_type is not None: + self.service_type = service_type + if storage_type is not None: + self.storage_type = storage_type + if retention_policy is not None: + self.retention_policy = retention_policy + if kafka_public_status is not None: + self.kafka_public_status = kafka_public_status + if public_bandwidth is not None: + self.public_bandwidth = public_bandwidth + if kafka_manager_user is not None: + self.kafka_manager_user = kafka_manager_user + if enable_log_collection is not None: + self.enable_log_collection = enable_log_collection + if cross_vpc_info is not None: + self.cross_vpc_info = cross_vpc_info + if ipv6_enable is not None: + self.ipv6_enable = ipv6_enable + if ipv6_connect_addresses is not None: + self.ipv6_connect_addresses = ipv6_connect_addresses + if connector_enable is not None: + self.connector_enable = connector_enable + if connector_id is not None: + self.connector_id = connector_id + if rest_enable is not None: + self.rest_enable = rest_enable + if rest_connect_address is not None: + self.rest_connect_address = rest_connect_address + if message_query_inst_enable is not None: + self.message_query_inst_enable = message_query_inst_enable + if vpc_client_plain is not None: + self.vpc_client_plain = vpc_client_plain + if support_features is not None: + self.support_features = support_features + if trace_enable is not None: + self.trace_enable = trace_enable + if pod_connect_address is not None: + self.pod_connect_address = pod_connect_address + if disk_encrypted is not None: + self.disk_encrypted = disk_encrypted + if kafka_private_connect_address is not None: + self.kafka_private_connect_address = kafka_private_connect_address + if ces_version is not None: + self.ces_version = ces_version + + @property + def name(self): + """Gets the name of this ShowInstanceResponse. + + 实例名称。 + + :return: The name of this ShowInstanceResponse. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ShowInstanceResponse. + + 实例名称。 + + :param name: The name of this ShowInstanceResponse. + :type: str + """ + self._name = name + + @property + def engine(self): + """Gets the engine of this ShowInstanceResponse. + + 引擎。 + + :return: The engine of this ShowInstanceResponse. + :rtype: str + """ + return self._engine + + @engine.setter + def engine(self, engine): + """Sets the engine of this ShowInstanceResponse. + + 引擎。 + + :param engine: The engine of this ShowInstanceResponse. + :type: str + """ + self._engine = engine + + @property + def engine_version(self): + """Gets the engine_version of this ShowInstanceResponse. + + 版本。 + + :return: The engine_version of this ShowInstanceResponse. + :rtype: str + """ + return self._engine_version + + @engine_version.setter + def engine_version(self, engine_version): + """Sets the engine_version of this ShowInstanceResponse. + + 版本。 + + :param engine_version: The engine_version of this ShowInstanceResponse. + :type: str + """ + self._engine_version = engine_version + + @property + def specification(self): + """Gets the specification of this ShowInstanceResponse. + + 实例规格。 + + :return: The specification of this ShowInstanceResponse. + :rtype: str + """ + return self._specification + + @specification.setter + def specification(self, specification): + """Sets the specification of this ShowInstanceResponse. + + 实例规格。 + + :param specification: The specification of this ShowInstanceResponse. + :type: str + """ + self._specification = specification + + @property + def storage_space(self): + """Gets the storage_space of this ShowInstanceResponse. + + 消息存储空间,单位:GB。 + + :return: The storage_space of this ShowInstanceResponse. + :rtype: int + """ + return self._storage_space + + @storage_space.setter + def storage_space(self, storage_space): + """Sets the storage_space of this ShowInstanceResponse. + + 消息存储空间,单位:GB。 + + :param storage_space: The storage_space of this ShowInstanceResponse. + :type: int + """ + self._storage_space = storage_space + + @property + def partition_num(self): + """Gets the partition_num of this ShowInstanceResponse. + + Kafka实例的最大topic数。 + + :return: The partition_num of this ShowInstanceResponse. + :rtype: int + """ + return self._partition_num + + @partition_num.setter + def partition_num(self, partition_num): + """Sets the partition_num of this ShowInstanceResponse. + + Kafka实例的最大topic数。 + + :param partition_num: The partition_num of this ShowInstanceResponse. + :type: int + """ + self._partition_num = partition_num + + @property + def used_storage_space(self): + """Gets the used_storage_space of this ShowInstanceResponse. + + 已使用的消息存储空间,单位:GB。 + + :return: The used_storage_space of this ShowInstanceResponse. + :rtype: int + """ + return self._used_storage_space + + @used_storage_space.setter + def used_storage_space(self, used_storage_space): + """Sets the used_storage_space of this ShowInstanceResponse. + + 已使用的消息存储空间,单位:GB。 + + :param used_storage_space: The used_storage_space of this ShowInstanceResponse. + :type: int + """ + self._used_storage_space = used_storage_space + + @property + def connect_address(self): + """Gets the connect_address of this ShowInstanceResponse. + + 实例连接IP地址。 + + :return: The connect_address of this ShowInstanceResponse. + :rtype: str + """ + return self._connect_address + + @connect_address.setter + def connect_address(self, connect_address): + """Sets the connect_address of this ShowInstanceResponse. + + 实例连接IP地址。 + + :param connect_address: The connect_address of this ShowInstanceResponse. + :type: str + """ + self._connect_address = connect_address + + @property + def port(self): + """Gets the port of this ShowInstanceResponse. + + 实例连接端口。 + + :return: The port of this ShowInstanceResponse. + :rtype: int + """ + return self._port + + @port.setter + def port(self, port): + """Sets the port of this ShowInstanceResponse. + + 实例连接端口。 + + :param port: The port of this ShowInstanceResponse. + :type: int + """ + self._port = port + + @property + def status(self): + """Gets the status of this ShowInstanceResponse. + + 实例的状态。详细状态说明见[实例状态说明](https://support.huaweicloud.com/api-kafka/kafka-api-180514012.html)。 + + :return: The status of this ShowInstanceResponse. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ShowInstanceResponse. + + 实例的状态。详细状态说明见[实例状态说明](https://support.huaweicloud.com/api-kafka/kafka-api-180514012.html)。 + + :param status: The status of this ShowInstanceResponse. + :type: str + """ + self._status = status + + @property + def instance_id(self): + """Gets the instance_id of this ShowInstanceResponse. + + 实例ID。 + + :return: The instance_id of this ShowInstanceResponse. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowInstanceResponse. + + 实例ID。 + + :param instance_id: The instance_id of this ShowInstanceResponse. + :type: str + """ + self._instance_id = instance_id + + @property + def resource_spec_code(self): + """Gets the resource_spec_code of this ShowInstanceResponse. + + 资源规格标识。 - dms.instance.kafka.cluster.c3.mini:Kafka实例的基准带宽为100MByte/秒。 - dms.instance.kafka.cluster.c3.small.2:Kafka实例的基准带宽为300MByte/秒。 - dms.instance.kafka.cluster.c3.middle.2:Kafka实例的基准带宽为600MByte/秒。 - dms.instance.kafka.cluster.c3.high.2:Kafka实例的基准带宽为1200MByte/秒。 + + :return: The resource_spec_code of this ShowInstanceResponse. + :rtype: str + """ + return self._resource_spec_code + + @resource_spec_code.setter + def resource_spec_code(self, resource_spec_code): + """Sets the resource_spec_code of this ShowInstanceResponse. + + 资源规格标识。 - dms.instance.kafka.cluster.c3.mini:Kafka实例的基准带宽为100MByte/秒。 - dms.instance.kafka.cluster.c3.small.2:Kafka实例的基准带宽为300MByte/秒。 - dms.instance.kafka.cluster.c3.middle.2:Kafka实例的基准带宽为600MByte/秒。 - dms.instance.kafka.cluster.c3.high.2:Kafka实例的基准带宽为1200MByte/秒。 + + :param resource_spec_code: The resource_spec_code of this ShowInstanceResponse. + :type: str + """ + self._resource_spec_code = resource_spec_code + + @property + def charging_mode(self): + """Gets the charging_mode of this ShowInstanceResponse. + + 付费模式,1表示按需计费,0表示包年/包月计费。 + + :return: The charging_mode of this ShowInstanceResponse. + :rtype: int + """ + return self._charging_mode + + @charging_mode.setter + def charging_mode(self, charging_mode): + """Sets the charging_mode of this ShowInstanceResponse. + + 付费模式,1表示按需计费,0表示包年/包月计费。 + + :param charging_mode: The charging_mode of this ShowInstanceResponse. + :type: int + """ + self._charging_mode = charging_mode + + @property + def vpc_id(self): + """Gets the vpc_id of this ShowInstanceResponse. + + VPC ID。 + + :return: The vpc_id of this ShowInstanceResponse. + :rtype: str + """ + return self._vpc_id + + @vpc_id.setter + def vpc_id(self, vpc_id): + """Sets the vpc_id of this ShowInstanceResponse. + + VPC ID。 + + :param vpc_id: The vpc_id of this ShowInstanceResponse. + :type: str + """ + self._vpc_id = vpc_id + + @property + def vpc_name(self): + """Gets the vpc_name of this ShowInstanceResponse. + + VPC的名称。 + + :return: The vpc_name of this ShowInstanceResponse. + :rtype: str + """ + return self._vpc_name + + @vpc_name.setter + def vpc_name(self, vpc_name): + """Sets the vpc_name of this ShowInstanceResponse. + + VPC的名称。 + + :param vpc_name: The vpc_name of this ShowInstanceResponse. + :type: str + """ + self._vpc_name = vpc_name + + @property + def created_at(self): + """Gets the created_at of this ShowInstanceResponse. + + 完成创建时间。 格式为时间戳,指从格林威治时间 1970年01月01日00时00分00秒起至指定时间的偏差总毫秒数。 + + :return: The created_at of this ShowInstanceResponse. + :rtype: str + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ShowInstanceResponse. + + 完成创建时间。 格式为时间戳,指从格林威治时间 1970年01月01日00时00分00秒起至指定时间的偏差总毫秒数。 + + :param created_at: The created_at of this ShowInstanceResponse. + :type: str + """ + self._created_at = created_at + + @property + def user_id(self): + """Gets the user_id of this ShowInstanceResponse. + + 用户ID。 + + :return: The user_id of this ShowInstanceResponse. + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this ShowInstanceResponse. + + 用户ID。 + + :param user_id: The user_id of this ShowInstanceResponse. + :type: str + """ + self._user_id = user_id + + @property + def user_name(self): + """Gets the user_name of this ShowInstanceResponse. + + 用户名。 + + :return: The user_name of this ShowInstanceResponse. + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """Sets the user_name of this ShowInstanceResponse. + + 用户名。 + + :param user_name: The user_name of this ShowInstanceResponse. + :type: str + """ + self._user_name = user_name + + @property + def order_id(self): + """Gets the order_id of this ShowInstanceResponse. + + 订单ID,只有在包周期计费时才会有order_id值,其他计费方式order_id值为空。 + + :return: The order_id of this ShowInstanceResponse. + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this ShowInstanceResponse. + + 订单ID,只有在包周期计费时才会有order_id值,其他计费方式order_id值为空。 + + :param order_id: The order_id of this ShowInstanceResponse. + :type: str + """ + self._order_id = order_id + + @property + def maintain_begin(self): + """Gets the maintain_begin of this ShowInstanceResponse. + + 维护时间窗开始时间,格式为HH:mm:ss。 + + :return: The maintain_begin of this ShowInstanceResponse. + :rtype: str + """ + return self._maintain_begin + + @maintain_begin.setter + def maintain_begin(self, maintain_begin): + """Sets the maintain_begin of this ShowInstanceResponse. + + 维护时间窗开始时间,格式为HH:mm:ss。 + + :param maintain_begin: The maintain_begin of this ShowInstanceResponse. + :type: str + """ + self._maintain_begin = maintain_begin + + @property + def maintain_end(self): + """Gets the maintain_end of this ShowInstanceResponse. + + 维护时间窗结束时间,格式为HH:mm:ss。 + + :return: The maintain_end of this ShowInstanceResponse. + :rtype: str + """ + return self._maintain_end + + @maintain_end.setter + def maintain_end(self, maintain_end): + """Sets the maintain_end of this ShowInstanceResponse. + + 维护时间窗结束时间,格式为HH:mm:ss。 + + :param maintain_end: The maintain_end of this ShowInstanceResponse. + :type: str + """ + self._maintain_end = maintain_end + + @property + def enable_publicip(self): + """Gets the enable_publicip of this ShowInstanceResponse. + + 实例是否开启公网访问功能。 - true:开启 - false:未开启 + + :return: The enable_publicip of this ShowInstanceResponse. + :rtype: bool + """ + return self._enable_publicip + + @enable_publicip.setter + def enable_publicip(self, enable_publicip): + """Sets the enable_publicip of this ShowInstanceResponse. + + 实例是否开启公网访问功能。 - true:开启 - false:未开启 + + :param enable_publicip: The enable_publicip of this ShowInstanceResponse. + :type: bool + """ + self._enable_publicip = enable_publicip + + @property + def management_connect_address(self): + """Gets the management_connect_address of this ShowInstanceResponse. + + Kafka实例的KafkaManager连接地址。 + + :return: The management_connect_address of this ShowInstanceResponse. + :rtype: str + """ + return self._management_connect_address + + @management_connect_address.setter + def management_connect_address(self, management_connect_address): + """Sets the management_connect_address of this ShowInstanceResponse. + + Kafka实例的KafkaManager连接地址。 + + :param management_connect_address: The management_connect_address of this ShowInstanceResponse. + :type: str + """ + self._management_connect_address = management_connect_address + + @property + def ssl_enable(self): + """Gets the ssl_enable of this ShowInstanceResponse. + + 是否开启安全认证。 - true:开启 - false:未开启 + + :return: The ssl_enable of this ShowInstanceResponse. + :rtype: bool + """ + return self._ssl_enable + + @ssl_enable.setter + def ssl_enable(self, ssl_enable): + """Sets the ssl_enable of this ShowInstanceResponse. + + 是否开启安全认证。 - true:开启 - false:未开启 + + :param ssl_enable: The ssl_enable of this ShowInstanceResponse. + :type: bool + """ + self._ssl_enable = ssl_enable + + @property + def enterprise_project_id(self): + """Gets the enterprise_project_id of this ShowInstanceResponse. + + 企业项目ID。 + + :return: The enterprise_project_id of this ShowInstanceResponse. + :rtype: str + """ + return self._enterprise_project_id + + @enterprise_project_id.setter + def enterprise_project_id(self, enterprise_project_id): + """Sets the enterprise_project_id of this ShowInstanceResponse. + + 企业项目ID。 + + :param enterprise_project_id: The enterprise_project_id of this ShowInstanceResponse. + :type: str + """ + self._enterprise_project_id = enterprise_project_id + + @property + def is_logical_volume(self): + """Gets the is_logical_volume of this ShowInstanceResponse. + + 实例扩容时用于区分老实例与新实例。 - true:新创建的实例,允许磁盘动态扩容不需要重启。 - false:老实例 + + :return: The is_logical_volume of this ShowInstanceResponse. + :rtype: bool + """ + return self._is_logical_volume + + @is_logical_volume.setter + def is_logical_volume(self, is_logical_volume): + """Sets the is_logical_volume of this ShowInstanceResponse. + + 实例扩容时用于区分老实例与新实例。 - true:新创建的实例,允许磁盘动态扩容不需要重启。 - false:老实例 + + :param is_logical_volume: The is_logical_volume of this ShowInstanceResponse. + :type: bool + """ + self._is_logical_volume = is_logical_volume + + @property + def extend_times(self): + """Gets the extend_times of this ShowInstanceResponse. + + 实例扩容磁盘次数,如果超过20次则无法扩容磁盘。 + + :return: The extend_times of this ShowInstanceResponse. + :rtype: int + """ + return self._extend_times + + @extend_times.setter + def extend_times(self, extend_times): + """Sets the extend_times of this ShowInstanceResponse. + + 实例扩容磁盘次数,如果超过20次则无法扩容磁盘。 + + :param extend_times: The extend_times of this ShowInstanceResponse. + :type: int + """ + self._extend_times = extend_times + + @property + def enable_auto_topic(self): + """Gets the enable_auto_topic of this ShowInstanceResponse. + + 是否打开kafka自动创建topic功能。 - true:开启 - false:关闭 + + :return: The enable_auto_topic of this ShowInstanceResponse. + :rtype: bool + """ + return self._enable_auto_topic + + @enable_auto_topic.setter + def enable_auto_topic(self, enable_auto_topic): + """Sets the enable_auto_topic of this ShowInstanceResponse. + + 是否打开kafka自动创建topic功能。 - true:开启 - false:关闭 + + :param enable_auto_topic: The enable_auto_topic of this ShowInstanceResponse. + :type: bool + """ + self._enable_auto_topic = enable_auto_topic + + @property + def type(self): + """Gets the type of this ShowInstanceResponse. + + 实例类型:集群,cluster。 + + :return: The type of this ShowInstanceResponse. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ShowInstanceResponse. + + 实例类型:集群,cluster。 + + :param type: The type of this ShowInstanceResponse. + :type: str + """ + self._type = type + + @property + def product_id(self): + """Gets the product_id of this ShowInstanceResponse. + + 产品标识。 + + :return: The product_id of this ShowInstanceResponse. + :rtype: str + """ + return self._product_id + + @product_id.setter + def product_id(self, product_id): + """Sets the product_id of this ShowInstanceResponse. + + 产品标识。 + + :param product_id: The product_id of this ShowInstanceResponse. + :type: str + """ + self._product_id = product_id + + @property + def security_group_id(self): + """Gets the security_group_id of this ShowInstanceResponse. + + 安全组ID。 + + :return: The security_group_id of this ShowInstanceResponse. + :rtype: str + """ + return self._security_group_id + + @security_group_id.setter + def security_group_id(self, security_group_id): + """Sets the security_group_id of this ShowInstanceResponse. + + 安全组ID。 + + :param security_group_id: The security_group_id of this ShowInstanceResponse. + :type: str + """ + self._security_group_id = security_group_id + + @property + def security_group_name(self): + """Gets the security_group_name of this ShowInstanceResponse. + + 租户安全组名称。 + + :return: The security_group_name of this ShowInstanceResponse. + :rtype: str + """ + return self._security_group_name + + @security_group_name.setter + def security_group_name(self, security_group_name): + """Sets the security_group_name of this ShowInstanceResponse. + + 租户安全组名称。 + + :param security_group_name: The security_group_name of this ShowInstanceResponse. + :type: str + """ + self._security_group_name = security_group_name + + @property + def subnet_id(self): + """Gets the subnet_id of this ShowInstanceResponse. + + 子网ID。 + + :return: The subnet_id of this ShowInstanceResponse. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """Sets the subnet_id of this ShowInstanceResponse. + + 子网ID。 + + :param subnet_id: The subnet_id of this ShowInstanceResponse. + :type: str + """ + self._subnet_id = subnet_id + + @property + def available_zones(self): + """Gets the available_zones of this ShowInstanceResponse. + + 实例节点所在的可用区,返回“可用区ID”。 + + :return: The available_zones of this ShowInstanceResponse. + :rtype: list[str] + """ + return self._available_zones + + @available_zones.setter + def available_zones(self, available_zones): + """Sets the available_zones of this ShowInstanceResponse. + + 实例节点所在的可用区,返回“可用区ID”。 + + :param available_zones: The available_zones of this ShowInstanceResponse. + :type: list[str] + """ + self._available_zones = available_zones + + @property + def total_storage_space(self): + """Gets the total_storage_space of this ShowInstanceResponse. + + 总共消息存储空间,单位:GB。 + + :return: The total_storage_space of this ShowInstanceResponse. + :rtype: int + """ + return self._total_storage_space + + @total_storage_space.setter + def total_storage_space(self, total_storage_space): + """Sets the total_storage_space of this ShowInstanceResponse. + + 总共消息存储空间,单位:GB。 + + :param total_storage_space: The total_storage_space of this ShowInstanceResponse. + :type: int + """ + self._total_storage_space = total_storage_space + + @property + def public_connect_address(self): + """Gets the public_connect_address of this ShowInstanceResponse. + + 实例公网连接IP地址。当实例开启了公网访问,实例才包含该参数。 + + :return: The public_connect_address of this ShowInstanceResponse. + :rtype: str + """ + return self._public_connect_address + + @public_connect_address.setter + def public_connect_address(self, public_connect_address): + """Sets the public_connect_address of this ShowInstanceResponse. + + 实例公网连接IP地址。当实例开启了公网访问,实例才包含该参数。 + + :param public_connect_address: The public_connect_address of this ShowInstanceResponse. + :type: str + """ + self._public_connect_address = public_connect_address + + @property + def storage_resource_id(self): + """Gets the storage_resource_id of this ShowInstanceResponse. + + 存储资源ID。 + + :return: The storage_resource_id of this ShowInstanceResponse. + :rtype: str + """ + return self._storage_resource_id + + @storage_resource_id.setter + def storage_resource_id(self, storage_resource_id): + """Sets the storage_resource_id of this ShowInstanceResponse. + + 存储资源ID。 + + :param storage_resource_id: The storage_resource_id of this ShowInstanceResponse. + :type: str + """ + self._storage_resource_id = storage_resource_id + + @property + def storage_spec_code(self): + """Gets the storage_spec_code of this ShowInstanceResponse. + + IO规格。 + + :return: The storage_spec_code of this ShowInstanceResponse. + :rtype: str + """ + return self._storage_spec_code + + @storage_spec_code.setter + def storage_spec_code(self, storage_spec_code): + """Sets the storage_spec_code of this ShowInstanceResponse. + + IO规格。 + + :param storage_spec_code: The storage_spec_code of this ShowInstanceResponse. + :type: str + """ + self._storage_spec_code = storage_spec_code + + @property + def service_type(self): + """Gets the service_type of this ShowInstanceResponse. + + 服务类型。 + + :return: The service_type of this ShowInstanceResponse. + :rtype: str + """ + return self._service_type + + @service_type.setter + def service_type(self, service_type): + """Sets the service_type of this ShowInstanceResponse. + + 服务类型。 + + :param service_type: The service_type of this ShowInstanceResponse. + :type: str + """ + self._service_type = service_type + + @property + def storage_type(self): + """Gets the storage_type of this ShowInstanceResponse. + + 存储类型。 + + :return: The storage_type of this ShowInstanceResponse. + :rtype: str + """ + return self._storage_type + + @storage_type.setter + def storage_type(self, storage_type): + """Sets the storage_type of this ShowInstanceResponse. + + 存储类型。 + + :param storage_type: The storage_type of this ShowInstanceResponse. + :type: str + """ + self._storage_type = storage_type + + @property + def retention_policy(self): + """Gets the retention_policy of this ShowInstanceResponse. + + 消息老化策略。 + + :return: The retention_policy of this ShowInstanceResponse. + :rtype: str + """ + return self._retention_policy + + @retention_policy.setter + def retention_policy(self, retention_policy): + """Sets the retention_policy of this ShowInstanceResponse. + + 消息老化策略。 + + :param retention_policy: The retention_policy of this ShowInstanceResponse. + :type: str + """ + self._retention_policy = retention_policy + + @property + def kafka_public_status(self): + """Gets the kafka_public_status of this ShowInstanceResponse. + + Kafka公网开启状态。 + + :return: The kafka_public_status of this ShowInstanceResponse. + :rtype: str + """ + return self._kafka_public_status + + @kafka_public_status.setter + def kafka_public_status(self, kafka_public_status): + """Sets the kafka_public_status of this ShowInstanceResponse. + + Kafka公网开启状态。 + + :param kafka_public_status: The kafka_public_status of this ShowInstanceResponse. + :type: str + """ + self._kafka_public_status = kafka_public_status + + @property + def public_bandwidth(self): + """Gets the public_bandwidth of this ShowInstanceResponse. + + 公网带宽。 + + :return: The public_bandwidth of this ShowInstanceResponse. + :rtype: int + """ + return self._public_bandwidth + + @public_bandwidth.setter + def public_bandwidth(self, public_bandwidth): + """Sets the public_bandwidth of this ShowInstanceResponse. + + 公网带宽。 + + :param public_bandwidth: The public_bandwidth of this ShowInstanceResponse. + :type: int + """ + self._public_bandwidth = public_bandwidth + + @property + def kafka_manager_user(self): + """Gets the kafka_manager_user of this ShowInstanceResponse. + + 登录Kafka Manager的用户名。 + + :return: The kafka_manager_user of this ShowInstanceResponse. + :rtype: str + """ + return self._kafka_manager_user + + @kafka_manager_user.setter + def kafka_manager_user(self, kafka_manager_user): + """Sets the kafka_manager_user of this ShowInstanceResponse. + + 登录Kafka Manager的用户名。 + + :param kafka_manager_user: The kafka_manager_user of this ShowInstanceResponse. + :type: str + """ + self._kafka_manager_user = kafka_manager_user + + @property + def enable_log_collection(self): + """Gets the enable_log_collection of this ShowInstanceResponse. + + 是否开启消息收集功能。 + + :return: The enable_log_collection of this ShowInstanceResponse. + :rtype: bool + """ + return self._enable_log_collection + + @enable_log_collection.setter + def enable_log_collection(self, enable_log_collection): + """Sets the enable_log_collection of this ShowInstanceResponse. + + 是否开启消息收集功能。 + + :param enable_log_collection: The enable_log_collection of this ShowInstanceResponse. + :type: bool + """ + self._enable_log_collection = enable_log_collection + + @property + def cross_vpc_info(self): + """Gets the cross_vpc_info of this ShowInstanceResponse. + + 跨VPC访问信息。 + + :return: The cross_vpc_info of this ShowInstanceResponse. + :rtype: str + """ + return self._cross_vpc_info + + @cross_vpc_info.setter + def cross_vpc_info(self, cross_vpc_info): + """Sets the cross_vpc_info of this ShowInstanceResponse. + + 跨VPC访问信息。 + + :param cross_vpc_info: The cross_vpc_info of this ShowInstanceResponse. + :type: str + """ + self._cross_vpc_info = cross_vpc_info + + @property + def ipv6_enable(self): + """Gets the ipv6_enable of this ShowInstanceResponse. + + 是否开启ipv6。 + + :return: The ipv6_enable of this ShowInstanceResponse. + :rtype: bool + """ + return self._ipv6_enable + + @ipv6_enable.setter + def ipv6_enable(self, ipv6_enable): + """Sets the ipv6_enable of this ShowInstanceResponse. + + 是否开启ipv6。 + + :param ipv6_enable: The ipv6_enable of this ShowInstanceResponse. + :type: bool + """ + self._ipv6_enable = ipv6_enable + + @property + def ipv6_connect_addresses(self): + """Gets the ipv6_connect_addresses of this ShowInstanceResponse. + + IPv6的连接地址。 + + :return: The ipv6_connect_addresses of this ShowInstanceResponse. + :rtype: list[str] + """ + return self._ipv6_connect_addresses + + @ipv6_connect_addresses.setter + def ipv6_connect_addresses(self, ipv6_connect_addresses): + """Sets the ipv6_connect_addresses of this ShowInstanceResponse. + + IPv6的连接地址。 + + :param ipv6_connect_addresses: The ipv6_connect_addresses of this ShowInstanceResponse. + :type: list[str] + """ + self._ipv6_connect_addresses = ipv6_connect_addresses + + @property + def connector_enable(self): + """Gets the connector_enable of this ShowInstanceResponse. + + 是否开启转储。 + + :return: The connector_enable of this ShowInstanceResponse. + :rtype: bool + """ + return self._connector_enable + + @connector_enable.setter + def connector_enable(self, connector_enable): + """Sets the connector_enable of this ShowInstanceResponse. + + 是否开启转储。 + + :param connector_enable: The connector_enable of this ShowInstanceResponse. + :type: bool + """ + self._connector_enable = connector_enable + + @property + def connector_id(self): + """Gets the connector_id of this ShowInstanceResponse. + + 转储任务ID。 + + :return: The connector_id of this ShowInstanceResponse. + :rtype: str + """ + return self._connector_id + + @connector_id.setter + def connector_id(self, connector_id): + """Sets the connector_id of this ShowInstanceResponse. + + 转储任务ID。 + + :param connector_id: The connector_id of this ShowInstanceResponse. + :type: str + """ + self._connector_id = connector_id + + @property + def rest_enable(self): + """Gets the rest_enable of this ShowInstanceResponse. + + 是否开启Kafka rest功能。 + + :return: The rest_enable of this ShowInstanceResponse. + :rtype: bool + """ + return self._rest_enable + + @rest_enable.setter + def rest_enable(self, rest_enable): + """Sets the rest_enable of this ShowInstanceResponse. + + 是否开启Kafka rest功能。 + + :param rest_enable: The rest_enable of this ShowInstanceResponse. + :type: bool + """ + self._rest_enable = rest_enable + + @property + def rest_connect_address(self): + """Gets the rest_connect_address of this ShowInstanceResponse. + + Kafka rest连接地址。 + + :return: The rest_connect_address of this ShowInstanceResponse. + :rtype: str + """ + return self._rest_connect_address + + @rest_connect_address.setter + def rest_connect_address(self, rest_connect_address): + """Sets the rest_connect_address of this ShowInstanceResponse. + + Kafka rest连接地址。 + + :param rest_connect_address: The rest_connect_address of this ShowInstanceResponse. + :type: str + """ + self._rest_connect_address = rest_connect_address + + @property + def message_query_inst_enable(self): + """Gets the message_query_inst_enable of this ShowInstanceResponse. + + 是否开启消息查询功能。 + + :return: The message_query_inst_enable of this ShowInstanceResponse. + :rtype: bool + """ + return self._message_query_inst_enable + + @message_query_inst_enable.setter + def message_query_inst_enable(self, message_query_inst_enable): + """Sets the message_query_inst_enable of this ShowInstanceResponse. + + 是否开启消息查询功能。 + + :param message_query_inst_enable: The message_query_inst_enable of this ShowInstanceResponse. + :type: bool + """ + self._message_query_inst_enable = message_query_inst_enable + + @property + def vpc_client_plain(self): + """Gets the vpc_client_plain of this ShowInstanceResponse. + + 是否开启VPC明文访问。 + + :return: The vpc_client_plain of this ShowInstanceResponse. + :rtype: bool + """ + return self._vpc_client_plain + + @vpc_client_plain.setter + def vpc_client_plain(self, vpc_client_plain): + """Sets the vpc_client_plain of this ShowInstanceResponse. + + 是否开启VPC明文访问。 + + :param vpc_client_plain: The vpc_client_plain of this ShowInstanceResponse. + :type: bool + """ + self._vpc_client_plain = vpc_client_plain + + @property + def support_features(self): + """Gets the support_features of this ShowInstanceResponse. + + Kafka实例支持的特性功能。 + + :return: The support_features of this ShowInstanceResponse. + :rtype: str + """ + return self._support_features + + @support_features.setter + def support_features(self, support_features): + """Sets the support_features of this ShowInstanceResponse. + + Kafka实例支持的特性功能。 + + :param support_features: The support_features of this ShowInstanceResponse. + :type: str + """ + self._support_features = support_features + + @property + def trace_enable(self): + """Gets the trace_enable of this ShowInstanceResponse. + + 是否开启消息轨迹功能。 + + :return: The trace_enable of this ShowInstanceResponse. + :rtype: bool + """ + return self._trace_enable + + @trace_enable.setter + def trace_enable(self, trace_enable): + """Sets the trace_enable of this ShowInstanceResponse. + + 是否开启消息轨迹功能。 + + :param trace_enable: The trace_enable of this ShowInstanceResponse. + :type: bool + """ + self._trace_enable = trace_enable + + @property + def pod_connect_address(self): + """Gets the pod_connect_address of this ShowInstanceResponse. + + 租户侧连接地址。 + + :return: The pod_connect_address of this ShowInstanceResponse. + :rtype: str + """ + return self._pod_connect_address + + @pod_connect_address.setter + def pod_connect_address(self, pod_connect_address): + """Sets the pod_connect_address of this ShowInstanceResponse. + + 租户侧连接地址。 + + :param pod_connect_address: The pod_connect_address of this ShowInstanceResponse. + :type: str + """ + self._pod_connect_address = pod_connect_address + + @property + def disk_encrypted(self): + """Gets the disk_encrypted of this ShowInstanceResponse. + + 是否开启磁盘加密。 + + :return: The disk_encrypted of this ShowInstanceResponse. + :rtype: bool + """ + return self._disk_encrypted + + @disk_encrypted.setter + def disk_encrypted(self, disk_encrypted): + """Sets the disk_encrypted of this ShowInstanceResponse. + + 是否开启磁盘加密。 + + :param disk_encrypted: The disk_encrypted of this ShowInstanceResponse. + :type: bool + """ + self._disk_encrypted = disk_encrypted + + @property + def kafka_private_connect_address(self): + """Gets the kafka_private_connect_address of this ShowInstanceResponse. + + Kafka实例私有连接地址。 + + :return: The kafka_private_connect_address of this ShowInstanceResponse. + :rtype: str + """ + return self._kafka_private_connect_address + + @kafka_private_connect_address.setter + def kafka_private_connect_address(self, kafka_private_connect_address): + """Sets the kafka_private_connect_address of this ShowInstanceResponse. + + Kafka实例私有连接地址。 + + :param kafka_private_connect_address: The kafka_private_connect_address of this ShowInstanceResponse. + :type: str + """ + self._kafka_private_connect_address = kafka_private_connect_address + + @property + def ces_version(self): + """Gets the ces_version of this ShowInstanceResponse. + + 云监控版本。 + + :return: The ces_version of this ShowInstanceResponse. + :rtype: str + """ + return self._ces_version + + @ces_version.setter + def ces_version(self, ces_version): + """Sets the ces_version of this ShowInstanceResponse. + + 云监控版本。 + + :param ces_version: The ces_version of this ShowInstanceResponse. + :type: str + """ + self._ces_version = ces_version + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowInstanceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_tags_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_tags_request.py new file mode 100644 index 0000000000..9b37179cae --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_tags_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowInstanceTagsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id' + } + + def __init__(self, instance_id=None): + """ShowInstanceTagsRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self.discriminator = None + + self.instance_id = instance_id + + @property + def instance_id(self): + """Gets the instance_id of this ShowInstanceTagsRequest. + + + :return: The instance_id of this ShowInstanceTagsRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowInstanceTagsRequest. + + + :param instance_id: The instance_id of this ShowInstanceTagsRequest. + :type: str + """ + self._instance_id = instance_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowInstanceTagsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_tags_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_tags_response.py new file mode 100644 index 0000000000..0812685818 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_tags_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowInstanceTagsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'tags': 'list[CreatePostPaidInstanceReqTags]' + } + + attribute_map = { + 'tags': 'tags' + } + + def __init__(self, tags=None): + """ShowInstanceTagsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._tags = None + self.discriminator = None + + if tags is not None: + self.tags = tags + + @property + def tags(self): + """Gets the tags of this ShowInstanceTagsResponse. + + 标签列表 + + :return: The tags of this ShowInstanceTagsResponse. + :rtype: list[CreatePostPaidInstanceReqTags] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this ShowInstanceTagsResponse. + + 标签列表 + + :param tags: The tags of this ShowInstanceTagsResponse. + :type: list[CreatePostPaidInstanceReqTags] + """ + self._tags = tags + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowInstanceTagsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_topic_detail_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_topic_detail_request.py new file mode 100644 index 0000000000..e807100514 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_topic_detail_request.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowInstanceTopicDetailRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'topic': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'topic': 'topic' + } + + def __init__(self, instance_id=None, topic=None): + """ShowInstanceTopicDetailRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._topic = None + self.discriminator = None + + self.instance_id = instance_id + self.topic = topic + + @property + def instance_id(self): + """Gets the instance_id of this ShowInstanceTopicDetailRequest. + + + :return: The instance_id of this ShowInstanceTopicDetailRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowInstanceTopicDetailRequest. + + + :param instance_id: The instance_id of this ShowInstanceTopicDetailRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def topic(self): + """Gets the topic of this ShowInstanceTopicDetailRequest. + + + :return: The topic of this ShowInstanceTopicDetailRequest. + :rtype: str + """ + return self._topic + + @topic.setter + def topic(self, topic): + """Sets the topic of this ShowInstanceTopicDetailRequest. + + + :param topic: The topic of this ShowInstanceTopicDetailRequest. + :type: str + """ + self._topic = topic + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowInstanceTopicDetailRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_topic_detail_resp_partitions.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_topic_detail_resp_partitions.py new file mode 100644 index 0000000000..78b5118c95 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_topic_detail_resp_partitions.py @@ -0,0 +1,272 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowInstanceTopicDetailRespPartitions: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'partition': 'int', + 'leader': 'int', + 'leo': 'int', + 'hw': 'int', + 'lso': 'int', + 'last_update_timestamp': 'int', + 'replicas': 'list[ShowInstanceTopicDetailRespReplicas]' + } + + attribute_map = { + 'partition': 'partition', + 'leader': 'leader', + 'leo': 'leo', + 'hw': 'hw', + 'lso': 'lso', + 'last_update_timestamp': 'last_update_timestamp', + 'replicas': 'replicas' + } + + def __init__(self, partition=None, leader=None, leo=None, hw=None, lso=None, last_update_timestamp=None, replicas=None): + """ShowInstanceTopicDetailRespPartitions - a model defined in huaweicloud sdk""" + + + + self._partition = None + self._leader = None + self._leo = None + self._hw = None + self._lso = None + self._last_update_timestamp = None + self._replicas = None + self.discriminator = None + + if partition is not None: + self.partition = partition + if leader is not None: + self.leader = leader + if leo is not None: + self.leo = leo + if hw is not None: + self.hw = hw + if lso is not None: + self.lso = lso + if last_update_timestamp is not None: + self.last_update_timestamp = last_update_timestamp + if replicas is not None: + self.replicas = replicas + + @property + def partition(self): + """Gets the partition of this ShowInstanceTopicDetailRespPartitions. + + 分区ID。 + + :return: The partition of this ShowInstanceTopicDetailRespPartitions. + :rtype: int + """ + return self._partition + + @partition.setter + def partition(self, partition): + """Sets the partition of this ShowInstanceTopicDetailRespPartitions. + + 分区ID。 + + :param partition: The partition of this ShowInstanceTopicDetailRespPartitions. + :type: int + """ + self._partition = partition + + @property + def leader(self): + """Gets the leader of this ShowInstanceTopicDetailRespPartitions. + + leader副本所在节点的id。 + + :return: The leader of this ShowInstanceTopicDetailRespPartitions. + :rtype: int + """ + return self._leader + + @leader.setter + def leader(self, leader): + """Sets the leader of this ShowInstanceTopicDetailRespPartitions. + + leader副本所在节点的id。 + + :param leader: The leader of this ShowInstanceTopicDetailRespPartitions. + :type: int + """ + self._leader = leader + + @property + def leo(self): + """Gets the leo of this ShowInstanceTopicDetailRespPartitions. + + 分区leader副本的LEO(Log End Offset)。 + + :return: The leo of this ShowInstanceTopicDetailRespPartitions. + :rtype: int + """ + return self._leo + + @leo.setter + def leo(self, leo): + """Sets the leo of this ShowInstanceTopicDetailRespPartitions. + + 分区leader副本的LEO(Log End Offset)。 + + :param leo: The leo of this ShowInstanceTopicDetailRespPartitions. + :type: int + """ + self._leo = leo + + @property + def hw(self): + """Gets the hw of this ShowInstanceTopicDetailRespPartitions. + + 分区高水位(HW,High Watermark)。 + + :return: The hw of this ShowInstanceTopicDetailRespPartitions. + :rtype: int + """ + return self._hw + + @hw.setter + def hw(self, hw): + """Sets the hw of this ShowInstanceTopicDetailRespPartitions. + + 分区高水位(HW,High Watermark)。 + + :param hw: The hw of this ShowInstanceTopicDetailRespPartitions. + :type: int + """ + self._hw = hw + + @property + def lso(self): + """Gets the lso of this ShowInstanceTopicDetailRespPartitions. + + 分区leader副本的LSO(Log Start Offset)。 + + :return: The lso of this ShowInstanceTopicDetailRespPartitions. + :rtype: int + """ + return self._lso + + @lso.setter + def lso(self, lso): + """Sets the lso of this ShowInstanceTopicDetailRespPartitions. + + 分区leader副本的LSO(Log Start Offset)。 + + :param lso: The lso of this ShowInstanceTopicDetailRespPartitions. + :type: int + """ + self._lso = lso + + @property + def last_update_timestamp(self): + """Gets the last_update_timestamp of this ShowInstanceTopicDetailRespPartitions. + + 分区上次写入消息的时间。 + + :return: The last_update_timestamp of this ShowInstanceTopicDetailRespPartitions. + :rtype: int + """ + return self._last_update_timestamp + + @last_update_timestamp.setter + def last_update_timestamp(self, last_update_timestamp): + """Sets the last_update_timestamp of this ShowInstanceTopicDetailRespPartitions. + + 分区上次写入消息的时间。 + + :param last_update_timestamp: The last_update_timestamp of this ShowInstanceTopicDetailRespPartitions. + :type: int + """ + self._last_update_timestamp = last_update_timestamp + + @property + def replicas(self): + """Gets the replicas of this ShowInstanceTopicDetailRespPartitions. + + 副本列表。 + + :return: The replicas of this ShowInstanceTopicDetailRespPartitions. + :rtype: list[ShowInstanceTopicDetailRespReplicas] + """ + return self._replicas + + @replicas.setter + def replicas(self, replicas): + """Sets the replicas of this ShowInstanceTopicDetailRespPartitions. + + 副本列表。 + + :param replicas: The replicas of this ShowInstanceTopicDetailRespPartitions. + :type: list[ShowInstanceTopicDetailRespReplicas] + """ + self._replicas = replicas + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowInstanceTopicDetailRespPartitions): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_topic_detail_resp_replicas.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_topic_detail_resp_replicas.py new file mode 100644 index 0000000000..7a4859701a --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_topic_detail_resp_replicas.py @@ -0,0 +1,218 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowInstanceTopicDetailRespReplicas: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'broker': 'int', + 'leader': 'bool', + 'in_sync': 'bool', + 'size': 'int', + 'lag': 'int' + } + + attribute_map = { + 'broker': 'broker', + 'leader': 'leader', + 'in_sync': 'in_sync', + 'size': 'size', + 'lag': 'lag' + } + + def __init__(self, broker=None, leader=None, in_sync=None, size=None, lag=None): + """ShowInstanceTopicDetailRespReplicas - a model defined in huaweicloud sdk""" + + + + self._broker = None + self._leader = None + self._in_sync = None + self._size = None + self._lag = None + self.discriminator = None + + if broker is not None: + self.broker = broker + if leader is not None: + self.leader = leader + if in_sync is not None: + self.in_sync = in_sync + if size is not None: + self.size = size + if lag is not None: + self.lag = lag + + @property + def broker(self): + """Gets the broker of this ShowInstanceTopicDetailRespReplicas. + + 副本所在的节点ID。 + + :return: The broker of this ShowInstanceTopicDetailRespReplicas. + :rtype: int + """ + return self._broker + + @broker.setter + def broker(self, broker): + """Sets the broker of this ShowInstanceTopicDetailRespReplicas. + + 副本所在的节点ID。 + + :param broker: The broker of this ShowInstanceTopicDetailRespReplicas. + :type: int + """ + self._broker = broker + + @property + def leader(self): + """Gets the leader of this ShowInstanceTopicDetailRespReplicas. + + 该副本是否为leader。 + + :return: The leader of this ShowInstanceTopicDetailRespReplicas. + :rtype: bool + """ + return self._leader + + @leader.setter + def leader(self, leader): + """Sets the leader of this ShowInstanceTopicDetailRespReplicas. + + 该副本是否为leader。 + + :param leader: The leader of this ShowInstanceTopicDetailRespReplicas. + :type: bool + """ + self._leader = leader + + @property + def in_sync(self): + """Gets the in_sync of this ShowInstanceTopicDetailRespReplicas. + + 该副本是否在ISR副本中。 + + :return: The in_sync of this ShowInstanceTopicDetailRespReplicas. + :rtype: bool + """ + return self._in_sync + + @in_sync.setter + def in_sync(self, in_sync): + """Sets the in_sync of this ShowInstanceTopicDetailRespReplicas. + + 该副本是否在ISR副本中。 + + :param in_sync: The in_sync of this ShowInstanceTopicDetailRespReplicas. + :type: bool + """ + self._in_sync = in_sync + + @property + def size(self): + """Gets the size of this ShowInstanceTopicDetailRespReplicas. + + 该副本当前日志大小。 + + :return: The size of this ShowInstanceTopicDetailRespReplicas. + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this ShowInstanceTopicDetailRespReplicas. + + 该副本当前日志大小。 + + :param size: The size of this ShowInstanceTopicDetailRespReplicas. + :type: int + """ + self._size = size + + @property + def lag(self): + """Gets the lag of this ShowInstanceTopicDetailRespReplicas. + + 该副本当前落后hw的消息数。 + + :return: The lag of this ShowInstanceTopicDetailRespReplicas. + :rtype: int + """ + return self._lag + + @lag.setter + def lag(self, lag): + """Sets the lag of this ShowInstanceTopicDetailRespReplicas. + + 该副本当前落后hw的消息数。 + + :param lag: The lag of this ShowInstanceTopicDetailRespReplicas. + :type: int + """ + self._lag = lag + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowInstanceTopicDetailRespReplicas): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_topic_detail_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_topic_detail_response.py new file mode 100644 index 0000000000..180cfd44d3 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_instance_topic_detail_response.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowInstanceTopicDetailResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'topic': 'str', + 'partitions': 'list[ShowInstanceTopicDetailRespPartitions]', + 'group_subscribed': 'list[str]' + } + + attribute_map = { + 'topic': 'topic', + 'partitions': 'partitions', + 'group_subscribed': 'group_subscribed' + } + + def __init__(self, topic=None, partitions=None, group_subscribed=None): + """ShowInstanceTopicDetailResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._topic = None + self._partitions = None + self._group_subscribed = None + self.discriminator = None + + if topic is not None: + self.topic = topic + if partitions is not None: + self.partitions = partitions + if group_subscribed is not None: + self.group_subscribed = group_subscribed + + @property + def topic(self): + """Gets the topic of this ShowInstanceTopicDetailResponse. + + topic名称。 + + :return: The topic of this ShowInstanceTopicDetailResponse. + :rtype: str + """ + return self._topic + + @topic.setter + def topic(self, topic): + """Sets the topic of this ShowInstanceTopicDetailResponse. + + topic名称。 + + :param topic: The topic of this ShowInstanceTopicDetailResponse. + :type: str + """ + self._topic = topic + + @property + def partitions(self): + """Gets the partitions of this ShowInstanceTopicDetailResponse. + + 分区列表。 + + :return: The partitions of this ShowInstanceTopicDetailResponse. + :rtype: list[ShowInstanceTopicDetailRespPartitions] + """ + return self._partitions + + @partitions.setter + def partitions(self, partitions): + """Sets the partitions of this ShowInstanceTopicDetailResponse. + + 分区列表。 + + :param partitions: The partitions of this ShowInstanceTopicDetailResponse. + :type: list[ShowInstanceTopicDetailRespPartitions] + """ + self._partitions = partitions + + @property + def group_subscribed(self): + """Gets the group_subscribed of this ShowInstanceTopicDetailResponse. + + 订阅该topic的消费组名称列表。 + + :return: The group_subscribed of this ShowInstanceTopicDetailResponse. + :rtype: list[str] + """ + return self._group_subscribed + + @group_subscribed.setter + def group_subscribed(self, group_subscribed): + """Sets the group_subscribed of this ShowInstanceTopicDetailResponse. + + 订阅该topic的消费组名称列表。 + + :param group_subscribed: The group_subscribed of this ShowInstanceTopicDetailResponse. + :type: list[str] + """ + self._group_subscribed = group_subscribed + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowInstanceTopicDetailResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_maintain_windows_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_maintain_windows_request.py new file mode 100644 index 0000000000..c9810d81f9 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_maintain_windows_request.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowMaintainWindowsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ShowMaintainWindowsRequest - a model defined in huaweicloud sdk""" + + + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowMaintainWindowsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_maintain_windows_resp_maintain_windows.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_maintain_windows_resp_maintain_windows.py new file mode 100644 index 0000000000..0c3c06291b --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_maintain_windows_resp_maintain_windows.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowMaintainWindowsRespMaintainWindows: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'default': 'bool', + 'end': 'str', + 'begin': 'str', + 'seq': 'int' + } + + attribute_map = { + 'default': 'default', + 'end': 'end', + 'begin': 'begin', + 'seq': 'seq' + } + + def __init__(self, default=None, end=None, begin=None, seq=None): + """ShowMaintainWindowsRespMaintainWindows - a model defined in huaweicloud sdk""" + + + + self._default = None + self._end = None + self._begin = None + self._seq = None + self.discriminator = None + + if default is not None: + self.default = default + if end is not None: + self.end = end + if begin is not None: + self.begin = begin + if seq is not None: + self.seq = seq + + @property + def default(self): + """Gets the default of this ShowMaintainWindowsRespMaintainWindows. + + 是否为默认时间段。 + + :return: The default of this ShowMaintainWindowsRespMaintainWindows. + :rtype: bool + """ + return self._default + + @default.setter + def default(self, default): + """Sets the default of this ShowMaintainWindowsRespMaintainWindows. + + 是否为默认时间段。 + + :param default: The default of this ShowMaintainWindowsRespMaintainWindows. + :type: bool + """ + self._default = default + + @property + def end(self): + """Gets the end of this ShowMaintainWindowsRespMaintainWindows. + + 维护时间窗结束时间。 + + :return: The end of this ShowMaintainWindowsRespMaintainWindows. + :rtype: str + """ + return self._end + + @end.setter + def end(self, end): + """Sets the end of this ShowMaintainWindowsRespMaintainWindows. + + 维护时间窗结束时间。 + + :param end: The end of this ShowMaintainWindowsRespMaintainWindows. + :type: str + """ + self._end = end + + @property + def begin(self): + """Gets the begin of this ShowMaintainWindowsRespMaintainWindows. + + 维护时间窗开始时间。 + + :return: The begin of this ShowMaintainWindowsRespMaintainWindows. + :rtype: str + """ + return self._begin + + @begin.setter + def begin(self, begin): + """Sets the begin of this ShowMaintainWindowsRespMaintainWindows. + + 维护时间窗开始时间。 + + :param begin: The begin of this ShowMaintainWindowsRespMaintainWindows. + :type: str + """ + self._begin = begin + + @property + def seq(self): + """Gets the seq of this ShowMaintainWindowsRespMaintainWindows. + + 序号。 + + :return: The seq of this ShowMaintainWindowsRespMaintainWindows. + :rtype: int + """ + return self._seq + + @seq.setter + def seq(self, seq): + """Sets the seq of this ShowMaintainWindowsRespMaintainWindows. + + 序号。 + + :param seq: The seq of this ShowMaintainWindowsRespMaintainWindows. + :type: int + """ + self._seq = seq + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowMaintainWindowsRespMaintainWindows): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_maintain_windows_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_maintain_windows_response.py new file mode 100644 index 0000000000..5134bed9c7 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_maintain_windows_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowMaintainWindowsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'maintain_windows': 'list[ShowMaintainWindowsRespMaintainWindows]' + } + + attribute_map = { + 'maintain_windows': 'maintain_windows' + } + + def __init__(self, maintain_windows=None): + """ShowMaintainWindowsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._maintain_windows = None + self.discriminator = None + + if maintain_windows is not None: + self.maintain_windows = maintain_windows + + @property + def maintain_windows(self): + """Gets the maintain_windows of this ShowMaintainWindowsResponse. + + 支持的维护时间窗列表。 + + :return: The maintain_windows of this ShowMaintainWindowsResponse. + :rtype: list[ShowMaintainWindowsRespMaintainWindows] + """ + return self._maintain_windows + + @maintain_windows.setter + def maintain_windows(self, maintain_windows): + """Sets the maintain_windows of this ShowMaintainWindowsResponse. + + 支持的维护时间窗列表。 + + :param maintain_windows: The maintain_windows of this ShowMaintainWindowsResponse. + :type: list[ShowMaintainWindowsRespMaintainWindows] + """ + self._maintain_windows = maintain_windows + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowMaintainWindowsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_messages_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_messages_request.py new file mode 100644 index 0000000000..6993d5a8bb --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_messages_request.py @@ -0,0 +1,256 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowMessagesRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'topic': 'str', + 'start_time': 'str', + 'end_time': 'str', + 'limit': 'int', + 'offset': 'int', + 'partition': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'topic': 'topic', + 'start_time': 'start_time', + 'end_time': 'end_time', + 'limit': 'limit', + 'offset': 'offset', + 'partition': 'partition' + } + + def __init__(self, instance_id=None, topic=None, start_time=None, end_time=None, limit=None, offset=None, partition=None): + """ShowMessagesRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._topic = None + self._start_time = None + self._end_time = None + self._limit = None + self._offset = None + self._partition = None + self.discriminator = None + + self.instance_id = instance_id + self.topic = topic + if start_time is not None: + self.start_time = start_time + if end_time is not None: + self.end_time = end_time + if limit is not None: + self.limit = limit + if offset is not None: + self.offset = offset + if partition is not None: + self.partition = partition + + @property + def instance_id(self): + """Gets the instance_id of this ShowMessagesRequest. + + + :return: The instance_id of this ShowMessagesRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowMessagesRequest. + + + :param instance_id: The instance_id of this ShowMessagesRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def topic(self): + """Gets the topic of this ShowMessagesRequest. + + + :return: The topic of this ShowMessagesRequest. + :rtype: str + """ + return self._topic + + @topic.setter + def topic(self, topic): + """Sets the topic of this ShowMessagesRequest. + + + :param topic: The topic of this ShowMessagesRequest. + :type: str + """ + self._topic = topic + + @property + def start_time(self): + """Gets the start_time of this ShowMessagesRequest. + + + :return: The start_time of this ShowMessagesRequest. + :rtype: str + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this ShowMessagesRequest. + + + :param start_time: The start_time of this ShowMessagesRequest. + :type: str + """ + self._start_time = start_time + + @property + def end_time(self): + """Gets the end_time of this ShowMessagesRequest. + + + :return: The end_time of this ShowMessagesRequest. + :rtype: str + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time): + """Sets the end_time of this ShowMessagesRequest. + + + :param end_time: The end_time of this ShowMessagesRequest. + :type: str + """ + self._end_time = end_time + + @property + def limit(self): + """Gets the limit of this ShowMessagesRequest. + + + :return: The limit of this ShowMessagesRequest. + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this ShowMessagesRequest. + + + :param limit: The limit of this ShowMessagesRequest. + :type: int + """ + self._limit = limit + + @property + def offset(self): + """Gets the offset of this ShowMessagesRequest. + + + :return: The offset of this ShowMessagesRequest. + :rtype: int + """ + return self._offset + + @offset.setter + def offset(self, offset): + """Sets the offset of this ShowMessagesRequest. + + + :param offset: The offset of this ShowMessagesRequest. + :type: int + """ + self._offset = offset + + @property + def partition(self): + """Gets the partition of this ShowMessagesRequest. + + + :return: The partition of this ShowMessagesRequest. + :rtype: str + """ + return self._partition + + @partition.setter + def partition(self, partition): + """Sets the partition of this ShowMessagesRequest. + + + :param partition: The partition of this ShowMessagesRequest. + :type: str + """ + self._partition = partition + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowMessagesRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_messages_resp_messages.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_messages_resp_messages.py new file mode 100644 index 0000000000..3d8643cc62 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_messages_resp_messages.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowMessagesRespMessages: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'topic': 'str', + 'partition': 'int', + 'message_offset': 'int', + 'size': 'int' + } + + attribute_map = { + 'topic': 'topic', + 'partition': 'partition', + 'message_offset': 'message_offset', + 'size': 'size' + } + + def __init__(self, topic=None, partition=None, message_offset=None, size=None): + """ShowMessagesRespMessages - a model defined in huaweicloud sdk""" + + + + self._topic = None + self._partition = None + self._message_offset = None + self._size = None + self.discriminator = None + + if topic is not None: + self.topic = topic + if partition is not None: + self.partition = partition + if message_offset is not None: + self.message_offset = message_offset + if size is not None: + self.size = size + + @property + def topic(self): + """Gets the topic of this ShowMessagesRespMessages. + + topic名称。 + + :return: The topic of this ShowMessagesRespMessages. + :rtype: str + """ + return self._topic + + @topic.setter + def topic(self, topic): + """Sets the topic of this ShowMessagesRespMessages. + + topic名称。 + + :param topic: The topic of this ShowMessagesRespMessages. + :type: str + """ + self._topic = topic + + @property + def partition(self): + """Gets the partition of this ShowMessagesRespMessages. + + 分区编号。 + + :return: The partition of this ShowMessagesRespMessages. + :rtype: int + """ + return self._partition + + @partition.setter + def partition(self, partition): + """Sets the partition of this ShowMessagesRespMessages. + + 分区编号。 + + :param partition: The partition of this ShowMessagesRespMessages. + :type: int + """ + self._partition = partition + + @property + def message_offset(self): + """Gets the message_offset of this ShowMessagesRespMessages. + + 消息编号。 + + :return: The message_offset of this ShowMessagesRespMessages. + :rtype: int + """ + return self._message_offset + + @message_offset.setter + def message_offset(self, message_offset): + """Sets the message_offset of this ShowMessagesRespMessages. + + 消息编号。 + + :param message_offset: The message_offset of this ShowMessagesRespMessages. + :type: int + """ + self._message_offset = message_offset + + @property + def size(self): + """Gets the size of this ShowMessagesRespMessages. + + 消息大小,单位字节。 + + :return: The size of this ShowMessagesRespMessages. + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this ShowMessagesRespMessages. + + 消息大小,单位字节。 + + :param size: The size of this ShowMessagesRespMessages. + :type: int + """ + self._size = size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowMessagesRespMessages): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_messages_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_messages_response.py new file mode 100644 index 0000000000..cf0f4ab7d6 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_messages_response.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowMessagesResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'messages': 'list[ShowMessagesRespMessages]', + 'messages_count': 'int', + 'offsets_count': 'int', + 'offset': 'int' + } + + attribute_map = { + 'messages': 'messages', + 'messages_count': 'messages_count', + 'offsets_count': 'offsets_count', + 'offset': 'offset' + } + + def __init__(self, messages=None, messages_count=None, offsets_count=None, offset=None): + """ShowMessagesResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._messages = None + self._messages_count = None + self._offsets_count = None + self._offset = None + self.discriminator = None + + if messages is not None: + self.messages = messages + if messages_count is not None: + self.messages_count = messages_count + if offsets_count is not None: + self.offsets_count = offsets_count + if offset is not None: + self.offset = offset + + @property + def messages(self): + """Gets the messages of this ShowMessagesResponse. + + 消息列表。 + + :return: The messages of this ShowMessagesResponse. + :rtype: list[ShowMessagesRespMessages] + """ + return self._messages + + @messages.setter + def messages(self, messages): + """Sets the messages of this ShowMessagesResponse. + + 消息列表。 + + :param messages: The messages of this ShowMessagesResponse. + :type: list[ShowMessagesRespMessages] + """ + self._messages = messages + + @property + def messages_count(self): + """Gets the messages_count of this ShowMessagesResponse. + + 消息总数。 + + :return: The messages_count of this ShowMessagesResponse. + :rtype: int + """ + return self._messages_count + + @messages_count.setter + def messages_count(self, messages_count): + """Sets the messages_count of this ShowMessagesResponse. + + 消息总数。 + + :param messages_count: The messages_count of this ShowMessagesResponse. + :type: int + """ + self._messages_count = messages_count + + @property + def offsets_count(self): + """Gets the offsets_count of this ShowMessagesResponse. + + 总页数。 + + :return: The offsets_count of this ShowMessagesResponse. + :rtype: int + """ + return self._offsets_count + + @offsets_count.setter + def offsets_count(self, offsets_count): + """Sets the offsets_count of this ShowMessagesResponse. + + 总页数。 + + :param offsets_count: The offsets_count of this ShowMessagesResponse. + :type: int + """ + self._offsets_count = offsets_count + + @property + def offset(self): + """Gets the offset of this ShowMessagesResponse. + + 当前页数。 + + :return: The offset of this ShowMessagesResponse. + :rtype: int + """ + return self._offset + + @offset.setter + def offset(self, offset): + """Sets the offset of this ShowMessagesResponse. + + 当前页数。 + + :param offset: The offset of this ShowMessagesResponse. + :type: int + """ + self._offset = offset + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowMessagesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_beginning_message_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_beginning_message_request.py new file mode 100644 index 0000000000..de7154ffd3 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_beginning_message_request.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowPartitionBeginningMessageRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'topic': 'str', + 'partition': 'int' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'topic': 'topic', + 'partition': 'partition' + } + + def __init__(self, instance_id=None, topic=None, partition=None): + """ShowPartitionBeginningMessageRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._topic = None + self._partition = None + self.discriminator = None + + self.instance_id = instance_id + self.topic = topic + self.partition = partition + + @property + def instance_id(self): + """Gets the instance_id of this ShowPartitionBeginningMessageRequest. + + + :return: The instance_id of this ShowPartitionBeginningMessageRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowPartitionBeginningMessageRequest. + + + :param instance_id: The instance_id of this ShowPartitionBeginningMessageRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def topic(self): + """Gets the topic of this ShowPartitionBeginningMessageRequest. + + + :return: The topic of this ShowPartitionBeginningMessageRequest. + :rtype: str + """ + return self._topic + + @topic.setter + def topic(self, topic): + """Sets the topic of this ShowPartitionBeginningMessageRequest. + + + :param topic: The topic of this ShowPartitionBeginningMessageRequest. + :type: str + """ + self._topic = topic + + @property + def partition(self): + """Gets the partition of this ShowPartitionBeginningMessageRequest. + + + :return: The partition of this ShowPartitionBeginningMessageRequest. + :rtype: int + """ + return self._partition + + @partition.setter + def partition(self, partition): + """Sets the partition of this ShowPartitionBeginningMessageRequest. + + + :param partition: The partition of this ShowPartitionBeginningMessageRequest. + :type: int + """ + self._partition = partition + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowPartitionBeginningMessageRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_beginning_message_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_beginning_message_response.py new file mode 100644 index 0000000000..799d3e6b2e --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_beginning_message_response.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowPartitionBeginningMessageResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'topic': 'str', + 'partition': 'int', + 'message_offset': 'int' + } + + attribute_map = { + 'topic': 'topic', + 'partition': 'partition', + 'message_offset': 'message_offset' + } + + def __init__(self, topic=None, partition=None, message_offset=None): + """ShowPartitionBeginningMessageResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._topic = None + self._partition = None + self._message_offset = None + self.discriminator = None + + if topic is not None: + self.topic = topic + if partition is not None: + self.partition = partition + if message_offset is not None: + self.message_offset = message_offset + + @property + def topic(self): + """Gets the topic of this ShowPartitionBeginningMessageResponse. + + Topic名称。 + + :return: The topic of this ShowPartitionBeginningMessageResponse. + :rtype: str + """ + return self._topic + + @topic.setter + def topic(self, topic): + """Sets the topic of this ShowPartitionBeginningMessageResponse. + + Topic名称。 + + :param topic: The topic of this ShowPartitionBeginningMessageResponse. + :type: str + """ + self._topic = topic + + @property + def partition(self): + """Gets the partition of this ShowPartitionBeginningMessageResponse. + + 分区编号。 + + :return: The partition of this ShowPartitionBeginningMessageResponse. + :rtype: int + """ + return self._partition + + @partition.setter + def partition(self, partition): + """Sets the partition of this ShowPartitionBeginningMessageResponse. + + 分区编号。 + + :param partition: The partition of this ShowPartitionBeginningMessageResponse. + :type: int + """ + self._partition = partition + + @property + def message_offset(self): + """Gets the message_offset of this ShowPartitionBeginningMessageResponse. + + 最新消息位置。 + + :return: The message_offset of this ShowPartitionBeginningMessageResponse. + :rtype: int + """ + return self._message_offset + + @message_offset.setter + def message_offset(self, message_offset): + """Sets the message_offset of this ShowPartitionBeginningMessageResponse. + + 最新消息位置。 + + :param message_offset: The message_offset of this ShowPartitionBeginningMessageResponse. + :type: int + """ + self._message_offset = message_offset + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowPartitionBeginningMessageResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_end_message_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_end_message_request.py new file mode 100644 index 0000000000..df9f8d4929 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_end_message_request.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowPartitionEndMessageRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'topic': 'str', + 'partition': 'int' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'topic': 'topic', + 'partition': 'partition' + } + + def __init__(self, instance_id=None, topic=None, partition=None): + """ShowPartitionEndMessageRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._topic = None + self._partition = None + self.discriminator = None + + self.instance_id = instance_id + self.topic = topic + self.partition = partition + + @property + def instance_id(self): + """Gets the instance_id of this ShowPartitionEndMessageRequest. + + + :return: The instance_id of this ShowPartitionEndMessageRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowPartitionEndMessageRequest. + + + :param instance_id: The instance_id of this ShowPartitionEndMessageRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def topic(self): + """Gets the topic of this ShowPartitionEndMessageRequest. + + + :return: The topic of this ShowPartitionEndMessageRequest. + :rtype: str + """ + return self._topic + + @topic.setter + def topic(self, topic): + """Sets the topic of this ShowPartitionEndMessageRequest. + + + :param topic: The topic of this ShowPartitionEndMessageRequest. + :type: str + """ + self._topic = topic + + @property + def partition(self): + """Gets the partition of this ShowPartitionEndMessageRequest. + + + :return: The partition of this ShowPartitionEndMessageRequest. + :rtype: int + """ + return self._partition + + @partition.setter + def partition(self, partition): + """Sets the partition of this ShowPartitionEndMessageRequest. + + + :param partition: The partition of this ShowPartitionEndMessageRequest. + :type: int + """ + self._partition = partition + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowPartitionEndMessageRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_end_message_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_end_message_response.py new file mode 100644 index 0000000000..757fb3dd3e --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_end_message_response.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowPartitionEndMessageResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'topic': 'str', + 'partition': 'int', + 'message_offset': 'int' + } + + attribute_map = { + 'topic': 'topic', + 'partition': 'partition', + 'message_offset': 'message_offset' + } + + def __init__(self, topic=None, partition=None, message_offset=None): + """ShowPartitionEndMessageResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._topic = None + self._partition = None + self._message_offset = None + self.discriminator = None + + if topic is not None: + self.topic = topic + if partition is not None: + self.partition = partition + if message_offset is not None: + self.message_offset = message_offset + + @property + def topic(self): + """Gets the topic of this ShowPartitionEndMessageResponse. + + Topic名称。 + + :return: The topic of this ShowPartitionEndMessageResponse. + :rtype: str + """ + return self._topic + + @topic.setter + def topic(self, topic): + """Sets the topic of this ShowPartitionEndMessageResponse. + + Topic名称。 + + :param topic: The topic of this ShowPartitionEndMessageResponse. + :type: str + """ + self._topic = topic + + @property + def partition(self): + """Gets the partition of this ShowPartitionEndMessageResponse. + + 分区编号。 + + :return: The partition of this ShowPartitionEndMessageResponse. + :rtype: int + """ + return self._partition + + @partition.setter + def partition(self, partition): + """Sets the partition of this ShowPartitionEndMessageResponse. + + 分区编号。 + + :param partition: The partition of this ShowPartitionEndMessageResponse. + :type: int + """ + self._partition = partition + + @property + def message_offset(self): + """Gets the message_offset of this ShowPartitionEndMessageResponse. + + 最新消息位置。 + + :return: The message_offset of this ShowPartitionEndMessageResponse. + :rtype: int + """ + return self._message_offset + + @message_offset.setter + def message_offset(self, message_offset): + """Sets the message_offset of this ShowPartitionEndMessageResponse. + + 最新消息位置。 + + :param message_offset: The message_offset of this ShowPartitionEndMessageResponse. + :type: int + """ + self._message_offset = message_offset + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowPartitionEndMessageResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_message_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_message_request.py new file mode 100644 index 0000000000..a536b64dde --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_message_request.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowPartitionMessageRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'topic': 'str', + 'partition': 'int', + 'message_offset': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'topic': 'topic', + 'partition': 'partition', + 'message_offset': 'message_offset' + } + + def __init__(self, instance_id=None, topic=None, partition=None, message_offset=None): + """ShowPartitionMessageRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._topic = None + self._partition = None + self._message_offset = None + self.discriminator = None + + self.instance_id = instance_id + self.topic = topic + self.partition = partition + self.message_offset = message_offset + + @property + def instance_id(self): + """Gets the instance_id of this ShowPartitionMessageRequest. + + + :return: The instance_id of this ShowPartitionMessageRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowPartitionMessageRequest. + + + :param instance_id: The instance_id of this ShowPartitionMessageRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def topic(self): + """Gets the topic of this ShowPartitionMessageRequest. + + + :return: The topic of this ShowPartitionMessageRequest. + :rtype: str + """ + return self._topic + + @topic.setter + def topic(self, topic): + """Sets the topic of this ShowPartitionMessageRequest. + + + :param topic: The topic of this ShowPartitionMessageRequest. + :type: str + """ + self._topic = topic + + @property + def partition(self): + """Gets the partition of this ShowPartitionMessageRequest. + + + :return: The partition of this ShowPartitionMessageRequest. + :rtype: int + """ + return self._partition + + @partition.setter + def partition(self, partition): + """Sets the partition of this ShowPartitionMessageRequest. + + + :param partition: The partition of this ShowPartitionMessageRequest. + :type: int + """ + self._partition = partition + + @property + def message_offset(self): + """Gets the message_offset of this ShowPartitionMessageRequest. + + + :return: The message_offset of this ShowPartitionMessageRequest. + :rtype: str + """ + return self._message_offset + + @message_offset.setter + def message_offset(self, message_offset): + """Sets the message_offset of this ShowPartitionMessageRequest. + + + :param message_offset: The message_offset of this ShowPartitionMessageRequest. + :type: str + """ + self._message_offset = message_offset + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowPartitionMessageRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_message_resp_message.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_message_resp_message.py new file mode 100644 index 0000000000..677bbdd8b1 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_message_resp_message.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowPartitionMessageRespMessage: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'key': 'str', + 'value': 'str', + 'topic': 'str', + 'partition': 'int', + 'message_offset': 'int', + 'size': 'int' + } + + attribute_map = { + 'key': 'key', + 'value': 'value', + 'topic': 'topic', + 'partition': 'partition', + 'message_offset': 'message_offset', + 'size': 'size' + } + + def __init__(self, key=None, value=None, topic=None, partition=None, message_offset=None, size=None): + """ShowPartitionMessageRespMessage - a model defined in huaweicloud sdk""" + + + + self._key = None + self._value = None + self._topic = None + self._partition = None + self._message_offset = None + self._size = None + self.discriminator = None + + if key is not None: + self.key = key + if value is not None: + self.value = value + if topic is not None: + self.topic = topic + if partition is not None: + self.partition = partition + if message_offset is not None: + self.message_offset = message_offset + if size is not None: + self.size = size + + @property + def key(self): + """Gets the key of this ShowPartitionMessageRespMessage. + + 消息的key。 + + :return: The key of this ShowPartitionMessageRespMessage. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this ShowPartitionMessageRespMessage. + + 消息的key。 + + :param key: The key of this ShowPartitionMessageRespMessage. + :type: str + """ + self._key = key + + @property + def value(self): + """Gets the value of this ShowPartitionMessageRespMessage. + + 消息内容。 + + :return: The value of this ShowPartitionMessageRespMessage. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this ShowPartitionMessageRespMessage. + + 消息内容。 + + :param value: The value of this ShowPartitionMessageRespMessage. + :type: str + """ + self._value = value + + @property + def topic(self): + """Gets the topic of this ShowPartitionMessageRespMessage. + + Topic名称。 + + :return: The topic of this ShowPartitionMessageRespMessage. + :rtype: str + """ + return self._topic + + @topic.setter + def topic(self, topic): + """Sets the topic of this ShowPartitionMessageRespMessage. + + Topic名称。 + + :param topic: The topic of this ShowPartitionMessageRespMessage. + :type: str + """ + self._topic = topic + + @property + def partition(self): + """Gets the partition of this ShowPartitionMessageRespMessage. + + 分区编号。 + + :return: The partition of this ShowPartitionMessageRespMessage. + :rtype: int + """ + return self._partition + + @partition.setter + def partition(self, partition): + """Sets the partition of this ShowPartitionMessageRespMessage. + + 分区编号。 + + :param partition: The partition of this ShowPartitionMessageRespMessage. + :type: int + """ + self._partition = partition + + @property + def message_offset(self): + """Gets the message_offset of this ShowPartitionMessageRespMessage. + + 消息位置。 + + :return: The message_offset of this ShowPartitionMessageRespMessage. + :rtype: int + """ + return self._message_offset + + @message_offset.setter + def message_offset(self, message_offset): + """Sets the message_offset of this ShowPartitionMessageRespMessage. + + 消息位置。 + + :param message_offset: The message_offset of this ShowPartitionMessageRespMessage. + :type: int + """ + self._message_offset = message_offset + + @property + def size(self): + """Gets the size of this ShowPartitionMessageRespMessage. + + 消息大小,单位字节。 + + :return: The size of this ShowPartitionMessageRespMessage. + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this ShowPartitionMessageRespMessage. + + 消息大小,单位字节。 + + :param size: The size of this ShowPartitionMessageRespMessage. + :type: int + """ + self._size = size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowPartitionMessageRespMessage): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_message_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_message_response.py new file mode 100644 index 0000000000..0d05821c50 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_partition_message_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowPartitionMessageResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'message': 'list[ShowPartitionMessageRespMessage]' + } + + attribute_map = { + 'message': 'message' + } + + def __init__(self, message=None): + """ShowPartitionMessageResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._message = None + self.discriminator = None + + if message is not None: + self.message = message + + @property + def message(self): + """Gets the message of this ShowPartitionMessageResponse. + + 消息列表。 + + :return: The message of this ShowPartitionMessageResponse. + :rtype: list[ShowPartitionMessageRespMessage] + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ShowPartitionMessageResponse. + + 消息列表。 + + :param message: The message of this ShowPartitionMessageResponse. + :type: list[ShowPartitionMessageRespMessage] + """ + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowPartitionMessageResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_project_tags_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_project_tags_request.py new file mode 100644 index 0000000000..3f2168564d --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_project_tags_request.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowProjectTagsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ShowProjectTagsRequest - a model defined in huaweicloud sdk""" + + + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowProjectTagsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_project_tags_resp_tags.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_project_tags_resp_tags.py new file mode 100644 index 0000000000..ab06ac5b23 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_project_tags_resp_tags.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowProjectTagsRespTags: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'key': 'str', + 'values': 'list[str]' + } + + attribute_map = { + 'key': 'key', + 'values': 'values' + } + + def __init__(self, key=None, values=None): + """ShowProjectTagsRespTags - a model defined in huaweicloud sdk""" + + + + self._key = None + self._values = None + self.discriminator = None + + if key is not None: + self.key = key + if values is not None: + self.values = values + + @property + def key(self): + """Gets the key of this ShowProjectTagsRespTags. + + 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :return: The key of this ShowProjectTagsRespTags. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this ShowProjectTagsRespTags. + + 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :param key: The key of this ShowProjectTagsRespTags. + :type: str + """ + self._key = key + + @property + def values(self): + """Gets the values of this ShowProjectTagsRespTags. + + 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :return: The values of this ShowProjectTagsRespTags. + :rtype: list[str] + """ + return self._values + + @values.setter + def values(self, values): + """Sets the values of this ShowProjectTagsRespTags. + + 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :param values: The values of this ShowProjectTagsRespTags. + :type: list[str] + """ + self._values = values + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowProjectTagsRespTags): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_project_tags_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_project_tags_response.py new file mode 100644 index 0000000000..836a7b7950 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_project_tags_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowProjectTagsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'tags': 'list[ShowProjectTagsRespTags]' + } + + attribute_map = { + 'tags': 'tags' + } + + def __init__(self, tags=None): + """ShowProjectTagsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._tags = None + self.discriminator = None + + if tags is not None: + self.tags = tags + + @property + def tags(self): + """Gets the tags of this ShowProjectTagsResponse. + + 标签列表 + + :return: The tags of this ShowProjectTagsResponse. + :rtype: list[ShowProjectTagsRespTags] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this ShowProjectTagsResponse. + + 标签列表 + + :param tags: The tags of this ShowProjectTagsResponse. + :type: list[ShowProjectTagsRespTags] + """ + self._tags = tags + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowProjectTagsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_sink_task_detail_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_sink_task_detail_request.py new file mode 100644 index 0000000000..3182b2ef3d --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_sink_task_detail_request.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowSinkTaskDetailRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'connector_id': 'str', + 'task_id': 'str' + } + + attribute_map = { + 'connector_id': 'connector_id', + 'task_id': 'task_id' + } + + def __init__(self, connector_id=None, task_id=None): + """ShowSinkTaskDetailRequest - a model defined in huaweicloud sdk""" + + + + self._connector_id = None + self._task_id = None + self.discriminator = None + + self.connector_id = connector_id + self.task_id = task_id + + @property + def connector_id(self): + """Gets the connector_id of this ShowSinkTaskDetailRequest. + + + :return: The connector_id of this ShowSinkTaskDetailRequest. + :rtype: str + """ + return self._connector_id + + @connector_id.setter + def connector_id(self, connector_id): + """Sets the connector_id of this ShowSinkTaskDetailRequest. + + + :param connector_id: The connector_id of this ShowSinkTaskDetailRequest. + :type: str + """ + self._connector_id = connector_id + + @property + def task_id(self): + """Gets the task_id of this ShowSinkTaskDetailRequest. + + + :return: The task_id of this ShowSinkTaskDetailRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ShowSinkTaskDetailRequest. + + + :param task_id: The task_id of this ShowSinkTaskDetailRequest. + :type: str + """ + self._task_id = task_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowSinkTaskDetailRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_sink_task_detail_resp_obs_destination_descriptor.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_sink_task_detail_resp_obs_destination_descriptor.py new file mode 100644 index 0000000000..c01fd1ee0d --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_sink_task_detail_resp_obs_destination_descriptor.py @@ -0,0 +1,299 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowSinkTaskDetailRespObsDestinationDescriptor: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'consumer_strategy': 'str', + 'destination_file_type': 'str', + 'obs_bucket_name': 'str', + 'obs_path': 'str', + 'partition_format': 'str', + 'record_delimiter': 'str', + 'deliver_time_interval': 'str', + 'obs_part_size': 'str' + } + + attribute_map = { + 'consumer_strategy': 'consumer_strategy', + 'destination_file_type': 'destination_file_type', + 'obs_bucket_name': 'obs_bucket_name', + 'obs_path': 'obs_path', + 'partition_format': 'partition_format', + 'record_delimiter': 'record_delimiter', + 'deliver_time_interval': 'deliver_time_interval', + 'obs_part_size': 'obs_part_size' + } + + def __init__(self, consumer_strategy=None, destination_file_type=None, obs_bucket_name=None, obs_path=None, partition_format=None, record_delimiter=None, deliver_time_interval=None, obs_part_size=None): + """ShowSinkTaskDetailRespObsDestinationDescriptor - a model defined in huaweicloud sdk""" + + + + self._consumer_strategy = None + self._destination_file_type = None + self._obs_bucket_name = None + self._obs_path = None + self._partition_format = None + self._record_delimiter = None + self._deliver_time_interval = None + self._obs_part_size = None + self.discriminator = None + + if consumer_strategy is not None: + self.consumer_strategy = consumer_strategy + if destination_file_type is not None: + self.destination_file_type = destination_file_type + if obs_bucket_name is not None: + self.obs_bucket_name = obs_bucket_name + if obs_path is not None: + self.obs_path = obs_path + if partition_format is not None: + self.partition_format = partition_format + if record_delimiter is not None: + self.record_delimiter = record_delimiter + if deliver_time_interval is not None: + self.deliver_time_interval = deliver_time_interval + if obs_part_size is not None: + self.obs_part_size = obs_part_size + + @property + def consumer_strategy(self): + """Gets the consumer_strategy of this ShowSinkTaskDetailRespObsDestinationDescriptor. + + 消费启动策略: - latest:从Topic最后端开始消费。 - earliest: 从Topic最前端消息开始消费。 默认是latest。 + + :return: The consumer_strategy of this ShowSinkTaskDetailRespObsDestinationDescriptor. + :rtype: str + """ + return self._consumer_strategy + + @consumer_strategy.setter + def consumer_strategy(self, consumer_strategy): + """Sets the consumer_strategy of this ShowSinkTaskDetailRespObsDestinationDescriptor. + + 消费启动策略: - latest:从Topic最后端开始消费。 - earliest: 从Topic最前端消息开始消费。 默认是latest。 + + :param consumer_strategy: The consumer_strategy of this ShowSinkTaskDetailRespObsDestinationDescriptor. + :type: str + """ + self._consumer_strategy = consumer_strategy + + @property + def destination_file_type(self): + """Gets the destination_file_type of this ShowSinkTaskDetailRespObsDestinationDescriptor. + + 转储文件格式。目前只支持text格式。 + + :return: The destination_file_type of this ShowSinkTaskDetailRespObsDestinationDescriptor. + :rtype: str + """ + return self._destination_file_type + + @destination_file_type.setter + def destination_file_type(self, destination_file_type): + """Sets the destination_file_type of this ShowSinkTaskDetailRespObsDestinationDescriptor. + + 转储文件格式。目前只支持text格式。 + + :param destination_file_type: The destination_file_type of this ShowSinkTaskDetailRespObsDestinationDescriptor. + :type: str + """ + self._destination_file_type = destination_file_type + + @property + def obs_bucket_name(self): + """Gets the obs_bucket_name of this ShowSinkTaskDetailRespObsDestinationDescriptor. + + 存储该通道数据的OBS桶名称。 + + :return: The obs_bucket_name of this ShowSinkTaskDetailRespObsDestinationDescriptor. + :rtype: str + """ + return self._obs_bucket_name + + @obs_bucket_name.setter + def obs_bucket_name(self, obs_bucket_name): + """Sets the obs_bucket_name of this ShowSinkTaskDetailRespObsDestinationDescriptor. + + 存储该通道数据的OBS桶名称。 + + :param obs_bucket_name: The obs_bucket_name of this ShowSinkTaskDetailRespObsDestinationDescriptor. + :type: str + """ + self._obs_bucket_name = obs_bucket_name + + @property + def obs_path(self): + """Gets the obs_path of this ShowSinkTaskDetailRespObsDestinationDescriptor. + + 存储在obs的路径。 + + :return: The obs_path of this ShowSinkTaskDetailRespObsDestinationDescriptor. + :rtype: str + """ + return self._obs_path + + @obs_path.setter + def obs_path(self, obs_path): + """Sets the obs_path of this ShowSinkTaskDetailRespObsDestinationDescriptor. + + 存储在obs的路径。 + + :param obs_path: The obs_path of this ShowSinkTaskDetailRespObsDestinationDescriptor. + :type: str + """ + self._obs_path = obs_path + + @property + def partition_format(self): + """Gets the partition_format of this ShowSinkTaskDetailRespObsDestinationDescriptor. + + 将转储文件的生成时间使用“yyyy/MM/dd/HH/mm”格式生成分区字符串,用来定义写到OBS的Object文件所在的目录层次结构。 - N/A:置空,不使用日期时间目录。 - yyyy:年 - yyyy/MM:年/月 - yyyy/MM/dd:年/月/日 - yyyy/MM/dd/HH:年/月/日/时 - yyyy/MM/dd/HH/mm:年/月/日/时/分,例如:2017/11/10/14/49,目录结构就是“2017 > 11 > 10 > 14 > 49”,“2017”表示最外层文件夹。 默认值:空 > 数据转储成功后,存储的目录结构为“obs_bucket_path/file_prefix/partition_format”。默认时间是GMT+8 时间 + + :return: The partition_format of this ShowSinkTaskDetailRespObsDestinationDescriptor. + :rtype: str + """ + return self._partition_format + + @partition_format.setter + def partition_format(self, partition_format): + """Sets the partition_format of this ShowSinkTaskDetailRespObsDestinationDescriptor. + + 将转储文件的生成时间使用“yyyy/MM/dd/HH/mm”格式生成分区字符串,用来定义写到OBS的Object文件所在的目录层次结构。 - N/A:置空,不使用日期时间目录。 - yyyy:年 - yyyy/MM:年/月 - yyyy/MM/dd:年/月/日 - yyyy/MM/dd/HH:年/月/日/时 - yyyy/MM/dd/HH/mm:年/月/日/时/分,例如:2017/11/10/14/49,目录结构就是“2017 > 11 > 10 > 14 > 49”,“2017”表示最外层文件夹。 默认值:空 > 数据转储成功后,存储的目录结构为“obs_bucket_path/file_prefix/partition_format”。默认时间是GMT+8 时间 + + :param partition_format: The partition_format of this ShowSinkTaskDetailRespObsDestinationDescriptor. + :type: str + """ + self._partition_format = partition_format + + @property + def record_delimiter(self): + """Gets the record_delimiter of this ShowSinkTaskDetailRespObsDestinationDescriptor. + + 转储文件的记录分隔符,用于分隔写入转储文件的用户数据。 取值范围: - 逗号“,” - 分号“;” - 竖线“|” - 换行符“\\n” - NULL 默认值:换行符“\\n”。 + + :return: The record_delimiter of this ShowSinkTaskDetailRespObsDestinationDescriptor. + :rtype: str + """ + return self._record_delimiter + + @record_delimiter.setter + def record_delimiter(self, record_delimiter): + """Sets the record_delimiter of this ShowSinkTaskDetailRespObsDestinationDescriptor. + + 转储文件的记录分隔符,用于分隔写入转储文件的用户数据。 取值范围: - 逗号“,” - 分号“;” - 竖线“|” - 换行符“\\n” - NULL 默认值:换行符“\\n”。 + + :param record_delimiter: The record_delimiter of this ShowSinkTaskDetailRespObsDestinationDescriptor. + :type: str + """ + self._record_delimiter = record_delimiter + + @property + def deliver_time_interval(self): + """Gets the deliver_time_interval of this ShowSinkTaskDetailRespObsDestinationDescriptor. + + 根据用户配置的时间,周期性的将数据导入OBS,若某个时间段内无数据,则此时间段不会生成打包文件。 取值范围:30~900 缺省值:300 单位:秒。 > 使用OBS通道转储流式数据时该参数为必选配置。 + + :return: The deliver_time_interval of this ShowSinkTaskDetailRespObsDestinationDescriptor. + :rtype: str + """ + return self._deliver_time_interval + + @deliver_time_interval.setter + def deliver_time_interval(self, deliver_time_interval): + """Sets the deliver_time_interval of this ShowSinkTaskDetailRespObsDestinationDescriptor. + + 根据用户配置的时间,周期性的将数据导入OBS,若某个时间段内无数据,则此时间段不会生成打包文件。 取值范围:30~900 缺省值:300 单位:秒。 > 使用OBS通道转储流式数据时该参数为必选配置。 + + :param deliver_time_interval: The deliver_time_interval of this ShowSinkTaskDetailRespObsDestinationDescriptor. + :type: str + """ + self._deliver_time_interval = deliver_time_interval + + @property + def obs_part_size(self): + """Gets the obs_part_size of this ShowSinkTaskDetailRespObsDestinationDescriptor. + + 每个传输文件多大后就开始上传,单位为byte。 默认值5242880。 + + :return: The obs_part_size of this ShowSinkTaskDetailRespObsDestinationDescriptor. + :rtype: str + """ + return self._obs_part_size + + @obs_part_size.setter + def obs_part_size(self, obs_part_size): + """Sets the obs_part_size of this ShowSinkTaskDetailRespObsDestinationDescriptor. + + 每个传输文件多大后就开始上传,单位为byte。 默认值5242880。 + + :param obs_part_size: The obs_part_size of this ShowSinkTaskDetailRespObsDestinationDescriptor. + :type: str + """ + self._obs_part_size = obs_part_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowSinkTaskDetailRespObsDestinationDescriptor): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_sink_task_detail_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_sink_task_detail_response.py new file mode 100644 index 0000000000..dfca16b1d5 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/show_sink_task_detail_response.py @@ -0,0 +1,243 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowSinkTaskDetailResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'task_name': 'str', + 'destination_type': 'str', + 'create_time': 'str', + 'status': 'str', + 'topics': 'str', + 'obs_destination_descriptor': 'ShowSinkTaskDetailRespObsDestinationDescriptor' + } + + attribute_map = { + 'task_name': 'task_name', + 'destination_type': 'destination_type', + 'create_time': 'create_time', + 'status': 'status', + 'topics': 'topics', + 'obs_destination_descriptor': 'obs_destination_descriptor' + } + + def __init__(self, task_name=None, destination_type=None, create_time=None, status=None, topics=None, obs_destination_descriptor=None): + """ShowSinkTaskDetailResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._task_name = None + self._destination_type = None + self._create_time = None + self._status = None + self._topics = None + self._obs_destination_descriptor = None + self.discriminator = None + + if task_name is not None: + self.task_name = task_name + if destination_type is not None: + self.destination_type = destination_type + if create_time is not None: + self.create_time = create_time + if status is not None: + self.status = status + if topics is not None: + self.topics = topics + if obs_destination_descriptor is not None: + self.obs_destination_descriptor = obs_destination_descriptor + + @property + def task_name(self): + """Gets the task_name of this ShowSinkTaskDetailResponse. + + 转储任务名称。 + + :return: The task_name of this ShowSinkTaskDetailResponse. + :rtype: str + """ + return self._task_name + + @task_name.setter + def task_name(self, task_name): + """Sets the task_name of this ShowSinkTaskDetailResponse. + + 转储任务名称。 + + :param task_name: The task_name of this ShowSinkTaskDetailResponse. + :type: str + """ + self._task_name = task_name + + @property + def destination_type(self): + """Gets the destination_type of this ShowSinkTaskDetailResponse. + + 转储任务类型。 + + :return: The destination_type of this ShowSinkTaskDetailResponse. + :rtype: str + """ + return self._destination_type + + @destination_type.setter + def destination_type(self, destination_type): + """Sets the destination_type of this ShowSinkTaskDetailResponse. + + 转储任务类型。 + + :param destination_type: The destination_type of this ShowSinkTaskDetailResponse. + :type: str + """ + self._destination_type = destination_type + + @property + def create_time(self): + """Gets the create_time of this ShowSinkTaskDetailResponse. + + 转储任务创建时间戳。 + + :return: The create_time of this ShowSinkTaskDetailResponse. + :rtype: str + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this ShowSinkTaskDetailResponse. + + 转储任务创建时间戳。 + + :param create_time: The create_time of this ShowSinkTaskDetailResponse. + :type: str + """ + self._create_time = create_time + + @property + def status(self): + """Gets the status of this ShowSinkTaskDetailResponse. + + 转储任务状态。 + + :return: The status of this ShowSinkTaskDetailResponse. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ShowSinkTaskDetailResponse. + + 转储任务状态。 + + :param status: The status of this ShowSinkTaskDetailResponse. + :type: str + """ + self._status = status + + @property + def topics(self): + """Gets the topics of this ShowSinkTaskDetailResponse. + + 返回任务转存的topics列表或者正则表达式。 + + :return: The topics of this ShowSinkTaskDetailResponse. + :rtype: str + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this ShowSinkTaskDetailResponse. + + 返回任务转存的topics列表或者正则表达式。 + + :param topics: The topics of this ShowSinkTaskDetailResponse. + :type: str + """ + self._topics = topics + + @property + def obs_destination_descriptor(self): + """Gets the obs_destination_descriptor of this ShowSinkTaskDetailResponse. + + + :return: The obs_destination_descriptor of this ShowSinkTaskDetailResponse. + :rtype: ShowSinkTaskDetailRespObsDestinationDescriptor + """ + return self._obs_destination_descriptor + + @obs_destination_descriptor.setter + def obs_destination_descriptor(self, obs_destination_descriptor): + """Sets the obs_destination_descriptor of this ShowSinkTaskDetailResponse. + + + :param obs_destination_descriptor: The obs_destination_descriptor of this ShowSinkTaskDetailResponse. + :type: ShowSinkTaskDetailRespObsDestinationDescriptor + """ + self._obs_destination_descriptor = obs_destination_descriptor + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowSinkTaskDetailResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_auto_create_topic_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_auto_create_topic_req.py new file mode 100644 index 0000000000..0c5868a3b1 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_auto_create_topic_req.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdateInstanceAutoCreateTopicReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'enable_auto_topic': 'bool' + } + + attribute_map = { + 'enable_auto_topic': 'enable_auto_topic' + } + + def __init__(self, enable_auto_topic=None): + """UpdateInstanceAutoCreateTopicReq - a model defined in huaweicloud sdk""" + + + + self._enable_auto_topic = None + self.discriminator = None + + self.enable_auto_topic = enable_auto_topic + + @property + def enable_auto_topic(self): + """Gets the enable_auto_topic of this UpdateInstanceAutoCreateTopicReq. + + 是否开启自动创建topic功能。 + + :return: The enable_auto_topic of this UpdateInstanceAutoCreateTopicReq. + :rtype: bool + """ + return self._enable_auto_topic + + @enable_auto_topic.setter + def enable_auto_topic(self, enable_auto_topic): + """Sets the enable_auto_topic of this UpdateInstanceAutoCreateTopicReq. + + 是否开启自动创建topic功能。 + + :param enable_auto_topic: The enable_auto_topic of this UpdateInstanceAutoCreateTopicReq. + :type: bool + """ + self._enable_auto_topic = enable_auto_topic + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceAutoCreateTopicReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_auto_create_topic_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_auto_create_topic_request.py new file mode 100644 index 0000000000..7b8354e6e5 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_auto_create_topic_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdateInstanceAutoCreateTopicRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'body': 'UpdateInstanceAutoCreateTopicReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'body': 'body' + } + + def __init__(self, instance_id=None, body=None): + """UpdateInstanceAutoCreateTopicRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this UpdateInstanceAutoCreateTopicRequest. + + + :return: The instance_id of this UpdateInstanceAutoCreateTopicRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this UpdateInstanceAutoCreateTopicRequest. + + + :param instance_id: The instance_id of this UpdateInstanceAutoCreateTopicRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def body(self): + """Gets the body of this UpdateInstanceAutoCreateTopicRequest. + + + :return: The body of this UpdateInstanceAutoCreateTopicRequest. + :rtype: UpdateInstanceAutoCreateTopicReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this UpdateInstanceAutoCreateTopicRequest. + + + :param body: The body of this UpdateInstanceAutoCreateTopicRequest. + :type: UpdateInstanceAutoCreateTopicReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceAutoCreateTopicRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_auto_create_topic_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_auto_create_topic_response.py new file mode 100644 index 0000000000..efb0535f0f --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_auto_create_topic_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class UpdateInstanceAutoCreateTopicResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """UpdateInstanceAutoCreateTopicResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceAutoCreateTopicResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_cross_vpcip_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_cross_vpcip_req.py new file mode 100644 index 0000000000..413037d846 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_cross_vpcip_req.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdateInstanceCrossVPCIPReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'advertised_ip_contents': 'dict(str, str)' + } + + attribute_map = { + 'advertised_ip_contents': 'advertised_ip_contents' + } + + def __init__(self, advertised_ip_contents=None): + """UpdateInstanceCrossVPCIPReq - a model defined in huaweicloud sdk""" + + + + self._advertised_ip_contents = None + self.discriminator = None + + self.advertised_ip_contents = advertised_ip_contents + + @property + def advertised_ip_contents(self): + """Gets the advertised_ip_contents of this UpdateInstanceCrossVPCIPReq. + + 用户自定义的advertised_ip_contents键值对。 键是listeners IP。 值是advertised.listeners IP,或者域名。 > IP修改未修改项也需填上。 + + :return: The advertised_ip_contents of this UpdateInstanceCrossVPCIPReq. + :rtype: dict(str, str) + """ + return self._advertised_ip_contents + + @advertised_ip_contents.setter + def advertised_ip_contents(self, advertised_ip_contents): + """Sets the advertised_ip_contents of this UpdateInstanceCrossVPCIPReq. + + 用户自定义的advertised_ip_contents键值对。 键是listeners IP。 值是advertised.listeners IP,或者域名。 > IP修改未修改项也需填上。 + + :param advertised_ip_contents: The advertised_ip_contents of this UpdateInstanceCrossVPCIPReq. + :type: dict(str, str) + """ + self._advertised_ip_contents = advertised_ip_contents + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceCrossVPCIPReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_cross_vpcip_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_cross_vpcip_request.py new file mode 100644 index 0000000000..206aea942a --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_cross_vpcip_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdateInstanceCrossVPCIPRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'body': 'UpdateInstanceCrossVPCIPReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'body': 'body' + } + + def __init__(self, instance_id=None, body=None): + """UpdateInstanceCrossVPCIPRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this UpdateInstanceCrossVPCIPRequest. + + + :return: The instance_id of this UpdateInstanceCrossVPCIPRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this UpdateInstanceCrossVPCIPRequest. + + + :param instance_id: The instance_id of this UpdateInstanceCrossVPCIPRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def body(self): + """Gets the body of this UpdateInstanceCrossVPCIPRequest. + + + :return: The body of this UpdateInstanceCrossVPCIPRequest. + :rtype: UpdateInstanceCrossVPCIPReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this UpdateInstanceCrossVPCIPRequest. + + + :param body: The body of this UpdateInstanceCrossVPCIPRequest. + :type: UpdateInstanceCrossVPCIPReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceCrossVPCIPRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_cross_vpcip_resp_results.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_cross_vpcip_resp_results.py new file mode 100644 index 0000000000..fd0bfb0fd1 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_cross_vpcip_resp_results.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdateInstanceCrossVPCIPRespResults: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'advertised_ip': 'str', + 'success': 'str', + 'ip': 'str' + } + + attribute_map = { + 'advertised_ip': 'advertised_ip', + 'success': 'success', + 'ip': 'ip' + } + + def __init__(self, advertised_ip=None, success=None, ip=None): + """UpdateInstanceCrossVPCIPRespResults - a model defined in huaweicloud sdk""" + + + + self._advertised_ip = None + self._success = None + self._ip = None + self.discriminator = None + + if advertised_ip is not None: + self.advertised_ip = advertised_ip + if success is not None: + self.success = success + if ip is not None: + self.ip = ip + + @property + def advertised_ip(self): + """Gets the advertised_ip of this UpdateInstanceCrossVPCIPRespResults. + + advertised.listeners IP/域名。 + + :return: The advertised_ip of this UpdateInstanceCrossVPCIPRespResults. + :rtype: str + """ + return self._advertised_ip + + @advertised_ip.setter + def advertised_ip(self, advertised_ip): + """Sets the advertised_ip of this UpdateInstanceCrossVPCIPRespResults. + + advertised.listeners IP/域名。 + + :param advertised_ip: The advertised_ip of this UpdateInstanceCrossVPCIPRespResults. + :type: str + """ + self._advertised_ip = advertised_ip + + @property + def success(self): + """Gets the success of this UpdateInstanceCrossVPCIPRespResults. + + 修改broker跨VPC访问的状态。 + + :return: The success of this UpdateInstanceCrossVPCIPRespResults. + :rtype: str + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this UpdateInstanceCrossVPCIPRespResults. + + 修改broker跨VPC访问的状态。 + + :param success: The success of this UpdateInstanceCrossVPCIPRespResults. + :type: str + """ + self._success = success + + @property + def ip(self): + """Gets the ip of this UpdateInstanceCrossVPCIPRespResults. + + listeners IP。 + + :return: The ip of this UpdateInstanceCrossVPCIPRespResults. + :rtype: str + """ + return self._ip + + @ip.setter + def ip(self, ip): + """Sets the ip of this UpdateInstanceCrossVPCIPRespResults. + + listeners IP。 + + :param ip: The ip of this UpdateInstanceCrossVPCIPRespResults. + :type: str + """ + self._ip = ip + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceCrossVPCIPRespResults): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_cross_vpcip_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_cross_vpcip_response.py new file mode 100644 index 0000000000..82ca49f1bc --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_cross_vpcip_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class UpdateInstanceCrossVPCIPResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'success': 'str', + 'results': 'list[UpdateInstanceCrossVPCIPRespResults]' + } + + attribute_map = { + 'success': 'success', + 'results': 'results' + } + + def __init__(self, success=None, results=None): + """UpdateInstanceCrossVPCIPResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._success = None + self._results = None + self.discriminator = None + + if success is not None: + self.success = success + if results is not None: + self.results = results + + @property + def success(self): + """Gets the success of this UpdateInstanceCrossVPCIPResponse. + + 修改跨VPC访问结果。 + + :return: The success of this UpdateInstanceCrossVPCIPResponse. + :rtype: str + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this UpdateInstanceCrossVPCIPResponse. + + 修改跨VPC访问结果。 + + :param success: The success of this UpdateInstanceCrossVPCIPResponse. + :type: str + """ + self._success = success + + @property + def results(self): + """Gets the results of this UpdateInstanceCrossVPCIPResponse. + + 修改broker跨VPC访问的结果列表。 + + :return: The results of this UpdateInstanceCrossVPCIPResponse. + :rtype: list[UpdateInstanceCrossVPCIPRespResults] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this UpdateInstanceCrossVPCIPResponse. + + 修改broker跨VPC访问的结果列表。 + + :param results: The results of this UpdateInstanceCrossVPCIPResponse. + :type: list[UpdateInstanceCrossVPCIPRespResults] + """ + self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceCrossVPCIPResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_req.py new file mode 100644 index 0000000000..8549e949a8 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_req.py @@ -0,0 +1,272 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdateInstanceReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'description': 'str', + 'maintain_begin': 'str', + 'maintain_end': 'str', + 'security_group_id': 'str', + 'retention_policy': 'str', + 'enterprise_project_id': 'str' + } + + attribute_map = { + 'name': 'name', + 'description': 'description', + 'maintain_begin': 'maintain_begin', + 'maintain_end': 'maintain_end', + 'security_group_id': 'security_group_id', + 'retention_policy': 'retention_policy', + 'enterprise_project_id': 'enterprise_project_id' + } + + def __init__(self, name=None, description=None, maintain_begin=None, maintain_end=None, security_group_id=None, retention_policy=None, enterprise_project_id=None): + """UpdateInstanceReq - a model defined in huaweicloud sdk""" + + + + self._name = None + self._description = None + self._maintain_begin = None + self._maintain_end = None + self._security_group_id = None + self._retention_policy = None + self._enterprise_project_id = None + self.discriminator = None + + if name is not None: + self.name = name + if description is not None: + self.description = description + if maintain_begin is not None: + self.maintain_begin = maintain_begin + if maintain_end is not None: + self.maintain_end = maintain_end + if security_group_id is not None: + self.security_group_id = security_group_id + if retention_policy is not None: + self.retention_policy = retention_policy + if enterprise_project_id is not None: + self.enterprise_project_id = enterprise_project_id + + @property + def name(self): + """Gets the name of this UpdateInstanceReq. + + 实例名称。 由英文字符开头,只能由英文字母、数字、中划线组成,长度为4~64的字符。 + + :return: The name of this UpdateInstanceReq. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UpdateInstanceReq. + + 实例名称。 由英文字符开头,只能由英文字母、数字、中划线组成,长度为4~64的字符。 + + :param name: The name of this UpdateInstanceReq. + :type: str + """ + self._name = name + + @property + def description(self): + """Gets the description of this UpdateInstanceReq. + + 实例的描述信息。 长度不超过1024的字符串。 > \\与\"在json报文中属于特殊字符,如果参数值中需要显示\\或者\"字符,请在字符前增加转义字符\\,比如\\\\或者\\\"。 + + :return: The description of this UpdateInstanceReq. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this UpdateInstanceReq. + + 实例的描述信息。 长度不超过1024的字符串。 > \\与\"在json报文中属于特殊字符,如果参数值中需要显示\\或者\"字符,请在字符前增加转义字符\\,比如\\\\或者\\\"。 + + :param description: The description of this UpdateInstanceReq. + :type: str + """ + self._description = description + + @property + def maintain_begin(self): + """Gets the maintain_begin of this UpdateInstanceReq. + + 维护时间窗开始时间,格式为HH:mm:ss。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考查[询维护时间窗时间段](https://support.huaweicloud.com/api-kafka/ShowMaintainWindows.html)。 - 开始时间必须为22:00:00、02:00:00、06:00:00、10:00:00、14:00:00和18:00:00。 - 该参数不能单独为空,若该值为空,则结束时间也为空。系统分配一个默认开始时间02:00:00。 + + :return: The maintain_begin of this UpdateInstanceReq. + :rtype: str + """ + return self._maintain_begin + + @maintain_begin.setter + def maintain_begin(self, maintain_begin): + """Sets the maintain_begin of this UpdateInstanceReq. + + 维护时间窗开始时间,格式为HH:mm:ss。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考查[询维护时间窗时间段](https://support.huaweicloud.com/api-kafka/ShowMaintainWindows.html)。 - 开始时间必须为22:00:00、02:00:00、06:00:00、10:00:00、14:00:00和18:00:00。 - 该参数不能单独为空,若该值为空,则结束时间也为空。系统分配一个默认开始时间02:00:00。 + + :param maintain_begin: The maintain_begin of this UpdateInstanceReq. + :type: str + """ + self._maintain_begin = maintain_begin + + @property + def maintain_end(self): + """Gets the maintain_end of this UpdateInstanceReq. + + 维护时间窗结束时间,格式为HH:mm:ss。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考查[询维护时间窗时间段](https://support.huaweicloud.com/api-kafka/ShowMaintainWindows.html)。 - 结束时间在开始时间基础上加四个小时,即当开始时间为22:00:00时,结束时间为02:00:00。 - 该参数不能单独为空,若该值为空,则开始时间也为空。系统分配一个默认结束时间06:00:00。 + + :return: The maintain_end of this UpdateInstanceReq. + :rtype: str + """ + return self._maintain_end + + @maintain_end.setter + def maintain_end(self, maintain_end): + """Sets the maintain_end of this UpdateInstanceReq. + + 维护时间窗结束时间,格式为HH:mm:ss。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考查[询维护时间窗时间段](https://support.huaweicloud.com/api-kafka/ShowMaintainWindows.html)。 - 结束时间在开始时间基础上加四个小时,即当开始时间为22:00:00时,结束时间为02:00:00。 - 该参数不能单独为空,若该值为空,则开始时间也为空。系统分配一个默认结束时间06:00:00。 + + :param maintain_end: The maintain_end of this UpdateInstanceReq. + :type: str + """ + self._maintain_end = maintain_end + + @property + def security_group_id(self): + """Gets the security_group_id of this UpdateInstanceReq. + + 安全组ID。 + + :return: The security_group_id of this UpdateInstanceReq. + :rtype: str + """ + return self._security_group_id + + @security_group_id.setter + def security_group_id(self, security_group_id): + """Sets the security_group_id of this UpdateInstanceReq. + + 安全组ID。 + + :param security_group_id: The security_group_id of this UpdateInstanceReq. + :type: str + """ + self._security_group_id = security_group_id + + @property + def retention_policy(self): + """Gets the retention_policy of this UpdateInstanceReq. + + 容量阈值策略。 支持两种策略模式: - produce_reject: 生产受限 - time_base: 自动删除 + + :return: The retention_policy of this UpdateInstanceReq. + :rtype: str + """ + return self._retention_policy + + @retention_policy.setter + def retention_policy(self, retention_policy): + """Sets the retention_policy of this UpdateInstanceReq. + + 容量阈值策略。 支持两种策略模式: - produce_reject: 生产受限 - time_base: 自动删除 + + :param retention_policy: The retention_policy of this UpdateInstanceReq. + :type: str + """ + self._retention_policy = retention_policy + + @property + def enterprise_project_id(self): + """Gets the enterprise_project_id of this UpdateInstanceReq. + + 企业项目。 + + :return: The enterprise_project_id of this UpdateInstanceReq. + :rtype: str + """ + return self._enterprise_project_id + + @enterprise_project_id.setter + def enterprise_project_id(self, enterprise_project_id): + """Sets the enterprise_project_id of this UpdateInstanceReq. + + 企业项目。 + + :param enterprise_project_id: The enterprise_project_id of this UpdateInstanceReq. + :type: str + """ + self._enterprise_project_id = enterprise_project_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_request.py new file mode 100644 index 0000000000..e438682810 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdateInstanceRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'body': 'UpdateInstanceReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'body': 'body' + } + + def __init__(self, instance_id=None, body=None): + """UpdateInstanceRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this UpdateInstanceRequest. + + + :return: The instance_id of this UpdateInstanceRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this UpdateInstanceRequest. + + + :param instance_id: The instance_id of this UpdateInstanceRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def body(self): + """Gets the body of this UpdateInstanceRequest. + + + :return: The body of this UpdateInstanceRequest. + :rtype: UpdateInstanceReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this UpdateInstanceRequest. + + + :param body: The body of this UpdateInstanceRequest. + :type: UpdateInstanceReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_response.py new file mode 100644 index 0000000000..8ef78af2e0 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class UpdateInstanceResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """UpdateInstanceResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_topic_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_topic_req.py new file mode 100644 index 0000000000..dc78a5ac9d --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_topic_req.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdateInstanceTopicReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'topics': 'list[UpdateInstanceTopicReqTopics]' + } + + attribute_map = { + 'topics': 'topics' + } + + def __init__(self, topics=None): + """UpdateInstanceTopicReq - a model defined in huaweicloud sdk""" + + + + self._topics = None + self.discriminator = None + + if topics is not None: + self.topics = topics + + @property + def topics(self): + """Gets the topics of this UpdateInstanceTopicReq. + + 修改的topic列表。 + + :return: The topics of this UpdateInstanceTopicReq. + :rtype: list[UpdateInstanceTopicReqTopics] + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this UpdateInstanceTopicReq. + + 修改的topic列表。 + + :param topics: The topics of this UpdateInstanceTopicReq. + :type: list[UpdateInstanceTopicReqTopics] + """ + self._topics = topics + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceTopicReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_topic_req_topics.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_topic_req_topics.py new file mode 100644 index 0000000000..68a099b557 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_topic_req_topics.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdateInstanceTopicReqTopics: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'id': 'str', + 'retention_time': 'str', + 'sync_replication': 'bool', + 'sync_message_flush': 'bool' + } + + attribute_map = { + 'id': 'id', + 'retention_time': 'retention_time', + 'sync_replication': 'sync_replication', + 'sync_message_flush': 'sync_message_flush' + } + + def __init__(self, id=None, retention_time=None, sync_replication=None, sync_message_flush=None): + """UpdateInstanceTopicReqTopics - a model defined in huaweicloud sdk""" + + + + self._id = None + self._retention_time = None + self._sync_replication = None + self._sync_message_flush = None + self.discriminator = None + + if id is not None: + self.id = id + if retention_time is not None: + self.retention_time = retention_time + if sync_replication is not None: + self.sync_replication = sync_replication + if sync_message_flush is not None: + self.sync_message_flush = sync_message_flush + + @property + def id(self): + """Gets the id of this UpdateInstanceTopicReqTopics. + + topic名称 + + :return: The id of this UpdateInstanceTopicReqTopics. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UpdateInstanceTopicReqTopics. + + topic名称 + + :param id: The id of this UpdateInstanceTopicReqTopics. + :type: str + """ + self._id = id + + @property + def retention_time(self): + """Gets the retention_time of this UpdateInstanceTopicReqTopics. + + 老化时间,单位小时。 + + :return: The retention_time of this UpdateInstanceTopicReqTopics. + :rtype: str + """ + return self._retention_time + + @retention_time.setter + def retention_time(self, retention_time): + """Sets the retention_time of this UpdateInstanceTopicReqTopics. + + 老化时间,单位小时。 + + :param retention_time: The retention_time of this UpdateInstanceTopicReqTopics. + :type: str + """ + self._retention_time = retention_time + + @property + def sync_replication(self): + """Gets the sync_replication of this UpdateInstanceTopicReqTopics. + + 是否同步复制。 + + :return: The sync_replication of this UpdateInstanceTopicReqTopics. + :rtype: bool + """ + return self._sync_replication + + @sync_replication.setter + def sync_replication(self, sync_replication): + """Sets the sync_replication of this UpdateInstanceTopicReqTopics. + + 是否同步复制。 + + :param sync_replication: The sync_replication of this UpdateInstanceTopicReqTopics. + :type: bool + """ + self._sync_replication = sync_replication + + @property + def sync_message_flush(self): + """Gets the sync_message_flush of this UpdateInstanceTopicReqTopics. + + 是否同步落盘。 + + :return: The sync_message_flush of this UpdateInstanceTopicReqTopics. + :rtype: bool + """ + return self._sync_message_flush + + @sync_message_flush.setter + def sync_message_flush(self, sync_message_flush): + """Sets the sync_message_flush of this UpdateInstanceTopicReqTopics. + + 是否同步落盘。 + + :param sync_message_flush: The sync_message_flush of this UpdateInstanceTopicReqTopics. + :type: bool + """ + self._sync_message_flush = sync_message_flush + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceTopicReqTopics): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_topic_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_topic_request.py new file mode 100644 index 0000000000..cece2ee77d --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_topic_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdateInstanceTopicRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'body': 'UpdateInstanceTopicReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'body': 'body' + } + + def __init__(self, instance_id=None, body=None): + """UpdateInstanceTopicRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this UpdateInstanceTopicRequest. + + + :return: The instance_id of this UpdateInstanceTopicRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this UpdateInstanceTopicRequest. + + + :param instance_id: The instance_id of this UpdateInstanceTopicRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def body(self): + """Gets the body of this UpdateInstanceTopicRequest. + + + :return: The body of this UpdateInstanceTopicRequest. + :rtype: UpdateInstanceTopicReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this UpdateInstanceTopicRequest. + + + :param body: The body of this UpdateInstanceTopicRequest. + :type: UpdateInstanceTopicReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceTopicRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_topic_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_topic_response.py new file mode 100644 index 0000000000..11178d9bb4 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_instance_topic_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class UpdateInstanceTopicResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """UpdateInstanceTopicResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceTopicResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_sink_task_quota_req.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_sink_task_quota_req.py new file mode 100644 index 0000000000..1b1fb50964 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_sink_task_quota_req.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdateSinkTaskQuotaReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'sink_max_tasks': 'str' + } + + attribute_map = { + 'sink_max_tasks': 'sink_max_tasks' + } + + def __init__(self, sink_max_tasks=None): + """UpdateSinkTaskQuotaReq - a model defined in huaweicloud sdk""" + + + + self._sink_max_tasks = None + self.discriminator = None + + self.sink_max_tasks = sink_max_tasks + + @property + def sink_max_tasks(self): + """Gets the sink_max_tasks of this UpdateSinkTaskQuotaReq. + + 转储任务的总个数。 + + :return: The sink_max_tasks of this UpdateSinkTaskQuotaReq. + :rtype: str + """ + return self._sink_max_tasks + + @sink_max_tasks.setter + def sink_max_tasks(self, sink_max_tasks): + """Sets the sink_max_tasks of this UpdateSinkTaskQuotaReq. + + 转储任务的总个数。 + + :param sink_max_tasks: The sink_max_tasks of this UpdateSinkTaskQuotaReq. + :type: str + """ + self._sink_max_tasks = sink_max_tasks + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateSinkTaskQuotaReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_sink_task_quota_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_sink_task_quota_request.py new file mode 100644 index 0000000000..9d3e749900 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_sink_task_quota_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdateSinkTaskQuotaRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'connector_id': 'str', + 'body': 'UpdateSinkTaskQuotaReq' + } + + attribute_map = { + 'connector_id': 'connector_id', + 'body': 'body' + } + + def __init__(self, connector_id=None, body=None): + """UpdateSinkTaskQuotaRequest - a model defined in huaweicloud sdk""" + + + + self._connector_id = None + self._body = None + self.discriminator = None + + self.connector_id = connector_id + if body is not None: + self.body = body + + @property + def connector_id(self): + """Gets the connector_id of this UpdateSinkTaskQuotaRequest. + + + :return: The connector_id of this UpdateSinkTaskQuotaRequest. + :rtype: str + """ + return self._connector_id + + @connector_id.setter + def connector_id(self, connector_id): + """Sets the connector_id of this UpdateSinkTaskQuotaRequest. + + + :param connector_id: The connector_id of this UpdateSinkTaskQuotaRequest. + :type: str + """ + self._connector_id = connector_id + + @property + def body(self): + """Gets the body of this UpdateSinkTaskQuotaRequest. + + + :return: The body of this UpdateSinkTaskQuotaRequest. + :rtype: UpdateSinkTaskQuotaReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this UpdateSinkTaskQuotaRequest. + + + :param body: The body of this UpdateSinkTaskQuotaRequest. + :type: UpdateSinkTaskQuotaReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateSinkTaskQuotaRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_sink_task_quota_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_sink_task_quota_response.py new file mode 100644 index 0000000000..cd22af678f --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_sink_task_quota_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class UpdateSinkTaskQuotaResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """UpdateSinkTaskQuotaResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateSinkTaskQuotaResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_topic_replica_request.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_topic_replica_request.py new file mode 100644 index 0000000000..b1ab5e55f7 --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_topic_replica_request.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdateTopicReplicaRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'topic': 'str', + 'body': 'ResetReplicaReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'topic': 'topic', + 'body': 'body' + } + + def __init__(self, instance_id=None, topic=None, body=None): + """UpdateTopicReplicaRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._topic = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + self.topic = topic + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this UpdateTopicReplicaRequest. + + + :return: The instance_id of this UpdateTopicReplicaRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this UpdateTopicReplicaRequest. + + + :param instance_id: The instance_id of this UpdateTopicReplicaRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def topic(self): + """Gets the topic of this UpdateTopicReplicaRequest. + + + :return: The topic of this UpdateTopicReplicaRequest. + :rtype: str + """ + return self._topic + + @topic.setter + def topic(self, topic): + """Sets the topic of this UpdateTopicReplicaRequest. + + + :param topic: The topic of this UpdateTopicReplicaRequest. + :type: str + """ + self._topic = topic + + @property + def body(self): + """Gets the body of this UpdateTopicReplicaRequest. + + + :return: The body of this UpdateTopicReplicaRequest. + :rtype: ResetReplicaReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this UpdateTopicReplicaRequest. + + + :param body: The body of this UpdateTopicReplicaRequest. + :type: ResetReplicaReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateTopicReplicaRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_topic_replica_response.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_topic_replica_response.py new file mode 100644 index 0000000000..01435c190d --- /dev/null +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/update_topic_replica_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class UpdateTopicReplicaResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """UpdateTopicReplicaResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateTopicReplicaResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-kafka/requirements.txt b/huaweicloud-sdk-kafka/requirements.txt new file mode 100644 index 0000000000..bf54e8e3d8 --- /dev/null +++ b/huaweicloud-sdk-kafka/requirements.txt @@ -0,0 +1 @@ +huaweicloud-sdk-python-core diff --git a/huaweicloud-sdk-kafka/setup.py b/huaweicloud-sdk-kafka/setup.py new file mode 100644 index 0000000000..1d7b1db043 --- /dev/null +++ b/huaweicloud-sdk-kafka/setup.py @@ -0,0 +1,45 @@ +# coding: utf-8 +from os import path + +from setuptools import setup, find_packages + +NAME = "huaweicloudsdkkafka" +VERSION = "3.0.11-beta" +AUTHOR = "HuaweiCloud SDK" +AUTHOR_EMAIL = "hwcloudsdk@huawei.com" +URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" + +DESCRIPTION = "Kafka" +this_directory = path.abspath(path.dirname(__file__)) +with open(path.join(this_directory, 'README_PYPI.md'), encoding='utf-8') as f: + LONG_DESCRIPTION = f.read() + +REQUIRES = ["huaweicloudsdkcore"] + +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=["huaweicloud", "sdk", "Kafka"], + packages=find_packages(exclude=["tests*"]), + install_requires=REQUIRES, + include_package_data=True, + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache Software License', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Topic :: Software Development' + ] +) diff --git a/huaweicloud-sdk-kafka/test-requirements.txt b/huaweicloud-sdk-kafka/test-requirements.txt new file mode 100644 index 0000000000..2702246c0e --- /dev/null +++ b/huaweicloud-sdk-kafka/test-requirements.txt @@ -0,0 +1,5 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 diff --git a/huaweicloud-sdk-kms/setup.py b/huaweicloud-sdk-kms/setup.py index dc03ff2db2..e74cfa69be 100644 --- a/huaweicloud-sdk-kms/setup.py +++ b/huaweicloud-sdk-kms/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkkms" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-live/setup.py b/huaweicloud-sdk-live/setup.py index b26974d5db..9d8cdb2fb0 100644 --- a/huaweicloud-sdk-live/setup.py +++ b/huaweicloud-sdk-live/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdklive" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/__init__.py b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/__init__.py index f06739eff2..4031f51d1b 100644 --- a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/__init__.py +++ b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/__init__.py @@ -105,6 +105,8 @@ from huaweicloudsdkmeeting.v1.model.id_mark_dto import IdMarkDTO from huaweicloudsdkmeeting.v1.model.invite_participant_request import InviteParticipantRequest from huaweicloudsdkmeeting.v1.model.invite_participant_response import InviteParticipantResponse +from huaweicloudsdkmeeting.v1.model.invite_with_pwd_request import InviteWithPwdRequest +from huaweicloudsdkmeeting.v1.model.invite_with_pwd_response import InviteWithPwdResponse from huaweicloudsdkmeeting.v1.model.list_meeting_file_response_dto import ListMeetingFileResponseDTO from huaweicloudsdkmeeting.v1.model.live_request import LiveRequest from huaweicloudsdkmeeting.v1.model.live_response import LiveResponse @@ -183,6 +185,7 @@ from huaweicloudsdkmeeting.v1.model.rest_conf_config_dto import RestConfConfigDTO from huaweicloudsdkmeeting.v1.model.rest_hands_up_req_body import RestHandsUpReqBody from huaweicloudsdkmeeting.v1.model.rest_invite_req_body import RestInviteReqBody +from huaweicloudsdkmeeting.v1.model.rest_invite_with_pwd_req_body import RestInviteWithPwdReqBody from huaweicloudsdkmeeting.v1.model.rest_lock_req_body import RestLockReqBody from huaweicloudsdkmeeting.v1.model.rest_lock_site_view_req_body import RestLockSiteViewReqBody from huaweicloudsdkmeeting.v1.model.rest_mixed_picture_body import RestMixedPictureBody @@ -252,6 +255,8 @@ from huaweicloudsdkmeeting.v1.model.set_participant_view_response import SetParticipantViewResponse from huaweicloudsdkmeeting.v1.model.set_role_request import SetRoleRequest from huaweicloudsdkmeeting.v1.model.set_role_response import SetRoleResponse +from huaweicloudsdkmeeting.v1.model.show_conf_org_request import ShowConfOrgRequest +from huaweicloudsdkmeeting.v1.model.show_conf_org_response import ShowConfOrgResponse from huaweicloudsdkmeeting.v1.model.show_corp_admin_request import ShowCorpAdminRequest from huaweicloudsdkmeeting.v1.model.show_corp_admin_response import ShowCorpAdminResponse from huaweicloudsdkmeeting.v1.model.show_corp_basic_info_request import ShowCorpBasicInfoRequest @@ -290,6 +295,8 @@ from huaweicloudsdkmeeting.v1.model.show_recording_detail_response import ShowRecordingDetailResponse from huaweicloudsdkmeeting.v1.model.show_region_info_of_meeting_request import ShowRegionInfoOfMeetingRequest from huaweicloudsdkmeeting.v1.model.show_region_info_of_meeting_response import ShowRegionInfoOfMeetingResponse +from huaweicloudsdkmeeting.v1.model.show_sp_res_request import ShowSpResRequest +from huaweicloudsdkmeeting.v1.model.show_sp_res_response import ShowSpResResponse from huaweicloudsdkmeeting.v1.model.show_user_detail_request import ShowUserDetailRequest from huaweicloudsdkmeeting.v1.model.show_user_detail_response import ShowUserDetailResponse from huaweicloudsdkmeeting.v1.model.slide_verify_code_check_dto import SlideVerifyCodeCheckDTO diff --git a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/meeting_async_client.py b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/meeting_async_client.py index 9dfbb6d286..9326d981f8 100644 --- a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/meeting_async_client.py +++ b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/meeting_async_client.py @@ -2558,6 +2558,68 @@ def invite_participant_with_http_info(self, request): request_type=request.__class__.__name__) + def invite_with_pwd_async(self, request): + """通过会议ID和密码邀请与会者 + + 通过会议ID和密码邀请与会者 + + :param InviteWithPwdRequest request + :return: InviteWithPwdResponse + """ + return self.invite_with_pwd_with_http_info(request) + + def invite_with_pwd_with_http_info(self, request): + """通过会议ID和密码邀请与会者 + + 通过会议ID和密码邀请与会者 + + :param InviteWithPwdRequest request + :return: InviteWithPwdResponse + """ + + all_params = ['conference_id', 'req_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'conference_id' in local_var_params: + query_params.append(('conferenceID', local_var_params['conference_id'])) + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v1/mmc/control/conferences/inviteWithPwd', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='InviteWithPwdResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def live_async(self, request): """启停会议直播 @@ -5201,6 +5263,64 @@ def set_role_with_http_info(self, request): request_type=request.__class__.__name__) + def show_conf_org_async(self, request): + """通过会议ID查询企业ID + + 与某个会议在同一个SP下的用户,可以通过会议ID查询到该会议对应的企业ID。 + + :param ShowConfOrgRequest request + :return: ShowConfOrgResponse + """ + return self.show_conf_org_with_http_info(request) + + def show_conf_org_with_http_info(self, request): + """通过会议ID查询企业ID + + 与某个会议在同一个SP下的用户,可以通过会议ID查询到该会议对应的企业ID。 + + :param ShowConfOrgRequest request + :return: ShowConfOrgResponse + """ + + all_params = ['conference_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'conference_id' in local_var_params: + query_params.append(('conferenceID', local_var_params['conference_id'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v1/mmc/management/conferences/confOrg', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowConfOrgResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_corp_async(self, request): """SP管理员查询企业 @@ -6407,6 +6527,62 @@ def show_region_info_of_meeting_with_http_info(self, request): request_type=request.__class__.__name__) + def show_sp_res_async(self, request): + """查询SP的共享资源使用信息 + + SP管理查询所属SP的共享资源使用信息 + + :param ShowSpResRequest request + :return: ShowSpResResponse + """ + return self.show_sp_res_with_http_info(request) + + def show_sp_res_with_http_info(self, request): + """查询SP的共享资源使用信息 + + SP管理查询所属SP的共享资源使用信息 + + :param ShowSpResRequest request + :return: ShowSpResResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v1/mmc/management/spRes', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowSpResResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_user_detail_async(self, request): """查询用户详情 diff --git a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/meeting_client.py b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/meeting_client.py index ff1a81680b..d14c7f2ac7 100644 --- a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/meeting_client.py +++ b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/meeting_client.py @@ -2558,6 +2558,68 @@ def invite_participant_with_http_info(self, request): request_type=request.__class__.__name__) + def invite_with_pwd(self, request): + """通过会议ID和密码邀请与会者 + + 通过会议ID和密码邀请与会者 + + :param InviteWithPwdRequest request + :return: InviteWithPwdResponse + """ + return self.invite_with_pwd_with_http_info(request) + + def invite_with_pwd_with_http_info(self, request): + """通过会议ID和密码邀请与会者 + + 通过会议ID和密码邀请与会者 + + :param InviteWithPwdRequest request + :return: InviteWithPwdResponse + """ + + all_params = ['conference_id', 'req_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'conference_id' in local_var_params: + query_params.append(('conferenceID', local_var_params['conference_id'])) + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v1/mmc/control/conferences/inviteWithPwd', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='InviteWithPwdResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def live(self, request): """启停会议直播 @@ -5201,6 +5263,64 @@ def set_role_with_http_info(self, request): request_type=request.__class__.__name__) + def show_conf_org(self, request): + """通过会议ID查询企业ID + + 与某个会议在同一个SP下的用户,可以通过会议ID查询到该会议对应的企业ID。 + + :param ShowConfOrgRequest request + :return: ShowConfOrgResponse + """ + return self.show_conf_org_with_http_info(request) + + def show_conf_org_with_http_info(self, request): + """通过会议ID查询企业ID + + 与某个会议在同一个SP下的用户,可以通过会议ID查询到该会议对应的企业ID。 + + :param ShowConfOrgRequest request + :return: ShowConfOrgResponse + """ + + all_params = ['conference_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'conference_id' in local_var_params: + query_params.append(('conferenceID', local_var_params['conference_id'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v1/mmc/management/conferences/confOrg', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowConfOrgResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_corp(self, request): """SP管理员查询企业 @@ -6407,6 +6527,62 @@ def show_region_info_of_meeting_with_http_info(self, request): request_type=request.__class__.__name__) + def show_sp_res(self, request): + """查询SP的共享资源使用信息 + + SP管理查询所属SP的共享资源使用信息 + + :param ShowSpResRequest request + :return: ShowSpResResponse + """ + return self.show_sp_res_with_http_info(request) + + def show_sp_res_with_http_info(self, request): + """查询SP的共享资源使用信息 + + SP管理查询所属SP的共享资源使用信息 + + :param ShowSpResRequest request + :return: ShowSpResResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v1/mmc/management/spRes', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowSpResResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_user_detail(self, request): """查询用户详情 diff --git a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/__init__.py b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/__init__.py index 053108956b..10a158f20e 100644 --- a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/__init__.py +++ b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/__init__.py @@ -102,6 +102,8 @@ from huaweicloudsdkmeeting.v1.model.id_mark_dto import IdMarkDTO from huaweicloudsdkmeeting.v1.model.invite_participant_request import InviteParticipantRequest from huaweicloudsdkmeeting.v1.model.invite_participant_response import InviteParticipantResponse +from huaweicloudsdkmeeting.v1.model.invite_with_pwd_request import InviteWithPwdRequest +from huaweicloudsdkmeeting.v1.model.invite_with_pwd_response import InviteWithPwdResponse from huaweicloudsdkmeeting.v1.model.list_meeting_file_response_dto import ListMeetingFileResponseDTO from huaweicloudsdkmeeting.v1.model.live_request import LiveRequest from huaweicloudsdkmeeting.v1.model.live_response import LiveResponse @@ -180,6 +182,7 @@ from huaweicloudsdkmeeting.v1.model.rest_conf_config_dto import RestConfConfigDTO from huaweicloudsdkmeeting.v1.model.rest_hands_up_req_body import RestHandsUpReqBody from huaweicloudsdkmeeting.v1.model.rest_invite_req_body import RestInviteReqBody +from huaweicloudsdkmeeting.v1.model.rest_invite_with_pwd_req_body import RestInviteWithPwdReqBody from huaweicloudsdkmeeting.v1.model.rest_lock_req_body import RestLockReqBody from huaweicloudsdkmeeting.v1.model.rest_lock_site_view_req_body import RestLockSiteViewReqBody from huaweicloudsdkmeeting.v1.model.rest_mixed_picture_body import RestMixedPictureBody @@ -249,6 +252,8 @@ from huaweicloudsdkmeeting.v1.model.set_participant_view_response import SetParticipantViewResponse from huaweicloudsdkmeeting.v1.model.set_role_request import SetRoleRequest from huaweicloudsdkmeeting.v1.model.set_role_response import SetRoleResponse +from huaweicloudsdkmeeting.v1.model.show_conf_org_request import ShowConfOrgRequest +from huaweicloudsdkmeeting.v1.model.show_conf_org_response import ShowConfOrgResponse from huaweicloudsdkmeeting.v1.model.show_corp_admin_request import ShowCorpAdminRequest from huaweicloudsdkmeeting.v1.model.show_corp_admin_response import ShowCorpAdminResponse from huaweicloudsdkmeeting.v1.model.show_corp_basic_info_request import ShowCorpBasicInfoRequest @@ -287,6 +292,8 @@ from huaweicloudsdkmeeting.v1.model.show_recording_detail_response import ShowRecordingDetailResponse from huaweicloudsdkmeeting.v1.model.show_region_info_of_meeting_request import ShowRegionInfoOfMeetingRequest from huaweicloudsdkmeeting.v1.model.show_region_info_of_meeting_response import ShowRegionInfoOfMeetingResponse +from huaweicloudsdkmeeting.v1.model.show_sp_res_request import ShowSpResRequest +from huaweicloudsdkmeeting.v1.model.show_sp_res_response import ShowSpResResponse from huaweicloudsdkmeeting.v1.model.show_user_detail_request import ShowUserDetailRequest from huaweicloudsdkmeeting.v1.model.show_user_detail_response import ShowUserDetailResponse from huaweicloudsdkmeeting.v1.model.slide_verify_code_check_dto import SlideVerifyCodeCheckDTO diff --git a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/invite_with_pwd_request.py b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/invite_with_pwd_request.py new file mode 100644 index 0000000000..c848ee6b6c --- /dev/null +++ b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/invite_with_pwd_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class InviteWithPwdRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'conference_id': 'str', + 'body': 'RestInviteWithPwdReqBody' + } + + attribute_map = { + 'conference_id': 'conferenceID', + 'body': 'body' + } + + def __init__(self, conference_id=None, body=None): + """InviteWithPwdRequest - a model defined in huaweicloud sdk""" + + + + self._conference_id = None + self._body = None + self.discriminator = None + + self.conference_id = conference_id + if body is not None: + self.body = body + + @property + def conference_id(self): + """Gets the conference_id of this InviteWithPwdRequest. + + + :return: The conference_id of this InviteWithPwdRequest. + :rtype: str + """ + return self._conference_id + + @conference_id.setter + def conference_id(self, conference_id): + """Sets the conference_id of this InviteWithPwdRequest. + + + :param conference_id: The conference_id of this InviteWithPwdRequest. + :type: str + """ + self._conference_id = conference_id + + @property + def body(self): + """Gets the body of this InviteWithPwdRequest. + + + :return: The body of this InviteWithPwdRequest. + :rtype: RestInviteWithPwdReqBody + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this InviteWithPwdRequest. + + + :param body: The body of this InviteWithPwdRequest. + :type: RestInviteWithPwdReqBody + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InviteWithPwdRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/invite_with_pwd_response.py b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/invite_with_pwd_response.py new file mode 100644 index 0000000000..e6d40183e1 --- /dev/null +++ b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/invite_with_pwd_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class InviteWithPwdResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """InviteWithPwdResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InviteWithPwdResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/rest_invite_with_pwd_req_body.py b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/rest_invite_with_pwd_req_body.py new file mode 100644 index 0000000000..5aa7d176ba --- /dev/null +++ b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/rest_invite_with_pwd_req_body.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class RestInviteWithPwdReqBody: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'call_num': 'str', + 'org_id': 'str', + 'conf_id': 'str', + 'pwd': 'str', + 'num_belongs_type': 'int', + 'is_not_overlay_pid_name': 'bool' + } + + attribute_map = { + 'call_num': 'callNum', + 'org_id': 'orgID', + 'conf_id': 'confID', + 'pwd': 'pwd', + 'num_belongs_type': 'numBelongsType', + 'is_not_overlay_pid_name': 'isNotOverlayPidName' + } + + def __init__(self, call_num=None, org_id=None, conf_id=None, pwd=None, num_belongs_type=None, is_not_overlay_pid_name=None): + """RestInviteWithPwdReqBody - a model defined in huaweicloud sdk""" + + + + self._call_num = None + self._org_id = None + self._conf_id = None + self._pwd = None + self._num_belongs_type = None + self._is_not_overlay_pid_name = None + self.discriminator = None + + if call_num is not None: + self.call_num = call_num + if org_id is not None: + self.org_id = org_id + if conf_id is not None: + self.conf_id = conf_id + if pwd is not None: + self.pwd = pwd + if num_belongs_type is not None: + self.num_belongs_type = num_belongs_type + if is_not_overlay_pid_name is not None: + self.is_not_overlay_pid_name = is_not_overlay_pid_name + + @property + def call_num(self): + """Gets the call_num of this RestInviteWithPwdReqBody. + + 被邀请的会议人号码。 + + :return: The call_num of this RestInviteWithPwdReqBody. + :rtype: str + """ + return self._call_num + + @call_num.setter + def call_num(self, call_num): + """Sets the call_num of this RestInviteWithPwdReqBody. + + 被邀请的会议人号码。 + + :param call_num: The call_num of this RestInviteWithPwdReqBody. + :type: str + """ + self._call_num = call_num + + @property + def org_id(self): + """Gets the org_id of this RestInviteWithPwdReqBody. + + 被邀请的会议人所属企业ID。 + + :return: The org_id of this RestInviteWithPwdReqBody. + :rtype: str + """ + return self._org_id + + @org_id.setter + def org_id(self, org_id): + """Sets the org_id of this RestInviteWithPwdReqBody. + + 被邀请的会议人所属企业ID。 + + :param org_id: The org_id of this RestInviteWithPwdReqBody. + :type: str + """ + self._org_id = org_id + + @property + def conf_id(self): + """Gets the conf_id of this RestInviteWithPwdReqBody. + + 当前会议ID。 + + :return: The conf_id of this RestInviteWithPwdReqBody. + :rtype: str + """ + return self._conf_id + + @conf_id.setter + def conf_id(self, conf_id): + """Sets the conf_id of this RestInviteWithPwdReqBody. + + 当前会议ID。 + + :param conf_id: The conf_id of this RestInviteWithPwdReqBody. + :type: str + """ + self._conf_id = conf_id + + @property + def pwd(self): + """Gets the pwd of this RestInviteWithPwdReqBody. + + 当前会议的密码。 + + :return: The pwd of this RestInviteWithPwdReqBody. + :rtype: str + """ + return self._pwd + + @pwd.setter + def pwd(self, pwd): + """Sets the pwd of this RestInviteWithPwdReqBody. + + 当前会议的密码。 + + :param pwd: The pwd of this RestInviteWithPwdReqBody. + :type: str + """ + self._pwd = pwd + + @property + def num_belongs_type(self): + """Gets the num_belongs_type of this RestInviteWithPwdReqBody. + + 号码类型0是本局号码,1是中继号码。 + + :return: The num_belongs_type of this RestInviteWithPwdReqBody. + :rtype: int + """ + return self._num_belongs_type + + @num_belongs_type.setter + def num_belongs_type(self, num_belongs_type): + """Sets the num_belongs_type of this RestInviteWithPwdReqBody. + + 号码类型0是本局号码,1是中继号码。 + + :param num_belongs_type: The num_belongs_type of this RestInviteWithPwdReqBody. + :type: int + """ + self._num_belongs_type = num_belongs_type + + @property + def is_not_overlay_pid_name(self): + """Gets the is_not_overlay_pid_name of this RestInviteWithPwdReqBody. + + 是否不叠加会场名。 + + :return: The is_not_overlay_pid_name of this RestInviteWithPwdReqBody. + :rtype: bool + """ + return self._is_not_overlay_pid_name + + @is_not_overlay_pid_name.setter + def is_not_overlay_pid_name(self, is_not_overlay_pid_name): + """Sets the is_not_overlay_pid_name of this RestInviteWithPwdReqBody. + + 是否不叠加会场名。 + + :param is_not_overlay_pid_name: The is_not_overlay_pid_name of this RestInviteWithPwdReqBody. + :type: bool + """ + self._is_not_overlay_pid_name = is_not_overlay_pid_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RestInviteWithPwdReqBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_conf_org_request.py b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_conf_org_request.py new file mode 100644 index 0000000000..9ef8475695 --- /dev/null +++ b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_conf_org_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowConfOrgRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'conference_id': 'str' + } + + attribute_map = { + 'conference_id': 'conferenceID' + } + + def __init__(self, conference_id=None): + """ShowConfOrgRequest - a model defined in huaweicloud sdk""" + + + + self._conference_id = None + self.discriminator = None + + self.conference_id = conference_id + + @property + def conference_id(self): + """Gets the conference_id of this ShowConfOrgRequest. + + + :return: The conference_id of this ShowConfOrgRequest. + :rtype: str + """ + return self._conference_id + + @conference_id.setter + def conference_id(self, conference_id): + """Sets the conference_id of this ShowConfOrgRequest. + + + :param conference_id: The conference_id of this ShowConfOrgRequest. + :type: str + """ + self._conference_id = conference_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowConfOrgRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_conf_org_response.py b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_conf_org_response.py new file mode 100644 index 0000000000..8d15776655 --- /dev/null +++ b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_conf_org_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowConfOrgResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'org_id': 'str' + } + + attribute_map = { + 'org_id': 'orgID' + } + + def __init__(self, org_id=None): + """ShowConfOrgResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._org_id = None + self.discriminator = None + + if org_id is not None: + self.org_id = org_id + + @property + def org_id(self): + """Gets the org_id of this ShowConfOrgResponse. + + 企业ID + + :return: The org_id of this ShowConfOrgResponse. + :rtype: str + """ + return self._org_id + + @org_id.setter + def org_id(self, org_id): + """Sets the org_id of this ShowConfOrgResponse. + + 企业ID + + :param org_id: The org_id of this ShowConfOrgResponse. + :type: str + """ + self._org_id = org_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowConfOrgResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_sp_res_request.py b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_sp_res_request.py new file mode 100644 index 0000000000..7f5ed48b1e --- /dev/null +++ b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_sp_res_request.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowSpResRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ShowSpResRequest - a model defined in huaweicloud sdk""" + + + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowSpResRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_sp_res_response.py b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_sp_res_response.py new file mode 100644 index 0000000000..f748e15162 --- /dev/null +++ b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_sp_res_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowSpResResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'used_accounts_count': 'int' + } + + attribute_map = { + 'used_accounts_count': 'usedAccountsCount' + } + + def __init__(self, used_accounts_count=None): + """ShowSpResResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._used_accounts_count = None + self.discriminator = None + + if used_accounts_count is not None: + self.used_accounts_count = used_accounts_count + + @property + def used_accounts_count(self): + """Gets the used_accounts_count of this ShowSpResResponse. + + 已用的企业并发数 + + :return: The used_accounts_count of this ShowSpResResponse. + :rtype: int + """ + return self._used_accounts_count + + @used_accounts_count.setter + def used_accounts_count(self, used_accounts_count): + """Sets the used_accounts_count of this ShowSpResResponse. + + 已用的企业并发数 + + :param used_accounts_count: The used_accounts_count of this ShowSpResResponse. + :type: int + """ + self._used_accounts_count = used_accounts_count + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowSpResResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-meeting/setup.py b/huaweicloud-sdk-meeting/setup.py index c9f5d04ea8..2de8ed0600 100644 --- a/huaweicloud-sdk-meeting/setup.py +++ b/huaweicloud-sdk-meeting/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkmeeting" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-moderation/setup.py b/huaweicloud-sdk-moderation/setup.py index 12a4f0804c..069c43a4f9 100644 --- a/huaweicloud-sdk-moderation/setup.py +++ b/huaweicloud-sdk-moderation/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkmoderation" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-mpc/setup.py b/huaweicloud-sdk-mpc/setup.py index c8afe6ce65..ff73b5c40d 100644 --- a/huaweicloud-sdk-mpc/setup.py +++ b/huaweicloud-sdk-mpc/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkmpc" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-projectman/setup.py b/huaweicloud-sdk-projectman/setup.py index bda4c6aa55..3739b1f098 100644 --- a/huaweicloud-sdk-projectman/setup.py +++ b/huaweicloud-sdk-projectman/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkprojectman" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-rabbitmq/LICENSE b/huaweicloud-sdk-rabbitmq/LICENSE new file mode 100644 index 0000000000..808e3296c0 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) Huawei Technologies Co., Ltd. 2020-present. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/huaweicloud-sdk-rabbitmq/README_PYPI.md b/huaweicloud-sdk-rabbitmq/README_PYPI.md new file mode 100644 index 0000000000..9711543c73 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/README_PYPI.md @@ -0,0 +1 @@ +See detailed information in [huaweicloud-sdk-python-v3](https://github.com/huaweicloud/huaweicloud-sdk-python-v3). \ No newline at end of file diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/__init__.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/__init__.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/__init__.py new file mode 100644 index 0000000000..2a94cc8418 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/__init__.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +from __future__ import absolute_import + +# import RabbitMQClient +from huaweicloudsdkrabbitmq.v2.rabbitmq_client import RabbitMQClient +from huaweicloudsdkrabbitmq.v2.rabbitmq_async_client import RabbitMQAsyncClient +# import models into sdk package +from huaweicloudsdkrabbitmq.v2.model.batch_create_or_delete_instance_tag_request import BatchCreateOrDeleteInstanceTagRequest +from huaweicloudsdkrabbitmq.v2.model.batch_create_or_delete_instance_tag_response import BatchCreateOrDeleteInstanceTagResponse +from huaweicloudsdkrabbitmq.v2.model.batch_create_or_delete_tag_req import BatchCreateOrDeleteTagReq +from huaweicloudsdkrabbitmq.v2.model.batch_restart_or_delete_instance_req import BatchRestartOrDeleteInstanceReq +from huaweicloudsdkrabbitmq.v2.model.batch_restart_or_delete_instance_resp_results import BatchRestartOrDeleteInstanceRespResults +from huaweicloudsdkrabbitmq.v2.model.batch_restart_or_delete_instances_request import BatchRestartOrDeleteInstancesRequest +from huaweicloudsdkrabbitmq.v2.model.batch_restart_or_delete_instances_response import BatchRestartOrDeleteInstancesResponse +from huaweicloudsdkrabbitmq.v2.model.create_instance_req import CreateInstanceReq +from huaweicloudsdkrabbitmq.v2.model.create_instance_req_tags import CreateInstanceReqTags +from huaweicloudsdkrabbitmq.v2.model.create_post_paid_instance_request import CreatePostPaidInstanceRequest +from huaweicloudsdkrabbitmq.v2.model.create_post_paid_instance_response import CreatePostPaidInstanceResponse +from huaweicloudsdkrabbitmq.v2.model.delete_background_task_request import DeleteBackgroundTaskRequest +from huaweicloudsdkrabbitmq.v2.model.delete_background_task_response import DeleteBackgroundTaskResponse +from huaweicloudsdkrabbitmq.v2.model.delete_instance_request import DeleteInstanceRequest +from huaweicloudsdkrabbitmq.v2.model.delete_instance_response import DeleteInstanceResponse +from huaweicloudsdkrabbitmq.v2.model.list_available_zones_request import ListAvailableZonesRequest +from huaweicloudsdkrabbitmq.v2.model.list_available_zones_resp_available_zones import ListAvailableZonesRespAvailableZones +from huaweicloudsdkrabbitmq.v2.model.list_available_zones_response import ListAvailableZonesResponse +from huaweicloudsdkrabbitmq.v2.model.list_background_tasks_request import ListBackgroundTasksRequest +from huaweicloudsdkrabbitmq.v2.model.list_background_tasks_resp_tasks import ListBackgroundTasksRespTasks +from huaweicloudsdkrabbitmq.v2.model.list_background_tasks_response import ListBackgroundTasksResponse +from huaweicloudsdkrabbitmq.v2.model.list_instances_details_request import ListInstancesDetailsRequest +from huaweicloudsdkrabbitmq.v2.model.list_instances_details_response import ListInstancesDetailsResponse +from huaweicloudsdkrabbitmq.v2.model.list_instances_resp_instances import ListInstancesRespInstances +from huaweicloudsdkrabbitmq.v2.model.list_plugins_request import ListPluginsRequest +from huaweicloudsdkrabbitmq.v2.model.list_plugins_resp_plugins import ListPluginsRespPlugins +from huaweicloudsdkrabbitmq.v2.model.list_plugins_response import ListPluginsResponse +from huaweicloudsdkrabbitmq.v2.model.list_products_request import ListProductsRequest +from huaweicloudsdkrabbitmq.v2.model.list_products_resp_detail import ListProductsRespDetail +from huaweicloudsdkrabbitmq.v2.model.list_products_resp_hourly import ListProductsRespHourly +from huaweicloudsdkrabbitmq.v2.model.list_products_resp_io import ListProductsRespIo +from huaweicloudsdkrabbitmq.v2.model.list_products_resp_values import ListProductsRespValues +from huaweicloudsdkrabbitmq.v2.model.list_products_response import ListProductsResponse +from huaweicloudsdkrabbitmq.v2.model.reset_password_req import ResetPasswordReq +from huaweicloudsdkrabbitmq.v2.model.reset_password_request import ResetPasswordRequest +from huaweicloudsdkrabbitmq.v2.model.reset_password_response import ResetPasswordResponse +from huaweicloudsdkrabbitmq.v2.model.resize_instance_req import ResizeInstanceReq +from huaweicloudsdkrabbitmq.v2.model.resize_instance_request import ResizeInstanceRequest +from huaweicloudsdkrabbitmq.v2.model.resize_instance_response import ResizeInstanceResponse +from huaweicloudsdkrabbitmq.v2.model.show_background_task_request import ShowBackgroundTaskRequest +from huaweicloudsdkrabbitmq.v2.model.show_background_task_response import ShowBackgroundTaskResponse +from huaweicloudsdkrabbitmq.v2.model.show_instance_extend_product_info_request import ShowInstanceExtendProductInfoRequest +from huaweicloudsdkrabbitmq.v2.model.show_instance_extend_product_info_response import ShowInstanceExtendProductInfoResponse +from huaweicloudsdkrabbitmq.v2.model.show_instance_request import ShowInstanceRequest +from huaweicloudsdkrabbitmq.v2.model.show_instance_response import ShowInstanceResponse +from huaweicloudsdkrabbitmq.v2.model.show_instance_tags_request import ShowInstanceTagsRequest +from huaweicloudsdkrabbitmq.v2.model.show_instance_tags_response import ShowInstanceTagsResponse +from huaweicloudsdkrabbitmq.v2.model.show_maintain_windows_request import ShowMaintainWindowsRequest +from huaweicloudsdkrabbitmq.v2.model.show_maintain_windows_resp_maintain_windows import ShowMaintainWindowsRespMaintainWindows +from huaweicloudsdkrabbitmq.v2.model.show_maintain_windows_response import ShowMaintainWindowsResponse +from huaweicloudsdkrabbitmq.v2.model.show_project_tags_request import ShowProjectTagsRequest +from huaweicloudsdkrabbitmq.v2.model.show_project_tags_resp_tags import ShowProjectTagsRespTags +from huaweicloudsdkrabbitmq.v2.model.show_project_tags_response import ShowProjectTagsResponse +from huaweicloudsdkrabbitmq.v2.model.update_instance_req import UpdateInstanceReq +from huaweicloudsdkrabbitmq.v2.model.update_instance_request import UpdateInstanceRequest +from huaweicloudsdkrabbitmq.v2.model.update_instance_response import UpdateInstanceResponse +from huaweicloudsdkrabbitmq.v2.model.update_plugins_req import UpdatePluginsReq +from huaweicloudsdkrabbitmq.v2.model.update_plugins_request import UpdatePluginsRequest +from huaweicloudsdkrabbitmq.v2.model.update_plugins_response import UpdatePluginsResponse + diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/__init__.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/__init__.py new file mode 100644 index 0000000000..c1587a90f7 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/__init__.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +from __future__ import absolute_import + +# import models into model package +from huaweicloudsdkrabbitmq.v2.model.batch_create_or_delete_instance_tag_request import BatchCreateOrDeleteInstanceTagRequest +from huaweicloudsdkrabbitmq.v2.model.batch_create_or_delete_instance_tag_response import BatchCreateOrDeleteInstanceTagResponse +from huaweicloudsdkrabbitmq.v2.model.batch_create_or_delete_tag_req import BatchCreateOrDeleteTagReq +from huaweicloudsdkrabbitmq.v2.model.batch_restart_or_delete_instance_req import BatchRestartOrDeleteInstanceReq +from huaweicloudsdkrabbitmq.v2.model.batch_restart_or_delete_instance_resp_results import BatchRestartOrDeleteInstanceRespResults +from huaweicloudsdkrabbitmq.v2.model.batch_restart_or_delete_instances_request import BatchRestartOrDeleteInstancesRequest +from huaweicloudsdkrabbitmq.v2.model.batch_restart_or_delete_instances_response import BatchRestartOrDeleteInstancesResponse +from huaweicloudsdkrabbitmq.v2.model.create_instance_req import CreateInstanceReq +from huaweicloudsdkrabbitmq.v2.model.create_instance_req_tags import CreateInstanceReqTags +from huaweicloudsdkrabbitmq.v2.model.create_post_paid_instance_request import CreatePostPaidInstanceRequest +from huaweicloudsdkrabbitmq.v2.model.create_post_paid_instance_response import CreatePostPaidInstanceResponse +from huaweicloudsdkrabbitmq.v2.model.delete_background_task_request import DeleteBackgroundTaskRequest +from huaweicloudsdkrabbitmq.v2.model.delete_background_task_response import DeleteBackgroundTaskResponse +from huaweicloudsdkrabbitmq.v2.model.delete_instance_request import DeleteInstanceRequest +from huaweicloudsdkrabbitmq.v2.model.delete_instance_response import DeleteInstanceResponse +from huaweicloudsdkrabbitmq.v2.model.list_available_zones_request import ListAvailableZonesRequest +from huaweicloudsdkrabbitmq.v2.model.list_available_zones_resp_available_zones import ListAvailableZonesRespAvailableZones +from huaweicloudsdkrabbitmq.v2.model.list_available_zones_response import ListAvailableZonesResponse +from huaweicloudsdkrabbitmq.v2.model.list_background_tasks_request import ListBackgroundTasksRequest +from huaweicloudsdkrabbitmq.v2.model.list_background_tasks_resp_tasks import ListBackgroundTasksRespTasks +from huaweicloudsdkrabbitmq.v2.model.list_background_tasks_response import ListBackgroundTasksResponse +from huaweicloudsdkrabbitmq.v2.model.list_instances_details_request import ListInstancesDetailsRequest +from huaweicloudsdkrabbitmq.v2.model.list_instances_details_response import ListInstancesDetailsResponse +from huaweicloudsdkrabbitmq.v2.model.list_instances_resp_instances import ListInstancesRespInstances +from huaweicloudsdkrabbitmq.v2.model.list_plugins_request import ListPluginsRequest +from huaweicloudsdkrabbitmq.v2.model.list_plugins_resp_plugins import ListPluginsRespPlugins +from huaweicloudsdkrabbitmq.v2.model.list_plugins_response import ListPluginsResponse +from huaweicloudsdkrabbitmq.v2.model.list_products_request import ListProductsRequest +from huaweicloudsdkrabbitmq.v2.model.list_products_resp_detail import ListProductsRespDetail +from huaweicloudsdkrabbitmq.v2.model.list_products_resp_hourly import ListProductsRespHourly +from huaweicloudsdkrabbitmq.v2.model.list_products_resp_io import ListProductsRespIo +from huaweicloudsdkrabbitmq.v2.model.list_products_resp_values import ListProductsRespValues +from huaweicloudsdkrabbitmq.v2.model.list_products_response import ListProductsResponse +from huaweicloudsdkrabbitmq.v2.model.reset_password_req import ResetPasswordReq +from huaweicloudsdkrabbitmq.v2.model.reset_password_request import ResetPasswordRequest +from huaweicloudsdkrabbitmq.v2.model.reset_password_response import ResetPasswordResponse +from huaweicloudsdkrabbitmq.v2.model.resize_instance_req import ResizeInstanceReq +from huaweicloudsdkrabbitmq.v2.model.resize_instance_request import ResizeInstanceRequest +from huaweicloudsdkrabbitmq.v2.model.resize_instance_response import ResizeInstanceResponse +from huaweicloudsdkrabbitmq.v2.model.show_background_task_request import ShowBackgroundTaskRequest +from huaweicloudsdkrabbitmq.v2.model.show_background_task_response import ShowBackgroundTaskResponse +from huaweicloudsdkrabbitmq.v2.model.show_instance_extend_product_info_request import ShowInstanceExtendProductInfoRequest +from huaweicloudsdkrabbitmq.v2.model.show_instance_extend_product_info_response import ShowInstanceExtendProductInfoResponse +from huaweicloudsdkrabbitmq.v2.model.show_instance_request import ShowInstanceRequest +from huaweicloudsdkrabbitmq.v2.model.show_instance_response import ShowInstanceResponse +from huaweicloudsdkrabbitmq.v2.model.show_instance_tags_request import ShowInstanceTagsRequest +from huaweicloudsdkrabbitmq.v2.model.show_instance_tags_response import ShowInstanceTagsResponse +from huaweicloudsdkrabbitmq.v2.model.show_maintain_windows_request import ShowMaintainWindowsRequest +from huaweicloudsdkrabbitmq.v2.model.show_maintain_windows_resp_maintain_windows import ShowMaintainWindowsRespMaintainWindows +from huaweicloudsdkrabbitmq.v2.model.show_maintain_windows_response import ShowMaintainWindowsResponse +from huaweicloudsdkrabbitmq.v2.model.show_project_tags_request import ShowProjectTagsRequest +from huaweicloudsdkrabbitmq.v2.model.show_project_tags_resp_tags import ShowProjectTagsRespTags +from huaweicloudsdkrabbitmq.v2.model.show_project_tags_response import ShowProjectTagsResponse +from huaweicloudsdkrabbitmq.v2.model.update_instance_req import UpdateInstanceReq +from huaweicloudsdkrabbitmq.v2.model.update_instance_request import UpdateInstanceRequest +from huaweicloudsdkrabbitmq.v2.model.update_instance_response import UpdateInstanceResponse +from huaweicloudsdkrabbitmq.v2.model.update_plugins_req import UpdatePluginsReq +from huaweicloudsdkrabbitmq.v2.model.update_plugins_request import UpdatePluginsRequest +from huaweicloudsdkrabbitmq.v2.model.update_plugins_response import UpdatePluginsResponse diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_create_or_delete_instance_tag_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_create_or_delete_instance_tag_request.py new file mode 100644 index 0000000000..ce8f2bb410 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_create_or_delete_instance_tag_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BatchCreateOrDeleteInstanceTagRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'body': 'BatchCreateOrDeleteTagReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'body': 'body' + } + + def __init__(self, instance_id=None, body=None): + """BatchCreateOrDeleteInstanceTagRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this BatchCreateOrDeleteInstanceTagRequest. + + + :return: The instance_id of this BatchCreateOrDeleteInstanceTagRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this BatchCreateOrDeleteInstanceTagRequest. + + + :param instance_id: The instance_id of this BatchCreateOrDeleteInstanceTagRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def body(self): + """Gets the body of this BatchCreateOrDeleteInstanceTagRequest. + + + :return: The body of this BatchCreateOrDeleteInstanceTagRequest. + :rtype: BatchCreateOrDeleteTagReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this BatchCreateOrDeleteInstanceTagRequest. + + + :param body: The body of this BatchCreateOrDeleteInstanceTagRequest. + :type: BatchCreateOrDeleteTagReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchCreateOrDeleteInstanceTagRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_create_or_delete_instance_tag_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_create_or_delete_instance_tag_response.py new file mode 100644 index 0000000000..40a40d396c --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_create_or_delete_instance_tag_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class BatchCreateOrDeleteInstanceTagResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """BatchCreateOrDeleteInstanceTagResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchCreateOrDeleteInstanceTagResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_create_or_delete_tag_req.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_create_or_delete_tag_req.py new file mode 100644 index 0000000000..155909d157 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_create_or_delete_tag_req.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BatchCreateOrDeleteTagReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'action': 'str', + 'tags': 'list[CreateInstanceReqTags]' + } + + attribute_map = { + 'action': 'action', + 'tags': 'tags' + } + + def __init__(self, action=None, tags=None): + """BatchCreateOrDeleteTagReq - a model defined in huaweicloud sdk""" + + + + self._action = None + self._tags = None + self.discriminator = None + + if action is not None: + self.action = action + if tags is not None: + self.tags = tags + + @property + def action(self): + """Gets the action of this BatchCreateOrDeleteTagReq. + + 操作标识(仅支持小写): - create(创建) - delete(删除) + + :return: The action of this BatchCreateOrDeleteTagReq. + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """Sets the action of this BatchCreateOrDeleteTagReq. + + 操作标识(仅支持小写): - create(创建) - delete(删除) + + :param action: The action of this BatchCreateOrDeleteTagReq. + :type: str + """ + self._action = action + + @property + def tags(self): + """Gets the tags of this BatchCreateOrDeleteTagReq. + + 标签列表。 + + :return: The tags of this BatchCreateOrDeleteTagReq. + :rtype: list[CreateInstanceReqTags] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this BatchCreateOrDeleteTagReq. + + 标签列表。 + + :param tags: The tags of this BatchCreateOrDeleteTagReq. + :type: list[CreateInstanceReqTags] + """ + self._tags = tags + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchCreateOrDeleteTagReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_restart_or_delete_instance_req.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_restart_or_delete_instance_req.py new file mode 100644 index 0000000000..77aef87cbc --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_restart_or_delete_instance_req.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BatchRestartOrDeleteInstanceReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instances': 'list[str]', + 'action': 'str', + 'all_failure': 'str' + } + + attribute_map = { + 'instances': 'instances', + 'action': 'action', + 'all_failure': 'all_failure' + } + + def __init__(self, instances=None, action=None, all_failure=None): + """BatchRestartOrDeleteInstanceReq - a model defined in huaweicloud sdk""" + + + + self._instances = None + self._action = None + self._all_failure = None + self.discriminator = None + + if instances is not None: + self.instances = instances + self.action = action + if all_failure is not None: + self.all_failure = all_failure + + @property + def instances(self): + """Gets the instances of this BatchRestartOrDeleteInstanceReq. + + 实例的ID列表。 + + :return: The instances of this BatchRestartOrDeleteInstanceReq. + :rtype: list[str] + """ + return self._instances + + @instances.setter + def instances(self, instances): + """Sets the instances of this BatchRestartOrDeleteInstanceReq. + + 实例的ID列表。 + + :param instances: The instances of this BatchRestartOrDeleteInstanceReq. + :type: list[str] + """ + self._instances = instances + + @property + def action(self): + """Gets the action of this BatchRestartOrDeleteInstanceReq. + + 对实例的操作:restart、delete + + :return: The action of this BatchRestartOrDeleteInstanceReq. + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """Sets the action of this BatchRestartOrDeleteInstanceReq. + + 对实例的操作:restart、delete + + :param action: The action of this BatchRestartOrDeleteInstanceReq. + :type: str + """ + self._action = action + + @property + def all_failure(self): + """Gets the all_failure of this BatchRestartOrDeleteInstanceReq. + + 是否批量删除创建失败的实例。 当参数值为“true”时,删除租户所有创建失败的实例,此时请求参数instances可为空。 + + :return: The all_failure of this BatchRestartOrDeleteInstanceReq. + :rtype: str + """ + return self._all_failure + + @all_failure.setter + def all_failure(self, all_failure): + """Sets the all_failure of this BatchRestartOrDeleteInstanceReq. + + 是否批量删除创建失败的实例。 当参数值为“true”时,删除租户所有创建失败的实例,此时请求参数instances可为空。 + + :param all_failure: The all_failure of this BatchRestartOrDeleteInstanceReq. + :type: str + """ + self._all_failure = all_failure + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchRestartOrDeleteInstanceReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_restart_or_delete_instance_resp_results.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_restart_or_delete_instance_resp_results.py new file mode 100644 index 0000000000..e007da9aa2 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_restart_or_delete_instance_resp_results.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BatchRestartOrDeleteInstanceRespResults: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'result': 'str', + 'instance': 'str' + } + + attribute_map = { + 'result': 'result', + 'instance': 'instance' + } + + def __init__(self, result=None, instance=None): + """BatchRestartOrDeleteInstanceRespResults - a model defined in huaweicloud sdk""" + + + + self._result = None + self._instance = None + self.discriminator = None + + if result is not None: + self.result = result + if instance is not None: + self.instance = instance + + @property + def result(self): + """Gets the result of this BatchRestartOrDeleteInstanceRespResults. + + 操作结果: - success: 操作成功 - failed: 操作失败 + + :return: The result of this BatchRestartOrDeleteInstanceRespResults. + :rtype: str + """ + return self._result + + @result.setter + def result(self, result): + """Sets the result of this BatchRestartOrDeleteInstanceRespResults. + + 操作结果: - success: 操作成功 - failed: 操作失败 + + :param result: The result of this BatchRestartOrDeleteInstanceRespResults. + :type: str + """ + self._result = result + + @property + def instance(self): + """Gets the instance of this BatchRestartOrDeleteInstanceRespResults. + + 实例ID。 + + :return: The instance of this BatchRestartOrDeleteInstanceRespResults. + :rtype: str + """ + return self._instance + + @instance.setter + def instance(self, instance): + """Sets the instance of this BatchRestartOrDeleteInstanceRespResults. + + 实例ID。 + + :param instance: The instance of this BatchRestartOrDeleteInstanceRespResults. + :type: str + """ + self._instance = instance + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchRestartOrDeleteInstanceRespResults): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_restart_or_delete_instances_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_restart_or_delete_instances_request.py new file mode 100644 index 0000000000..5eafbe1b5e --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_restart_or_delete_instances_request.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BatchRestartOrDeleteInstancesRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'body': 'BatchRestartOrDeleteInstanceReq' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): + """BatchRestartOrDeleteInstancesRequest - a model defined in huaweicloud sdk""" + + + + self._body = None + self.discriminator = None + + if body is not None: + self.body = body + + @property + def body(self): + """Gets the body of this BatchRestartOrDeleteInstancesRequest. + + + :return: The body of this BatchRestartOrDeleteInstancesRequest. + :rtype: BatchRestartOrDeleteInstanceReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this BatchRestartOrDeleteInstancesRequest. + + + :param body: The body of this BatchRestartOrDeleteInstancesRequest. + :type: BatchRestartOrDeleteInstanceReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchRestartOrDeleteInstancesRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_restart_or_delete_instances_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_restart_or_delete_instances_response.py new file mode 100644 index 0000000000..f4bea5803e --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/batch_restart_or_delete_instances_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class BatchRestartOrDeleteInstancesResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'results': 'list[BatchRestartOrDeleteInstanceRespResults]' + } + + attribute_map = { + 'results': 'results' + } + + def __init__(self, results=None): + """BatchRestartOrDeleteInstancesResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._results = None + self.discriminator = None + + if results is not None: + self.results = results + + @property + def results(self): + """Gets the results of this BatchRestartOrDeleteInstancesResponse. + + 修改实例的结果。 + + :return: The results of this BatchRestartOrDeleteInstancesResponse. + :rtype: list[BatchRestartOrDeleteInstanceRespResults] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this BatchRestartOrDeleteInstancesResponse. + + 修改实例的结果。 + + :param results: The results of this BatchRestartOrDeleteInstancesResponse. + :type: list[BatchRestartOrDeleteInstanceRespResults] + """ + self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BatchRestartOrDeleteInstancesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/create_instance_req.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/create_instance_req.py new file mode 100644 index 0000000000..8eeb4a4e50 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/create_instance_req.py @@ -0,0 +1,611 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreateInstanceReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'description': 'str', + 'engine': 'str', + 'engine_version': 'str', + 'storage_space': 'int', + 'access_user': 'str', + 'password': 'str', + 'vpc_id': 'str', + 'security_group_id': 'str', + 'subnet_id': 'str', + 'available_zones': 'list[str]', + 'product_id': 'str', + 'maintain_begin': 'str', + 'maintain_end': 'str', + 'enable_publicip': 'bool', + 'publicip_id': 'str', + 'ssl_enable': 'bool', + 'storage_spec_code': 'str', + 'enterprise_project_id': 'str', + 'tags': 'list[CreateInstanceReqTags]' + } + + attribute_map = { + 'name': 'name', + 'description': 'description', + 'engine': 'engine', + 'engine_version': 'engine_version', + 'storage_space': 'storage_space', + 'access_user': 'access_user', + 'password': 'password', + 'vpc_id': 'vpc_id', + 'security_group_id': 'security_group_id', + 'subnet_id': 'subnet_id', + 'available_zones': 'available_zones', + 'product_id': 'product_id', + 'maintain_begin': 'maintain_begin', + 'maintain_end': 'maintain_end', + 'enable_publicip': 'enable_publicip', + 'publicip_id': 'publicip_id', + 'ssl_enable': 'ssl_enable', + 'storage_spec_code': 'storage_spec_code', + 'enterprise_project_id': 'enterprise_project_id', + 'tags': 'tags' + } + + def __init__(self, name=None, description=None, engine=None, engine_version=None, storage_space=None, access_user=None, password=None, vpc_id=None, security_group_id=None, subnet_id=None, available_zones=None, product_id=None, maintain_begin=None, maintain_end=None, enable_publicip=None, publicip_id=None, ssl_enable=None, storage_spec_code=None, enterprise_project_id=None, tags=None): + """CreateInstanceReq - a model defined in huaweicloud sdk""" + + + + self._name = None + self._description = None + self._engine = None + self._engine_version = None + self._storage_space = None + self._access_user = None + self._password = None + self._vpc_id = None + self._security_group_id = None + self._subnet_id = None + self._available_zones = None + self._product_id = None + self._maintain_begin = None + self._maintain_end = None + self._enable_publicip = None + self._publicip_id = None + self._ssl_enable = None + self._storage_spec_code = None + self._enterprise_project_id = None + self._tags = None + self.discriminator = None + + self.name = name + if description is not None: + self.description = description + self.engine = engine + self.engine_version = engine_version + self.storage_space = storage_space + self.access_user = access_user + self.password = password + self.vpc_id = vpc_id + self.security_group_id = security_group_id + self.subnet_id = subnet_id + self.available_zones = available_zones + self.product_id = product_id + if maintain_begin is not None: + self.maintain_begin = maintain_begin + if maintain_end is not None: + self.maintain_end = maintain_end + if enable_publicip is not None: + self.enable_publicip = enable_publicip + if publicip_id is not None: + self.publicip_id = publicip_id + if ssl_enable is not None: + self.ssl_enable = ssl_enable + self.storage_spec_code = storage_spec_code + if enterprise_project_id is not None: + self.enterprise_project_id = enterprise_project_id + if tags is not None: + self.tags = tags + + @property + def name(self): + """Gets the name of this CreateInstanceReq. + + 实例名称。 由英文字符开头,只能由英文字母、数字、中划线、下划线组成,长度为4~64的字符。 + + :return: The name of this CreateInstanceReq. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateInstanceReq. + + 实例名称。 由英文字符开头,只能由英文字母、数字、中划线、下划线组成,长度为4~64的字符。 + + :param name: The name of this CreateInstanceReq. + :type: str + """ + self._name = name + + @property + def description(self): + """Gets the description of this CreateInstanceReq. + + 实例的描述信息。 长度不超过1024的字符串。 > \\与\"在json报文中属于特殊字符,如果参数值中需要显示\\或者\"字符,请在字符前增加转义字符\\,比如\\\\或者\\\"。 + + :return: The description of this CreateInstanceReq. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateInstanceReq. + + 实例的描述信息。 长度不超过1024的字符串。 > \\与\"在json报文中属于特殊字符,如果参数值中需要显示\\或者\"字符,请在字符前增加转义字符\\,比如\\\\或者\\\"。 + + :param description: The description of this CreateInstanceReq. + :type: str + """ + self._description = description + + @property + def engine(self): + """Gets the engine of this CreateInstanceReq. + + 消息引擎:rabbitmq。 + + :return: The engine of this CreateInstanceReq. + :rtype: str + """ + return self._engine + + @engine.setter + def engine(self, engine): + """Sets the engine of this CreateInstanceReq. + + 消息引擎:rabbitmq。 + + :param engine: The engine of this CreateInstanceReq. + :type: str + """ + self._engine = engine + + @property + def engine_version(self): + """Gets the engine_version of this CreateInstanceReq. + + 消息引擎的版本。 - RabbitMQ版本有:3.7.17 + + :return: The engine_version of this CreateInstanceReq. + :rtype: str + """ + return self._engine_version + + @engine_version.setter + def engine_version(self, engine_version): + """Sets the engine_version of this CreateInstanceReq. + + 消息引擎的版本。 - RabbitMQ版本有:3.7.17 + + :param engine_version: The engine_version of this CreateInstanceReq. + :type: str + """ + self._engine_version = engine_version + + @property + def storage_space(self): + """Gets the storage_space of this CreateInstanceReq. + + 消息存储空间,单位GB。 - 单机RabbitMQ实例的存储空间的取值范围100GB~90000GB。 - 集群RabbitMQ实例的存储空间的取值范围为100GB*节点数~90000GB、200GB*节点数~90000GB、300GB*节点数~90000GB。 + + :return: The storage_space of this CreateInstanceReq. + :rtype: int + """ + return self._storage_space + + @storage_space.setter + def storage_space(self, storage_space): + """Sets the storage_space of this CreateInstanceReq. + + 消息存储空间,单位GB。 - 单机RabbitMQ实例的存储空间的取值范围100GB~90000GB。 - 集群RabbitMQ实例的存储空间的取值范围为100GB*节点数~90000GB、200GB*节点数~90000GB、300GB*节点数~90000GB。 + + :param storage_space: The storage_space of this CreateInstanceReq. + :type: int + """ + self._storage_space = storage_space + + @property + def access_user(self): + """Gets the access_user of this CreateInstanceReq. + + 认证用户名,只能由英文字母、数字、中划线组成,长度为4~64的字符。 + + :return: The access_user of this CreateInstanceReq. + :rtype: str + """ + return self._access_user + + @access_user.setter + def access_user(self, access_user): + """Sets the access_user of this CreateInstanceReq. + + 认证用户名,只能由英文字母、数字、中划线组成,长度为4~64的字符。 + + :param access_user: The access_user of this CreateInstanceReq. + :type: str + """ + self._access_user = access_user + + @property + def password(self): + """Gets the password of this CreateInstanceReq. + + 实例的认证密码。 复杂度要求: - 输入长度为8到32位的字符串。 - 必须包含如下四种字符中的两种组合: - 小写字母 - 大写字母 - 数字 - 特殊字符包括(`~!@#$%^&*()-_=+\\|[{}]:'\",<.>/?) + + :return: The password of this CreateInstanceReq. + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this CreateInstanceReq. + + 实例的认证密码。 复杂度要求: - 输入长度为8到32位的字符串。 - 必须包含如下四种字符中的两种组合: - 小写字母 - 大写字母 - 数字 - 特殊字符包括(`~!@#$%^&*()-_=+\\|[{}]:'\",<.>/?) + + :param password: The password of this CreateInstanceReq. + :type: str + """ + self._password = password + + @property + def vpc_id(self): + """Gets the vpc_id of this CreateInstanceReq. + + 租户VPC ID。 + + :return: The vpc_id of this CreateInstanceReq. + :rtype: str + """ + return self._vpc_id + + @vpc_id.setter + def vpc_id(self, vpc_id): + """Sets the vpc_id of this CreateInstanceReq. + + 租户VPC ID。 + + :param vpc_id: The vpc_id of this CreateInstanceReq. + :type: str + """ + self._vpc_id = vpc_id + + @property + def security_group_id(self): + """Gets the security_group_id of this CreateInstanceReq. + + 租户安全组ID。 + + :return: The security_group_id of this CreateInstanceReq. + :rtype: str + """ + return self._security_group_id + + @security_group_id.setter + def security_group_id(self, security_group_id): + """Sets the security_group_id of this CreateInstanceReq. + + 租户安全组ID。 + + :param security_group_id: The security_group_id of this CreateInstanceReq. + :type: str + """ + self._security_group_id = security_group_id + + @property + def subnet_id(self): + """Gets the subnet_id of this CreateInstanceReq. + + 子网ID。 + + :return: The subnet_id of this CreateInstanceReq. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """Sets the subnet_id of this CreateInstanceReq. + + 子网ID。 + + :param subnet_id: The subnet_id of this CreateInstanceReq. + :type: str + """ + self._subnet_id = subnet_id + + @property + def available_zones(self): + """Gets the available_zones of this CreateInstanceReq. + + 创建节点到指定且有资源的可用区ID。该参数不能为空数组或者数组的值为空,详情请参考[查询可用区信息](https://support.huaweicloud.com/api-rabbitmq/ListAvailableZones.html)查询得到。 + + :return: The available_zones of this CreateInstanceReq. + :rtype: list[str] + """ + return self._available_zones + + @available_zones.setter + def available_zones(self, available_zones): + """Sets the available_zones of this CreateInstanceReq. + + 创建节点到指定且有资源的可用区ID。该参数不能为空数组或者数组的值为空,详情请参考[查询可用区信息](https://support.huaweicloud.com/api-rabbitmq/ListAvailableZones.html)查询得到。 + + :param available_zones: The available_zones of this CreateInstanceReq. + :type: list[str] + """ + self._available_zones = available_zones + + @property + def product_id(self): + """Gets the product_id of this CreateInstanceReq. + + 产品标识。 获取方法,请参考[查询产品规格列表](https://support.huaweicloud.com/api-rabbitmq/ListProducts.html)。 + + :return: The product_id of this CreateInstanceReq. + :rtype: str + """ + return self._product_id + + @product_id.setter + def product_id(self, product_id): + """Sets the product_id of this CreateInstanceReq. + + 产品标识。 获取方法,请参考[查询产品规格列表](https://support.huaweicloud.com/api-rabbitmq/ListProducts.html)。 + + :param product_id: The product_id of this CreateInstanceReq. + :type: str + """ + self._product_id = product_id + + @property + def maintain_begin(self): + """Gets the maintain_begin of this CreateInstanceReq. + + 维护时间窗开始时间,格式为HH:mm。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-rabbitmq/ShowMaintainWindows.html)获取。 - 开始时间必须为22:00、02:00、06:00、10:00、14:00和18:00。 - 该参数不能单独为空,若该值为空,则结束时间也为空。系统分配一个默认开始时间02:00。 + + :return: The maintain_begin of this CreateInstanceReq. + :rtype: str + """ + return self._maintain_begin + + @maintain_begin.setter + def maintain_begin(self, maintain_begin): + """Sets the maintain_begin of this CreateInstanceReq. + + 维护时间窗开始时间,格式为HH:mm。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-rabbitmq/ShowMaintainWindows.html)获取。 - 开始时间必须为22:00、02:00、06:00、10:00、14:00和18:00。 - 该参数不能单独为空,若该值为空,则结束时间也为空。系统分配一个默认开始时间02:00。 + + :param maintain_begin: The maintain_begin of this CreateInstanceReq. + :type: str + """ + self._maintain_begin = maintain_begin + + @property + def maintain_end(self): + """Gets the maintain_end of this CreateInstanceReq. + + 维护时间窗结束时间,格式为HH:mm。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-rabbitmq/ShowMaintainWindows.html)获取。 - 结束时间在开始时间基础上加四个小时,即当开始时间为22:00时,结束时间为02:00。 - 该参数不能单独为空,若该值为空,则开始时间也为空,系统分配一个默认结束时间06:00。 + + :return: The maintain_end of this CreateInstanceReq. + :rtype: str + """ + return self._maintain_end + + @maintain_end.setter + def maintain_end(self, maintain_end): + """Sets the maintain_end of this CreateInstanceReq. + + 维护时间窗结束时间,格式为HH:mm。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-rabbitmq/ShowMaintainWindows.html)获取。 - 结束时间在开始时间基础上加四个小时,即当开始时间为22:00时,结束时间为02:00。 - 该参数不能单独为空,若该值为空,则开始时间也为空,系统分配一个默认结束时间06:00。 + + :param maintain_end: The maintain_end of this CreateInstanceReq. + :type: str + """ + self._maintain_end = maintain_end + + @property + def enable_publicip(self): + """Gets the enable_publicip of this CreateInstanceReq. + + RabbitMQ实例是否开启公网访问功能。 - true:开启 - false:不开启 + + :return: The enable_publicip of this CreateInstanceReq. + :rtype: bool + """ + return self._enable_publicip + + @enable_publicip.setter + def enable_publicip(self, enable_publicip): + """Sets the enable_publicip of this CreateInstanceReq. + + RabbitMQ实例是否开启公网访问功能。 - true:开启 - false:不开启 + + :param enable_publicip: The enable_publicip of this CreateInstanceReq. + :type: bool + """ + self._enable_publicip = enable_publicip + + @property + def publicip_id(self): + """Gets the publicip_id of this CreateInstanceReq. + + RabbitMQ实例绑定的弹性IP地址的ID。 如果开启了公网访问功能(即enable_publicip为true),该字段为必选。 + + :return: The publicip_id of this CreateInstanceReq. + :rtype: str + """ + return self._publicip_id + + @publicip_id.setter + def publicip_id(self, publicip_id): + """Sets the publicip_id of this CreateInstanceReq. + + RabbitMQ实例绑定的弹性IP地址的ID。 如果开启了公网访问功能(即enable_publicip为true),该字段为必选。 + + :param publicip_id: The publicip_id of this CreateInstanceReq. + :type: str + """ + self._publicip_id = publicip_id + + @property + def ssl_enable(self): + """Gets the ssl_enable of this CreateInstanceReq. + + 是否打开SSL加密访问。 - true:打开SSL加密访问。 - false:不打开SSL加密访问。 + + :return: The ssl_enable of this CreateInstanceReq. + :rtype: bool + """ + return self._ssl_enable + + @ssl_enable.setter + def ssl_enable(self, ssl_enable): + """Sets the ssl_enable of this CreateInstanceReq. + + 是否打开SSL加密访问。 - true:打开SSL加密访问。 - false:不打开SSL加密访问。 + + :param ssl_enable: The ssl_enable of this CreateInstanceReq. + :type: bool + """ + self._ssl_enable = ssl_enable + + @property + def storage_spec_code(self): + """Gets the storage_spec_code of this CreateInstanceReq. + + 存储IO规格。如何选择磁盘类型请参考[磁盘类型及性能介绍](https://support.huaweicloud.com/productdesc-evs/zh-cn_topic_0044524691.html)。 取值范围: - dms.physical.storage.normal: - dms.physical.storage.high - dms.physical.storage.ultra + + :return: The storage_spec_code of this CreateInstanceReq. + :rtype: str + """ + return self._storage_spec_code + + @storage_spec_code.setter + def storage_spec_code(self, storage_spec_code): + """Sets the storage_spec_code of this CreateInstanceReq. + + 存储IO规格。如何选择磁盘类型请参考[磁盘类型及性能介绍](https://support.huaweicloud.com/productdesc-evs/zh-cn_topic_0044524691.html)。 取值范围: - dms.physical.storage.normal: - dms.physical.storage.high - dms.physical.storage.ultra + + :param storage_spec_code: The storage_spec_code of this CreateInstanceReq. + :type: str + """ + self._storage_spec_code = storage_spec_code + + @property + def enterprise_project_id(self): + """Gets the enterprise_project_id of this CreateInstanceReq. + + 企业项目ID。若为企业项目账号,该参数必填。 + + :return: The enterprise_project_id of this CreateInstanceReq. + :rtype: str + """ + return self._enterprise_project_id + + @enterprise_project_id.setter + def enterprise_project_id(self, enterprise_project_id): + """Sets the enterprise_project_id of this CreateInstanceReq. + + 企业项目ID。若为企业项目账号,该参数必填。 + + :param enterprise_project_id: The enterprise_project_id of this CreateInstanceReq. + :type: str + """ + self._enterprise_project_id = enterprise_project_id + + @property + def tags(self): + """Gets the tags of this CreateInstanceReq. + + 标签列表。 + + :return: The tags of this CreateInstanceReq. + :rtype: list[CreateInstanceReqTags] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this CreateInstanceReq. + + 标签列表。 + + :param tags: The tags of this CreateInstanceReq. + :type: list[CreateInstanceReqTags] + """ + self._tags = tags + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateInstanceReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/create_instance_req_tags.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/create_instance_req_tags.py new file mode 100644 index 0000000000..d127fad6b3 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/create_instance_req_tags.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreateInstanceReqTags: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'key': 'str', + 'value': 'str' + } + + attribute_map = { + 'key': 'key', + 'value': 'value' + } + + def __init__(self, key=None, value=None): + """CreateInstanceReqTags - a model defined in huaweicloud sdk""" + + + + self._key = None + self._value = None + self.discriminator = None + + if key is not None: + self.key = key + if value is not None: + self.value = value + + @property + def key(self): + """Gets the key of this CreateInstanceReqTags. + + 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :return: The key of this CreateInstanceReqTags. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this CreateInstanceReqTags. + + 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :param key: The key of this CreateInstanceReqTags. + :type: str + """ + self._key = key + + @property + def value(self): + """Gets the value of this CreateInstanceReqTags. + + 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :return: The value of this CreateInstanceReqTags. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this CreateInstanceReqTags. + + 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :param value: The value of this CreateInstanceReqTags. + :type: str + """ + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateInstanceReqTags): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/create_post_paid_instance_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/create_post_paid_instance_request.py new file mode 100644 index 0000000000..0acdd7e059 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/create_post_paid_instance_request.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreatePostPaidInstanceRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'body': 'CreateInstanceReq' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): + """CreatePostPaidInstanceRequest - a model defined in huaweicloud sdk""" + + + + self._body = None + self.discriminator = None + + if body is not None: + self.body = body + + @property + def body(self): + """Gets the body of this CreatePostPaidInstanceRequest. + + + :return: The body of this CreatePostPaidInstanceRequest. + :rtype: CreateInstanceReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreatePostPaidInstanceRequest. + + + :param body: The body of this CreatePostPaidInstanceRequest. + :type: CreateInstanceReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreatePostPaidInstanceRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/create_post_paid_instance_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/create_post_paid_instance_response.py new file mode 100644 index 0000000000..a5659745ac --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/create_post_paid_instance_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class CreatePostPaidInstanceResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id' + } + + def __init__(self, instance_id=None): + """CreatePostPaidInstanceResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._instance_id = None + self.discriminator = None + + if instance_id is not None: + self.instance_id = instance_id + + @property + def instance_id(self): + """Gets the instance_id of this CreatePostPaidInstanceResponse. + + 实例ID。 + + :return: The instance_id of this CreatePostPaidInstanceResponse. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this CreatePostPaidInstanceResponse. + + 实例ID。 + + :param instance_id: The instance_id of this CreatePostPaidInstanceResponse. + :type: str + """ + self._instance_id = instance_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreatePostPaidInstanceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/delete_background_task_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/delete_background_task_request.py new file mode 100644 index 0000000000..fc4c98afe5 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/delete_background_task_request.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class DeleteBackgroundTaskRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'task_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'task_id': 'task_id' + } + + def __init__(self, instance_id=None, task_id=None): + """DeleteBackgroundTaskRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._task_id = None + self.discriminator = None + + self.instance_id = instance_id + self.task_id = task_id + + @property + def instance_id(self): + """Gets the instance_id of this DeleteBackgroundTaskRequest. + + + :return: The instance_id of this DeleteBackgroundTaskRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this DeleteBackgroundTaskRequest. + + + :param instance_id: The instance_id of this DeleteBackgroundTaskRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def task_id(self): + """Gets the task_id of this DeleteBackgroundTaskRequest. + + + :return: The task_id of this DeleteBackgroundTaskRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this DeleteBackgroundTaskRequest. + + + :param task_id: The task_id of this DeleteBackgroundTaskRequest. + :type: str + """ + self._task_id = task_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteBackgroundTaskRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/delete_background_task_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/delete_background_task_response.py new file mode 100644 index 0000000000..f7b5463610 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/delete_background_task_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class DeleteBackgroundTaskResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """DeleteBackgroundTaskResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteBackgroundTaskResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/delete_instance_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/delete_instance_request.py new file mode 100644 index 0000000000..778540d59f --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/delete_instance_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class DeleteInstanceRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id' + } + + def __init__(self, instance_id=None): + """DeleteInstanceRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self.discriminator = None + + self.instance_id = instance_id + + @property + def instance_id(self): + """Gets the instance_id of this DeleteInstanceRequest. + + + :return: The instance_id of this DeleteInstanceRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this DeleteInstanceRequest. + + + :param instance_id: The instance_id of this DeleteInstanceRequest. + :type: str + """ + self._instance_id = instance_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteInstanceRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/delete_instance_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/delete_instance_response.py new file mode 100644 index 0000000000..997326048f --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/delete_instance_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class DeleteInstanceResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """DeleteInstanceResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteInstanceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_available_zones_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_available_zones_request.py new file mode 100644 index 0000000000..eba1687f23 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_available_zones_request.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListAvailableZonesRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ListAvailableZonesRequest - a model defined in huaweicloud sdk""" + + + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListAvailableZonesRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_available_zones_resp_available_zones.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_available_zones_resp_available_zones.py new file mode 100644 index 0000000000..1157a36522 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_available_zones_resp_available_zones.py @@ -0,0 +1,299 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListAvailableZonesRespAvailableZones: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'sold_out': 'bool', + 'id': 'str', + 'code': 'str', + 'name': 'str', + 'port': 'str', + 'resource_availability': 'str', + 'default_az': 'bool', + 'ipv6_enable': 'bool' + } + + attribute_map = { + 'sold_out': 'soldOut', + 'id': 'id', + 'code': 'code', + 'name': 'name', + 'port': 'port', + 'resource_availability': 'resource_availability', + 'default_az': 'default_az', + 'ipv6_enable': 'ipv6_enable' + } + + def __init__(self, sold_out=None, id=None, code=None, name=None, port=None, resource_availability=None, default_az=None, ipv6_enable=None): + """ListAvailableZonesRespAvailableZones - a model defined in huaweicloud sdk""" + + + + self._sold_out = None + self._id = None + self._code = None + self._name = None + self._port = None + self._resource_availability = None + self._default_az = None + self._ipv6_enable = None + self.discriminator = None + + if sold_out is not None: + self.sold_out = sold_out + if id is not None: + self.id = id + if code is not None: + self.code = code + if name is not None: + self.name = name + if port is not None: + self.port = port + if resource_availability is not None: + self.resource_availability = resource_availability + if default_az is not None: + self.default_az = default_az + if ipv6_enable is not None: + self.ipv6_enable = ipv6_enable + + @property + def sold_out(self): + """Gets the sold_out of this ListAvailableZonesRespAvailableZones. + + 是否售罄。 + + :return: The sold_out of this ListAvailableZonesRespAvailableZones. + :rtype: bool + """ + return self._sold_out + + @sold_out.setter + def sold_out(self, sold_out): + """Sets the sold_out of this ListAvailableZonesRespAvailableZones. + + 是否售罄。 + + :param sold_out: The sold_out of this ListAvailableZonesRespAvailableZones. + :type: bool + """ + self._sold_out = sold_out + + @property + def id(self): + """Gets the id of this ListAvailableZonesRespAvailableZones. + + 可用区ID。 + + :return: The id of this ListAvailableZonesRespAvailableZones. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ListAvailableZonesRespAvailableZones. + + 可用区ID。 + + :param id: The id of this ListAvailableZonesRespAvailableZones. + :type: str + """ + self._id = id + + @property + def code(self): + """Gets the code of this ListAvailableZonesRespAvailableZones. + + 可用区编码。 + + :return: The code of this ListAvailableZonesRespAvailableZones. + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ListAvailableZonesRespAvailableZones. + + 可用区编码。 + + :param code: The code of this ListAvailableZonesRespAvailableZones. + :type: str + """ + self._code = code + + @property + def name(self): + """Gets the name of this ListAvailableZonesRespAvailableZones. + + 可用区名称。 + + :return: The name of this ListAvailableZonesRespAvailableZones. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListAvailableZonesRespAvailableZones. + + 可用区名称。 + + :param name: The name of this ListAvailableZonesRespAvailableZones. + :type: str + """ + self._name = name + + @property + def port(self): + """Gets the port of this ListAvailableZonesRespAvailableZones. + + 可用区端口号。 + + :return: The port of this ListAvailableZonesRespAvailableZones. + :rtype: str + """ + return self._port + + @port.setter + def port(self, port): + """Sets the port of this ListAvailableZonesRespAvailableZones. + + 可用区端口号。 + + :param port: The port of this ListAvailableZonesRespAvailableZones. + :type: str + """ + self._port = port + + @property + def resource_availability(self): + """Gets the resource_availability of this ListAvailableZonesRespAvailableZones. + + 分区上是否还有可用资源。 + + :return: The resource_availability of this ListAvailableZonesRespAvailableZones. + :rtype: str + """ + return self._resource_availability + + @resource_availability.setter + def resource_availability(self, resource_availability): + """Sets the resource_availability of this ListAvailableZonesRespAvailableZones. + + 分区上是否还有可用资源。 + + :param resource_availability: The resource_availability of this ListAvailableZonesRespAvailableZones. + :type: str + """ + self._resource_availability = resource_availability + + @property + def default_az(self): + """Gets the default_az of this ListAvailableZonesRespAvailableZones. + + 是否为默认可用区。 + + :return: The default_az of this ListAvailableZonesRespAvailableZones. + :rtype: bool + """ + return self._default_az + + @default_az.setter + def default_az(self, default_az): + """Sets the default_az of this ListAvailableZonesRespAvailableZones. + + 是否为默认可用区。 + + :param default_az: The default_az of this ListAvailableZonesRespAvailableZones. + :type: bool + """ + self._default_az = default_az + + @property + def ipv6_enable(self): + """Gets the ipv6_enable of this ListAvailableZonesRespAvailableZones. + + 是否支持IPv6。 + + :return: The ipv6_enable of this ListAvailableZonesRespAvailableZones. + :rtype: bool + """ + return self._ipv6_enable + + @ipv6_enable.setter + def ipv6_enable(self, ipv6_enable): + """Sets the ipv6_enable of this ListAvailableZonesRespAvailableZones. + + 是否支持IPv6。 + + :param ipv6_enable: The ipv6_enable of this ListAvailableZonesRespAvailableZones. + :type: bool + """ + self._ipv6_enable = ipv6_enable + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListAvailableZonesRespAvailableZones): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_available_zones_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_available_zones_response.py new file mode 100644 index 0000000000..da5901b51b --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_available_zones_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ListAvailableZonesResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'region_id': 'str', + 'available_zones': 'list[ListAvailableZonesRespAvailableZones]' + } + + attribute_map = { + 'region_id': 'region_id', + 'available_zones': 'available_zones' + } + + def __init__(self, region_id=None, available_zones=None): + """ListAvailableZonesResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._region_id = None + self._available_zones = None + self.discriminator = None + + if region_id is not None: + self.region_id = region_id + if available_zones is not None: + self.available_zones = available_zones + + @property + def region_id(self): + """Gets the region_id of this ListAvailableZonesResponse. + + 区域ID。 + + :return: The region_id of this ListAvailableZonesResponse. + :rtype: str + """ + return self._region_id + + @region_id.setter + def region_id(self, region_id): + """Sets the region_id of this ListAvailableZonesResponse. + + 区域ID。 + + :param region_id: The region_id of this ListAvailableZonesResponse. + :type: str + """ + self._region_id = region_id + + @property + def available_zones(self): + """Gets the available_zones of this ListAvailableZonesResponse. + + 可用区数组。 + + :return: The available_zones of this ListAvailableZonesResponse. + :rtype: list[ListAvailableZonesRespAvailableZones] + """ + return self._available_zones + + @available_zones.setter + def available_zones(self, available_zones): + """Sets the available_zones of this ListAvailableZonesResponse. + + 可用区数组。 + + :param available_zones: The available_zones of this ListAvailableZonesResponse. + :type: list[ListAvailableZonesRespAvailableZones] + """ + self._available_zones = available_zones + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListAvailableZonesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_background_tasks_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_background_tasks_request.py new file mode 100644 index 0000000000..ac0f6cd22d --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_background_tasks_request.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListBackgroundTasksRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'start': 'int', + 'limit': 'int', + 'begin_time': 'str', + 'end_time': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'start': 'start', + 'limit': 'limit', + 'begin_time': 'begin_time', + 'end_time': 'end_time' + } + + def __init__(self, instance_id=None, start=None, limit=None, begin_time=None, end_time=None): + """ListBackgroundTasksRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._start = None + self._limit = None + self._begin_time = None + self._end_time = None + self.discriminator = None + + self.instance_id = instance_id + if start is not None: + self.start = start + if limit is not None: + self.limit = limit + if begin_time is not None: + self.begin_time = begin_time + if end_time is not None: + self.end_time = end_time + + @property + def instance_id(self): + """Gets the instance_id of this ListBackgroundTasksRequest. + + + :return: The instance_id of this ListBackgroundTasksRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ListBackgroundTasksRequest. + + + :param instance_id: The instance_id of this ListBackgroundTasksRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def start(self): + """Gets the start of this ListBackgroundTasksRequest. + + + :return: The start of this ListBackgroundTasksRequest. + :rtype: int + """ + return self._start + + @start.setter + def start(self, start): + """Sets the start of this ListBackgroundTasksRequest. + + + :param start: The start of this ListBackgroundTasksRequest. + :type: int + """ + self._start = start + + @property + def limit(self): + """Gets the limit of this ListBackgroundTasksRequest. + + + :return: The limit of this ListBackgroundTasksRequest. + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this ListBackgroundTasksRequest. + + + :param limit: The limit of this ListBackgroundTasksRequest. + :type: int + """ + self._limit = limit + + @property + def begin_time(self): + """Gets the begin_time of this ListBackgroundTasksRequest. + + + :return: The begin_time of this ListBackgroundTasksRequest. + :rtype: str + """ + return self._begin_time + + @begin_time.setter + def begin_time(self, begin_time): + """Sets the begin_time of this ListBackgroundTasksRequest. + + + :param begin_time: The begin_time of this ListBackgroundTasksRequest. + :type: str + """ + self._begin_time = begin_time + + @property + def end_time(self): + """Gets the end_time of this ListBackgroundTasksRequest. + + + :return: The end_time of this ListBackgroundTasksRequest. + :rtype: str + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time): + """Sets the end_time of this ListBackgroundTasksRequest. + + + :param end_time: The end_time of this ListBackgroundTasksRequest. + :type: str + """ + self._end_time = end_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListBackgroundTasksRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_background_tasks_resp_tasks.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_background_tasks_resp_tasks.py new file mode 100644 index 0000000000..5f08b7946f --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_background_tasks_resp_tasks.py @@ -0,0 +1,299 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListBackgroundTasksRespTasks: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'id': 'str', + 'name': 'str', + 'user_name': 'str', + 'user_id': 'str', + 'params': 'str', + 'status': 'str', + 'created_at': 'str', + 'updated_at': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'user_name': 'user_name', + 'user_id': 'user_id', + 'params': 'params', + 'status': 'status', + 'created_at': 'created_at', + 'updated_at': 'updated_at' + } + + def __init__(self, id=None, name=None, user_name=None, user_id=None, params=None, status=None, created_at=None, updated_at=None): + """ListBackgroundTasksRespTasks - a model defined in huaweicloud sdk""" + + + + self._id = None + self._name = None + self._user_name = None + self._user_id = None + self._params = None + self._status = None + self._created_at = None + self._updated_at = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if user_name is not None: + self.user_name = user_name + if user_id is not None: + self.user_id = user_id + if params is not None: + self.params = params + if status is not None: + self.status = status + if created_at is not None: + self.created_at = created_at + if updated_at is not None: + self.updated_at = updated_at + + @property + def id(self): + """Gets the id of this ListBackgroundTasksRespTasks. + + 任务ID。 + + :return: The id of this ListBackgroundTasksRespTasks. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ListBackgroundTasksRespTasks. + + 任务ID。 + + :param id: The id of this ListBackgroundTasksRespTasks. + :type: str + """ + self._id = id + + @property + def name(self): + """Gets the name of this ListBackgroundTasksRespTasks. + + 任务名称。 + + :return: The name of this ListBackgroundTasksRespTasks. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListBackgroundTasksRespTasks. + + 任务名称。 + + :param name: The name of this ListBackgroundTasksRespTasks. + :type: str + """ + self._name = name + + @property + def user_name(self): + """Gets the user_name of this ListBackgroundTasksRespTasks. + + 用户名。 + + :return: The user_name of this ListBackgroundTasksRespTasks. + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """Sets the user_name of this ListBackgroundTasksRespTasks. + + 用户名。 + + :param user_name: The user_name of this ListBackgroundTasksRespTasks. + :type: str + """ + self._user_name = user_name + + @property + def user_id(self): + """Gets the user_id of this ListBackgroundTasksRespTasks. + + 用户ID。 + + :return: The user_id of this ListBackgroundTasksRespTasks. + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this ListBackgroundTasksRespTasks. + + 用户ID。 + + :param user_id: The user_id of this ListBackgroundTasksRespTasks. + :type: str + """ + self._user_id = user_id + + @property + def params(self): + """Gets the params of this ListBackgroundTasksRespTasks. + + 任务参数。 + + :return: The params of this ListBackgroundTasksRespTasks. + :rtype: str + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this ListBackgroundTasksRespTasks. + + 任务参数。 + + :param params: The params of this ListBackgroundTasksRespTasks. + :type: str + """ + self._params = params + + @property + def status(self): + """Gets the status of this ListBackgroundTasksRespTasks. + + 任务状态。 + + :return: The status of this ListBackgroundTasksRespTasks. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ListBackgroundTasksRespTasks. + + 任务状态。 + + :param status: The status of this ListBackgroundTasksRespTasks. + :type: str + """ + self._status = status + + @property + def created_at(self): + """Gets the created_at of this ListBackgroundTasksRespTasks. + + 启动时间。 + + :return: The created_at of this ListBackgroundTasksRespTasks. + :rtype: str + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ListBackgroundTasksRespTasks. + + 启动时间。 + + :param created_at: The created_at of this ListBackgroundTasksRespTasks. + :type: str + """ + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this ListBackgroundTasksRespTasks. + + 结束时间。 + + :return: The updated_at of this ListBackgroundTasksRespTasks. + :rtype: str + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this ListBackgroundTasksRespTasks. + + 结束时间。 + + :param updated_at: The updated_at of this ListBackgroundTasksRespTasks. + :type: str + """ + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListBackgroundTasksRespTasks): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_background_tasks_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_background_tasks_response.py new file mode 100644 index 0000000000..27b7dc9bab --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_background_tasks_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ListBackgroundTasksResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'task_count': 'str', + 'tasks': 'list[ListBackgroundTasksRespTasks]' + } + + attribute_map = { + 'task_count': 'task_count', + 'tasks': 'tasks' + } + + def __init__(self, task_count=None, tasks=None): + """ListBackgroundTasksResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._task_count = None + self._tasks = None + self.discriminator = None + + if task_count is not None: + self.task_count = task_count + if tasks is not None: + self.tasks = tasks + + @property + def task_count(self): + """Gets the task_count of this ListBackgroundTasksResponse. + + 任务数量。 + + :return: The task_count of this ListBackgroundTasksResponse. + :rtype: str + """ + return self._task_count + + @task_count.setter + def task_count(self, task_count): + """Sets the task_count of this ListBackgroundTasksResponse. + + 任务数量。 + + :param task_count: The task_count of this ListBackgroundTasksResponse. + :type: str + """ + self._task_count = task_count + + @property + def tasks(self): + """Gets the tasks of this ListBackgroundTasksResponse. + + 任务列表。 + + :return: The tasks of this ListBackgroundTasksResponse. + :rtype: list[ListBackgroundTasksRespTasks] + """ + return self._tasks + + @tasks.setter + def tasks(self, tasks): + """Sets the tasks of this ListBackgroundTasksResponse. + + 任务列表。 + + :param tasks: The tasks of this ListBackgroundTasksResponse. + :type: list[ListBackgroundTasksRespTasks] + """ + self._tasks = tasks + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListBackgroundTasksResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_instances_details_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_instances_details_request.py new file mode 100644 index 0000000000..5b4fefcf95 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_instances_details_request.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListInstancesDetailsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'engine': 'str', + 'name': 'str', + 'instance_id': 'str', + 'status': 'str', + 'include_failure': 'str', + 'exact_match_name': 'str', + 'enterprise_project_id': 'str' + } + + attribute_map = { + 'engine': 'engine', + 'name': 'name', + 'instance_id': 'instance_id', + 'status': 'status', + 'include_failure': 'include_failure', + 'exact_match_name': 'exact_match_name', + 'enterprise_project_id': 'enterprise_project_id' + } + + def __init__(self, engine=None, name=None, instance_id=None, status=None, include_failure=None, exact_match_name=None, enterprise_project_id=None): + """ListInstancesDetailsRequest - a model defined in huaweicloud sdk""" + + + + self._engine = None + self._name = None + self._instance_id = None + self._status = None + self._include_failure = None + self._exact_match_name = None + self._enterprise_project_id = None + self.discriminator = None + + self.engine = engine + if name is not None: + self.name = name + if instance_id is not None: + self.instance_id = instance_id + if status is not None: + self.status = status + if include_failure is not None: + self.include_failure = include_failure + if exact_match_name is not None: + self.exact_match_name = exact_match_name + if enterprise_project_id is not None: + self.enterprise_project_id = enterprise_project_id + + @property + def engine(self): + """Gets the engine of this ListInstancesDetailsRequest. + + + :return: The engine of this ListInstancesDetailsRequest. + :rtype: str + """ + return self._engine + + @engine.setter + def engine(self, engine): + """Sets the engine of this ListInstancesDetailsRequest. + + + :param engine: The engine of this ListInstancesDetailsRequest. + :type: str + """ + self._engine = engine + + @property + def name(self): + """Gets the name of this ListInstancesDetailsRequest. + + + :return: The name of this ListInstancesDetailsRequest. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListInstancesDetailsRequest. + + + :param name: The name of this ListInstancesDetailsRequest. + :type: str + """ + self._name = name + + @property + def instance_id(self): + """Gets the instance_id of this ListInstancesDetailsRequest. + + + :return: The instance_id of this ListInstancesDetailsRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ListInstancesDetailsRequest. + + + :param instance_id: The instance_id of this ListInstancesDetailsRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def status(self): + """Gets the status of this ListInstancesDetailsRequest. + + + :return: The status of this ListInstancesDetailsRequest. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ListInstancesDetailsRequest. + + + :param status: The status of this ListInstancesDetailsRequest. + :type: str + """ + self._status = status + + @property + def include_failure(self): + """Gets the include_failure of this ListInstancesDetailsRequest. + + + :return: The include_failure of this ListInstancesDetailsRequest. + :rtype: str + """ + return self._include_failure + + @include_failure.setter + def include_failure(self, include_failure): + """Sets the include_failure of this ListInstancesDetailsRequest. + + + :param include_failure: The include_failure of this ListInstancesDetailsRequest. + :type: str + """ + self._include_failure = include_failure + + @property + def exact_match_name(self): + """Gets the exact_match_name of this ListInstancesDetailsRequest. + + + :return: The exact_match_name of this ListInstancesDetailsRequest. + :rtype: str + """ + return self._exact_match_name + + @exact_match_name.setter + def exact_match_name(self, exact_match_name): + """Sets the exact_match_name of this ListInstancesDetailsRequest. + + + :param exact_match_name: The exact_match_name of this ListInstancesDetailsRequest. + :type: str + """ + self._exact_match_name = exact_match_name + + @property + def enterprise_project_id(self): + """Gets the enterprise_project_id of this ListInstancesDetailsRequest. + + + :return: The enterprise_project_id of this ListInstancesDetailsRequest. + :rtype: str + """ + return self._enterprise_project_id + + @enterprise_project_id.setter + def enterprise_project_id(self, enterprise_project_id): + """Sets the enterprise_project_id of this ListInstancesDetailsRequest. + + + :param enterprise_project_id: The enterprise_project_id of this ListInstancesDetailsRequest. + :type: str + """ + self._enterprise_project_id = enterprise_project_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListInstancesDetailsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_instances_details_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_instances_details_response.py new file mode 100644 index 0000000000..6303538349 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_instances_details_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ListInstancesDetailsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instances': 'list[ListInstancesRespInstances]', + 'instance_num': 'int' + } + + attribute_map = { + 'instances': 'instances', + 'instance_num': 'instance_num' + } + + def __init__(self, instances=None, instance_num=None): + """ListInstancesDetailsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._instances = None + self._instance_num = None + self.discriminator = None + + if instances is not None: + self.instances = instances + if instance_num is not None: + self.instance_num = instance_num + + @property + def instances(self): + """Gets the instances of this ListInstancesDetailsResponse. + + 实例列表。 + + :return: The instances of this ListInstancesDetailsResponse. + :rtype: list[ListInstancesRespInstances] + """ + return self._instances + + @instances.setter + def instances(self, instances): + """Sets the instances of this ListInstancesDetailsResponse. + + 实例列表。 + + :param instances: The instances of this ListInstancesDetailsResponse. + :type: list[ListInstancesRespInstances] + """ + self._instances = instances + + @property + def instance_num(self): + """Gets the instance_num of this ListInstancesDetailsResponse. + + 实例个数。 + + :return: The instance_num of this ListInstancesDetailsResponse. + :rtype: int + """ + return self._instance_num + + @instance_num.setter + def instance_num(self, instance_num): + """Sets the instance_num of this ListInstancesDetailsResponse. + + 实例个数。 + + :param instance_num: The instance_num of this ListInstancesDetailsResponse. + :type: int + """ + self._instance_num = instance_num + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListInstancesDetailsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_instances_resp_instances.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_instances_resp_instances.py new file mode 100644 index 0000000000..65de9b0308 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_instances_resp_instances.py @@ -0,0 +1,1217 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListInstancesRespInstances: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'engine': 'str', + 'engine_version': 'str', + 'specification': 'str', + 'storage_space': 'int', + 'used_storage_space': 'int', + 'connect_address': 'str', + 'port': 'int', + 'status': 'str', + 'description': 'str', + 'instance_id': 'str', + 'resource_spec_code': 'str', + 'charging_mode': 'int', + 'vpc_id': 'str', + 'vpc_name': 'str', + 'created_at': 'str', + 'user_id': 'str', + 'user_name': 'str', + 'order_id': 'str', + 'maintain_begin': 'str', + 'maintain_end': 'str', + 'enable_publicip': 'bool', + 'publicip_address': 'str', + 'publicip_id': 'str', + 'management_connect_address': 'str', + 'ssl_enable': 'bool', + 'enterprise_project_id': 'str', + 'is_logical_volume': 'bool', + 'extend_times': 'int', + 'type': 'str', + 'product_id': 'str', + 'security_group_id': 'str', + 'security_group_name': 'str', + 'subnet_id': 'str', + 'available_zones': 'list[str]', + 'total_storage_space': 'int', + 'storage_resource_id': 'str', + 'storage_spec_code': 'str', + 'service_type': 'str', + 'storage_type': 'str', + 'ipv6_enable': 'bool', + 'ipv6_connect_addresses': 'list[str]' + } + + attribute_map = { + 'name': 'name', + 'engine': 'engine', + 'engine_version': 'engine_version', + 'specification': 'specification', + 'storage_space': 'storage_space', + 'used_storage_space': 'used_storage_space', + 'connect_address': 'connect_address', + 'port': 'port', + 'status': 'status', + 'description': 'description', + 'instance_id': 'instance_id', + 'resource_spec_code': 'resource_spec_code', + 'charging_mode': 'charging_mode', + 'vpc_id': 'vpc_id', + 'vpc_name': 'vpc_name', + 'created_at': 'created_at', + 'user_id': 'user_id', + 'user_name': 'user_name', + 'order_id': 'order_id', + 'maintain_begin': 'maintain_begin', + 'maintain_end': 'maintain_end', + 'enable_publicip': 'enable_publicip', + 'publicip_address': 'publicip_address', + 'publicip_id': 'publicip_id', + 'management_connect_address': 'management_connect_address', + 'ssl_enable': 'ssl_enable', + 'enterprise_project_id': 'enterprise_project_id', + 'is_logical_volume': 'is_logical_volume', + 'extend_times': 'extend_times', + 'type': 'type', + 'product_id': 'product_id', + 'security_group_id': 'security_group_id', + 'security_group_name': 'security_group_name', + 'subnet_id': 'subnet_id', + 'available_zones': 'available_zones', + 'total_storage_space': 'total_storage_space', + 'storage_resource_id': 'storage_resource_id', + 'storage_spec_code': 'storage_spec_code', + 'service_type': 'service_type', + 'storage_type': 'storage_type', + 'ipv6_enable': 'ipv6_enable', + 'ipv6_connect_addresses': 'ipv6_connect_addresses' + } + + def __init__(self, name=None, engine=None, engine_version=None, specification=None, storage_space=None, used_storage_space=None, connect_address=None, port=None, status=None, description=None, instance_id=None, resource_spec_code=None, charging_mode=None, vpc_id=None, vpc_name=None, created_at=None, user_id=None, user_name=None, order_id=None, maintain_begin=None, maintain_end=None, enable_publicip=None, publicip_address=None, publicip_id=None, management_connect_address=None, ssl_enable=None, enterprise_project_id=None, is_logical_volume=None, extend_times=None, type=None, product_id=None, security_group_id=None, security_group_name=None, subnet_id=None, available_zones=None, total_storage_space=None, storage_resource_id=None, storage_spec_code=None, service_type=None, storage_type=None, ipv6_enable=None, ipv6_connect_addresses=None): + """ListInstancesRespInstances - a model defined in huaweicloud sdk""" + + + + self._name = None + self._engine = None + self._engine_version = None + self._specification = None + self._storage_space = None + self._used_storage_space = None + self._connect_address = None + self._port = None + self._status = None + self._description = None + self._instance_id = None + self._resource_spec_code = None + self._charging_mode = None + self._vpc_id = None + self._vpc_name = None + self._created_at = None + self._user_id = None + self._user_name = None + self._order_id = None + self._maintain_begin = None + self._maintain_end = None + self._enable_publicip = None + self._publicip_address = None + self._publicip_id = None + self._management_connect_address = None + self._ssl_enable = None + self._enterprise_project_id = None + self._is_logical_volume = None + self._extend_times = None + self._type = None + self._product_id = None + self._security_group_id = None + self._security_group_name = None + self._subnet_id = None + self._available_zones = None + self._total_storage_space = None + self._storage_resource_id = None + self._storage_spec_code = None + self._service_type = None + self._storage_type = None + self._ipv6_enable = None + self._ipv6_connect_addresses = None + self.discriminator = None + + if name is not None: + self.name = name + if engine is not None: + self.engine = engine + if engine_version is not None: + self.engine_version = engine_version + if specification is not None: + self.specification = specification + if storage_space is not None: + self.storage_space = storage_space + if used_storage_space is not None: + self.used_storage_space = used_storage_space + if connect_address is not None: + self.connect_address = connect_address + if port is not None: + self.port = port + if status is not None: + self.status = status + if description is not None: + self.description = description + if instance_id is not None: + self.instance_id = instance_id + if resource_spec_code is not None: + self.resource_spec_code = resource_spec_code + if charging_mode is not None: + self.charging_mode = charging_mode + if vpc_id is not None: + self.vpc_id = vpc_id + if vpc_name is not None: + self.vpc_name = vpc_name + if created_at is not None: + self.created_at = created_at + if user_id is not None: + self.user_id = user_id + if user_name is not None: + self.user_name = user_name + if order_id is not None: + self.order_id = order_id + if maintain_begin is not None: + self.maintain_begin = maintain_begin + if maintain_end is not None: + self.maintain_end = maintain_end + if enable_publicip is not None: + self.enable_publicip = enable_publicip + if publicip_address is not None: + self.publicip_address = publicip_address + if publicip_id is not None: + self.publicip_id = publicip_id + if management_connect_address is not None: + self.management_connect_address = management_connect_address + if ssl_enable is not None: + self.ssl_enable = ssl_enable + if enterprise_project_id is not None: + self.enterprise_project_id = enterprise_project_id + if is_logical_volume is not None: + self.is_logical_volume = is_logical_volume + if extend_times is not None: + self.extend_times = extend_times + if type is not None: + self.type = type + if product_id is not None: + self.product_id = product_id + if security_group_id is not None: + self.security_group_id = security_group_id + if security_group_name is not None: + self.security_group_name = security_group_name + if subnet_id is not None: + self.subnet_id = subnet_id + if available_zones is not None: + self.available_zones = available_zones + if total_storage_space is not None: + self.total_storage_space = total_storage_space + if storage_resource_id is not None: + self.storage_resource_id = storage_resource_id + if storage_spec_code is not None: + self.storage_spec_code = storage_spec_code + if service_type is not None: + self.service_type = service_type + if storage_type is not None: + self.storage_type = storage_type + if ipv6_enable is not None: + self.ipv6_enable = ipv6_enable + if ipv6_connect_addresses is not None: + self.ipv6_connect_addresses = ipv6_connect_addresses + + @property + def name(self): + """Gets the name of this ListInstancesRespInstances. + + 实例名称。 + + :return: The name of this ListInstancesRespInstances. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListInstancesRespInstances. + + 实例名称。 + + :param name: The name of this ListInstancesRespInstances. + :type: str + """ + self._name = name + + @property + def engine(self): + """Gets the engine of this ListInstancesRespInstances. + + 引擎。 + + :return: The engine of this ListInstancesRespInstances. + :rtype: str + """ + return self._engine + + @engine.setter + def engine(self, engine): + """Sets the engine of this ListInstancesRespInstances. + + 引擎。 + + :param engine: The engine of this ListInstancesRespInstances. + :type: str + """ + self._engine = engine + + @property + def engine_version(self): + """Gets the engine_version of this ListInstancesRespInstances. + + 版本。 + + :return: The engine_version of this ListInstancesRespInstances. + :rtype: str + """ + return self._engine_version + + @engine_version.setter + def engine_version(self, engine_version): + """Sets the engine_version of this ListInstancesRespInstances. + + 版本。 + + :param engine_version: The engine_version of this ListInstancesRespInstances. + :type: str + """ + self._engine_version = engine_version + + @property + def specification(self): + """Gets the specification of this ListInstancesRespInstances. + + 实例规格。 - RabbitMQ实例单机返回vm规格。 - RabbitMQ实例集群返回vm规格和节点数。 + + :return: The specification of this ListInstancesRespInstances. + :rtype: str + """ + return self._specification + + @specification.setter + def specification(self, specification): + """Sets the specification of this ListInstancesRespInstances. + + 实例规格。 - RabbitMQ实例单机返回vm规格。 - RabbitMQ实例集群返回vm规格和节点数。 + + :param specification: The specification of this ListInstancesRespInstances. + :type: str + """ + self._specification = specification + + @property + def storage_space(self): + """Gets the storage_space of this ListInstancesRespInstances. + + 消息存储空间,单位:GB。 + + :return: The storage_space of this ListInstancesRespInstances. + :rtype: int + """ + return self._storage_space + + @storage_space.setter + def storage_space(self, storage_space): + """Sets the storage_space of this ListInstancesRespInstances. + + 消息存储空间,单位:GB。 + + :param storage_space: The storage_space of this ListInstancesRespInstances. + :type: int + """ + self._storage_space = storage_space + + @property + def used_storage_space(self): + """Gets the used_storage_space of this ListInstancesRespInstances. + + 已使用的消息存储空间,单位:GB。 + + :return: The used_storage_space of this ListInstancesRespInstances. + :rtype: int + """ + return self._used_storage_space + + @used_storage_space.setter + def used_storage_space(self, used_storage_space): + """Sets the used_storage_space of this ListInstancesRespInstances. + + 已使用的消息存储空间,单位:GB。 + + :param used_storage_space: The used_storage_space of this ListInstancesRespInstances. + :type: int + """ + self._used_storage_space = used_storage_space + + @property + def connect_address(self): + """Gets the connect_address of this ListInstancesRespInstances. + + 实例连接IP地址。 + + :return: The connect_address of this ListInstancesRespInstances. + :rtype: str + """ + return self._connect_address + + @connect_address.setter + def connect_address(self, connect_address): + """Sets the connect_address of this ListInstancesRespInstances. + + 实例连接IP地址。 + + :param connect_address: The connect_address of this ListInstancesRespInstances. + :type: str + """ + self._connect_address = connect_address + + @property + def port(self): + """Gets the port of this ListInstancesRespInstances. + + 实例连接端口。 + + :return: The port of this ListInstancesRespInstances. + :rtype: int + """ + return self._port + + @port.setter + def port(self, port): + """Sets the port of this ListInstancesRespInstances. + + 实例连接端口。 + + :param port: The port of this ListInstancesRespInstances. + :type: int + """ + self._port = port + + @property + def status(self): + """Gets the status of this ListInstancesRespInstances. + + 实例的状态。详细状态说明见[实例状态说明](https://support.huaweicloud.com/api-rabbitmq/rabbitmq-api-180514012.html)。 + + :return: The status of this ListInstancesRespInstances. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ListInstancesRespInstances. + + 实例的状态。详细状态说明见[实例状态说明](https://support.huaweicloud.com/api-rabbitmq/rabbitmq-api-180514012.html)。 + + :param status: The status of this ListInstancesRespInstances. + :type: str + """ + self._status = status + + @property + def description(self): + """Gets the description of this ListInstancesRespInstances. + + 实例描述。 + + :return: The description of this ListInstancesRespInstances. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this ListInstancesRespInstances. + + 实例描述。 + + :param description: The description of this ListInstancesRespInstances. + :type: str + """ + self._description = description + + @property + def instance_id(self): + """Gets the instance_id of this ListInstancesRespInstances. + + 实例ID。 + + :return: The instance_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ListInstancesRespInstances. + + 实例ID。 + + :param instance_id: The instance_id of this ListInstancesRespInstances. + :type: str + """ + self._instance_id = instance_id + + @property + def resource_spec_code(self): + """Gets the resource_spec_code of this ListInstancesRespInstances. + + 资源规格标识。 - dms.instance.rabbitmq.single.c3.2u4g:RabbitMQ单机,vm规格2u4g - dms.instance.rabbitmq.single.c3.4u8g:RabbitMQ单机,vm规格4u8g - dms.instance.rabbitmq.single.c3.8u16g:RabbitMQ单机,vm规格8u16g - dms.instance.rabbitmq.single.c3.16u32g:RabbitMQ单机,vm规格16u32g - dms.instance.rabbitmq.cluster.c3.4u8g.3:RabbitMQ集群,vm规格4u8g,3个节点 - dms.instance.rabbitmq.cluster.c3.4u8g.5:RabbitMQ集群,vm规格4u8g,5个节点 - dms.instance.rabbitmq.cluster.c3.4u8g.7:RabbitMQ集群,vm规格4u8g,7个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.3:RabbitMQ集群,vm规格8u16g,3个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.5:RabbitMQ集群,vm规格8u16g,5个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.7:RabbitMQ集群,vm规格8u16g,7个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.3:RabbitMQ集群,vm规格16u32g,3个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.5:RabbitMQ集群,vm规格16u32g,5个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.7:RabbitMQ集群,vm规格16u32g,7个节点 + + :return: The resource_spec_code of this ListInstancesRespInstances. + :rtype: str + """ + return self._resource_spec_code + + @resource_spec_code.setter + def resource_spec_code(self, resource_spec_code): + """Sets the resource_spec_code of this ListInstancesRespInstances. + + 资源规格标识。 - dms.instance.rabbitmq.single.c3.2u4g:RabbitMQ单机,vm规格2u4g - dms.instance.rabbitmq.single.c3.4u8g:RabbitMQ单机,vm规格4u8g - dms.instance.rabbitmq.single.c3.8u16g:RabbitMQ单机,vm规格8u16g - dms.instance.rabbitmq.single.c3.16u32g:RabbitMQ单机,vm规格16u32g - dms.instance.rabbitmq.cluster.c3.4u8g.3:RabbitMQ集群,vm规格4u8g,3个节点 - dms.instance.rabbitmq.cluster.c3.4u8g.5:RabbitMQ集群,vm规格4u8g,5个节点 - dms.instance.rabbitmq.cluster.c3.4u8g.7:RabbitMQ集群,vm规格4u8g,7个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.3:RabbitMQ集群,vm规格8u16g,3个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.5:RabbitMQ集群,vm规格8u16g,5个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.7:RabbitMQ集群,vm规格8u16g,7个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.3:RabbitMQ集群,vm规格16u32g,3个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.5:RabbitMQ集群,vm规格16u32g,5个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.7:RabbitMQ集群,vm规格16u32g,7个节点 + + :param resource_spec_code: The resource_spec_code of this ListInstancesRespInstances. + :type: str + """ + self._resource_spec_code = resource_spec_code + + @property + def charging_mode(self): + """Gets the charging_mode of this ListInstancesRespInstances. + + 付费模式,1表示按需计费,0表示包年/包月计费。 + + :return: The charging_mode of this ListInstancesRespInstances. + :rtype: int + """ + return self._charging_mode + + @charging_mode.setter + def charging_mode(self, charging_mode): + """Sets the charging_mode of this ListInstancesRespInstances. + + 付费模式,1表示按需计费,0表示包年/包月计费。 + + :param charging_mode: The charging_mode of this ListInstancesRespInstances. + :type: int + """ + self._charging_mode = charging_mode + + @property + def vpc_id(self): + """Gets the vpc_id of this ListInstancesRespInstances. + + VPC ID。 + + :return: The vpc_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._vpc_id + + @vpc_id.setter + def vpc_id(self, vpc_id): + """Sets the vpc_id of this ListInstancesRespInstances. + + VPC ID。 + + :param vpc_id: The vpc_id of this ListInstancesRespInstances. + :type: str + """ + self._vpc_id = vpc_id + + @property + def vpc_name(self): + """Gets the vpc_name of this ListInstancesRespInstances. + + VPC的名称。 + + :return: The vpc_name of this ListInstancesRespInstances. + :rtype: str + """ + return self._vpc_name + + @vpc_name.setter + def vpc_name(self, vpc_name): + """Sets the vpc_name of this ListInstancesRespInstances. + + VPC的名称。 + + :param vpc_name: The vpc_name of this ListInstancesRespInstances. + :type: str + """ + self._vpc_name = vpc_name + + @property + def created_at(self): + """Gets the created_at of this ListInstancesRespInstances. + + 完成创建时间。 格式为时间戳,指从格林威治时间 1970年01月01日00时00分00秒起至指定时间的偏差总毫秒数。 + + :return: The created_at of this ListInstancesRespInstances. + :rtype: str + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ListInstancesRespInstances. + + 完成创建时间。 格式为时间戳,指从格林威治时间 1970年01月01日00时00分00秒起至指定时间的偏差总毫秒数。 + + :param created_at: The created_at of this ListInstancesRespInstances. + :type: str + """ + self._created_at = created_at + + @property + def user_id(self): + """Gets the user_id of this ListInstancesRespInstances. + + 用户ID。 + + :return: The user_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this ListInstancesRespInstances. + + 用户ID。 + + :param user_id: The user_id of this ListInstancesRespInstances. + :type: str + """ + self._user_id = user_id + + @property + def user_name(self): + """Gets the user_name of this ListInstancesRespInstances. + + 用户名。 + + :return: The user_name of this ListInstancesRespInstances. + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """Sets the user_name of this ListInstancesRespInstances. + + 用户名。 + + :param user_name: The user_name of this ListInstancesRespInstances. + :type: str + """ + self._user_name = user_name + + @property + def order_id(self): + """Gets the order_id of this ListInstancesRespInstances. + + 订单ID,只有在包周期计费时才会有order_id值,其他计费方式order_id值为空。 + + :return: The order_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this ListInstancesRespInstances. + + 订单ID,只有在包周期计费时才会有order_id值,其他计费方式order_id值为空。 + + :param order_id: The order_id of this ListInstancesRespInstances. + :type: str + """ + self._order_id = order_id + + @property + def maintain_begin(self): + """Gets the maintain_begin of this ListInstancesRespInstances. + + 维护时间窗开始时间,格式为HH:mm:ss。 + + :return: The maintain_begin of this ListInstancesRespInstances. + :rtype: str + """ + return self._maintain_begin + + @maintain_begin.setter + def maintain_begin(self, maintain_begin): + """Sets the maintain_begin of this ListInstancesRespInstances. + + 维护时间窗开始时间,格式为HH:mm:ss。 + + :param maintain_begin: The maintain_begin of this ListInstancesRespInstances. + :type: str + """ + self._maintain_begin = maintain_begin + + @property + def maintain_end(self): + """Gets the maintain_end of this ListInstancesRespInstances. + + 维护时间窗结束时间,格式为HH:mm:ss。 + + :return: The maintain_end of this ListInstancesRespInstances. + :rtype: str + """ + return self._maintain_end + + @maintain_end.setter + def maintain_end(self, maintain_end): + """Sets the maintain_end of this ListInstancesRespInstances. + + 维护时间窗结束时间,格式为HH:mm:ss。 + + :param maintain_end: The maintain_end of this ListInstancesRespInstances. + :type: str + """ + self._maintain_end = maintain_end + + @property + def enable_publicip(self): + """Gets the enable_publicip of this ListInstancesRespInstances. + + RabbitMQ实例是否开启公网访问功能。 - true:开启 - false:未开启 + + :return: The enable_publicip of this ListInstancesRespInstances. + :rtype: bool + """ + return self._enable_publicip + + @enable_publicip.setter + def enable_publicip(self, enable_publicip): + """Sets the enable_publicip of this ListInstancesRespInstances. + + RabbitMQ实例是否开启公网访问功能。 - true:开启 - false:未开启 + + :param enable_publicip: The enable_publicip of this ListInstancesRespInstances. + :type: bool + """ + self._enable_publicip = enable_publicip + + @property + def publicip_address(self): + """Gets the publicip_address of this ListInstancesRespInstances. + + RabbitMQ实例绑定的弹性IP地址。 如果未开启公网访问功能,该字段值为null。 + + :return: The publicip_address of this ListInstancesRespInstances. + :rtype: str + """ + return self._publicip_address + + @publicip_address.setter + def publicip_address(self, publicip_address): + """Sets the publicip_address of this ListInstancesRespInstances. + + RabbitMQ实例绑定的弹性IP地址。 如果未开启公网访问功能,该字段值为null。 + + :param publicip_address: The publicip_address of this ListInstancesRespInstances. + :type: str + """ + self._publicip_address = publicip_address + + @property + def publicip_id(self): + """Gets the publicip_id of this ListInstancesRespInstances. + + RabbitMQ实例绑定的弹性IP地址的ID。 如果未开启公网访问功能,该字段值为null。 + + :return: The publicip_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._publicip_id + + @publicip_id.setter + def publicip_id(self, publicip_id): + """Sets the publicip_id of this ListInstancesRespInstances. + + RabbitMQ实例绑定的弹性IP地址的ID。 如果未开启公网访问功能,该字段值为null。 + + :param publicip_id: The publicip_id of this ListInstancesRespInstances. + :type: str + """ + self._publicip_id = publicip_id + + @property + def management_connect_address(self): + """Gets the management_connect_address of this ListInstancesRespInstances. + + RabbitMQ实例的管理地址。 + + :return: The management_connect_address of this ListInstancesRespInstances. + :rtype: str + """ + return self._management_connect_address + + @management_connect_address.setter + def management_connect_address(self, management_connect_address): + """Sets the management_connect_address of this ListInstancesRespInstances. + + RabbitMQ实例的管理地址。 + + :param management_connect_address: The management_connect_address of this ListInstancesRespInstances. + :type: str + """ + self._management_connect_address = management_connect_address + + @property + def ssl_enable(self): + """Gets the ssl_enable of this ListInstancesRespInstances. + + 是否开启安全认证。 - true:开启 - false:未开启 + + :return: The ssl_enable of this ListInstancesRespInstances. + :rtype: bool + """ + return self._ssl_enable + + @ssl_enable.setter + def ssl_enable(self, ssl_enable): + """Sets the ssl_enable of this ListInstancesRespInstances. + + 是否开启安全认证。 - true:开启 - false:未开启 + + :param ssl_enable: The ssl_enable of this ListInstancesRespInstances. + :type: bool + """ + self._ssl_enable = ssl_enable + + @property + def enterprise_project_id(self): + """Gets the enterprise_project_id of this ListInstancesRespInstances. + + 企业项目ID。 + + :return: The enterprise_project_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._enterprise_project_id + + @enterprise_project_id.setter + def enterprise_project_id(self, enterprise_project_id): + """Sets the enterprise_project_id of this ListInstancesRespInstances. + + 企业项目ID。 + + :param enterprise_project_id: The enterprise_project_id of this ListInstancesRespInstances. + :type: str + """ + self._enterprise_project_id = enterprise_project_id + + @property + def is_logical_volume(self): + """Gets the is_logical_volume of this ListInstancesRespInstances. + + 实例扩容时用于区分老实例与新实例。 - true:新创建的实例,允许磁盘动态扩容不需要重启。 - false:老实例 + + :return: The is_logical_volume of this ListInstancesRespInstances. + :rtype: bool + """ + return self._is_logical_volume + + @is_logical_volume.setter + def is_logical_volume(self, is_logical_volume): + """Sets the is_logical_volume of this ListInstancesRespInstances. + + 实例扩容时用于区分老实例与新实例。 - true:新创建的实例,允许磁盘动态扩容不需要重启。 - false:老实例 + + :param is_logical_volume: The is_logical_volume of this ListInstancesRespInstances. + :type: bool + """ + self._is_logical_volume = is_logical_volume + + @property + def extend_times(self): + """Gets the extend_times of this ListInstancesRespInstances. + + 实例扩容磁盘次数,如果超过20次则无法扩容磁盘。 + + :return: The extend_times of this ListInstancesRespInstances. + :rtype: int + """ + return self._extend_times + + @extend_times.setter + def extend_times(self, extend_times): + """Sets the extend_times of this ListInstancesRespInstances. + + 实例扩容磁盘次数,如果超过20次则无法扩容磁盘。 + + :param extend_times: The extend_times of this ListInstancesRespInstances. + :type: int + """ + self._extend_times = extend_times + + @property + def type(self): + """Gets the type of this ListInstancesRespInstances. + + 实例类型:集群,cluster。 + + :return: The type of this ListInstancesRespInstances. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ListInstancesRespInstances. + + 实例类型:集群,cluster。 + + :param type: The type of this ListInstancesRespInstances. + :type: str + """ + self._type = type + + @property + def product_id(self): + """Gets the product_id of this ListInstancesRespInstances. + + 产品标识。 + + :return: The product_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._product_id + + @product_id.setter + def product_id(self, product_id): + """Sets the product_id of this ListInstancesRespInstances. + + 产品标识。 + + :param product_id: The product_id of this ListInstancesRespInstances. + :type: str + """ + self._product_id = product_id + + @property + def security_group_id(self): + """Gets the security_group_id of this ListInstancesRespInstances. + + 安全组ID。 + + :return: The security_group_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._security_group_id + + @security_group_id.setter + def security_group_id(self, security_group_id): + """Sets the security_group_id of this ListInstancesRespInstances. + + 安全组ID。 + + :param security_group_id: The security_group_id of this ListInstancesRespInstances. + :type: str + """ + self._security_group_id = security_group_id + + @property + def security_group_name(self): + """Gets the security_group_name of this ListInstancesRespInstances. + + 租户安全组名称。 + + :return: The security_group_name of this ListInstancesRespInstances. + :rtype: str + """ + return self._security_group_name + + @security_group_name.setter + def security_group_name(self, security_group_name): + """Sets the security_group_name of this ListInstancesRespInstances. + + 租户安全组名称。 + + :param security_group_name: The security_group_name of this ListInstancesRespInstances. + :type: str + """ + self._security_group_name = security_group_name + + @property + def subnet_id(self): + """Gets the subnet_id of this ListInstancesRespInstances. + + 子网ID。 + + :return: The subnet_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """Sets the subnet_id of this ListInstancesRespInstances. + + 子网ID。 + + :param subnet_id: The subnet_id of this ListInstancesRespInstances. + :type: str + """ + self._subnet_id = subnet_id + + @property + def available_zones(self): + """Gets the available_zones of this ListInstancesRespInstances. + + 实例节点所在的可用区,返回“可用区ID”。 + + :return: The available_zones of this ListInstancesRespInstances. + :rtype: list[str] + """ + return self._available_zones + + @available_zones.setter + def available_zones(self, available_zones): + """Sets the available_zones of this ListInstancesRespInstances. + + 实例节点所在的可用区,返回“可用区ID”。 + + :param available_zones: The available_zones of this ListInstancesRespInstances. + :type: list[str] + """ + self._available_zones = available_zones + + @property + def total_storage_space(self): + """Gets the total_storage_space of this ListInstancesRespInstances. + + 总共消息存储空间,单位:GB。 + + :return: The total_storage_space of this ListInstancesRespInstances. + :rtype: int + """ + return self._total_storage_space + + @total_storage_space.setter + def total_storage_space(self, total_storage_space): + """Sets the total_storage_space of this ListInstancesRespInstances. + + 总共消息存储空间,单位:GB。 + + :param total_storage_space: The total_storage_space of this ListInstancesRespInstances. + :type: int + """ + self._total_storage_space = total_storage_space + + @property + def storage_resource_id(self): + """Gets the storage_resource_id of this ListInstancesRespInstances. + + 存储资源ID。 + + :return: The storage_resource_id of this ListInstancesRespInstances. + :rtype: str + """ + return self._storage_resource_id + + @storage_resource_id.setter + def storage_resource_id(self, storage_resource_id): + """Sets the storage_resource_id of this ListInstancesRespInstances. + + 存储资源ID。 + + :param storage_resource_id: The storage_resource_id of this ListInstancesRespInstances. + :type: str + """ + self._storage_resource_id = storage_resource_id + + @property + def storage_spec_code(self): + """Gets the storage_spec_code of this ListInstancesRespInstances. + + IO规格。 + + :return: The storage_spec_code of this ListInstancesRespInstances. + :rtype: str + """ + return self._storage_spec_code + + @storage_spec_code.setter + def storage_spec_code(self, storage_spec_code): + """Sets the storage_spec_code of this ListInstancesRespInstances. + + IO规格。 + + :param storage_spec_code: The storage_spec_code of this ListInstancesRespInstances. + :type: str + """ + self._storage_spec_code = storage_spec_code + + @property + def service_type(self): + """Gets the service_type of this ListInstancesRespInstances. + + 服务类型。 + + :return: The service_type of this ListInstancesRespInstances. + :rtype: str + """ + return self._service_type + + @service_type.setter + def service_type(self, service_type): + """Sets the service_type of this ListInstancesRespInstances. + + 服务类型。 + + :param service_type: The service_type of this ListInstancesRespInstances. + :type: str + """ + self._service_type = service_type + + @property + def storage_type(self): + """Gets the storage_type of this ListInstancesRespInstances. + + 存储类型。 + + :return: The storage_type of this ListInstancesRespInstances. + :rtype: str + """ + return self._storage_type + + @storage_type.setter + def storage_type(self, storage_type): + """Sets the storage_type of this ListInstancesRespInstances. + + 存储类型。 + + :param storage_type: The storage_type of this ListInstancesRespInstances. + :type: str + """ + self._storage_type = storage_type + + @property + def ipv6_enable(self): + """Gets the ipv6_enable of this ListInstancesRespInstances. + + 是否开启ipv6。 + + :return: The ipv6_enable of this ListInstancesRespInstances. + :rtype: bool + """ + return self._ipv6_enable + + @ipv6_enable.setter + def ipv6_enable(self, ipv6_enable): + """Sets the ipv6_enable of this ListInstancesRespInstances. + + 是否开启ipv6。 + + :param ipv6_enable: The ipv6_enable of this ListInstancesRespInstances. + :type: bool + """ + self._ipv6_enable = ipv6_enable + + @property + def ipv6_connect_addresses(self): + """Gets the ipv6_connect_addresses of this ListInstancesRespInstances. + + IPv6的连接地址。 + + :return: The ipv6_connect_addresses of this ListInstancesRespInstances. + :rtype: list[str] + """ + return self._ipv6_connect_addresses + + @ipv6_connect_addresses.setter + def ipv6_connect_addresses(self, ipv6_connect_addresses): + """Sets the ipv6_connect_addresses of this ListInstancesRespInstances. + + IPv6的连接地址。 + + :param ipv6_connect_addresses: The ipv6_connect_addresses of this ListInstancesRespInstances. + :type: list[str] + """ + self._ipv6_connect_addresses = ipv6_connect_addresses + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListInstancesRespInstances): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_plugins_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_plugins_request.py new file mode 100644 index 0000000000..2a26b583e7 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_plugins_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListPluginsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id' + } + + def __init__(self, instance_id=None): + """ListPluginsRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self.discriminator = None + + self.instance_id = instance_id + + @property + def instance_id(self): + """Gets the instance_id of this ListPluginsRequest. + + + :return: The instance_id of this ListPluginsRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ListPluginsRequest. + + + :param instance_id: The instance_id of this ListPluginsRequest. + :type: str + """ + self._instance_id = instance_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListPluginsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_plugins_resp_plugins.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_plugins_resp_plugins.py new file mode 100644 index 0000000000..460f7b2b84 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_plugins_resp_plugins.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListPluginsRespPlugins: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'running': 'bool', + 'enable': 'bool', + 'name': 'str', + 'version': 'str' + } + + attribute_map = { + 'running': 'running', + 'enable': 'enable', + 'name': 'name', + 'version': 'version' + } + + def __init__(self, running=None, enable=None, name=None, version=None): + """ListPluginsRespPlugins - a model defined in huaweicloud sdk""" + + + + self._running = None + self._enable = None + self._name = None + self._version = None + self.discriminator = None + + if running is not None: + self.running = running + if enable is not None: + self.enable = enable + if name is not None: + self.name = name + if version is not None: + self.version = version + + @property + def running(self): + """Gets the running of this ListPluginsRespPlugins. + + 是否运行。 + + :return: The running of this ListPluginsRespPlugins. + :rtype: bool + """ + return self._running + + @running.setter + def running(self, running): + """Sets the running of this ListPluginsRespPlugins. + + 是否运行。 + + :param running: The running of this ListPluginsRespPlugins. + :type: bool + """ + self._running = running + + @property + def enable(self): + """Gets the enable of this ListPluginsRespPlugins. + + 是否启用。 + + :return: The enable of this ListPluginsRespPlugins. + :rtype: bool + """ + return self._enable + + @enable.setter + def enable(self, enable): + """Sets the enable of this ListPluginsRespPlugins. + + 是否启用。 + + :param enable: The enable of this ListPluginsRespPlugins. + :type: bool + """ + self._enable = enable + + @property + def name(self): + """Gets the name of this ListPluginsRespPlugins. + + 插件名称。 + + :return: The name of this ListPluginsRespPlugins. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListPluginsRespPlugins. + + 插件名称。 + + :param name: The name of this ListPluginsRespPlugins. + :type: str + """ + self._name = name + + @property + def version(self): + """Gets the version of this ListPluginsRespPlugins. + + 插件版本。 + + :return: The version of this ListPluginsRespPlugins. + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this ListPluginsRespPlugins. + + 插件版本。 + + :param version: The version of this ListPluginsRespPlugins. + :type: str + """ + self._version = version + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListPluginsRespPlugins): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_plugins_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_plugins_response.py new file mode 100644 index 0000000000..85050bf306 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_plugins_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ListPluginsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'plugins': 'list[ListPluginsRespPlugins]' + } + + attribute_map = { + 'plugins': 'plugins' + } + + def __init__(self, plugins=None): + """ListPluginsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._plugins = None + self.discriminator = None + + if plugins is not None: + self.plugins = plugins + + @property + def plugins(self): + """Gets the plugins of this ListPluginsResponse. + + 插件信息列表。 + + :return: The plugins of this ListPluginsResponse. + :rtype: list[ListPluginsRespPlugins] + """ + return self._plugins + + @plugins.setter + def plugins(self, plugins): + """Sets the plugins of this ListPluginsResponse. + + 插件信息列表。 + + :param plugins: The plugins of this ListPluginsResponse. + :type: list[ListPluginsRespPlugins] + """ + self._plugins = plugins + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListPluginsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_request.py new file mode 100644 index 0000000000..e051cb35ed --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListProductsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'engine': 'str' + } + + attribute_map = { + 'engine': 'engine' + } + + def __init__(self, engine=None): + """ListProductsRequest - a model defined in huaweicloud sdk""" + + + + self._engine = None + self.discriminator = None + + self.engine = engine + + @property + def engine(self): + """Gets the engine of this ListProductsRequest. + + + :return: The engine of this ListProductsRequest. + :rtype: str + """ + return self._engine + + @engine.setter + def engine(self, engine): + """Sets the engine of this ListProductsRequest. + + + :param engine: The engine of this ListProductsRequest. + :type: str + """ + self._engine = engine + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListProductsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_resp_detail.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_resp_detail.py new file mode 100644 index 0000000000..77e00d783e --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_resp_detail.py @@ -0,0 +1,299 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListProductsRespDetail: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'storage': 'str', + 'product_id': 'str', + 'spec_code': 'str', + 'io': 'list[ListProductsRespIo]', + 'unavailable_zones': 'list[str]', + 'available_zones': 'list[str]', + 'ecs_flavor_id': 'str', + 'arch_type': 'str' + } + + attribute_map = { + 'storage': 'storage', + 'product_id': 'product_id', + 'spec_code': 'spec_code', + 'io': 'io', + 'unavailable_zones': 'unavailable_zones', + 'available_zones': 'available_zones', + 'ecs_flavor_id': 'ecs_flavor_id', + 'arch_type': 'arch_type' + } + + def __init__(self, storage=None, product_id=None, spec_code=None, io=None, unavailable_zones=None, available_zones=None, ecs_flavor_id=None, arch_type=None): + """ListProductsRespDetail - a model defined in huaweicloud sdk""" + + + + self._storage = None + self._product_id = None + self._spec_code = None + self._io = None + self._unavailable_zones = None + self._available_zones = None + self._ecs_flavor_id = None + self._arch_type = None + self.discriminator = None + + if storage is not None: + self.storage = storage + if product_id is not None: + self.product_id = product_id + if spec_code is not None: + self.spec_code = spec_code + if io is not None: + self.io = io + if unavailable_zones is not None: + self.unavailable_zones = unavailable_zones + if available_zones is not None: + self.available_zones = available_zones + if ecs_flavor_id is not None: + self.ecs_flavor_id = ecs_flavor_id + if arch_type is not None: + self.arch_type = arch_type + + @property + def storage(self): + """Gets the storage of this ListProductsRespDetail. + + 消息存储空间。 + + :return: The storage of this ListProductsRespDetail. + :rtype: str + """ + return self._storage + + @storage.setter + def storage(self, storage): + """Sets the storage of this ListProductsRespDetail. + + 消息存储空间。 + + :param storage: The storage of this ListProductsRespDetail. + :type: str + """ + self._storage = storage + + @property + def product_id(self): + """Gets the product_id of this ListProductsRespDetail. + + 产品ID。 + + :return: The product_id of this ListProductsRespDetail. + :rtype: str + """ + return self._product_id + + @product_id.setter + def product_id(self, product_id): + """Sets the product_id of this ListProductsRespDetail. + + 产品ID。 + + :param product_id: The product_id of this ListProductsRespDetail. + :type: str + """ + self._product_id = product_id + + @property + def spec_code(self): + """Gets the spec_code of this ListProductsRespDetail. + + 规格ID。 + + :return: The spec_code of this ListProductsRespDetail. + :rtype: str + """ + return self._spec_code + + @spec_code.setter + def spec_code(self, spec_code): + """Sets the spec_code of this ListProductsRespDetail. + + 规格ID。 + + :param spec_code: The spec_code of this ListProductsRespDetail. + :type: str + """ + self._spec_code = spec_code + + @property + def io(self): + """Gets the io of this ListProductsRespDetail. + + IO信息。 + + :return: The io of this ListProductsRespDetail. + :rtype: list[ListProductsRespIo] + """ + return self._io + + @io.setter + def io(self, io): + """Sets the io of this ListProductsRespDetail. + + IO信息。 + + :param io: The io of this ListProductsRespDetail. + :type: list[ListProductsRespIo] + """ + self._io = io + + @property + def unavailable_zones(self): + """Gets the unavailable_zones of this ListProductsRespDetail. + + 资源售罄的可用区列表。 + + :return: The unavailable_zones of this ListProductsRespDetail. + :rtype: list[str] + """ + return self._unavailable_zones + + @unavailable_zones.setter + def unavailable_zones(self, unavailable_zones): + """Sets the unavailable_zones of this ListProductsRespDetail. + + 资源售罄的可用区列表。 + + :param unavailable_zones: The unavailable_zones of this ListProductsRespDetail. + :type: list[str] + """ + self._unavailable_zones = unavailable_zones + + @property + def available_zones(self): + """Gets the available_zones of this ListProductsRespDetail. + + 有可用资源的可用区列表。 + + :return: The available_zones of this ListProductsRespDetail. + :rtype: list[str] + """ + return self._available_zones + + @available_zones.setter + def available_zones(self, available_zones): + """Sets the available_zones of this ListProductsRespDetail. + + 有可用资源的可用区列表。 + + :param available_zones: The available_zones of this ListProductsRespDetail. + :type: list[str] + """ + self._available_zones = available_zones + + @property + def ecs_flavor_id(self): + """Gets the ecs_flavor_id of this ListProductsRespDetail. + + 该产品规格对应的虚拟机规格。 + + :return: The ecs_flavor_id of this ListProductsRespDetail. + :rtype: str + """ + return self._ecs_flavor_id + + @ecs_flavor_id.setter + def ecs_flavor_id(self, ecs_flavor_id): + """Sets the ecs_flavor_id of this ListProductsRespDetail. + + 该产品规格对应的虚拟机规格。 + + :param ecs_flavor_id: The ecs_flavor_id of this ListProductsRespDetail. + :type: str + """ + self._ecs_flavor_id = ecs_flavor_id + + @property + def arch_type(self): + """Gets the arch_type of this ListProductsRespDetail. + + 实例规格架构类型。当前仅支持X86。 + + :return: The arch_type of this ListProductsRespDetail. + :rtype: str + """ + return self._arch_type + + @arch_type.setter + def arch_type(self, arch_type): + """Sets the arch_type of this ListProductsRespDetail. + + 实例规格架构类型。当前仅支持X86。 + + :param arch_type: The arch_type of this ListProductsRespDetail. + :type: str + """ + self._arch_type = arch_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListProductsRespDetail): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_resp_hourly.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_resp_hourly.py new file mode 100644 index 0000000000..62677a08d2 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_resp_hourly.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListProductsRespHourly: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'version': 'str', + 'values': 'list[ListProductsRespValues]' + } + + attribute_map = { + 'name': 'name', + 'version': 'version', + 'values': 'values' + } + + def __init__(self, name=None, version=None, values=None): + """ListProductsRespHourly - a model defined in huaweicloud sdk""" + + + + self._name = None + self._version = None + self._values = None + self.discriminator = None + + if name is not None: + self.name = name + if version is not None: + self.version = version + if values is not None: + self.values = values + + @property + def name(self): + """Gets the name of this ListProductsRespHourly. + + 消息引擎的名称,该字段显示为rabbitmq。 + + :return: The name of this ListProductsRespHourly. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListProductsRespHourly. + + 消息引擎的名称,该字段显示为rabbitmq。 + + :param name: The name of this ListProductsRespHourly. + :type: str + """ + self._name = name + + @property + def version(self): + """Gets the version of this ListProductsRespHourly. + + 消息引擎的版本,当前仅支持3.7.17。 + + :return: The version of this ListProductsRespHourly. + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this ListProductsRespHourly. + + 消息引擎的版本,当前仅支持3.7.17。 + + :param version: The version of this ListProductsRespHourly. + :type: str + """ + self._version = version + + @property + def values(self): + """Gets the values of this ListProductsRespHourly. + + 产品规格列表。 + + :return: The values of this ListProductsRespHourly. + :rtype: list[ListProductsRespValues] + """ + return self._values + + @values.setter + def values(self, values): + """Sets the values of this ListProductsRespHourly. + + 产品规格列表。 + + :param values: The values of this ListProductsRespHourly. + :type: list[ListProductsRespValues] + """ + self._values = values + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListProductsRespHourly): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_resp_io.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_resp_io.py new file mode 100644 index 0000000000..00c9c6b76f --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_resp_io.py @@ -0,0 +1,218 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListProductsRespIo: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'io_type': 'str', + 'storage_spec_code': 'str', + 'available_zones': 'list[str]', + 'unavailable_zones': 'list[str]', + 'volume_type': 'str' + } + + attribute_map = { + 'io_type': 'io_type', + 'storage_spec_code': 'storage_spec_code', + 'available_zones': 'available_zones', + 'unavailable_zones': 'unavailable_zones', + 'volume_type': 'volume_type' + } + + def __init__(self, io_type=None, storage_spec_code=None, available_zones=None, unavailable_zones=None, volume_type=None): + """ListProductsRespIo - a model defined in huaweicloud sdk""" + + + + self._io_type = None + self._storage_spec_code = None + self._available_zones = None + self._unavailable_zones = None + self._volume_type = None + self.discriminator = None + + if io_type is not None: + self.io_type = io_type + if storage_spec_code is not None: + self.storage_spec_code = storage_spec_code + if available_zones is not None: + self.available_zones = available_zones + if unavailable_zones is not None: + self.unavailable_zones = unavailable_zones + if volume_type is not None: + self.volume_type = volume_type + + @property + def io_type(self): + """Gets the io_type of this ListProductsRespIo. + + IO类型。 + + :return: The io_type of this ListProductsRespIo. + :rtype: str + """ + return self._io_type + + @io_type.setter + def io_type(self, io_type): + """Sets the io_type of this ListProductsRespIo. + + IO类型。 + + :param io_type: The io_type of this ListProductsRespIo. + :type: str + """ + self._io_type = io_type + + @property + def storage_spec_code(self): + """Gets the storage_spec_code of this ListProductsRespIo. + + IO规格。 + + :return: The storage_spec_code of this ListProductsRespIo. + :rtype: str + """ + return self._storage_spec_code + + @storage_spec_code.setter + def storage_spec_code(self, storage_spec_code): + """Sets the storage_spec_code of this ListProductsRespIo. + + IO规格。 + + :param storage_spec_code: The storage_spec_code of this ListProductsRespIo. + :type: str + """ + self._storage_spec_code = storage_spec_code + + @property + def available_zones(self): + """Gets the available_zones of this ListProductsRespIo. + + IO未售罄的可用区列表。 + + :return: The available_zones of this ListProductsRespIo. + :rtype: list[str] + """ + return self._available_zones + + @available_zones.setter + def available_zones(self, available_zones): + """Sets the available_zones of this ListProductsRespIo. + + IO未售罄的可用区列表。 + + :param available_zones: The available_zones of this ListProductsRespIo. + :type: list[str] + """ + self._available_zones = available_zones + + @property + def unavailable_zones(self): + """Gets the unavailable_zones of this ListProductsRespIo. + + IO已售罄的不可用区列表。 + + :return: The unavailable_zones of this ListProductsRespIo. + :rtype: list[str] + """ + return self._unavailable_zones + + @unavailable_zones.setter + def unavailable_zones(self, unavailable_zones): + """Sets the unavailable_zones of this ListProductsRespIo. + + IO已售罄的不可用区列表。 + + :param unavailable_zones: The unavailable_zones of this ListProductsRespIo. + :type: list[str] + """ + self._unavailable_zones = unavailable_zones + + @property + def volume_type(self): + """Gets the volume_type of this ListProductsRespIo. + + 磁盘类型。 + + :return: The volume_type of this ListProductsRespIo. + :rtype: str + """ + return self._volume_type + + @volume_type.setter + def volume_type(self, volume_type): + """Sets the volume_type of this ListProductsRespIo. + + 磁盘类型。 + + :param volume_type: The volume_type of this ListProductsRespIo. + :type: str + """ + self._volume_type = volume_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListProductsRespIo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_resp_values.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_resp_values.py new file mode 100644 index 0000000000..2f383c6f7f --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_resp_values.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListProductsRespValues: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'detail': 'list[ListProductsRespDetail]', + 'name': 'str', + 'unavailable_zones': 'list[str]', + 'available_zones': 'list[str]' + } + + attribute_map = { + 'detail': 'detail', + 'name': 'name', + 'unavailable_zones': 'unavailable_zones', + 'available_zones': 'available_zones' + } + + def __init__(self, detail=None, name=None, unavailable_zones=None, available_zones=None): + """ListProductsRespValues - a model defined in huaweicloud sdk""" + + + + self._detail = None + self._name = None + self._unavailable_zones = None + self._available_zones = None + self.discriminator = None + + if detail is not None: + self.detail = detail + if name is not None: + self.name = name + if unavailable_zones is not None: + self.unavailable_zones = unavailable_zones + if available_zones is not None: + self.available_zones = available_zones + + @property + def detail(self): + """Gets the detail of this ListProductsRespValues. + + 规格详情。 + + :return: The detail of this ListProductsRespValues. + :rtype: list[ListProductsRespDetail] + """ + return self._detail + + @detail.setter + def detail(self, detail): + """Sets the detail of this ListProductsRespValues. + + 规格详情。 + + :param detail: The detail of this ListProductsRespValues. + :type: list[ListProductsRespDetail] + """ + self._detail = detail + + @property + def name(self): + """Gets the name of this ListProductsRespValues. + + 实例类型。 + + :return: The name of this ListProductsRespValues. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ListProductsRespValues. + + 实例类型。 + + :param name: The name of this ListProductsRespValues. + :type: str + """ + self._name = name + + @property + def unavailable_zones(self): + """Gets the unavailable_zones of this ListProductsRespValues. + + 资源售罄的可用区列表。 + + :return: The unavailable_zones of this ListProductsRespValues. + :rtype: list[str] + """ + return self._unavailable_zones + + @unavailable_zones.setter + def unavailable_zones(self, unavailable_zones): + """Sets the unavailable_zones of this ListProductsRespValues. + + 资源售罄的可用区列表。 + + :param unavailable_zones: The unavailable_zones of this ListProductsRespValues. + :type: list[str] + """ + self._unavailable_zones = unavailable_zones + + @property + def available_zones(self): + """Gets the available_zones of this ListProductsRespValues. + + 有可用资源的可用区列表。 + + :return: The available_zones of this ListProductsRespValues. + :rtype: list[str] + """ + return self._available_zones + + @available_zones.setter + def available_zones(self, available_zones): + """Sets the available_zones of this ListProductsRespValues. + + 有可用资源的可用区列表。 + + :param available_zones: The available_zones of this ListProductsRespValues. + :type: list[str] + """ + self._available_zones = available_zones + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListProductsRespValues): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_response.py new file mode 100644 index 0000000000..ac9c3707c4 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/list_products_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ListProductsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'hourly': 'list[ListProductsRespHourly]', + 'monthly': 'list[ListProductsRespHourly]' + } + + attribute_map = { + 'hourly': 'Hourly', + 'monthly': 'Monthly' + } + + def __init__(self, hourly=None, monthly=None): + """ListProductsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._hourly = None + self._monthly = None + self.discriminator = None + + if hourly is not None: + self.hourly = hourly + if monthly is not None: + self.monthly = monthly + + @property + def hourly(self): + """Gets the hourly of this ListProductsResponse. + + 表示按需付费的产品列表。 + + :return: The hourly of this ListProductsResponse. + :rtype: list[ListProductsRespHourly] + """ + return self._hourly + + @hourly.setter + def hourly(self, hourly): + """Sets the hourly of this ListProductsResponse. + + 表示按需付费的产品列表。 + + :param hourly: The hourly of this ListProductsResponse. + :type: list[ListProductsRespHourly] + """ + self._hourly = hourly + + @property + def monthly(self): + """Gets the monthly of this ListProductsResponse. + + 表示包年包月的产品列表。当前暂不支持通过API创建包年包月的rabbitmq实例。 + + :return: The monthly of this ListProductsResponse. + :rtype: list[ListProductsRespHourly] + """ + return self._monthly + + @monthly.setter + def monthly(self, monthly): + """Sets the monthly of this ListProductsResponse. + + 表示包年包月的产品列表。当前暂不支持通过API创建包年包月的rabbitmq实例。 + + :param monthly: The monthly of this ListProductsResponse. + :type: list[ListProductsRespHourly] + """ + self._monthly = monthly + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListProductsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/reset_password_req.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/reset_password_req.py new file mode 100644 index 0000000000..cc8f75f360 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/reset_password_req.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ResetPasswordReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'new_password': 'str' + } + + attribute_map = { + 'new_password': 'new_password' + } + + def __init__(self, new_password=None): + """ResetPasswordReq - a model defined in huaweicloud sdk""" + + + + self._new_password = None + self.discriminator = None + + if new_password is not None: + self.new_password = new_password + + @property + def new_password(self): + """Gets the new_password of this ResetPasswordReq. + + 8-32个字符。 至少包含以下字符中的3种: - 大写字母 - 小写字母 - 数字 - 特殊字符`~!@#$%^&*()-_=+\\\\|[{}];:\\'\\\",<.>/? 和空格,并且不能以-开头。 + + :return: The new_password of this ResetPasswordReq. + :rtype: str + """ + return self._new_password + + @new_password.setter + def new_password(self, new_password): + """Sets the new_password of this ResetPasswordReq. + + 8-32个字符。 至少包含以下字符中的3种: - 大写字母 - 小写字母 - 数字 - 特殊字符`~!@#$%^&*()-_=+\\\\|[{}];:\\'\\\",<.>/? 和空格,并且不能以-开头。 + + :param new_password: The new_password of this ResetPasswordReq. + :type: str + """ + self._new_password = new_password + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResetPasswordReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/reset_password_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/reset_password_request.py new file mode 100644 index 0000000000..dbd69cff3e --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/reset_password_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ResetPasswordRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'body': 'ResetPasswordReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'body': 'body' + } + + def __init__(self, instance_id=None, body=None): + """ResetPasswordRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this ResetPasswordRequest. + + + :return: The instance_id of this ResetPasswordRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ResetPasswordRequest. + + + :param instance_id: The instance_id of this ResetPasswordRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def body(self): + """Gets the body of this ResetPasswordRequest. + + + :return: The body of this ResetPasswordRequest. + :rtype: ResetPasswordReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ResetPasswordRequest. + + + :param body: The body of this ResetPasswordRequest. + :type: ResetPasswordReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResetPasswordRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/reset_password_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/reset_password_response.py new file mode 100644 index 0000000000..dfc5b511cf --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/reset_password_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ResetPasswordResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ResetPasswordResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResetPasswordResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/resize_instance_req.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/resize_instance_req.py new file mode 100644 index 0000000000..d215b6b2b8 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/resize_instance_req.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ResizeInstanceReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'new_spec_code': 'str', + 'new_storage_space': 'int' + } + + attribute_map = { + 'new_spec_code': 'new_spec_code', + 'new_storage_space': 'new_storage_space' + } + + def __init__(self, new_spec_code=None, new_storage_space=None): + """ResizeInstanceReq - a model defined in huaweicloud sdk""" + + + + self._new_spec_code = None + self._new_storage_space = None + self.discriminator = None + + self.new_spec_code = new_spec_code + self.new_storage_space = new_storage_space + + @property + def new_spec_code(self): + """Gets the new_spec_code of this ResizeInstanceReq. + + 规格变更后的规格ID。 请参考[查询可扩容规格列表](https://support.huaweicloud.com/api-rabbitmq/ResizeInstance.html)接口返回的数据。 + + :return: The new_spec_code of this ResizeInstanceReq. + :rtype: str + """ + return self._new_spec_code + + @new_spec_code.setter + def new_spec_code(self, new_spec_code): + """Sets the new_spec_code of this ResizeInstanceReq. + + 规格变更后的规格ID。 请参考[查询可扩容规格列表](https://support.huaweicloud.com/api-rabbitmq/ResizeInstance.html)接口返回的数据。 + + :param new_spec_code: The new_spec_code of this ResizeInstanceReq. + :type: str + """ + self._new_spec_code = new_spec_code + + @property + def new_storage_space(self): + """Gets the new_storage_space of this ResizeInstanceReq. + + 规格变更后的消息存储空间,单位:GB。 请参考[查询可扩容规格列表](https://support.huaweicloud.com/api-rabbitmq/ResizeInstance.html)接口返回的数据。 + + :return: The new_storage_space of this ResizeInstanceReq. + :rtype: int + """ + return self._new_storage_space + + @new_storage_space.setter + def new_storage_space(self, new_storage_space): + """Sets the new_storage_space of this ResizeInstanceReq. + + 规格变更后的消息存储空间,单位:GB。 请参考[查询可扩容规格列表](https://support.huaweicloud.com/api-rabbitmq/ResizeInstance.html)接口返回的数据。 + + :param new_storage_space: The new_storage_space of this ResizeInstanceReq. + :type: int + """ + self._new_storage_space = new_storage_space + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResizeInstanceReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/resize_instance_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/resize_instance_request.py new file mode 100644 index 0000000000..731baf034f --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/resize_instance_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ResizeInstanceRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'body': 'ResizeInstanceReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'body': 'body' + } + + def __init__(self, instance_id=None, body=None): + """ResizeInstanceRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this ResizeInstanceRequest. + + + :return: The instance_id of this ResizeInstanceRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ResizeInstanceRequest. + + + :param instance_id: The instance_id of this ResizeInstanceRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def body(self): + """Gets the body of this ResizeInstanceRequest. + + + :return: The body of this ResizeInstanceRequest. + :rtype: ResizeInstanceReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ResizeInstanceRequest. + + + :param body: The body of this ResizeInstanceRequest. + :type: ResizeInstanceReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResizeInstanceRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/resize_instance_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/resize_instance_response.py new file mode 100644 index 0000000000..c59d5ecbc4 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/resize_instance_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ResizeInstanceResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'job_id': 'str' + } + + attribute_map = { + 'job_id': 'job_id' + } + + def __init__(self, job_id=None): + """ResizeInstanceResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._job_id = None + self.discriminator = None + + if job_id is not None: + self.job_id = job_id + + @property + def job_id(self): + """Gets the job_id of this ResizeInstanceResponse. + + 规格变更任务ID。 + + :return: The job_id of this ResizeInstanceResponse. + :rtype: str + """ + return self._job_id + + @job_id.setter + def job_id(self, job_id): + """Sets the job_id of this ResizeInstanceResponse. + + 规格变更任务ID。 + + :param job_id: The job_id of this ResizeInstanceResponse. + :type: str + """ + self._job_id = job_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResizeInstanceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_background_task_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_background_task_request.py new file mode 100644 index 0000000000..b0b2461a19 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_background_task_request.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowBackgroundTaskRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'task_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'task_id': 'task_id' + } + + def __init__(self, instance_id=None, task_id=None): + """ShowBackgroundTaskRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._task_id = None + self.discriminator = None + + self.instance_id = instance_id + self.task_id = task_id + + @property + def instance_id(self): + """Gets the instance_id of this ShowBackgroundTaskRequest. + + + :return: The instance_id of this ShowBackgroundTaskRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowBackgroundTaskRequest. + + + :param instance_id: The instance_id of this ShowBackgroundTaskRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def task_id(self): + """Gets the task_id of this ShowBackgroundTaskRequest. + + + :return: The task_id of this ShowBackgroundTaskRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ShowBackgroundTaskRequest. + + + :param task_id: The task_id of this ShowBackgroundTaskRequest. + :type: str + """ + self._task_id = task_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowBackgroundTaskRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_background_task_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_background_task_response.py new file mode 100644 index 0000000000..09a163fbb0 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_background_task_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowBackgroundTaskResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'task_count': 'str', + 'tasks': 'list[ListBackgroundTasksRespTasks]' + } + + attribute_map = { + 'task_count': 'task_count', + 'tasks': 'tasks' + } + + def __init__(self, task_count=None, tasks=None): + """ShowBackgroundTaskResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._task_count = None + self._tasks = None + self.discriminator = None + + if task_count is not None: + self.task_count = task_count + if tasks is not None: + self.tasks = tasks + + @property + def task_count(self): + """Gets the task_count of this ShowBackgroundTaskResponse. + + 任务数量。 + + :return: The task_count of this ShowBackgroundTaskResponse. + :rtype: str + """ + return self._task_count + + @task_count.setter + def task_count(self, task_count): + """Sets the task_count of this ShowBackgroundTaskResponse. + + 任务数量。 + + :param task_count: The task_count of this ShowBackgroundTaskResponse. + :type: str + """ + self._task_count = task_count + + @property + def tasks(self): + """Gets the tasks of this ShowBackgroundTaskResponse. + + 任务列表。 + + :return: The tasks of this ShowBackgroundTaskResponse. + :rtype: list[ListBackgroundTasksRespTasks] + """ + return self._tasks + + @tasks.setter + def tasks(self, tasks): + """Sets the tasks of this ShowBackgroundTaskResponse. + + 任务列表。 + + :param tasks: The tasks of this ShowBackgroundTaskResponse. + :type: list[ListBackgroundTasksRespTasks] + """ + self._tasks = tasks + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowBackgroundTaskResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_extend_product_info_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_extend_product_info_request.py new file mode 100644 index 0000000000..9dfceef86a --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_extend_product_info_request.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowInstanceExtendProductInfoRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'type': 'str', + 'engine': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'type': 'type', + 'engine': 'engine' + } + + def __init__(self, instance_id=None, type=None, engine=None): + """ShowInstanceExtendProductInfoRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._type = None + self._engine = None + self.discriminator = None + + self.instance_id = instance_id + self.type = type + self.engine = engine + + @property + def instance_id(self): + """Gets the instance_id of this ShowInstanceExtendProductInfoRequest. + + + :return: The instance_id of this ShowInstanceExtendProductInfoRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowInstanceExtendProductInfoRequest. + + + :param instance_id: The instance_id of this ShowInstanceExtendProductInfoRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def type(self): + """Gets the type of this ShowInstanceExtendProductInfoRequest. + + + :return: The type of this ShowInstanceExtendProductInfoRequest. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ShowInstanceExtendProductInfoRequest. + + + :param type: The type of this ShowInstanceExtendProductInfoRequest. + :type: str + """ + self._type = type + + @property + def engine(self): + """Gets the engine of this ShowInstanceExtendProductInfoRequest. + + + :return: The engine of this ShowInstanceExtendProductInfoRequest. + :rtype: str + """ + return self._engine + + @engine.setter + def engine(self, engine): + """Sets the engine of this ShowInstanceExtendProductInfoRequest. + + + :param engine: The engine of this ShowInstanceExtendProductInfoRequest. + :type: str + """ + self._engine = engine + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowInstanceExtendProductInfoRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_extend_product_info_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_extend_product_info_response.py new file mode 100644 index 0000000000..68a8599e89 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_extend_product_info_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowInstanceExtendProductInfoResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'hourly': 'list[ListProductsRespHourly]', + 'monthly': 'list[ListProductsRespHourly]' + } + + attribute_map = { + 'hourly': 'hourly', + 'monthly': 'monthly' + } + + def __init__(self, hourly=None, monthly=None): + """ShowInstanceExtendProductInfoResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._hourly = None + self._monthly = None + self.discriminator = None + + if hourly is not None: + self.hourly = hourly + if monthly is not None: + self.monthly = monthly + + @property + def hourly(self): + """Gets the hourly of this ShowInstanceExtendProductInfoResponse. + + 表示按需付费的产品列表。 + + :return: The hourly of this ShowInstanceExtendProductInfoResponse. + :rtype: list[ListProductsRespHourly] + """ + return self._hourly + + @hourly.setter + def hourly(self, hourly): + """Sets the hourly of this ShowInstanceExtendProductInfoResponse. + + 表示按需付费的产品列表。 + + :param hourly: The hourly of this ShowInstanceExtendProductInfoResponse. + :type: list[ListProductsRespHourly] + """ + self._hourly = hourly + + @property + def monthly(self): + """Gets the monthly of this ShowInstanceExtendProductInfoResponse. + + 表示包年包月的产品列表。当前暂不支持通过API创建包年包月的Rabbitmq实例。 + + :return: The monthly of this ShowInstanceExtendProductInfoResponse. + :rtype: list[ListProductsRespHourly] + """ + return self._monthly + + @monthly.setter + def monthly(self, monthly): + """Sets the monthly of this ShowInstanceExtendProductInfoResponse. + + 表示包年包月的产品列表。当前暂不支持通过API创建包年包月的Rabbitmq实例。 + + :param monthly: The monthly of this ShowInstanceExtendProductInfoResponse. + :type: list[ListProductsRespHourly] + """ + self._monthly = monthly + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowInstanceExtendProductInfoResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_request.py new file mode 100644 index 0000000000..66e39f50e2 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowInstanceRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id' + } + + def __init__(self, instance_id=None): + """ShowInstanceRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self.discriminator = None + + self.instance_id = instance_id + + @property + def instance_id(self): + """Gets the instance_id of this ShowInstanceRequest. + + + :return: The instance_id of this ShowInstanceRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowInstanceRequest. + + + :param instance_id: The instance_id of this ShowInstanceRequest. + :type: str + """ + self._instance_id = instance_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowInstanceRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_response.py new file mode 100644 index 0000000000..e86dc25410 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_response.py @@ -0,0 +1,1163 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowInstanceResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'engine': 'str', + 'engine_version': 'str', + 'specification': 'str', + 'storage_space': 'int', + 'used_storage_space': 'int', + 'connect_address': 'str', + 'port': 'int', + 'status': 'str', + 'description': 'str', + 'instance_id': 'str', + 'resource_spec_code': 'str', + 'charging_mode': 'int', + 'vpc_id': 'str', + 'vpc_name': 'str', + 'created_at': 'str', + 'user_id': 'str', + 'user_name': 'str', + 'order_id': 'str', + 'maintain_begin': 'str', + 'maintain_end': 'str', + 'enable_publicip': 'bool', + 'publicip_address': 'str', + 'publicip_id': 'str', + 'management_connect_address': 'str', + 'ssl_enable': 'bool', + 'enterprise_project_id': 'str', + 'is_logical_volume': 'bool', + 'extend_times': 'int', + 'type': 'str', + 'product_id': 'str', + 'security_group_id': 'str', + 'security_group_name': 'str', + 'subnet_id': 'str', + 'available_zones': 'list[str]', + 'total_storage_space': 'int', + 'storage_resource_id': 'str', + 'storage_spec_code': 'str', + 'ipv6_enable': 'bool', + 'ipv6_connect_addresses': 'list[str]' + } + + attribute_map = { + 'name': 'name', + 'engine': 'engine', + 'engine_version': 'engine_version', + 'specification': 'specification', + 'storage_space': 'storage_space', + 'used_storage_space': 'used_storage_space', + 'connect_address': 'connect_address', + 'port': 'port', + 'status': 'status', + 'description': 'description', + 'instance_id': 'instance_id', + 'resource_spec_code': 'resource_spec_code', + 'charging_mode': 'charging_mode', + 'vpc_id': 'vpc_id', + 'vpc_name': 'vpc_name', + 'created_at': 'created_at', + 'user_id': 'user_id', + 'user_name': 'user_name', + 'order_id': 'order_id', + 'maintain_begin': 'maintain_begin', + 'maintain_end': 'maintain_end', + 'enable_publicip': 'enable_publicip', + 'publicip_address': 'publicip_address', + 'publicip_id': 'publicip_id', + 'management_connect_address': 'management_connect_address', + 'ssl_enable': 'ssl_enable', + 'enterprise_project_id': 'enterprise_project_id', + 'is_logical_volume': 'is_logical_volume', + 'extend_times': 'extend_times', + 'type': 'type', + 'product_id': 'product_id', + 'security_group_id': 'security_group_id', + 'security_group_name': 'security_group_name', + 'subnet_id': 'subnet_id', + 'available_zones': 'available_zones', + 'total_storage_space': 'total_storage_space', + 'storage_resource_id': 'storage_resource_id', + 'storage_spec_code': 'storage_spec_code', + 'ipv6_enable': 'ipv6_enable', + 'ipv6_connect_addresses': 'ipv6_connect_addresses' + } + + def __init__(self, name=None, engine=None, engine_version=None, specification=None, storage_space=None, used_storage_space=None, connect_address=None, port=None, status=None, description=None, instance_id=None, resource_spec_code=None, charging_mode=None, vpc_id=None, vpc_name=None, created_at=None, user_id=None, user_name=None, order_id=None, maintain_begin=None, maintain_end=None, enable_publicip=None, publicip_address=None, publicip_id=None, management_connect_address=None, ssl_enable=None, enterprise_project_id=None, is_logical_volume=None, extend_times=None, type=None, product_id=None, security_group_id=None, security_group_name=None, subnet_id=None, available_zones=None, total_storage_space=None, storage_resource_id=None, storage_spec_code=None, ipv6_enable=None, ipv6_connect_addresses=None): + """ShowInstanceResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._name = None + self._engine = None + self._engine_version = None + self._specification = None + self._storage_space = None + self._used_storage_space = None + self._connect_address = None + self._port = None + self._status = None + self._description = None + self._instance_id = None + self._resource_spec_code = None + self._charging_mode = None + self._vpc_id = None + self._vpc_name = None + self._created_at = None + self._user_id = None + self._user_name = None + self._order_id = None + self._maintain_begin = None + self._maintain_end = None + self._enable_publicip = None + self._publicip_address = None + self._publicip_id = None + self._management_connect_address = None + self._ssl_enable = None + self._enterprise_project_id = None + self._is_logical_volume = None + self._extend_times = None + self._type = None + self._product_id = None + self._security_group_id = None + self._security_group_name = None + self._subnet_id = None + self._available_zones = None + self._total_storage_space = None + self._storage_resource_id = None + self._storage_spec_code = None + self._ipv6_enable = None + self._ipv6_connect_addresses = None + self.discriminator = None + + if name is not None: + self.name = name + if engine is not None: + self.engine = engine + if engine_version is not None: + self.engine_version = engine_version + if specification is not None: + self.specification = specification + if storage_space is not None: + self.storage_space = storage_space + if used_storage_space is not None: + self.used_storage_space = used_storage_space + if connect_address is not None: + self.connect_address = connect_address + if port is not None: + self.port = port + if status is not None: + self.status = status + if description is not None: + self.description = description + if instance_id is not None: + self.instance_id = instance_id + if resource_spec_code is not None: + self.resource_spec_code = resource_spec_code + if charging_mode is not None: + self.charging_mode = charging_mode + if vpc_id is not None: + self.vpc_id = vpc_id + if vpc_name is not None: + self.vpc_name = vpc_name + if created_at is not None: + self.created_at = created_at + if user_id is not None: + self.user_id = user_id + if user_name is not None: + self.user_name = user_name + if order_id is not None: + self.order_id = order_id + if maintain_begin is not None: + self.maintain_begin = maintain_begin + if maintain_end is not None: + self.maintain_end = maintain_end + if enable_publicip is not None: + self.enable_publicip = enable_publicip + if publicip_address is not None: + self.publicip_address = publicip_address + if publicip_id is not None: + self.publicip_id = publicip_id + if management_connect_address is not None: + self.management_connect_address = management_connect_address + if ssl_enable is not None: + self.ssl_enable = ssl_enable + if enterprise_project_id is not None: + self.enterprise_project_id = enterprise_project_id + if is_logical_volume is not None: + self.is_logical_volume = is_logical_volume + if extend_times is not None: + self.extend_times = extend_times + if type is not None: + self.type = type + if product_id is not None: + self.product_id = product_id + if security_group_id is not None: + self.security_group_id = security_group_id + if security_group_name is not None: + self.security_group_name = security_group_name + if subnet_id is not None: + self.subnet_id = subnet_id + if available_zones is not None: + self.available_zones = available_zones + if total_storage_space is not None: + self.total_storage_space = total_storage_space + if storage_resource_id is not None: + self.storage_resource_id = storage_resource_id + if storage_spec_code is not None: + self.storage_spec_code = storage_spec_code + if ipv6_enable is not None: + self.ipv6_enable = ipv6_enable + if ipv6_connect_addresses is not None: + self.ipv6_connect_addresses = ipv6_connect_addresses + + @property + def name(self): + """Gets the name of this ShowInstanceResponse. + + 实例名称。 + + :return: The name of this ShowInstanceResponse. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ShowInstanceResponse. + + 实例名称。 + + :param name: The name of this ShowInstanceResponse. + :type: str + """ + self._name = name + + @property + def engine(self): + """Gets the engine of this ShowInstanceResponse. + + 消息引擎。 + + :return: The engine of this ShowInstanceResponse. + :rtype: str + """ + return self._engine + + @engine.setter + def engine(self, engine): + """Sets the engine of this ShowInstanceResponse. + + 消息引擎。 + + :param engine: The engine of this ShowInstanceResponse. + :type: str + """ + self._engine = engine + + @property + def engine_version(self): + """Gets the engine_version of this ShowInstanceResponse. + + 消息引擎版本。 + + :return: The engine_version of this ShowInstanceResponse. + :rtype: str + """ + return self._engine_version + + @engine_version.setter + def engine_version(self, engine_version): + """Sets the engine_version of this ShowInstanceResponse. + + 消息引擎版本。 + + :param engine_version: The engine_version of this ShowInstanceResponse. + :type: str + """ + self._engine_version = engine_version + + @property + def specification(self): + """Gets the specification of this ShowInstanceResponse. + + 实例规格。 - RabbitMQ实例单机返回vm规格。 - RabbitMQ实例集群返回vm规格和节点数。 + + :return: The specification of this ShowInstanceResponse. + :rtype: str + """ + return self._specification + + @specification.setter + def specification(self, specification): + """Sets the specification of this ShowInstanceResponse. + + 实例规格。 - RabbitMQ实例单机返回vm规格。 - RabbitMQ实例集群返回vm规格和节点数。 + + :param specification: The specification of this ShowInstanceResponse. + :type: str + """ + self._specification = specification + + @property + def storage_space(self): + """Gets the storage_space of this ShowInstanceResponse. + + 消息存储空间,单位:GB。 + + :return: The storage_space of this ShowInstanceResponse. + :rtype: int + """ + return self._storage_space + + @storage_space.setter + def storage_space(self, storage_space): + """Sets the storage_space of this ShowInstanceResponse. + + 消息存储空间,单位:GB。 + + :param storage_space: The storage_space of this ShowInstanceResponse. + :type: int + """ + self._storage_space = storage_space + + @property + def used_storage_space(self): + """Gets the used_storage_space of this ShowInstanceResponse. + + 已使用的消息存储空间,单位:GB。 + + :return: The used_storage_space of this ShowInstanceResponse. + :rtype: int + """ + return self._used_storage_space + + @used_storage_space.setter + def used_storage_space(self, used_storage_space): + """Sets the used_storage_space of this ShowInstanceResponse. + + 已使用的消息存储空间,单位:GB。 + + :param used_storage_space: The used_storage_space of this ShowInstanceResponse. + :type: int + """ + self._used_storage_space = used_storage_space + + @property + def connect_address(self): + """Gets the connect_address of this ShowInstanceResponse. + + 实例连接IP地址。 + + :return: The connect_address of this ShowInstanceResponse. + :rtype: str + """ + return self._connect_address + + @connect_address.setter + def connect_address(self, connect_address): + """Sets the connect_address of this ShowInstanceResponse. + + 实例连接IP地址。 + + :param connect_address: The connect_address of this ShowInstanceResponse. + :type: str + """ + self._connect_address = connect_address + + @property + def port(self): + """Gets the port of this ShowInstanceResponse. + + 实例连接端口。 + + :return: The port of this ShowInstanceResponse. + :rtype: int + """ + return self._port + + @port.setter + def port(self, port): + """Sets the port of this ShowInstanceResponse. + + 实例连接端口。 + + :param port: The port of this ShowInstanceResponse. + :type: int + """ + self._port = port + + @property + def status(self): + """Gets the status of this ShowInstanceResponse. + + 实例的状态。详细状态说明见[实例状态说明](https://support.huaweicloud.com/api-rabbitmq/rabbitmq-api-180514012.html)。 + + :return: The status of this ShowInstanceResponse. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ShowInstanceResponse. + + 实例的状态。详细状态说明见[实例状态说明](https://support.huaweicloud.com/api-rabbitmq/rabbitmq-api-180514012.html)。 + + :param status: The status of this ShowInstanceResponse. + :type: str + """ + self._status = status + + @property + def description(self): + """Gets the description of this ShowInstanceResponse. + + 实例描述。 + + :return: The description of this ShowInstanceResponse. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this ShowInstanceResponse. + + 实例描述。 + + :param description: The description of this ShowInstanceResponse. + :type: str + """ + self._description = description + + @property + def instance_id(self): + """Gets the instance_id of this ShowInstanceResponse. + + 实例ID。 + + :return: The instance_id of this ShowInstanceResponse. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowInstanceResponse. + + 实例ID。 + + :param instance_id: The instance_id of this ShowInstanceResponse. + :type: str + """ + self._instance_id = instance_id + + @property + def resource_spec_code(self): + """Gets the resource_spec_code of this ShowInstanceResponse. + + 资源规格标识。 - dms.instance.rabbitmq.single.c3.2u4g:RabbitMQ单机,vm规格2u4g - dms.instance.rabbitmq.single.c3.4u8g:RabbitMQ单机,vm规格4u8g - dms.instance.rabbitmq.single.c3.8u16g:RabbitMQ单机,vm规格8u16g - dms.instance.rabbitmq.single.c3.16u32g:RabbitMQ单机,vm规格16u32g - dms.instance.rabbitmq.cluster.c3.4u8g.3:RabbitMQ集群,vm规格4u8g,3个节点 - dms.instance.rabbitmq.cluster.c3.4u8g.5:RabbitMQ集群,vm规格4u8g,5个节点 - dms.instance.rabbitmq.cluster.c3.4u8g.7:RabbitMQ集群,vm规格4u8g,7个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.3:RabbitMQ集群,vm规格8u16g,3个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.5:RabbitMQ集群,vm规格8u16g,5个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.7:RabbitMQ集群,vm规格8u16g,7个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.3:RabbitMQ集群,vm规格16u32g,3个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.5:RabbitMQ集群,vm规格16u32g,5个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.7:RabbitMQ集群,vm规格16u32g,7个节点 + + :return: The resource_spec_code of this ShowInstanceResponse. + :rtype: str + """ + return self._resource_spec_code + + @resource_spec_code.setter + def resource_spec_code(self, resource_spec_code): + """Sets the resource_spec_code of this ShowInstanceResponse. + + 资源规格标识。 - dms.instance.rabbitmq.single.c3.2u4g:RabbitMQ单机,vm规格2u4g - dms.instance.rabbitmq.single.c3.4u8g:RabbitMQ单机,vm规格4u8g - dms.instance.rabbitmq.single.c3.8u16g:RabbitMQ单机,vm规格8u16g - dms.instance.rabbitmq.single.c3.16u32g:RabbitMQ单机,vm规格16u32g - dms.instance.rabbitmq.cluster.c3.4u8g.3:RabbitMQ集群,vm规格4u8g,3个节点 - dms.instance.rabbitmq.cluster.c3.4u8g.5:RabbitMQ集群,vm规格4u8g,5个节点 - dms.instance.rabbitmq.cluster.c3.4u8g.7:RabbitMQ集群,vm规格4u8g,7个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.3:RabbitMQ集群,vm规格8u16g,3个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.5:RabbitMQ集群,vm规格8u16g,5个节点 - dms.instance.rabbitmq.cluster.c3.8u16g.7:RabbitMQ集群,vm规格8u16g,7个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.3:RabbitMQ集群,vm规格16u32g,3个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.5:RabbitMQ集群,vm规格16u32g,5个节点 - dms.instance.rabbitmq.cluster.c3.16u32g.7:RabbitMQ集群,vm规格16u32g,7个节点 + + :param resource_spec_code: The resource_spec_code of this ShowInstanceResponse. + :type: str + """ + self._resource_spec_code = resource_spec_code + + @property + def charging_mode(self): + """Gets the charging_mode of this ShowInstanceResponse. + + 付费模式,1表示按需计费,0表示包年/包月计费。 + + :return: The charging_mode of this ShowInstanceResponse. + :rtype: int + """ + return self._charging_mode + + @charging_mode.setter + def charging_mode(self, charging_mode): + """Sets the charging_mode of this ShowInstanceResponse. + + 付费模式,1表示按需计费,0表示包年/包月计费。 + + :param charging_mode: The charging_mode of this ShowInstanceResponse. + :type: int + """ + self._charging_mode = charging_mode + + @property + def vpc_id(self): + """Gets the vpc_id of this ShowInstanceResponse. + + VPC ID。 + + :return: The vpc_id of this ShowInstanceResponse. + :rtype: str + """ + return self._vpc_id + + @vpc_id.setter + def vpc_id(self, vpc_id): + """Sets the vpc_id of this ShowInstanceResponse. + + VPC ID。 + + :param vpc_id: The vpc_id of this ShowInstanceResponse. + :type: str + """ + self._vpc_id = vpc_id + + @property + def vpc_name(self): + """Gets the vpc_name of this ShowInstanceResponse. + + VPC的名称。 + + :return: The vpc_name of this ShowInstanceResponse. + :rtype: str + """ + return self._vpc_name + + @vpc_name.setter + def vpc_name(self, vpc_name): + """Sets the vpc_name of this ShowInstanceResponse. + + VPC的名称。 + + :param vpc_name: The vpc_name of this ShowInstanceResponse. + :type: str + """ + self._vpc_name = vpc_name + + @property + def created_at(self): + """Gets the created_at of this ShowInstanceResponse. + + 完成创建时间。格式为时间戳,指从格林威治时间 1970年01月01日00时00分00秒起至指定时间的偏差总毫秒数。 + + :return: The created_at of this ShowInstanceResponse. + :rtype: str + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ShowInstanceResponse. + + 完成创建时间。格式为时间戳,指从格林威治时间 1970年01月01日00时00分00秒起至指定时间的偏差总毫秒数。 + + :param created_at: The created_at of this ShowInstanceResponse. + :type: str + """ + self._created_at = created_at + + @property + def user_id(self): + """Gets the user_id of this ShowInstanceResponse. + + 用户ID。 + + :return: The user_id of this ShowInstanceResponse. + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this ShowInstanceResponse. + + 用户ID。 + + :param user_id: The user_id of this ShowInstanceResponse. + :type: str + """ + self._user_id = user_id + + @property + def user_name(self): + """Gets the user_name of this ShowInstanceResponse. + + 用户名。 + + :return: The user_name of this ShowInstanceResponse. + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """Sets the user_name of this ShowInstanceResponse. + + 用户名。 + + :param user_name: The user_name of this ShowInstanceResponse. + :type: str + """ + self._user_name = user_name + + @property + def order_id(self): + """Gets the order_id of this ShowInstanceResponse. + + 订单ID,只有在包周期计费时才会有order_id值,其他计费方式order_id值为空。 + + :return: The order_id of this ShowInstanceResponse. + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order_id of this ShowInstanceResponse. + + 订单ID,只有在包周期计费时才会有order_id值,其他计费方式order_id值为空。 + + :param order_id: The order_id of this ShowInstanceResponse. + :type: str + """ + self._order_id = order_id + + @property + def maintain_begin(self): + """Gets the maintain_begin of this ShowInstanceResponse. + + 维护时间窗开始时间,格式为HH:mm:ss。 + + :return: The maintain_begin of this ShowInstanceResponse. + :rtype: str + """ + return self._maintain_begin + + @maintain_begin.setter + def maintain_begin(self, maintain_begin): + """Sets the maintain_begin of this ShowInstanceResponse. + + 维护时间窗开始时间,格式为HH:mm:ss。 + + :param maintain_begin: The maintain_begin of this ShowInstanceResponse. + :type: str + """ + self._maintain_begin = maintain_begin + + @property + def maintain_end(self): + """Gets the maintain_end of this ShowInstanceResponse. + + 维护时间窗结束时间,格式为HH:mm:ss。 + + :return: The maintain_end of this ShowInstanceResponse. + :rtype: str + """ + return self._maintain_end + + @maintain_end.setter + def maintain_end(self, maintain_end): + """Sets the maintain_end of this ShowInstanceResponse. + + 维护时间窗结束时间,格式为HH:mm:ss。 + + :param maintain_end: The maintain_end of this ShowInstanceResponse. + :type: str + """ + self._maintain_end = maintain_end + + @property + def enable_publicip(self): + """Gets the enable_publicip of this ShowInstanceResponse. + + RabbitMQ实例是否开启公网访问功能。 - true:开启 - false:未开启 + + :return: The enable_publicip of this ShowInstanceResponse. + :rtype: bool + """ + return self._enable_publicip + + @enable_publicip.setter + def enable_publicip(self, enable_publicip): + """Sets the enable_publicip of this ShowInstanceResponse. + + RabbitMQ实例是否开启公网访问功能。 - true:开启 - false:未开启 + + :param enable_publicip: The enable_publicip of this ShowInstanceResponse. + :type: bool + """ + self._enable_publicip = enable_publicip + + @property + def publicip_address(self): + """Gets the publicip_address of this ShowInstanceResponse. + + RabbitMQ实例绑定的弹性IP地址。 如果未开启公网访问功能,该字段值为null。 + + :return: The publicip_address of this ShowInstanceResponse. + :rtype: str + """ + return self._publicip_address + + @publicip_address.setter + def publicip_address(self, publicip_address): + """Sets the publicip_address of this ShowInstanceResponse. + + RabbitMQ实例绑定的弹性IP地址。 如果未开启公网访问功能,该字段值为null。 + + :param publicip_address: The publicip_address of this ShowInstanceResponse. + :type: str + """ + self._publicip_address = publicip_address + + @property + def publicip_id(self): + """Gets the publicip_id of this ShowInstanceResponse. + + RabbitMQ实例绑定的弹性IP地址的ID。 如果未开启公网访问功能,该字段值为null。 + + :return: The publicip_id of this ShowInstanceResponse. + :rtype: str + """ + return self._publicip_id + + @publicip_id.setter + def publicip_id(self, publicip_id): + """Sets the publicip_id of this ShowInstanceResponse. + + RabbitMQ实例绑定的弹性IP地址的ID。 如果未开启公网访问功能,该字段值为null。 + + :param publicip_id: The publicip_id of this ShowInstanceResponse. + :type: str + """ + self._publicip_id = publicip_id + + @property + def management_connect_address(self): + """Gets the management_connect_address of this ShowInstanceResponse. + + RabbitMQ实例的管理地址。 + + :return: The management_connect_address of this ShowInstanceResponse. + :rtype: str + """ + return self._management_connect_address + + @management_connect_address.setter + def management_connect_address(self, management_connect_address): + """Sets the management_connect_address of this ShowInstanceResponse. + + RabbitMQ实例的管理地址。 + + :param management_connect_address: The management_connect_address of this ShowInstanceResponse. + :type: str + """ + self._management_connect_address = management_connect_address + + @property + def ssl_enable(self): + """Gets the ssl_enable of this ShowInstanceResponse. + + 是否开启安全认证。 - true:开启 - false:未开启 + + :return: The ssl_enable of this ShowInstanceResponse. + :rtype: bool + """ + return self._ssl_enable + + @ssl_enable.setter + def ssl_enable(self, ssl_enable): + """Sets the ssl_enable of this ShowInstanceResponse. + + 是否开启安全认证。 - true:开启 - false:未开启 + + :param ssl_enable: The ssl_enable of this ShowInstanceResponse. + :type: bool + """ + self._ssl_enable = ssl_enable + + @property + def enterprise_project_id(self): + """Gets the enterprise_project_id of this ShowInstanceResponse. + + 企业项目ID。 + + :return: The enterprise_project_id of this ShowInstanceResponse. + :rtype: str + """ + return self._enterprise_project_id + + @enterprise_project_id.setter + def enterprise_project_id(self, enterprise_project_id): + """Sets the enterprise_project_id of this ShowInstanceResponse. + + 企业项目ID。 + + :param enterprise_project_id: The enterprise_project_id of this ShowInstanceResponse. + :type: str + """ + self._enterprise_project_id = enterprise_project_id + + @property + def is_logical_volume(self): + """Gets the is_logical_volume of this ShowInstanceResponse. + + 实例扩容时用于区分老实例与新实例。 - true:新创建的实例,允许磁盘动态扩容不需要重启。 - false:老实例 + + :return: The is_logical_volume of this ShowInstanceResponse. + :rtype: bool + """ + return self._is_logical_volume + + @is_logical_volume.setter + def is_logical_volume(self, is_logical_volume): + """Sets the is_logical_volume of this ShowInstanceResponse. + + 实例扩容时用于区分老实例与新实例。 - true:新创建的实例,允许磁盘动态扩容不需要重启。 - false:老实例 + + :param is_logical_volume: The is_logical_volume of this ShowInstanceResponse. + :type: bool + """ + self._is_logical_volume = is_logical_volume + + @property + def extend_times(self): + """Gets the extend_times of this ShowInstanceResponse. + + 实例扩容磁盘次数,如果超过20次则无法扩容磁盘。 + + :return: The extend_times of this ShowInstanceResponse. + :rtype: int + """ + return self._extend_times + + @extend_times.setter + def extend_times(self, extend_times): + """Sets the extend_times of this ShowInstanceResponse. + + 实例扩容磁盘次数,如果超过20次则无法扩容磁盘。 + + :param extend_times: The extend_times of this ShowInstanceResponse. + :type: int + """ + self._extend_times = extend_times + + @property + def type(self): + """Gets the type of this ShowInstanceResponse. + + 实例类型:集群,cluster。 + + :return: The type of this ShowInstanceResponse. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ShowInstanceResponse. + + 实例类型:集群,cluster。 + + :param type: The type of this ShowInstanceResponse. + :type: str + """ + self._type = type + + @property + def product_id(self): + """Gets the product_id of this ShowInstanceResponse. + + 产品标识。 + + :return: The product_id of this ShowInstanceResponse. + :rtype: str + """ + return self._product_id + + @product_id.setter + def product_id(self, product_id): + """Sets the product_id of this ShowInstanceResponse. + + 产品标识。 + + :param product_id: The product_id of this ShowInstanceResponse. + :type: str + """ + self._product_id = product_id + + @property + def security_group_id(self): + """Gets the security_group_id of this ShowInstanceResponse. + + 安全组ID。 + + :return: The security_group_id of this ShowInstanceResponse. + :rtype: str + """ + return self._security_group_id + + @security_group_id.setter + def security_group_id(self, security_group_id): + """Sets the security_group_id of this ShowInstanceResponse. + + 安全组ID。 + + :param security_group_id: The security_group_id of this ShowInstanceResponse. + :type: str + """ + self._security_group_id = security_group_id + + @property + def security_group_name(self): + """Gets the security_group_name of this ShowInstanceResponse. + + 租户安全组名称。 + + :return: The security_group_name of this ShowInstanceResponse. + :rtype: str + """ + return self._security_group_name + + @security_group_name.setter + def security_group_name(self, security_group_name): + """Sets the security_group_name of this ShowInstanceResponse. + + 租户安全组名称。 + + :param security_group_name: The security_group_name of this ShowInstanceResponse. + :type: str + """ + self._security_group_name = security_group_name + + @property + def subnet_id(self): + """Gets the subnet_id of this ShowInstanceResponse. + + 子网ID。 + + :return: The subnet_id of this ShowInstanceResponse. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """Sets the subnet_id of this ShowInstanceResponse. + + 子网ID。 + + :param subnet_id: The subnet_id of this ShowInstanceResponse. + :type: str + """ + self._subnet_id = subnet_id + + @property + def available_zones(self): + """Gets the available_zones of this ShowInstanceResponse. + + 实例节点所在的可用区,返回“可用区ID”。 + + :return: The available_zones of this ShowInstanceResponse. + :rtype: list[str] + """ + return self._available_zones + + @available_zones.setter + def available_zones(self, available_zones): + """Sets the available_zones of this ShowInstanceResponse. + + 实例节点所在的可用区,返回“可用区ID”。 + + :param available_zones: The available_zones of this ShowInstanceResponse. + :type: list[str] + """ + self._available_zones = available_zones + + @property + def total_storage_space(self): + """Gets the total_storage_space of this ShowInstanceResponse. + + 总共消息存储空间,单位:GB。 + + :return: The total_storage_space of this ShowInstanceResponse. + :rtype: int + """ + return self._total_storage_space + + @total_storage_space.setter + def total_storage_space(self, total_storage_space): + """Sets the total_storage_space of this ShowInstanceResponse. + + 总共消息存储空间,单位:GB。 + + :param total_storage_space: The total_storage_space of this ShowInstanceResponse. + :type: int + """ + self._total_storage_space = total_storage_space + + @property + def storage_resource_id(self): + """Gets the storage_resource_id of this ShowInstanceResponse. + + 存储资源ID。 + + :return: The storage_resource_id of this ShowInstanceResponse. + :rtype: str + """ + return self._storage_resource_id + + @storage_resource_id.setter + def storage_resource_id(self, storage_resource_id): + """Sets the storage_resource_id of this ShowInstanceResponse. + + 存储资源ID。 + + :param storage_resource_id: The storage_resource_id of this ShowInstanceResponse. + :type: str + """ + self._storage_resource_id = storage_resource_id + + @property + def storage_spec_code(self): + """Gets the storage_spec_code of this ShowInstanceResponse. + + IO规格。 + + :return: The storage_spec_code of this ShowInstanceResponse. + :rtype: str + """ + return self._storage_spec_code + + @storage_spec_code.setter + def storage_spec_code(self, storage_spec_code): + """Sets the storage_spec_code of this ShowInstanceResponse. + + IO规格。 + + :param storage_spec_code: The storage_spec_code of this ShowInstanceResponse. + :type: str + """ + self._storage_spec_code = storage_spec_code + + @property + def ipv6_enable(self): + """Gets the ipv6_enable of this ShowInstanceResponse. + + 是否开启ipv6。 + + :return: The ipv6_enable of this ShowInstanceResponse. + :rtype: bool + """ + return self._ipv6_enable + + @ipv6_enable.setter + def ipv6_enable(self, ipv6_enable): + """Sets the ipv6_enable of this ShowInstanceResponse. + + 是否开启ipv6。 + + :param ipv6_enable: The ipv6_enable of this ShowInstanceResponse. + :type: bool + """ + self._ipv6_enable = ipv6_enable + + @property + def ipv6_connect_addresses(self): + """Gets the ipv6_connect_addresses of this ShowInstanceResponse. + + IPv6的连接地址。 + + :return: The ipv6_connect_addresses of this ShowInstanceResponse. + :rtype: list[str] + """ + return self._ipv6_connect_addresses + + @ipv6_connect_addresses.setter + def ipv6_connect_addresses(self, ipv6_connect_addresses): + """Sets the ipv6_connect_addresses of this ShowInstanceResponse. + + IPv6的连接地址。 + + :param ipv6_connect_addresses: The ipv6_connect_addresses of this ShowInstanceResponse. + :type: list[str] + """ + self._ipv6_connect_addresses = ipv6_connect_addresses + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowInstanceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_tags_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_tags_request.py new file mode 100644 index 0000000000..9b37179cae --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_tags_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowInstanceTagsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str' + } + + attribute_map = { + 'instance_id': 'instance_id' + } + + def __init__(self, instance_id=None): + """ShowInstanceTagsRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self.discriminator = None + + self.instance_id = instance_id + + @property + def instance_id(self): + """Gets the instance_id of this ShowInstanceTagsRequest. + + + :return: The instance_id of this ShowInstanceTagsRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this ShowInstanceTagsRequest. + + + :param instance_id: The instance_id of this ShowInstanceTagsRequest. + :type: str + """ + self._instance_id = instance_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowInstanceTagsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_tags_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_tags_response.py new file mode 100644 index 0000000000..2ebced810e --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_instance_tags_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowInstanceTagsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'tags': 'list[CreateInstanceReqTags]' + } + + attribute_map = { + 'tags': 'tags' + } + + def __init__(self, tags=None): + """ShowInstanceTagsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._tags = None + self.discriminator = None + + if tags is not None: + self.tags = tags + + @property + def tags(self): + """Gets the tags of this ShowInstanceTagsResponse. + + 标签列表 + + :return: The tags of this ShowInstanceTagsResponse. + :rtype: list[CreateInstanceReqTags] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this ShowInstanceTagsResponse. + + 标签列表 + + :param tags: The tags of this ShowInstanceTagsResponse. + :type: list[CreateInstanceReqTags] + """ + self._tags = tags + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowInstanceTagsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_maintain_windows_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_maintain_windows_request.py new file mode 100644 index 0000000000..c9810d81f9 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_maintain_windows_request.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowMaintainWindowsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ShowMaintainWindowsRequest - a model defined in huaweicloud sdk""" + + + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowMaintainWindowsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_maintain_windows_resp_maintain_windows.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_maintain_windows_resp_maintain_windows.py new file mode 100644 index 0000000000..0c3c06291b --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_maintain_windows_resp_maintain_windows.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowMaintainWindowsRespMaintainWindows: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'default': 'bool', + 'end': 'str', + 'begin': 'str', + 'seq': 'int' + } + + attribute_map = { + 'default': 'default', + 'end': 'end', + 'begin': 'begin', + 'seq': 'seq' + } + + def __init__(self, default=None, end=None, begin=None, seq=None): + """ShowMaintainWindowsRespMaintainWindows - a model defined in huaweicloud sdk""" + + + + self._default = None + self._end = None + self._begin = None + self._seq = None + self.discriminator = None + + if default is not None: + self.default = default + if end is not None: + self.end = end + if begin is not None: + self.begin = begin + if seq is not None: + self.seq = seq + + @property + def default(self): + """Gets the default of this ShowMaintainWindowsRespMaintainWindows. + + 是否为默认时间段。 + + :return: The default of this ShowMaintainWindowsRespMaintainWindows. + :rtype: bool + """ + return self._default + + @default.setter + def default(self, default): + """Sets the default of this ShowMaintainWindowsRespMaintainWindows. + + 是否为默认时间段。 + + :param default: The default of this ShowMaintainWindowsRespMaintainWindows. + :type: bool + """ + self._default = default + + @property + def end(self): + """Gets the end of this ShowMaintainWindowsRespMaintainWindows. + + 维护时间窗结束时间。 + + :return: The end of this ShowMaintainWindowsRespMaintainWindows. + :rtype: str + """ + return self._end + + @end.setter + def end(self, end): + """Sets the end of this ShowMaintainWindowsRespMaintainWindows. + + 维护时间窗结束时间。 + + :param end: The end of this ShowMaintainWindowsRespMaintainWindows. + :type: str + """ + self._end = end + + @property + def begin(self): + """Gets the begin of this ShowMaintainWindowsRespMaintainWindows. + + 维护时间窗开始时间。 + + :return: The begin of this ShowMaintainWindowsRespMaintainWindows. + :rtype: str + """ + return self._begin + + @begin.setter + def begin(self, begin): + """Sets the begin of this ShowMaintainWindowsRespMaintainWindows. + + 维护时间窗开始时间。 + + :param begin: The begin of this ShowMaintainWindowsRespMaintainWindows. + :type: str + """ + self._begin = begin + + @property + def seq(self): + """Gets the seq of this ShowMaintainWindowsRespMaintainWindows. + + 序号。 + + :return: The seq of this ShowMaintainWindowsRespMaintainWindows. + :rtype: int + """ + return self._seq + + @seq.setter + def seq(self, seq): + """Sets the seq of this ShowMaintainWindowsRespMaintainWindows. + + 序号。 + + :param seq: The seq of this ShowMaintainWindowsRespMaintainWindows. + :type: int + """ + self._seq = seq + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowMaintainWindowsRespMaintainWindows): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_maintain_windows_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_maintain_windows_response.py new file mode 100644 index 0000000000..5134bed9c7 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_maintain_windows_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowMaintainWindowsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'maintain_windows': 'list[ShowMaintainWindowsRespMaintainWindows]' + } + + attribute_map = { + 'maintain_windows': 'maintain_windows' + } + + def __init__(self, maintain_windows=None): + """ShowMaintainWindowsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._maintain_windows = None + self.discriminator = None + + if maintain_windows is not None: + self.maintain_windows = maintain_windows + + @property + def maintain_windows(self): + """Gets the maintain_windows of this ShowMaintainWindowsResponse. + + 支持的维护时间窗列表。 + + :return: The maintain_windows of this ShowMaintainWindowsResponse. + :rtype: list[ShowMaintainWindowsRespMaintainWindows] + """ + return self._maintain_windows + + @maintain_windows.setter + def maintain_windows(self, maintain_windows): + """Sets the maintain_windows of this ShowMaintainWindowsResponse. + + 支持的维护时间窗列表。 + + :param maintain_windows: The maintain_windows of this ShowMaintainWindowsResponse. + :type: list[ShowMaintainWindowsRespMaintainWindows] + """ + self._maintain_windows = maintain_windows + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowMaintainWindowsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_project_tags_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_project_tags_request.py new file mode 100644 index 0000000000..3f2168564d --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_project_tags_request.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowProjectTagsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ShowProjectTagsRequest - a model defined in huaweicloud sdk""" + + + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowProjectTagsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_project_tags_resp_tags.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_project_tags_resp_tags.py new file mode 100644 index 0000000000..ab06ac5b23 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_project_tags_resp_tags.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowProjectTagsRespTags: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'key': 'str', + 'values': 'list[str]' + } + + attribute_map = { + 'key': 'key', + 'values': 'values' + } + + def __init__(self, key=None, values=None): + """ShowProjectTagsRespTags - a model defined in huaweicloud sdk""" + + + + self._key = None + self._values = None + self.discriminator = None + + if key is not None: + self.key = key + if values is not None: + self.values = values + + @property + def key(self): + """Gets the key of this ShowProjectTagsRespTags. + + 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :return: The key of this ShowProjectTagsRespTags. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this ShowProjectTagsRespTags. + + 键。最大长度36个unicode字符。 key不能为空,不能为空字符串。 不能包含下列字符:非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :param key: The key of this ShowProjectTagsRespTags. + :type: str + """ + self._key = key + + @property + def values(self): + """Gets the values of this ShowProjectTagsRespTags. + + 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :return: The values of this ShowProjectTagsRespTags. + :rtype: list[str] + """ + return self._values + + @values.setter + def values(self, values): + """Sets the values of this ShowProjectTagsRespTags. + + 值。每个值最大长度43个unicode字符。 value不能为空,可以空字符串。 不能包含下列字符:非打印字符ASCII(0-31), “=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。 + + :param values: The values of this ShowProjectTagsRespTags. + :type: list[str] + """ + self._values = values + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowProjectTagsRespTags): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_project_tags_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_project_tags_response.py new file mode 100644 index 0000000000..836a7b7950 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/show_project_tags_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowProjectTagsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'tags': 'list[ShowProjectTagsRespTags]' + } + + attribute_map = { + 'tags': 'tags' + } + + def __init__(self, tags=None): + """ShowProjectTagsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._tags = None + self.discriminator = None + + if tags is not None: + self.tags = tags + + @property + def tags(self): + """Gets the tags of this ShowProjectTagsResponse. + + 标签列表 + + :return: The tags of this ShowProjectTagsResponse. + :rtype: list[ShowProjectTagsRespTags] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this ShowProjectTagsResponse. + + 标签列表 + + :param tags: The tags of this ShowProjectTagsResponse. + :type: list[ShowProjectTagsRespTags] + """ + self._tags = tags + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowProjectTagsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_instance_req.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_instance_req.py new file mode 100644 index 0000000000..d2dc03eda3 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_instance_req.py @@ -0,0 +1,299 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdateInstanceReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'description': 'str', + 'maintain_begin': 'str', + 'maintain_end': 'str', + 'security_group_id': 'str', + 'enable_publicip': 'bool', + 'publicip_id': 'str', + 'enterprise_project_id': 'str' + } + + attribute_map = { + 'name': 'name', + 'description': 'description', + 'maintain_begin': 'maintain_begin', + 'maintain_end': 'maintain_end', + 'security_group_id': 'security_group_id', + 'enable_publicip': 'enable_publicip', + 'publicip_id': 'publicip_id', + 'enterprise_project_id': 'enterprise_project_id' + } + + def __init__(self, name=None, description=None, maintain_begin=None, maintain_end=None, security_group_id=None, enable_publicip=None, publicip_id=None, enterprise_project_id=None): + """UpdateInstanceReq - a model defined in huaweicloud sdk""" + + + + self._name = None + self._description = None + self._maintain_begin = None + self._maintain_end = None + self._security_group_id = None + self._enable_publicip = None + self._publicip_id = None + self._enterprise_project_id = None + self.discriminator = None + + if name is not None: + self.name = name + if description is not None: + self.description = description + if maintain_begin is not None: + self.maintain_begin = maintain_begin + if maintain_end is not None: + self.maintain_end = maintain_end + if security_group_id is not None: + self.security_group_id = security_group_id + if enable_publicip is not None: + self.enable_publicip = enable_publicip + if publicip_id is not None: + self.publicip_id = publicip_id + if enterprise_project_id is not None: + self.enterprise_project_id = enterprise_project_id + + @property + def name(self): + """Gets the name of this UpdateInstanceReq. + + 实例名称。 由英文字符开头,只能由英文字母、数字、中划线组成,长度为4~64的字符。 + + :return: The name of this UpdateInstanceReq. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UpdateInstanceReq. + + 实例名称。 由英文字符开头,只能由英文字母、数字、中划线组成,长度为4~64的字符。 + + :param name: The name of this UpdateInstanceReq. + :type: str + """ + self._name = name + + @property + def description(self): + """Gets the description of this UpdateInstanceReq. + + 实例的描述信息。 长度不超过1024的字符串。 > \\与\"在json报文中属于特殊字符,如果参数值中需要显示\\或者\"字符,请在字符前增加转义字符\\,比如\\\\或者\\\"。 + + :return: The description of this UpdateInstanceReq. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this UpdateInstanceReq. + + 实例的描述信息。 长度不超过1024的字符串。 > \\与\"在json报文中属于特殊字符,如果参数值中需要显示\\或者\"字符,请在字符前增加转义字符\\,比如\\\\或者\\\"。 + + :param description: The description of this UpdateInstanceReq. + :type: str + """ + self._description = description + + @property + def maintain_begin(self): + """Gets the maintain_begin of this UpdateInstanceReq. + + 维护时间窗开始时间,格式为HH:mm:ss。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-rabbitmq/ShowMaintainWindows.html)。 - 开始时间必须为22:00:00、02:00:00、06:00:00、10:00:00、14:00:00和18:00:00。 - 该参数不能单独为空,若该值为空,则结束时间也为空。系统分配一个默认开始时间02:00:00。 + + :return: The maintain_begin of this UpdateInstanceReq. + :rtype: str + """ + return self._maintain_begin + + @maintain_begin.setter + def maintain_begin(self, maintain_begin): + """Sets the maintain_begin of this UpdateInstanceReq. + + 维护时间窗开始时间,格式为HH:mm:ss。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-rabbitmq/ShowMaintainWindows.html)。 - 开始时间必须为22:00:00、02:00:00、06:00:00、10:00:00、14:00:00和18:00:00。 - 该参数不能单独为空,若该值为空,则结束时间也为空。系统分配一个默认开始时间02:00:00。 + + :param maintain_begin: The maintain_begin of this UpdateInstanceReq. + :type: str + """ + self._maintain_begin = maintain_begin + + @property + def maintain_end(self): + """Gets the maintain_end of this UpdateInstanceReq. + + 维护时间窗结束时间,格式为HH:mm:ss。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-rabbitmq/ShowMaintainWindows.html)。 - 结束时间在开始时间基础上加四个小时,即当开始时间为22:00:00时,结束时间为02:00:00。 - 该参数不能单独为空,若该值为空,则开始时间也为空。系统分配一个默认结束时间06:00:00。 + + :return: The maintain_end of this UpdateInstanceReq. + :rtype: str + """ + return self._maintain_end + + @maintain_end.setter + def maintain_end(self, maintain_end): + """Sets the maintain_end of this UpdateInstanceReq. + + 维护时间窗结束时间,格式为HH:mm:ss。 - 维护时间窗开始和结束时间必须为指定的时间段,可参考[查询维护时间窗时间段](https://support.huaweicloud.com/api-rabbitmq/ShowMaintainWindows.html)。 - 结束时间在开始时间基础上加四个小时,即当开始时间为22:00:00时,结束时间为02:00:00。 - 该参数不能单独为空,若该值为空,则开始时间也为空。系统分配一个默认结束时间06:00:00。 + + :param maintain_end: The maintain_end of this UpdateInstanceReq. + :type: str + """ + self._maintain_end = maintain_end + + @property + def security_group_id(self): + """Gets the security_group_id of this UpdateInstanceReq. + + 安全组ID。 + + :return: The security_group_id of this UpdateInstanceReq. + :rtype: str + """ + return self._security_group_id + + @security_group_id.setter + def security_group_id(self, security_group_id): + """Sets the security_group_id of this UpdateInstanceReq. + + 安全组ID。 + + :param security_group_id: The security_group_id of this UpdateInstanceReq. + :type: str + """ + self._security_group_id = security_group_id + + @property + def enable_publicip(self): + """Gets the enable_publicip of this UpdateInstanceReq. + + RabbitMQ实例是否开启公网访问功能。 - true:开启 - false:不开启 + + :return: The enable_publicip of this UpdateInstanceReq. + :rtype: bool + """ + return self._enable_publicip + + @enable_publicip.setter + def enable_publicip(self, enable_publicip): + """Sets the enable_publicip of this UpdateInstanceReq. + + RabbitMQ实例是否开启公网访问功能。 - true:开启 - false:不开启 + + :param enable_publicip: The enable_publicip of this UpdateInstanceReq. + :type: bool + """ + self._enable_publicip = enable_publicip + + @property + def publicip_id(self): + """Gets the publicip_id of this UpdateInstanceReq. + + RabbitMQ实例绑定的弹性IP地址的id。 如果开启了公网访问功能(即enable_publicip为true),该字段为必选。 获取方法: - 方法1:登录弹性公网IP和带宽的控制台界面,在弹性公网IP的详情页面查的基本信息栏找ID。 - 方法2:通过弹性公网IP的API接口查询,具体操作可参考[查询公网IP ID](https://support.huaweicloud.com/api-eip/eip_api_0003.html)。 + + :return: The publicip_id of this UpdateInstanceReq. + :rtype: str + """ + return self._publicip_id + + @publicip_id.setter + def publicip_id(self, publicip_id): + """Sets the publicip_id of this UpdateInstanceReq. + + RabbitMQ实例绑定的弹性IP地址的id。 如果开启了公网访问功能(即enable_publicip为true),该字段为必选。 获取方法: - 方法1:登录弹性公网IP和带宽的控制台界面,在弹性公网IP的详情页面查的基本信息栏找ID。 - 方法2:通过弹性公网IP的API接口查询,具体操作可参考[查询公网IP ID](https://support.huaweicloud.com/api-eip/eip_api_0003.html)。 + + :param publicip_id: The publicip_id of this UpdateInstanceReq. + :type: str + """ + self._publicip_id = publicip_id + + @property + def enterprise_project_id(self): + """Gets the enterprise_project_id of this UpdateInstanceReq. + + 企业项目。 + + :return: The enterprise_project_id of this UpdateInstanceReq. + :rtype: str + """ + return self._enterprise_project_id + + @enterprise_project_id.setter + def enterprise_project_id(self, enterprise_project_id): + """Sets the enterprise_project_id of this UpdateInstanceReq. + + 企业项目。 + + :param enterprise_project_id: The enterprise_project_id of this UpdateInstanceReq. + :type: str + """ + self._enterprise_project_id = enterprise_project_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_instance_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_instance_request.py new file mode 100644 index 0000000000..e438682810 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_instance_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdateInstanceRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'body': 'UpdateInstanceReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'body': 'body' + } + + def __init__(self, instance_id=None, body=None): + """UpdateInstanceRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this UpdateInstanceRequest. + + + :return: The instance_id of this UpdateInstanceRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this UpdateInstanceRequest. + + + :param instance_id: The instance_id of this UpdateInstanceRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def body(self): + """Gets the body of this UpdateInstanceRequest. + + + :return: The body of this UpdateInstanceRequest. + :rtype: UpdateInstanceReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this UpdateInstanceRequest. + + + :param body: The body of this UpdateInstanceRequest. + :type: UpdateInstanceReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_instance_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_instance_response.py new file mode 100644 index 0000000000..8ef78af2e0 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_instance_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class UpdateInstanceResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """UpdateInstanceResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInstanceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_plugins_req.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_plugins_req.py new file mode 100644 index 0000000000..0cf5f33095 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_plugins_req.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdatePluginsReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'enable': 'bool', + 'plugins': 'str' + } + + attribute_map = { + 'enable': 'enable', + 'plugins': 'plugins' + } + + def __init__(self, enable=None, plugins=None): + """UpdatePluginsReq - a model defined in huaweicloud sdk""" + + + + self._enable = None + self._plugins = None + self.discriminator = None + + if enable is not None: + self.enable = enable + if plugins is not None: + self.plugins = plugins + + @property + def enable(self): + """Gets the enable of this UpdatePluginsReq. + + 是否开启改插件。 + + :return: The enable of this UpdatePluginsReq. + :rtype: bool + """ + return self._enable + + @enable.setter + def enable(self, enable): + """Sets the enable of this UpdatePluginsReq. + + 是否开启改插件。 + + :param enable: The enable of this UpdatePluginsReq. + :type: bool + """ + self._enable = enable + + @property + def plugins(self): + """Gets the plugins of this UpdatePluginsReq. + + 插件列表,多个插件中间用“,”隔开。 + + :return: The plugins of this UpdatePluginsReq. + :rtype: str + """ + return self._plugins + + @plugins.setter + def plugins(self, plugins): + """Sets the plugins of this UpdatePluginsReq. + + 插件列表,多个插件中间用“,”隔开。 + + :param plugins: The plugins of this UpdatePluginsReq. + :type: str + """ + self._plugins = plugins + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdatePluginsReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_plugins_request.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_plugins_request.py new file mode 100644 index 0000000000..56f4f9aae0 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_plugins_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class UpdatePluginsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'instance_id': 'str', + 'body': 'UpdatePluginsReq' + } + + attribute_map = { + 'instance_id': 'instance_id', + 'body': 'body' + } + + def __init__(self, instance_id=None, body=None): + """UpdatePluginsRequest - a model defined in huaweicloud sdk""" + + + + self._instance_id = None + self._body = None + self.discriminator = None + + self.instance_id = instance_id + if body is not None: + self.body = body + + @property + def instance_id(self): + """Gets the instance_id of this UpdatePluginsRequest. + + + :return: The instance_id of this UpdatePluginsRequest. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """Sets the instance_id of this UpdatePluginsRequest. + + + :param instance_id: The instance_id of this UpdatePluginsRequest. + :type: str + """ + self._instance_id = instance_id + + @property + def body(self): + """Gets the body of this UpdatePluginsRequest. + + + :return: The body of this UpdatePluginsRequest. + :rtype: UpdatePluginsReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this UpdatePluginsRequest. + + + :param body: The body of this UpdatePluginsRequest. + :type: UpdatePluginsReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdatePluginsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_plugins_response.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_plugins_response.py new file mode 100644 index 0000000000..c503509f95 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/model/update_plugins_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class UpdatePluginsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'job_id': 'str' + } + + attribute_map = { + 'job_id': 'job_id' + } + + def __init__(self, job_id=None): + """UpdatePluginsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._job_id = None + self.discriminator = None + + if job_id is not None: + self.job_id = job_id + + @property + def job_id(self): + """Gets the job_id of this UpdatePluginsResponse. + + 后台任务ID。 + + :return: The job_id of this UpdatePluginsResponse. + :rtype: str + """ + return self._job_id + + @job_id.setter + def job_id(self, job_id): + """Sets the job_id of this UpdatePluginsResponse. + + 后台任务ID。 + + :param job_id: The job_id of this UpdatePluginsResponse. + :type: str + """ + self._job_id = job_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdatePluginsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/rabbitmq_async_client.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/rabbitmq_async_client.py new file mode 100644 index 0000000000..1046c0b337 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/rabbitmq_async_client.py @@ -0,0 +1,1283 @@ +# coding: utf-8 + +from __future__ import absolute_import + +import datetime +import re +import importlib + +import six + +from huaweicloudsdkcore.client import Client, ClientBuilder +from huaweicloudsdkcore.exceptions import exceptions +from huaweicloudsdkcore.utils import http_utils +from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest + + +class RabbitMQAsyncClient(Client): + """ + :param configuration: .Configuration object for this client + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self): + super(RabbitMQAsyncClient, self).__init__() + self.model_package = importlib.import_module("huaweicloudsdkrabbitmq.v2.model") + self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} + + @staticmethod + def new_builder(clazz): + return ClientBuilder(clazz) + + def batch_create_or_delete_instance_tag_async(self, request): + """批量添加或删除实例标签 + + 批量添加或删除实例标签。 + + :param BatchCreateOrDeleteInstanceTagRequest request + :return: BatchCreateOrDeleteInstanceTagResponse + """ + return self.batch_create_or_delete_instance_tag_with_http_info(request) + + def batch_create_or_delete_instance_tag_with_http_info(self, request): + """批量添加或删除实例标签 + + 批量添加或删除实例标签。 + + :param BatchCreateOrDeleteInstanceTagRequest request + :return: BatchCreateOrDeleteInstanceTagResponse + """ + + all_params = ['instance_id', 'batch_create_or_delete_instance_tag_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/rabbitmq/{instance_id}/tags/action', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='BatchCreateOrDeleteInstanceTagResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def batch_restart_or_delete_instances_async(self, request): + """批量重启或删除实例 + + 批量重启或删除实例。 在实例重启过程中,客户端的生产与消费消息等请求会被拒绝。 实例删除后,实例中原有的数据将被删除,且没有备份,请谨慎操作。 + + :param BatchRestartOrDeleteInstancesRequest request + :return: BatchRestartOrDeleteInstancesResponse + """ + return self.batch_restart_or_delete_instances_with_http_info(request) + + def batch_restart_or_delete_instances_with_http_info(self, request): + """批量重启或删除实例 + + 批量重启或删除实例。 在实例重启过程中,客户端的生产与消费消息等请求会被拒绝。 实例删除后,实例中原有的数据将被删除,且没有备份,请谨慎操作。 + + :param BatchRestartOrDeleteInstancesRequest request + :return: BatchRestartOrDeleteInstancesResponse + """ + + all_params = ['batch_restart_or_delete_instances_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/action', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='BatchRestartOrDeleteInstancesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def create_post_paid_instance_async(self, request): + """创建实例(按需) + + 创建实例,该接口创建的实例为按需计费的方式。 + + :param CreatePostPaidInstanceRequest request + :return: CreatePostPaidInstanceResponse + """ + return self.create_post_paid_instance_with_http_info(request) + + def create_post_paid_instance_with_http_info(self, request): + """创建实例(按需) + + 创建实例,该接口创建的实例为按需计费的方式。 + + :param CreatePostPaidInstanceRequest request + :return: CreatePostPaidInstanceResponse + """ + + all_params = ['create_post_paid_instance_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreatePostPaidInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def delete_background_task_async(self, request): + """删除后台任务管理中的指定记录 + + 删除后台任务管理中的指定记录。 + + :param DeleteBackgroundTaskRequest request + :return: DeleteBackgroundTaskResponse + """ + return self.delete_background_task_with_http_info(request) + + def delete_background_task_with_http_info(self, request): + """删除后台任务管理中的指定记录 + + 删除后台任务管理中的指定记录。 + + :param DeleteBackgroundTaskRequest request + :return: DeleteBackgroundTaskResponse + """ + + all_params = ['instance_id', 'task_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/tasks/{task_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='DeleteBackgroundTaskResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def delete_instance_async(self, request): + """删除指定的实例 + + 删除指定的实例,释放该实例的所有资源。 + + :param DeleteInstanceRequest request + :return: DeleteInstanceResponse + """ + return self.delete_instance_with_http_info(request) + + def delete_instance_with_http_info(self, request): + """删除指定的实例 + + 删除指定的实例,释放该实例的所有资源。 + + :param DeleteInstanceRequest request + :return: DeleteInstanceResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='DeleteInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_available_zones_async(self, request): + """查询可用区信息 + + 在创建实例时,需要配置实例所在的可用区ID,可通过该接口查询可用区的ID。 + + :param ListAvailableZonesRequest request + :return: ListAvailableZonesResponse + """ + return self.list_available_zones_with_http_info(request) + + def list_available_zones_with_http_info(self, request): + """查询可用区信息 + + 在创建实例时,需要配置实例所在的可用区ID,可通过该接口查询可用区的ID。 + + :param ListAvailableZonesRequest request + :return: ListAvailableZonesResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/available-zones', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListAvailableZonesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_background_tasks_async(self, request): + """查询实例的后台任务列表 + + 查询实例的后台任务列表。 + + :param ListBackgroundTasksRequest request + :return: ListBackgroundTasksResponse + """ + return self.list_background_tasks_with_http_info(request) + + def list_background_tasks_with_http_info(self, request): + """查询实例的后台任务列表 + + 查询实例的后台任务列表。 + + :param ListBackgroundTasksRequest request + :return: ListBackgroundTasksResponse + """ + + all_params = ['instance_id', 'start', 'limit', 'begin_time', 'end_time'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + if 'start' in local_var_params: + query_params.append(('start', local_var_params['start'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + if 'begin_time' in local_var_params: + query_params.append(('begin_time', local_var_params['begin_time'])) + if 'end_time' in local_var_params: + query_params.append(('end_time', local_var_params['end_time'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/tasks', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListBackgroundTasksResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_instances_details_async(self, request): + """查询所有实例列表 + + 查询租户的实例列表,支持按照条件查询。 + + :param ListInstancesDetailsRequest request + :return: ListInstancesDetailsResponse + """ + return self.list_instances_details_with_http_info(request) + + def list_instances_details_with_http_info(self, request): + """查询所有实例列表 + + 查询租户的实例列表,支持按照条件查询。 + + :param ListInstancesDetailsRequest request + :return: ListInstancesDetailsResponse + """ + + all_params = ['engine', 'name', 'instance_id', 'status', 'include_failure', 'exact_match_name', 'enterprise_project_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'engine' in local_var_params: + query_params.append(('engine', local_var_params['engine'])) + if 'name' in local_var_params: + query_params.append(('name', local_var_params['name'])) + if 'instance_id' in local_var_params: + query_params.append(('instance_id', local_var_params['instance_id'])) + if 'status' in local_var_params: + query_params.append(('status', local_var_params['status'])) + if 'include_failure' in local_var_params: + query_params.append(('include_failure', local_var_params['include_failure'])) + if 'exact_match_name' in local_var_params: + query_params.append(('exact_match_name', local_var_params['exact_match_name'])) + if 'enterprise_project_id' in local_var_params: + query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListInstancesDetailsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_plugins_async(self, request): + """查询插件列表 + + 查询插件列表。 + + :param ListPluginsRequest request + :return: ListPluginsResponse + """ + return self.list_plugins_with_http_info(request) + + def list_plugins_with_http_info(self, request): + """查询插件列表 + + 查询插件列表。 + + :param ListPluginsRequest request + :return: ListPluginsResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/rabbitmq/plugins', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListPluginsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_products_async(self, request): + """查询产品规格列表 + + 在创建实例时,需要配置订购的产品ID(即product_id),可通过该接口查询产品规格。 + + :param ListProductsRequest request + :return: ListProductsResponse + """ + return self.list_products_with_http_info(request) + + def list_products_with_http_info(self, request): + """查询产品规格列表 + + 在创建实例时,需要配置订购的产品ID(即product_id),可通过该接口查询产品规格。 + + :param ListProductsRequest request + :return: ListProductsResponse + """ + + all_params = ['engine'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'engine' in local_var_params: + query_params.append(('engine', local_var_params['engine'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/products', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListProductsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def reset_password_async(self, request): + """重置密码 + + 重置密码。 + + :param ResetPasswordRequest request + :return: ResetPasswordResponse + """ + return self.reset_password_with_http_info(request) + + def reset_password_with_http_info(self, request): + """重置密码 + + 重置密码。 + + :param ResetPasswordRequest request + :return: ResetPasswordResponse + """ + + all_params = ['instance_id', 'reset_password_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/password', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ResetPasswordResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def resize_instance_async(self, request): + """实例规格变更 + + 实例规格变更。 + + :param ResizeInstanceRequest request + :return: ResizeInstanceResponse + """ + return self.resize_instance_with_http_info(request) + + def resize_instance_with_http_info(self, request): + """实例规格变更 + + 实例规格变更。 + + :param ResizeInstanceRequest request + :return: ResizeInstanceResponse + """ + + all_params = ['instance_id', 'resize_instance_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/extend', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ResizeInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_background_task_async(self, request): + """查询后台任务管理中的指定记录 + + 查询后台任务管理中的指定记录。 + + :param ShowBackgroundTaskRequest request + :return: ShowBackgroundTaskResponse + """ + return self.show_background_task_with_http_info(request) + + def show_background_task_with_http_info(self, request): + """查询后台任务管理中的指定记录 + + 查询后台任务管理中的指定记录。 + + :param ShowBackgroundTaskRequest request + :return: ShowBackgroundTaskResponse + """ + + all_params = ['instance_id', 'task_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/tasks/{task_id}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowBackgroundTaskResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_instance_async(self, request): + """查询指定实例成功 + + 查询指定实例的详细信息。 + + :param ShowInstanceRequest request + :return: ShowInstanceResponse + """ + return self.show_instance_with_http_info(request) + + def show_instance_with_http_info(self, request): + """查询指定实例成功 + + 查询指定实例的详细信息。 + + :param ShowInstanceRequest request + :return: ShowInstanceResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_instance_extend_product_info_async(self, request): + """查询可扩容规格列表 + + 查询可扩容规格列表。 RabbtiMQ只支持只增加节点数的扩容方式。 + + :param ShowInstanceExtendProductInfoRequest request + :return: ShowInstanceExtendProductInfoResponse + """ + return self.show_instance_extend_product_info_with_http_info(request) + + def show_instance_extend_product_info_with_http_info(self, request): + """查询可扩容规格列表 + + 查询可扩容规格列表。 RabbtiMQ只支持只增加节点数的扩容方式。 + + :param ShowInstanceExtendProductInfoRequest request + :return: ShowInstanceExtendProductInfoResponse + """ + + all_params = ['instance_id', 'type', 'engine'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + if 'type' in local_var_params: + query_params.append(('type', local_var_params['type'])) + if 'engine' in local_var_params: + query_params.append(('engine', local_var_params['engine'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/extend', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowInstanceExtendProductInfoResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_instance_tags_async(self, request): + """查询实例标签 + + 查询实例标签。 + + :param ShowInstanceTagsRequest request + :return: ShowInstanceTagsResponse + """ + return self.show_instance_tags_with_http_info(request) + + def show_instance_tags_with_http_info(self, request): + """查询实例标签 + + 查询实例标签。 + + :param ShowInstanceTagsRequest request + :return: ShowInstanceTagsResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/rabbitmq/{instance_id}/tags', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowInstanceTagsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_maintain_windows_async(self, request): + """查询维护时间窗时间段 + + 查询维护时间窗开始时间和结束时间。 + + :param ShowMaintainWindowsRequest request + :return: ShowMaintainWindowsResponse + """ + return self.show_maintain_windows_with_http_info(request) + + def show_maintain_windows_with_http_info(self, request): + """查询维护时间窗时间段 + + 查询维护时间窗开始时间和结束时间。 + + :param ShowMaintainWindowsRequest request + :return: ShowMaintainWindowsResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/instances/maintain-windows', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowMaintainWindowsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_project_tags_async(self, request): + """查询项目标签 + + 查询项目标签。 + + :param ShowProjectTagsRequest request + :return: ShowProjectTagsResponse + """ + return self.show_project_tags_with_http_info(request) + + def show_project_tags_with_http_info(self, request): + """查询项目标签 + + 查询项目标签。 + + :param ShowProjectTagsRequest request + :return: ShowProjectTagsResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/rabbitmq/tags', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowProjectTagsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_instance_async(self, request): + """修改实例信息 + + 修改实例的名称和描述信息。 + + :param UpdateInstanceRequest request + :return: UpdateInstanceResponse + """ + return self.update_instance_with_http_info(request) + + def update_instance_with_http_info(self, request): + """修改实例信息 + + 修改实例的名称和描述信息。 + + :param UpdateInstanceRequest request + :return: UpdateInstanceResponse + """ + + all_params = ['instance_id', 'update_instance_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdateInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_plugins_async(self, request): + """开启或关闭插件 + + 开启或关闭插件。 + + :param UpdatePluginsRequest request + :return: UpdatePluginsResponse + """ + return self.update_plugins_with_http_info(request) + + def update_plugins_with_http_info(self, request): + """开启或关闭插件 + + 开启或关闭插件。 + + :param UpdatePluginsRequest request + :return: UpdatePluginsResponse + """ + + all_params = ['instance_id', 'update_plugins_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/rabbitmq/plugins', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdatePluginsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, + body=None, post_params=None, response_type=None, auth_settings=None, collection_formats=None, + request_type=None): + """Makes the HTTP request and returns deserialized data. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response_type: Response data type. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :return: + Return the response directly. + """ + return self.do_http_request( + method=method, + resource_path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body, + post_params=post_params, + response_type=response_type, + collection_formats=collection_formats, + request_type=request_type, + async_request=True) diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/rabbitmq_client.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/rabbitmq_client.py new file mode 100644 index 0000000000..c3785ae67c --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/rabbitmq_client.py @@ -0,0 +1,1282 @@ +# coding: utf-8 + +from __future__ import absolute_import + +import datetime +import re +import importlib + +import six + +from huaweicloudsdkcore.client import Client, ClientBuilder +from huaweicloudsdkcore.exceptions import exceptions +from huaweicloudsdkcore.utils import http_utils +from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest + + +class RabbitMQClient(Client): + """ + :param configuration: .Configuration object for this client + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self): + super(RabbitMQClient, self).__init__() + self.model_package = importlib.import_module("huaweicloudsdkrabbitmq.v2.model") + self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} + + @staticmethod + def new_builder(clazz): + return ClientBuilder(clazz) + + def batch_create_or_delete_instance_tag(self, request): + """批量添加或删除实例标签 + + 批量添加或删除实例标签。 + + :param BatchCreateOrDeleteInstanceTagRequest request + :return: BatchCreateOrDeleteInstanceTagResponse + """ + return self.batch_create_or_delete_instance_tag_with_http_info(request) + + def batch_create_or_delete_instance_tag_with_http_info(self, request): + """批量添加或删除实例标签 + + 批量添加或删除实例标签。 + + :param BatchCreateOrDeleteInstanceTagRequest request + :return: BatchCreateOrDeleteInstanceTagResponse + """ + + all_params = ['instance_id', 'batch_create_or_delete_instance_tag_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/rabbitmq/{instance_id}/tags/action', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='BatchCreateOrDeleteInstanceTagResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def batch_restart_or_delete_instances(self, request): + """批量重启或删除实例 + + 批量重启或删除实例。 在实例重启过程中,客户端的生产与消费消息等请求会被拒绝。 实例删除后,实例中原有的数据将被删除,且没有备份,请谨慎操作。 + + :param BatchRestartOrDeleteInstancesRequest request + :return: BatchRestartOrDeleteInstancesResponse + """ + return self.batch_restart_or_delete_instances_with_http_info(request) + + def batch_restart_or_delete_instances_with_http_info(self, request): + """批量重启或删除实例 + + 批量重启或删除实例。 在实例重启过程中,客户端的生产与消费消息等请求会被拒绝。 实例删除后,实例中原有的数据将被删除,且没有备份,请谨慎操作。 + + :param BatchRestartOrDeleteInstancesRequest request + :return: BatchRestartOrDeleteInstancesResponse + """ + + all_params = ['batch_restart_or_delete_instances_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/action', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='BatchRestartOrDeleteInstancesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def create_post_paid_instance(self, request): + """创建实例(按需) + + 创建实例,该接口创建的实例为按需计费的方式。 + + :param CreatePostPaidInstanceRequest request + :return: CreatePostPaidInstanceResponse + """ + return self.create_post_paid_instance_with_http_info(request) + + def create_post_paid_instance_with_http_info(self, request): + """创建实例(按需) + + 创建实例,该接口创建的实例为按需计费的方式。 + + :param CreatePostPaidInstanceRequest request + :return: CreatePostPaidInstanceResponse + """ + + all_params = ['create_post_paid_instance_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreatePostPaidInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def delete_background_task(self, request): + """删除后台任务管理中的指定记录 + + 删除后台任务管理中的指定记录。 + + :param DeleteBackgroundTaskRequest request + :return: DeleteBackgroundTaskResponse + """ + return self.delete_background_task_with_http_info(request) + + def delete_background_task_with_http_info(self, request): + """删除后台任务管理中的指定记录 + + 删除后台任务管理中的指定记录。 + + :param DeleteBackgroundTaskRequest request + :return: DeleteBackgroundTaskResponse + """ + + all_params = ['instance_id', 'task_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/tasks/{task_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='DeleteBackgroundTaskResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def delete_instance(self, request): + """删除指定的实例 + + 删除指定的实例,释放该实例的所有资源。 + + :param DeleteInstanceRequest request + :return: DeleteInstanceResponse + """ + return self.delete_instance_with_http_info(request) + + def delete_instance_with_http_info(self, request): + """删除指定的实例 + + 删除指定的实例,释放该实例的所有资源。 + + :param DeleteInstanceRequest request + :return: DeleteInstanceResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='DeleteInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_available_zones(self, request): + """查询可用区信息 + + 在创建实例时,需要配置实例所在的可用区ID,可通过该接口查询可用区的ID。 + + :param ListAvailableZonesRequest request + :return: ListAvailableZonesResponse + """ + return self.list_available_zones_with_http_info(request) + + def list_available_zones_with_http_info(self, request): + """查询可用区信息 + + 在创建实例时,需要配置实例所在的可用区ID,可通过该接口查询可用区的ID。 + + :param ListAvailableZonesRequest request + :return: ListAvailableZonesResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/available-zones', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListAvailableZonesResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_background_tasks(self, request): + """查询实例的后台任务列表 + + 查询实例的后台任务列表。 + + :param ListBackgroundTasksRequest request + :return: ListBackgroundTasksResponse + """ + return self.list_background_tasks_with_http_info(request) + + def list_background_tasks_with_http_info(self, request): + """查询实例的后台任务列表 + + 查询实例的后台任务列表。 + + :param ListBackgroundTasksRequest request + :return: ListBackgroundTasksResponse + """ + + all_params = ['instance_id', 'start', 'limit', 'begin_time', 'end_time'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + if 'start' in local_var_params: + query_params.append(('start', local_var_params['start'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + if 'begin_time' in local_var_params: + query_params.append(('begin_time', local_var_params['begin_time'])) + if 'end_time' in local_var_params: + query_params.append(('end_time', local_var_params['end_time'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/tasks', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListBackgroundTasksResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_instances_details(self, request): + """查询所有实例列表 + + 查询租户的实例列表,支持按照条件查询。 + + :param ListInstancesDetailsRequest request + :return: ListInstancesDetailsResponse + """ + return self.list_instances_details_with_http_info(request) + + def list_instances_details_with_http_info(self, request): + """查询所有实例列表 + + 查询租户的实例列表,支持按照条件查询。 + + :param ListInstancesDetailsRequest request + :return: ListInstancesDetailsResponse + """ + + all_params = ['engine', 'name', 'instance_id', 'status', 'include_failure', 'exact_match_name', 'enterprise_project_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'engine' in local_var_params: + query_params.append(('engine', local_var_params['engine'])) + if 'name' in local_var_params: + query_params.append(('name', local_var_params['name'])) + if 'instance_id' in local_var_params: + query_params.append(('instance_id', local_var_params['instance_id'])) + if 'status' in local_var_params: + query_params.append(('status', local_var_params['status'])) + if 'include_failure' in local_var_params: + query_params.append(('include_failure', local_var_params['include_failure'])) + if 'exact_match_name' in local_var_params: + query_params.append(('exact_match_name', local_var_params['exact_match_name'])) + if 'enterprise_project_id' in local_var_params: + query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListInstancesDetailsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_plugins(self, request): + """查询插件列表 + + 查询插件列表。 + + :param ListPluginsRequest request + :return: ListPluginsResponse + """ + return self.list_plugins_with_http_info(request) + + def list_plugins_with_http_info(self, request): + """查询插件列表 + + 查询插件列表。 + + :param ListPluginsRequest request + :return: ListPluginsResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/rabbitmq/plugins', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListPluginsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_products(self, request): + """查询产品规格列表 + + 在创建实例时,需要配置订购的产品ID(即product_id),可通过该接口查询产品规格。 + + :param ListProductsRequest request + :return: ListProductsResponse + """ + return self.list_products_with_http_info(request) + + def list_products_with_http_info(self, request): + """查询产品规格列表 + + 在创建实例时,需要配置订购的产品ID(即product_id),可通过该接口查询产品规格。 + + :param ListProductsRequest request + :return: ListProductsResponse + """ + + all_params = ['engine'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'engine' in local_var_params: + query_params.append(('engine', local_var_params['engine'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/products', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListProductsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def reset_password(self, request): + """重置密码 + + 重置密码。 + + :param ResetPasswordRequest request + :return: ResetPasswordResponse + """ + return self.reset_password_with_http_info(request) + + def reset_password_with_http_info(self, request): + """重置密码 + + 重置密码。 + + :param ResetPasswordRequest request + :return: ResetPasswordResponse + """ + + all_params = ['instance_id', 'reset_password_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/password', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ResetPasswordResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def resize_instance(self, request): + """实例规格变更 + + 实例规格变更。 + + :param ResizeInstanceRequest request + :return: ResizeInstanceResponse + """ + return self.resize_instance_with_http_info(request) + + def resize_instance_with_http_info(self, request): + """实例规格变更 + + 实例规格变更。 + + :param ResizeInstanceRequest request + :return: ResizeInstanceResponse + """ + + all_params = ['instance_id', 'resize_instance_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/extend', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ResizeInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_background_task(self, request): + """查询后台任务管理中的指定记录 + + 查询后台任务管理中的指定记录。 + + :param ShowBackgroundTaskRequest request + :return: ShowBackgroundTaskResponse + """ + return self.show_background_task_with_http_info(request) + + def show_background_task_with_http_info(self, request): + """查询后台任务管理中的指定记录 + + 查询后台任务管理中的指定记录。 + + :param ShowBackgroundTaskRequest request + :return: ShowBackgroundTaskResponse + """ + + all_params = ['instance_id', 'task_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/tasks/{task_id}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowBackgroundTaskResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_instance(self, request): + """查询指定实例成功 + + 查询指定实例的详细信息。 + + :param ShowInstanceRequest request + :return: ShowInstanceResponse + """ + return self.show_instance_with_http_info(request) + + def show_instance_with_http_info(self, request): + """查询指定实例成功 + + 查询指定实例的详细信息。 + + :param ShowInstanceRequest request + :return: ShowInstanceResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_instance_extend_product_info(self, request): + """查询可扩容规格列表 + + 查询可扩容规格列表。 RabbtiMQ只支持只增加节点数的扩容方式。 + + :param ShowInstanceExtendProductInfoRequest request + :return: ShowInstanceExtendProductInfoResponse + """ + return self.show_instance_extend_product_info_with_http_info(request) + + def show_instance_extend_product_info_with_http_info(self, request): + """查询可扩容规格列表 + + 查询可扩容规格列表。 RabbtiMQ只支持只增加节点数的扩容方式。 + + :param ShowInstanceExtendProductInfoRequest request + :return: ShowInstanceExtendProductInfoResponse + """ + + all_params = ['instance_id', 'type', 'engine'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + if 'type' in local_var_params: + query_params.append(('type', local_var_params['type'])) + if 'engine' in local_var_params: + query_params.append(('engine', local_var_params['engine'])) + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/extend', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowInstanceExtendProductInfoResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_instance_tags(self, request): + """查询实例标签 + + 查询实例标签。 + + :param ShowInstanceTagsRequest request + :return: ShowInstanceTagsResponse + """ + return self.show_instance_tags_with_http_info(request) + + def show_instance_tags_with_http_info(self, request): + """查询实例标签 + + 查询实例标签。 + + :param ShowInstanceTagsRequest request + :return: ShowInstanceTagsResponse + """ + + all_params = ['instance_id'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/rabbitmq/{instance_id}/tags', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowInstanceTagsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_maintain_windows(self, request): + """查询维护时间窗时间段 + + 查询维护时间窗开始时间和结束时间。 + + :param ShowMaintainWindowsRequest request + :return: ShowMaintainWindowsResponse + """ + return self.show_maintain_windows_with_http_info(request) + + def show_maintain_windows_with_http_info(self, request): + """查询维护时间窗时间段 + + 查询维护时间窗开始时间和结束时间。 + + :param ShowMaintainWindowsRequest request + :return: ShowMaintainWindowsResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/instances/maintain-windows', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowMaintainWindowsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_project_tags(self, request): + """查询项目标签 + + 查询项目标签。 + + :param ShowProjectTagsRequest request + :return: ShowProjectTagsResponse + """ + return self.show_project_tags_with_http_info(request) + + def show_project_tags_with_http_info(self, request): + """查询项目标签 + + 查询项目标签。 + + :param ShowProjectTagsRequest request + :return: ShowProjectTagsResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/rabbitmq/tags', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowProjectTagsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_instance(self, request): + """修改实例信息 + + 修改实例的名称和描述信息。 + + :param UpdateInstanceRequest request + :return: UpdateInstanceResponse + """ + return self.update_instance_with_http_info(request) + + def update_instance_with_http_info(self, request): + """修改实例信息 + + 修改实例的名称和描述信息。 + + :param UpdateInstanceRequest request + :return: UpdateInstanceResponse + """ + + all_params = ['instance_id', 'update_instance_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdateInstanceResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_plugins(self, request): + """开启或关闭插件 + + 开启或关闭插件。 + + :param UpdatePluginsRequest request + :return: UpdatePluginsResponse + """ + return self.update_plugins_with_http_info(request) + + def update_plugins_with_http_info(self, request): + """开启或关闭插件 + + 开启或关闭插件。 + + :param UpdatePluginsRequest request + :return: UpdatePluginsResponse + """ + + all_params = ['instance_id', 'update_plugins_request_body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'instance_id' in local_var_params: + path_params['instance_id'] = local_var_params['instance_id'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/instances/{instance_id}/rabbitmq/plugins', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdatePluginsResponse', + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, + body=None, post_params=None, response_type=None, auth_settings=None, collection_formats=None, + request_type=None): + """Makes the HTTP request and returns deserialized data. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response_type: Response data type. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :return: + Return the response directly. + """ + return self.do_http_request( + method=method, + resource_path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body, + post_params=post_params, + response_type=response_type, + collection_formats=collection_formats, + request_type=request_type) diff --git a/huaweicloud-sdk-rabbitmq/requirements.txt b/huaweicloud-sdk-rabbitmq/requirements.txt new file mode 100644 index 0000000000..bf54e8e3d8 --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/requirements.txt @@ -0,0 +1 @@ +huaweicloud-sdk-python-core diff --git a/huaweicloud-sdk-rabbitmq/setup.py b/huaweicloud-sdk-rabbitmq/setup.py new file mode 100644 index 0000000000..eb59e2906a --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/setup.py @@ -0,0 +1,45 @@ +# coding: utf-8 +from os import path + +from setuptools import setup, find_packages + +NAME = "huaweicloudsdkrabbitmq" +VERSION = "3.0.11-beta" +AUTHOR = "HuaweiCloud SDK" +AUTHOR_EMAIL = "hwcloudsdk@huawei.com" +URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" + +DESCRIPTION = "RabbitMQ" +this_directory = path.abspath(path.dirname(__file__)) +with open(path.join(this_directory, 'README_PYPI.md'), encoding='utf-8') as f: + LONG_DESCRIPTION = f.read() + +REQUIRES = ["huaweicloudsdkcore"] + +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=["huaweicloud", "sdk", "RabbitMQ"], + packages=find_packages(exclude=["tests*"]), + install_requires=REQUIRES, + include_package_data=True, + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache Software License', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Topic :: Software Development' + ] +) diff --git a/huaweicloud-sdk-rabbitmq/test-requirements.txt b/huaweicloud-sdk-rabbitmq/test-requirements.txt new file mode 100644 index 0000000000..2702246c0e --- /dev/null +++ b/huaweicloud-sdk-rabbitmq/test-requirements.txt @@ -0,0 +1,5 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 diff --git a/huaweicloud-sdk-servicestage/setup.py b/huaweicloud-sdk-servicestage/setup.py index 5b842b8fe0..b96c21b17d 100644 --- a/huaweicloud-sdk-servicestage/setup.py +++ b/huaweicloud-sdk-servicestage/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkservicestage" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-testhub/setup.py b/huaweicloud-sdk-testhub/setup.py index d229295070..0c9fde6253 100644 --- a/huaweicloud-sdk-testhub/setup.py +++ b/huaweicloud-sdk-testhub/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdktesthub" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-tms/setup.py b/huaweicloud-sdk-tms/setup.py index 3d2ca61f7c..a2167f0ec8 100644 --- a/huaweicloud-sdk-tms/setup.py +++ b/huaweicloud-sdk-tms/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdktms" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/model/create_security_group_rule_option.py b/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/model/create_security_group_rule_option.py index 0f31cb1c80..86b5e6f202 100644 --- a/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/model/create_security_group_rule_option.py +++ b/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/model/create_security_group_rule_option.py @@ -28,7 +28,7 @@ class CreateSecurityGroupRuleOption: 'direction': 'str', 'ethertype': 'str', 'protocol': 'str', - 'multiport': 'int', + 'multiport': 'str', 'remote_ip_prefix': 'str', 'remote_group_id': 'str', 'remote_address_group_id': 'str', @@ -206,7 +206,7 @@ def multiport(self): 功能说明:端口取值范围 取值范围:支持单端口(80),连续端口(1-30)以及不连续端口(22,3389,80) 约束:端口值的范围1~65535 :return: The multiport of this CreateSecurityGroupRuleOption. - :rtype: int + :rtype: str """ return self._multiport @@ -217,7 +217,7 @@ def multiport(self, multiport): 功能说明:端口取值范围 取值范围:支持单端口(80),连续端口(1-30)以及不连续端口(22,3389,80) 约束:端口值的范围1~65535 :param multiport: The multiport of this CreateSecurityGroupRuleOption. - :type: int + :type: str """ self._multiport = multiport diff --git a/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/model/security_group_info.py b/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/model/security_group_info.py index 324639e875..32cf9391f1 100644 --- a/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/model/security_group_info.py +++ b/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/model/security_group_info.py @@ -30,7 +30,7 @@ class SecurityGroupInfo: 'created_at': 'datetime', 'updated_at': 'datetime', 'enterprise_project_id': 'str', - 'security_group_rule': 'SecurityGroupRule' + 'security_group_rules': 'list[SecurityGroupRule]' } attribute_map = { @@ -41,10 +41,10 @@ class SecurityGroupInfo: 'created_at': 'created_at', 'updated_at': 'updated_at', 'enterprise_project_id': 'enterprise_project_id', - 'security_group_rule': 'security_group_rule' + 'security_group_rules': 'security_group_rules' } - def __init__(self, id=None, name=None, description=None, project_id=None, created_at=None, updated_at=None, enterprise_project_id=None, security_group_rule=None): + def __init__(self, id=None, name=None, description=None, project_id=None, created_at=None, updated_at=None, enterprise_project_id=None, security_group_rules=None): """SecurityGroupInfo - a model defined in huaweicloud sdk""" @@ -56,7 +56,7 @@ def __init__(self, id=None, name=None, description=None, project_id=None, create self._created_at = None self._updated_at = None self._enterprise_project_id = None - self._security_group_rule = None + self._security_group_rules = None self.discriminator = None self.id = id @@ -66,7 +66,7 @@ def __init__(self, id=None, name=None, description=None, project_id=None, create self.created_at = created_at self.updated_at = updated_at self.enterprise_project_id = enterprise_project_id - self.security_group_rule = security_group_rule + self.security_group_rules = security_group_rules @property def id(self): @@ -223,24 +223,26 @@ def enterprise_project_id(self, enterprise_project_id): self._enterprise_project_id = enterprise_project_id @property - def security_group_rule(self): - """Gets the security_group_rule of this SecurityGroupInfo. + def security_group_rules(self): + """Gets the security_group_rules of this SecurityGroupInfo. + 安全组规则 - :return: The security_group_rule of this SecurityGroupInfo. - :rtype: SecurityGroupRule + :return: The security_group_rules of this SecurityGroupInfo. + :rtype: list[SecurityGroupRule] """ - return self._security_group_rule + return self._security_group_rules - @security_group_rule.setter - def security_group_rule(self, security_group_rule): - """Sets the security_group_rule of this SecurityGroupInfo. + @security_group_rules.setter + def security_group_rules(self, security_group_rules): + """Sets the security_group_rules of this SecurityGroupInfo. + 安全组规则 - :param security_group_rule: The security_group_rule of this SecurityGroupInfo. - :type: SecurityGroupRule + :param security_group_rules: The security_group_rules of this SecurityGroupInfo. + :type: list[SecurityGroupRule] """ - self._security_group_rule = security_group_rule + self._security_group_rules = security_group_rules def to_dict(self): """Returns the model properties as a dict""" diff --git a/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/model/security_group_rule.py b/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/model/security_group_rule.py index 742a3e2715..3f643845f6 100644 --- a/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/model/security_group_rule.py +++ b/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/model/security_group_rule.py @@ -29,7 +29,7 @@ class SecurityGroupRule: 'direction': 'str', 'protocol': 'str', 'ethertype': 'str', - 'multiport': 'int', + 'multiport': 'str', 'action': 'str', 'priority': 'int', 'remote_group_id': 'str', @@ -235,7 +235,7 @@ def multiport(self): 功能说明:端口取值范围 取值范围:支持单端口(80),连续端口(1-30)以及不连续端口(22,3389,80) :return: The multiport of this SecurityGroupRule. - :rtype: int + :rtype: str """ return self._multiport @@ -246,7 +246,7 @@ def multiport(self, multiport): 功能说明:端口取值范围 取值范围:支持单端口(80),连续端口(1-30)以及不连续端口(22,3389,80) :param multiport: The multiport of this SecurityGroupRule. - :type: int + :type: str """ self._multiport = multiport diff --git a/huaweicloud-sdk-vpc/setup.py b/huaweicloud-sdk-vpc/setup.py index 6c17325cf3..3da38d1ae3 100644 --- a/huaweicloud-sdk-vpc/setup.py +++ b/huaweicloud-sdk-vpc/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkvpc" -VERSION = "3.0.10-beta" +VERSION = "3.0.11-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"