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

229 lines
7.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 ResourceDTO:
"""
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 = {
2021-06-10 11:54:19 +00:00
'id': 'str',
'type': 'str',
'type_id': 'str',
'count': 'int',
'expire_date': 'int'
}
attribute_map = {
2021-06-10 11:54:19 +00:00
'id': 'id',
'type': 'type',
'type_id': 'typeId',
'count': 'count',
'expire_date': 'expireDate'
}
2021-06-10 11:54:19 +00:00
def __init__(self, id=None, type=None, type_id=None, count=None, expire_date=None):
2022-04-21 12:03:46 +00:00
"""ResourceDTO
The model defined in huaweicloud sdk
2022-09-22 11:38:02 +00:00
:param id: 资源标识不携带则后台自动生成
2022-04-21 12:03:46 +00:00
:type id: str
2022-09-22 11:38:02 +00:00
:param type: 资源类型 - VMR - 云会议室 - CONF_CALL - 会议并发数 - HARD_1080P - 1080P硬终端 - HARD_720P - 720P硬终端 - SOFT - 软终端用户数 - ROOM - 大屏软终端 - LIVE - 直播推流 - RECORD - 录播空间 - HARD_THIRD_PARTY - 第三方硬终端帐号 - HUAWEI_VISION -智慧屏 - IDEA_HUB - ideahub
2022-04-21 12:03:46 +00:00
:type type: str
:param type_id: 类型标识比如资源类型为vmrvmr又分为5方10方等该参数为vmrPkgId用来区分子类别详见如下 - vmr10:ff808081699b56d40169c410d5080179 - vmr50:ff808081699b56cb0169c411a0980152 - vmr100:ff808081699b56cb0169c41167850151 - vmr200:ff808081699b56d40169c410913d0178 - vmr25:ff808081699b56d40169c4111fe5017a - vmr300:ff8080816b9ec3ab016bdff237962e83 - vmr400:ff8080816b9ec475016bdff37efc279f - vmr500:ff8080816b9ec3ab016bdff338542e84
:type type_id: str
2022-09-22 11:38:02 +00:00
:param count: 资源数量
2022-04-21 12:03:46 +00:00
:type count: int
2022-09-22 11:38:02 +00:00
:param expire_date: 到期时间,utc时间戳
2022-04-21 12:03:46 +00:00
:type expire_date: int
"""
2021-06-10 11:54:19 +00:00
self._id = None
self._type = None
self._type_id = None
self._count = None
self._expire_date = None
self.discriminator = None
2021-06-10 11:54:19 +00:00
if id is not None:
self.id = id
self.type = type
if type_id is not None:
self.type_id = type_id
self.count = count
self.expire_date = expire_date
2021-06-10 11:54:19 +00:00
@property
def id(self):
"""Gets the id of this ResourceDTO.
2022-09-22 11:38:02 +00:00
资源标识不携带则后台自动生成
2021-06-10 11:54:19 +00:00
:return: The id of this ResourceDTO.
:rtype: str
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this ResourceDTO.
2022-09-22 11:38:02 +00:00
资源标识不携带则后台自动生成
2021-06-10 11:54:19 +00:00
:param id: The id of this ResourceDTO.
2022-04-21 12:03:46 +00:00
:type id: str
2021-06-10 11:54:19 +00:00
"""
self._id = id
@property
def type(self):
"""Gets the type of this ResourceDTO.
2022-09-22 11:38:02 +00:00
资源类型 - VMR - 云会议室 - CONF_CALL - 会议并发数 - HARD_1080P - 1080P硬终端 - HARD_720P - 720P硬终端 - SOFT - 软终端用户数 - ROOM - 大屏软终端 - LIVE - 直播推流 - RECORD - 录播空间 - HARD_THIRD_PARTY - 第三方硬终端帐号 - HUAWEI_VISION -智慧屏 - IDEA_HUB - ideahub
:return: The type of this ResourceDTO.
:rtype: str
"""
return self._type
@type.setter
def type(self, type):
"""Sets the type of this ResourceDTO.
2022-09-22 11:38:02 +00:00
资源类型 - VMR - 云会议室 - CONF_CALL - 会议并发数 - HARD_1080P - 1080P硬终端 - HARD_720P - 720P硬终端 - SOFT - 软终端用户数 - ROOM - 大屏软终端 - LIVE - 直播推流 - RECORD - 录播空间 - HARD_THIRD_PARTY - 第三方硬终端帐号 - HUAWEI_VISION -智慧屏 - IDEA_HUB - ideahub
:param type: The type of this ResourceDTO.
2022-04-21 12:03:46 +00:00
:type type: str
"""
self._type = type
@property
def type_id(self):
"""Gets the type_id of this ResourceDTO.
类型标识比如资源类型为vmrvmr又分为5方10方等该参数为vmrPkgId用来区分子类别详见如下 - vmr10:ff808081699b56d40169c410d5080179 - vmr50:ff808081699b56cb0169c411a0980152 - vmr100:ff808081699b56cb0169c41167850151 - vmr200:ff808081699b56d40169c410913d0178 - vmr25:ff808081699b56d40169c4111fe5017a - vmr300:ff8080816b9ec3ab016bdff237962e83 - vmr400:ff8080816b9ec475016bdff37efc279f - vmr500:ff8080816b9ec3ab016bdff338542e84
:return: The type_id of this ResourceDTO.
:rtype: str
"""
return self._type_id
@type_id.setter
def type_id(self, type_id):
"""Sets the type_id of this ResourceDTO.
类型标识比如资源类型为vmrvmr又分为5方10方等该参数为vmrPkgId用来区分子类别详见如下 - vmr10:ff808081699b56d40169c410d5080179 - vmr50:ff808081699b56cb0169c411a0980152 - vmr100:ff808081699b56cb0169c41167850151 - vmr200:ff808081699b56d40169c410913d0178 - vmr25:ff808081699b56d40169c4111fe5017a - vmr300:ff8080816b9ec3ab016bdff237962e83 - vmr400:ff8080816b9ec475016bdff37efc279f - vmr500:ff8080816b9ec3ab016bdff338542e84
:param type_id: The type_id of this ResourceDTO.
2022-04-21 12:03:46 +00:00
:type type_id: str
"""
self._type_id = type_id
@property
def count(self):
"""Gets the count of this ResourceDTO.
2022-09-22 11:38:02 +00:00
资源数量
:return: The count of this ResourceDTO.
:rtype: int
"""
return self._count
@count.setter
def count(self, count):
"""Sets the count of this ResourceDTO.
2022-09-22 11:38:02 +00:00
资源数量
:param count: The count of this ResourceDTO.
2022-04-21 12:03:46 +00:00
:type count: int
"""
self._count = count
@property
def expire_date(self):
"""Gets the expire_date of this ResourceDTO.
2022-09-22 11:38:02 +00:00
到期时间,utc时间戳
:return: The expire_date of this ResourceDTO.
:rtype: int
"""
return self._expire_date
@expire_date.setter
def expire_date(self, expire_date):
"""Sets the expire_date of this ResourceDTO.
2022-09-22 11:38:02 +00:00
到期时间,utc时间戳
:param expire_date: The expire_date of this ResourceDTO.
2022-04-21 12:03:46 +00:00
:type expire_date: int
"""
self._expire_date = expire_date
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, ResourceDTO):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other