huaweicloud-sdk-python-v3/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/mod_pwd_req_dto.py

171 lines
6.0 KiB
Python
Raw Normal View History

# coding: utf-8
import six
2021-07-26 11:24:08 +00:00
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ModPwdReqDTO:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'account': 'str',
'old_pwd': 'str',
'new_pwd': 'str'
}
attribute_map = {
'account': 'account',
'old_pwd': 'oldPwd',
'new_pwd': 'newPwd'
}
def __init__(self, account=None, old_pwd=None, new_pwd=None):
2022-04-21 12:03:46 +00:00
"""ModPwdReqDTO
The model defined in huaweicloud sdk
2022-09-22 11:38:02 +00:00
:param account: 帐号必须是携带域名的帐号
2022-04-21 12:03:46 +00:00
:type account: str
2022-09-22 11:38:02 +00:00
:param old_pwd: 用户旧的登录密码
2022-04-21 12:03:46 +00:00
:type old_pwd: str
2022-09-22 11:38:02 +00:00
:param new_pwd: 用户新的登录密码 密码要求 * 长度范围要求8~32 * 至少包含两种字符类型小写字母大写字母数字特殊字符` ~ ! @ # $ % ^ & * ( ) - _ = + \\ | [ { } ] ; : \" ,' < . > / ? * 旧密码和新密码不能相同 * 上次修改密码后5分钟内不能更新密码 * 不能与最近使用的旧密码相同 * 不能包含3个以上重复字符 * 密码不能包含与其对应的用户名(不区分大小写)以及逆序的用户名(不区分大小写) * 新密码与旧密码之间允许的最少不相同字符数为2个
2022-04-21 12:03:46 +00:00
:type new_pwd: str
"""
self._account = None
self._old_pwd = None
self._new_pwd = None
self.discriminator = None
self.account = account
self.old_pwd = old_pwd
self.new_pwd = new_pwd
@property
def account(self):
"""Gets the account of this ModPwdReqDTO.
2022-09-22 11:38:02 +00:00
帐号必须是携带域名的帐号
:return: The account of this ModPwdReqDTO.
:rtype: str
"""
return self._account
@account.setter
def account(self, account):
"""Sets the account of this ModPwdReqDTO.
2022-09-22 11:38:02 +00:00
帐号必须是携带域名的帐号
:param account: The account of this ModPwdReqDTO.
2022-04-21 12:03:46 +00:00
:type account: str
"""
self._account = account
@property
def old_pwd(self):
"""Gets the old_pwd of this ModPwdReqDTO.
2022-09-22 11:38:02 +00:00
用户旧的登录密码
:return: The old_pwd of this ModPwdReqDTO.
:rtype: str
"""
return self._old_pwd
@old_pwd.setter
def old_pwd(self, old_pwd):
"""Sets the old_pwd of this ModPwdReqDTO.
2022-09-22 11:38:02 +00:00
用户旧的登录密码
:param old_pwd: The old_pwd of this ModPwdReqDTO.
2022-04-21 12:03:46 +00:00
:type old_pwd: str
"""
self._old_pwd = old_pwd
@property
def new_pwd(self):
"""Gets the new_pwd of this ModPwdReqDTO.
2022-09-22 11:38:02 +00:00
用户新的登录密码 密码要求 * 长度范围要求8~32 * 至少包含两种字符类型小写字母大写字母数字特殊字符` ~ ! @ # $ % ^ & * ( ) - _ = + \\ | [ { } ] ; : \" ,' < . > / ? * 旧密码和新密码不能相同 * 上次修改密码后5分钟内不能更新密码 * 不能与最近使用的旧密码相同 * 不能包含3个以上重复字符 * 密码不能包含与其对应的用户名(不区分大小写)以及逆序的用户名(不区分大小写) * 新密码与旧密码之间允许的最少不相同字符数为2个
:return: The new_pwd of this ModPwdReqDTO.
:rtype: str
"""
return self._new_pwd
@new_pwd.setter
def new_pwd(self, new_pwd):
"""Sets the new_pwd of this ModPwdReqDTO.
2022-09-22 11:38:02 +00:00
用户新的登录密码 密码要求 * 长度范围要求8~32 * 至少包含两种字符类型小写字母大写字母数字特殊字符` ~ ! @ # $ % ^ & * ( ) - _ = + \\ | [ { } ] ; : \" ,' < . > / ? * 旧密码和新密码不能相同 * 上次修改密码后5分钟内不能更新密码 * 不能与最近使用的旧密码相同 * 不能包含3个以上重复字符 * 密码不能包含与其对应的用户名(不区分大小写)以及逆序的用户名(不区分大小写) * 新密码与旧密码之间允许的最少不相同字符数为2个
:param new_pwd: The new_pwd of this ModPwdReqDTO.
2022-04-21 12:03:46 +00:00
:type new_pwd: str
"""
self._new_pwd = new_pwd
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
2021-08-10 12:26:18 +00:00
"""Returns the string representation of the model"""
2021-07-09 10:57:08 +00:00
import simplejson as json
2021-08-10 12:26:18 +00:00
if six.PY2:
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
def __repr__(self):
2021-08-10 12:26:18 +00:00
"""For `print`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ModPwdReqDTO):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other