2020-06-30 12:45:36 +00:00
|
|
|
|
# coding: utf-8
|
|
|
|
|
|
|
|
|
|
import six
|
|
|
|
|
|
2021-07-26 11:24:08 +00:00
|
|
|
|
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
2020-07-15 09:30:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ValidateTokenReqDTO:
|
2020-06-30 12:45:36 +00:00
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
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'
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-15 12:57:36 +00:00
|
|
|
|
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
|
|
|
|
|
"""
|
2020-07-15 09:30:15 +00:00
|
|
|
|
|
|
|
|
|
|
2020-06-30 12:45:36 +00:00
|
|
|
|
|
|
|
|
|
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。
|
2020-06-30 12:45:36 +00:00
|
|
|
|
|
|
|
|
|
: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。
|
2020-06-30 12:45:36 +00:00
|
|
|
|
|
|
|
|
|
:param token: The token of this ValidateTokenReqDTO.
|
2022-04-21 12:03:46 +00:00
|
|
|
|
:type token: str
|
2020-06-30 12:45:36 +00:00
|
|
|
|
"""
|
|
|
|
|
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值
|
2020-06-30 12:45:36 +00:00
|
|
|
|
|
|
|
|
|
: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值
|
2020-06-30 12:45:36 +00:00
|
|
|
|
|
|
|
|
|
: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
|
2020-06-30 12:45:36 +00:00
|
|
|
|
"""
|
|
|
|
|
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
|
|
|
|
是否需要返回用户帐号信息(帐号、用户名称等信息)。
|
2020-06-30 12:45:36 +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
|
|
|
|
是否需要返回用户帐号信息(帐号、用户名称等信息)。
|
2020-06-30 12:45:36 +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
|
2020-06-30 12:45:36 +00:00
|
|
|
|
"""
|
|
|
|
|
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)
|
2020-06-30 12:45:36 +00:00
|
|
|
|
|
|
|
|
|
def __repr__(self):
|
2021-08-10 12:26:18 +00:00
|
|
|
|
"""For `print`"""
|
2020-06-30 12:45:36 +00:00
|
|
|
|
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
|