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

172 lines
5.2 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 ValidateTokenReqDTO:
"""
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 = {
'token': 'str',
'need_gen_new_token': 'bool',
'need_account_info': 'bool'
}
attribute_map = {
'token': 'token',
'need_gen_new_token': 'needGenNewToken',
'need_account_info': 'needAccountInfo'
}
def __init__(self, token=None, need_gen_new_token=None, need_account_info=None):
2022-04-21 12:03:46 +00:00
"""ValidateTokenReqDTO
The model defined in huaweicloud sdk
2022-09-22 11:38:02 +00:00
:param token: Access Token
2022-04-21 12:03:46 +00:00
:type token: str
2022-09-22 11:38:02 +00:00
:param need_gen_new_token: 是否生成新的Token * true生成新的token值 * false不生成新的token值
2022-04-21 12:03:46 +00:00
:type need_gen_new_token: bool
2022-09-22 11:38:02 +00:00
:param need_account_info: 是否需要返回用户帐号信息帐号用户名称等信息
2022-04-21 12:03:46 +00:00
:type need_account_info: bool
"""
self._token = None
self._need_gen_new_token = None
self._need_account_info = None
self.discriminator = None
self.token = token
self.need_gen_new_token = need_gen_new_token
if need_account_info is not None:
self.need_account_info = need_account_info
@property
def token(self):
"""Gets the token of this ValidateTokenReqDTO.
2022-09-22 11:38:02 +00:00
Access Token
:return: The token of this ValidateTokenReqDTO.
:rtype: str
"""
return self._token
@token.setter
def token(self, token):
"""Sets the token of this ValidateTokenReqDTO.
2022-09-22 11:38:02 +00:00
Access Token
:param token: The token of this ValidateTokenReqDTO.
2022-04-21 12:03:46 +00:00
:type token: str
"""
self._token = token
@property
def need_gen_new_token(self):
"""Gets the need_gen_new_token of this ValidateTokenReqDTO.
2022-09-22 11:38:02 +00:00
是否生成新的Token * true生成新的token值 * false不生成新的token值
:return: The need_gen_new_token of this ValidateTokenReqDTO.
:rtype: bool
"""
return self._need_gen_new_token
@need_gen_new_token.setter
def need_gen_new_token(self, need_gen_new_token):
"""Sets the need_gen_new_token of this ValidateTokenReqDTO.
2022-09-22 11:38:02 +00:00
是否生成新的Token * true生成新的token值 * false不生成新的token值
:param need_gen_new_token: The need_gen_new_token of this ValidateTokenReqDTO.
2022-04-21 12:03:46 +00:00
:type need_gen_new_token: bool
"""
self._need_gen_new_token = need_gen_new_token
@property
def need_account_info(self):
"""Gets the need_account_info of this ValidateTokenReqDTO.
2022-09-22 11:38:02 +00:00
是否需要返回用户帐号信息帐号用户名称等信息
:return: The need_account_info of this ValidateTokenReqDTO.
:rtype: bool
"""
return self._need_account_info
@need_account_info.setter
def need_account_info(self, need_account_info):
"""Sets the need_account_info of this ValidateTokenReqDTO.
2022-09-22 11:38:02 +00:00
是否需要返回用户帐号信息帐号用户名称等信息
:param need_account_info: The need_account_info of this ValidateTokenReqDTO.
2022-04-21 12:03:46 +00:00
:type need_account_info: bool
"""
self._need_account_info = need_account_info
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, ValidateTokenReqDTO):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other