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

174 lines
4.9 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 UserStatusDTO:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'number': 'str',
'reg_status': 'str',
'call_status': 'str'
}
attribute_map = {
'number': 'Number',
'reg_status': 'RegStatus',
'call_status': 'CallStatus'
}
def __init__(self, number=None, reg_status=None, call_status=None):
2022-04-21 12:03:46 +00:00
"""UserStatusDTO
The model defined in huaweicloud sdk
:param number: 终端号码
:type number: str
2022-09-22 11:38:02 +00:00
:param reg_status: 注册状态 * 1是未注册上 * 0是已注册
2022-04-21 12:03:46 +00:00
:type reg_status: str
2022-09-22 11:38:02 +00:00
:param call_status: 呼叫状态 * 0未上线 * 1空闲中 * 2使用中 * 3非会议硬终端统一的无效值
2022-04-21 12:03:46 +00:00
:type call_status: str
"""
self._number = None
self._reg_status = None
self._call_status = None
self.discriminator = None
if number is not None:
self.number = number
if reg_status is not None:
self.reg_status = reg_status
if call_status is not None:
self.call_status = call_status
@property
def number(self):
"""Gets the number of this UserStatusDTO.
终端号码
:return: The number of this UserStatusDTO.
:rtype: str
"""
return self._number
@number.setter
def number(self, number):
"""Sets the number of this UserStatusDTO.
终端号码
:param number: The number of this UserStatusDTO.
2022-04-21 12:03:46 +00:00
:type number: str
"""
self._number = number
@property
def reg_status(self):
"""Gets the reg_status of this UserStatusDTO.
2022-09-22 11:38:02 +00:00
注册状态 * 1是未注册上 * 0是已注册
:return: The reg_status of this UserStatusDTO.
:rtype: str
"""
return self._reg_status
@reg_status.setter
def reg_status(self, reg_status):
"""Sets the reg_status of this UserStatusDTO.
2022-09-22 11:38:02 +00:00
注册状态 * 1是未注册上 * 0是已注册
:param reg_status: The reg_status of this UserStatusDTO.
2022-04-21 12:03:46 +00:00
:type reg_status: str
"""
self._reg_status = reg_status
@property
def call_status(self):
"""Gets the call_status of this UserStatusDTO.
2022-09-22 11:38:02 +00:00
呼叫状态 * 0未上线 * 1空闲中 * 2使用中 * 3非会议硬终端统一的无效值
:return: The call_status of this UserStatusDTO.
:rtype: str
"""
return self._call_status
@call_status.setter
def call_status(self, call_status):
"""Sets the call_status of this UserStatusDTO.
2022-09-22 11:38:02 +00:00
呼叫状态 * 0未上线 * 1空闲中 * 2使用中 * 3非会议硬终端统一的无效值
:param call_status: The call_status of this UserStatusDTO.
2022-04-21 12:03:46 +00:00
:type call_status: str
"""
self._call_status = call_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):
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, UserStatusDTO):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other