|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | + rds_mysql_v2 |
| 5 | +
|
| 6 | + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 |
| 7 | +
|
| 8 | + OpenAPI spec version: common-version |
| 9 | + |
| 10 | + Generated by: https://github.com/swagger-api/swagger-codegen.git |
| 11 | +""" |
| 12 | + |
| 13 | + |
| 14 | +import pprint |
| 15 | +import re # noqa: F401 |
| 16 | + |
| 17 | +import six |
| 18 | + |
| 19 | +from volcenginesdkcore.configuration import Configuration |
| 20 | + |
| 21 | + |
| 22 | +class AccountPrivilegesInfoForCreateDBAccountInput(object): |
| 23 | + """NOTE: This class is auto generated by the swagger code generator program. |
| 24 | +
|
| 25 | + Do not edit the class manually. |
| 26 | + """ |
| 27 | + |
| 28 | + """ |
| 29 | + Attributes: |
| 30 | + swagger_types (dict): The key is attribute name |
| 31 | + and the value is attribute type. |
| 32 | + attribute_map (dict): The key is attribute name |
| 33 | + and the value is json key in definition. |
| 34 | + """ |
| 35 | + swagger_types = { |
| 36 | + 'account_privilege': 'str', |
| 37 | + 'account_privilege_custom': 'str', |
| 38 | + 'db_name': 'str' |
| 39 | + } |
| 40 | + |
| 41 | + attribute_map = { |
| 42 | + 'account_privilege': 'AccountPrivilege', |
| 43 | + 'account_privilege_custom': 'AccountPrivilegeCustom', |
| 44 | + 'db_name': 'DBName' |
| 45 | + } |
| 46 | + |
| 47 | + def __init__(self, account_privilege=None, account_privilege_custom=None, db_name=None, _configuration=None): # noqa: E501 |
| 48 | + """AccountPrivilegesInfoForCreateDBAccountInput - a model defined in Swagger""" # noqa: E501 |
| 49 | + if _configuration is None: |
| 50 | + _configuration = Configuration() |
| 51 | + self._configuration = _configuration |
| 52 | + |
| 53 | + self._account_privilege = None |
| 54 | + self._account_privilege_custom = None |
| 55 | + self._db_name = None |
| 56 | + self.discriminator = None |
| 57 | + |
| 58 | + if account_privilege is not None: |
| 59 | + self.account_privilege = account_privilege |
| 60 | + if account_privilege_custom is not None: |
| 61 | + self.account_privilege_custom = account_privilege_custom |
| 62 | + if db_name is not None: |
| 63 | + self.db_name = db_name |
| 64 | + |
| 65 | + @property |
| 66 | + def account_privilege(self): |
| 67 | + """Gets the account_privilege of this AccountPrivilegesInfoForCreateDBAccountInput. # noqa: E501 |
| 68 | +
|
| 69 | +
|
| 70 | + :return: The account_privilege of this AccountPrivilegesInfoForCreateDBAccountInput. # noqa: E501 |
| 71 | + :rtype: str |
| 72 | + """ |
| 73 | + return self._account_privilege |
| 74 | + |
| 75 | + @account_privilege.setter |
| 76 | + def account_privilege(self, account_privilege): |
| 77 | + """Sets the account_privilege of this AccountPrivilegesInfoForCreateDBAccountInput. |
| 78 | +
|
| 79 | +
|
| 80 | + :param account_privilege: The account_privilege of this AccountPrivilegesInfoForCreateDBAccountInput. # noqa: E501 |
| 81 | + :type: str |
| 82 | + """ |
| 83 | + allowed_values = ["Custom", "DDLOnly", "DMLOnly", "None", "ReadOnly", "ReadWrite"] # noqa: E501 |
| 84 | + if (self._configuration.client_side_validation and |
| 85 | + account_privilege not in allowed_values): |
| 86 | + raise ValueError( |
| 87 | + "Invalid value for `account_privilege` ({0}), must be one of {1}" # noqa: E501 |
| 88 | + .format(account_privilege, allowed_values) |
| 89 | + ) |
| 90 | + |
| 91 | + self._account_privilege = account_privilege |
| 92 | + |
| 93 | + @property |
| 94 | + def account_privilege_custom(self): |
| 95 | + """Gets the account_privilege_custom of this AccountPrivilegesInfoForCreateDBAccountInput. # noqa: E501 |
| 96 | +
|
| 97 | +
|
| 98 | + :return: The account_privilege_custom of this AccountPrivilegesInfoForCreateDBAccountInput. # noqa: E501 |
| 99 | + :rtype: str |
| 100 | + """ |
| 101 | + return self._account_privilege_custom |
| 102 | + |
| 103 | + @account_privilege_custom.setter |
| 104 | + def account_privilege_custom(self, account_privilege_custom): |
| 105 | + """Sets the account_privilege_custom of this AccountPrivilegesInfoForCreateDBAccountInput. |
| 106 | +
|
| 107 | +
|
| 108 | + :param account_privilege_custom: The account_privilege_custom of this AccountPrivilegesInfoForCreateDBAccountInput. # noqa: E501 |
| 109 | + :type: str |
| 110 | + """ |
| 111 | + |
| 112 | + self._account_privilege_custom = account_privilege_custom |
| 113 | + |
| 114 | + @property |
| 115 | + def db_name(self): |
| 116 | + """Gets the db_name of this AccountPrivilegesInfoForCreateDBAccountInput. # noqa: E501 |
| 117 | +
|
| 118 | +
|
| 119 | + :return: The db_name of this AccountPrivilegesInfoForCreateDBAccountInput. # noqa: E501 |
| 120 | + :rtype: str |
| 121 | + """ |
| 122 | + return self._db_name |
| 123 | + |
| 124 | + @db_name.setter |
| 125 | + def db_name(self, db_name): |
| 126 | + """Sets the db_name of this AccountPrivilegesInfoForCreateDBAccountInput. |
| 127 | +
|
| 128 | +
|
| 129 | + :param db_name: The db_name of this AccountPrivilegesInfoForCreateDBAccountInput. # noqa: E501 |
| 130 | + :type: str |
| 131 | + """ |
| 132 | + |
| 133 | + self._db_name = db_name |
| 134 | + |
| 135 | + def to_dict(self): |
| 136 | + """Returns the model properties as a dict""" |
| 137 | + result = {} |
| 138 | + |
| 139 | + for attr, _ in six.iteritems(self.swagger_types): |
| 140 | + value = getattr(self, attr) |
| 141 | + if isinstance(value, list): |
| 142 | + result[attr] = list(map( |
| 143 | + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, |
| 144 | + value |
| 145 | + )) |
| 146 | + elif hasattr(value, "to_dict"): |
| 147 | + result[attr] = value.to_dict() |
| 148 | + elif isinstance(value, dict): |
| 149 | + result[attr] = dict(map( |
| 150 | + lambda item: (item[0], item[1].to_dict()) |
| 151 | + if hasattr(item[1], "to_dict") else item, |
| 152 | + value.items() |
| 153 | + )) |
| 154 | + else: |
| 155 | + result[attr] = value |
| 156 | + if issubclass(AccountPrivilegesInfoForCreateDBAccountInput, dict): |
| 157 | + for key, value in self.items(): |
| 158 | + result[key] = value |
| 159 | + |
| 160 | + return result |
| 161 | + |
| 162 | + def to_str(self): |
| 163 | + """Returns the string representation of the model""" |
| 164 | + return pprint.pformat(self.to_dict()) |
| 165 | + |
| 166 | + def __repr__(self): |
| 167 | + """For `print` and `pprint`""" |
| 168 | + return self.to_str() |
| 169 | + |
| 170 | + def __eq__(self, other): |
| 171 | + """Returns true if both objects are equal""" |
| 172 | + if not isinstance(other, AccountPrivilegesInfoForCreateDBAccountInput): |
| 173 | + return False |
| 174 | + |
| 175 | + return self.to_dict() == other.to_dict() |
| 176 | + |
| 177 | + def __ne__(self, other): |
| 178 | + """Returns true if both objects are not equal""" |
| 179 | + if not isinstance(other, AccountPrivilegesInfoForCreateDBAccountInput): |
| 180 | + return True |
| 181 | + |
| 182 | + return self.to_dict() != other.to_dict() |
0 commit comments