# coding: utf-8 import pprint import re import six class CreateTopicRequestBody: """ Attributes: openapi_types (dict): The key is attribute name and the 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', 'display_name': 'str', 'enterprise_project_id': 'str' } attribute_map = { 'name': 'name', 'display_name': 'display_name', 'enterprise_project_id': 'enterprise_project_id' } def __init__(self, name=None, display_name=None, enterprise_project_id=None): """CreateTopicRequestBody - a model defined in huaweicloud sdk""" self._name = None self._display_name = None self._enterprise_project_id = None self.discriminator = None self.name = name self.display_name = display_name if enterprise_project_id is not None: self.enterprise_project_id = enterprise_project_id @property def name(self): """Gets the name of this CreateTopicRequestBody. 创建topic的名字。Topic名称只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度为1到255个字符。 :return: The name of this CreateTopicRequestBody. :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this CreateTopicRequestBody. 创建topic的名字。Topic名称只能包含大写字母、小写字母、数字、-和_,且必须由大写字母、小写字母或数字开头,长度为1到255个字符。 :param name: The name of this CreateTopicRequestBody. :type: str """ self._name = name @property def display_name(self): """Gets the display_name of this CreateTopicRequestBody. Topic的显示名,推送邮件消息时,作为邮件发件人显示。显示名的长度为192byte或64个中文。默认值为空。 :return: The display_name of this CreateTopicRequestBody. :rtype: str """ return self._display_name @display_name.setter def display_name(self, display_name): """Sets the display_name of this CreateTopicRequestBody. Topic的显示名,推送邮件消息时,作为邮件发件人显示。显示名的长度为192byte或64个中文。默认值为空。 :param display_name: The display_name of this CreateTopicRequestBody. :type: str """ self._display_name = display_name @property def enterprise_project_id(self): """Gets the enterprise_project_id of this CreateTopicRequestBody. 企业项目ID。非必选参数,当企业项目开关打开时需要传入该参数。 :return: The enterprise_project_id of this CreateTopicRequestBody. :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 CreateTopicRequestBody. 企业项目ID。非必选参数,当企业项目开关打开时需要传入该参数。 :param enterprise_project_id: The enterprise_project_id of this CreateTopicRequestBody. :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, CreateTopicRequestBody): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other