huaweicloud-sdk-python-v3/huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/update_user_option.py

354 lines
12 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# coding: utf-8
import pprint
import re
import six
class UpdateUserOption:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the 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',
'password': 'str',
'email': 'str',
'areacode': 'str',
'phone': 'str',
'enabled': 'bool',
'pwd_status': 'bool',
'xuser_type': 'str',
'xuser_id': 'str',
'description': 'str'
}
attribute_map = {
'name': 'name',
'password': 'password',
'email': 'email',
'areacode': 'areacode',
'phone': 'phone',
'enabled': 'enabled',
'pwd_status': 'pwd_status',
'xuser_type': 'xuser_type',
'xuser_id': 'xuser_id',
'description': 'description'
}
def __init__(self, name=None, password=None, email=None, areacode=None, phone=None, enabled=None, pwd_status=None, xuser_type=None, xuser_id=None, description=None):
"""UpdateUserOption - a model defined in huaweicloud sdk"""
self._name = None
self._password = None
self._email = None
self._areacode = None
self._phone = None
self._enabled = None
self._pwd_status = None
self._xuser_type = None
self._xuser_id = None
self._description = None
self.discriminator = None
if name is not None:
self.name = name
if password is not None:
self.password = password
if email is not None:
self.email = email
if areacode is not None:
self.areacode = areacode
if phone is not None:
self.phone = phone
if enabled is not None:
self.enabled = enabled
if pwd_status is not None:
self.pwd_status = pwd_status
if xuser_type is not None:
self.xuser_type = xuser_type
if xuser_id is not None:
self.xuser_id = xuser_id
if description is not None:
self.description = description
@property
def name(self):
"""Gets the name of this UpdateUserOption.
新IAM用户名长度5~32字符之间首位不能为数字特殊字符只能包含下划线“_”、中划线“-”和空格。
:return: The name of this UpdateUserOption.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this UpdateUserOption.
新IAM用户名长度5~32字符之间首位不能为数字特殊字符只能包含下划线“_”、中划线“-”和空格。
:param name: The name of this UpdateUserOption.
:type: str
"""
self._name = name
@property
def password(self):
"""Gets the password of this UpdateUserOption.
IAM用户新密码。 - 系统默认密码最小长度为6字符在6-32字符之间支持用户自定义密码长度。 - 至少包含以下四种字符中的两种: 大写字母、小写字母、数字和特殊字符。 - 必须满足账户设置中[密码策略](https://support.huaweicloud.com/usermanual-iam/iam_01_0607.html)的要求。 - 新密码不能与当前密码相同。
:return: The password of this UpdateUserOption.
:rtype: str
"""
return self._password
@password.setter
def password(self, password):
"""Sets the password of this UpdateUserOption.
IAM用户新密码。 - 系统默认密码最小长度为6字符在6-32字符之间支持用户自定义密码长度。 - 至少包含以下四种字符中的两种: 大写字母、小写字母、数字和特殊字符。 - 必须满足账户设置中[密码策略](https://support.huaweicloud.com/usermanual-iam/iam_01_0607.html)的要求。 - 新密码不能与当前密码相同。
:param password: The password of this UpdateUserOption.
:type: str
"""
self._password = password
@property
def email(self):
"""Gets the email of this UpdateUserOption.
IAM用户新邮箱需符合邮箱格式长度小于等于255字符。
:return: The email of this UpdateUserOption.
:rtype: str
"""
return self._email
@email.setter
def email(self, email):
"""Sets the email of this UpdateUserOption.
IAM用户新邮箱需符合邮箱格式长度小于等于255字符。
:param email: The email of this UpdateUserOption.
:type: str
"""
self._email = email
@property
def areacode(self):
"""Gets the areacode of this UpdateUserOption.
国家码。必须与手机号同时存在。中国大陆为“0086”。
:return: The areacode of this UpdateUserOption.
:rtype: str
"""
return self._areacode
@areacode.setter
def areacode(self, areacode):
"""Sets the areacode of this UpdateUserOption.
国家码。必须与手机号同时存在。中国大陆为“0086”。
:param areacode: The areacode of this UpdateUserOption.
:type: str
"""
self._areacode = areacode
@property
def phone(self):
"""Gets the phone of this UpdateUserOption.
IAM用户新手机号纯数字长度小于等于32字符。必须与国家码同时存在。
:return: The phone of this UpdateUserOption.
:rtype: str
"""
return self._phone
@phone.setter
def phone(self, phone):
"""Sets the phone of this UpdateUserOption.
IAM用户新手机号纯数字长度小于等于32字符。必须与国家码同时存在。
:param phone: The phone of this UpdateUserOption.
:type: str
"""
self._phone = phone
@property
def enabled(self):
"""Gets the enabled of this UpdateUserOption.
是否启用IAM用户。true为启用false为停用默认为true。
:return: The enabled of this UpdateUserOption.
:rtype: bool
"""
return self._enabled
@enabled.setter
def enabled(self, enabled):
"""Sets the enabled of this UpdateUserOption.
是否启用IAM用户。true为启用false为停用默认为true。
:param enabled: The enabled of this UpdateUserOption.
:type: bool
"""
self._enabled = enabled
@property
def pwd_status(self):
"""Gets the pwd_status of this UpdateUserOption.
IAM用户密码状态。true需要修改密码false正常。
:return: The pwd_status of this UpdateUserOption.
:rtype: bool
"""
return self._pwd_status
@pwd_status.setter
def pwd_status(self, pwd_status):
"""Sets the pwd_status of this UpdateUserOption.
IAM用户密码状态。true需要修改密码false正常。
:param pwd_status: The pwd_status of this UpdateUserOption.
:type: bool
"""
self._pwd_status = pwd_status
@property
def xuser_type(self):
"""Gets the xuser_type of this UpdateUserOption.
IAM用户在外部系统中的类型。长度小于等于64字符。xuser_type如果存在则需要与同一租户中的xaccount_type、xdomain_type校验须与xuser_id同时存在。 >外部系统指与华为云对接的外部企业管理系统xaccount_type、xaccount_id、xdomain_type、xdomain_id、xuser_type、xuser_id等参数值无法在华为云获取请咨询企业管理员。
:return: The xuser_type of this UpdateUserOption.
:rtype: str
"""
return self._xuser_type
@xuser_type.setter
def xuser_type(self, xuser_type):
"""Sets the xuser_type of this UpdateUserOption.
IAM用户在外部系统中的类型。长度小于等于64字符。xuser_type如果存在则需要与同一租户中的xaccount_type、xdomain_type校验须与xuser_id同时存在。 >外部系统指与华为云对接的外部企业管理系统xaccount_type、xaccount_id、xdomain_type、xdomain_id、xuser_type、xuser_id等参数值无法在华为云获取请咨询企业管理员。
:param xuser_type: The xuser_type of this UpdateUserOption.
:type: str
"""
self._xuser_type = xuser_type
@property
def xuser_id(self):
"""Gets the xuser_id of this UpdateUserOption.
IAM用户在外部系统中的ID。长度小于等于128字符必须与xuser_type同时存在。 >外部系统指与华为云对接的外部企业管理系统xaccount_type、xaccount_id、xdomain_type、xdomain_id、xuser_type、xuser_id等参数值无法在华为云获取请咨询企业管理员。
:return: The xuser_id of this UpdateUserOption.
:rtype: str
"""
return self._xuser_id
@xuser_id.setter
def xuser_id(self, xuser_id):
"""Sets the xuser_id of this UpdateUserOption.
IAM用户在外部系统中的ID。长度小于等于128字符必须与xuser_type同时存在。 >外部系统指与华为云对接的外部企业管理系统xaccount_type、xaccount_id、xdomain_type、xdomain_id、xuser_type、xuser_id等参数值无法在华为云获取请咨询企业管理员。
:param xuser_id: The xuser_id of this UpdateUserOption.
:type: str
"""
self._xuser_id = xuser_id
@property
def description(self):
"""Gets the description of this UpdateUserOption.
IAM用户新描述信息。
:return: The description of this UpdateUserOption.
:rtype: str
"""
return self._description
@description.setter
def description(self, description):
"""Sets the description of this UpdateUserOption.
IAM用户新描述信息。
:param description: The description of this UpdateUserOption.
:type: str
"""
self._description = description
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, UpdateUserOption):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other