2020-11-30 13:39:15 +00:00
|
|
|
|
# coding: utf-8
|
|
|
|
|
|
|
|
|
|
import pprint
|
|
|
|
|
import re
|
|
|
|
|
|
|
|
|
|
import six
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
class VersionItem:
|
2020-11-30 13:39:15 +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 = {
|
|
|
|
|
'id': 'str',
|
|
|
|
|
'min_version': 'str',
|
|
|
|
|
'status': 'str',
|
2020-12-07 08:59:42 +00:00
|
|
|
|
'updated': 'str',
|
2020-11-30 13:39:15 +00:00
|
|
|
|
'version': 'str',
|
2020-12-07 08:59:42 +00:00
|
|
|
|
'links': 'list[LinksItem]'
|
2020-11-30 13:39:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
attribute_map = {
|
|
|
|
|
'id': 'id',
|
|
|
|
|
'min_version': 'min_version',
|
|
|
|
|
'status': 'status',
|
2020-12-07 08:59:42 +00:00
|
|
|
|
'updated': 'updated',
|
2020-11-30 13:39:15 +00:00
|
|
|
|
'version': 'version',
|
2020-12-07 08:59:42 +00:00
|
|
|
|
'links': 'links'
|
2020-11-30 13:39:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
def __init__(self, id=None, min_version=None, status=None, updated=None, version=None, links=None):
|
|
|
|
|
"""VersionItem - a model defined in huaweicloud sdk"""
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self._id = None
|
|
|
|
|
self._min_version = None
|
|
|
|
|
self._status = None
|
|
|
|
|
self._updated = None
|
2020-12-07 08:59:42 +00:00
|
|
|
|
self._version = None
|
|
|
|
|
self._links = None
|
2020-11-30 13:39:15 +00:00
|
|
|
|
self.discriminator = None
|
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
self.id = id
|
|
|
|
|
self.min_version = min_version
|
|
|
|
|
self.status = status
|
|
|
|
|
self.updated = updated
|
|
|
|
|
self.version = version
|
|
|
|
|
self.links = links
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
|
def id(self):
|
2020-12-07 08:59:42 +00:00
|
|
|
|
"""Gets the id of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
版本ID(版本号),如v2。
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
:return: The id of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
:rtype: str
|
|
|
|
|
"""
|
|
|
|
|
return self._id
|
|
|
|
|
|
|
|
|
|
@id.setter
|
|
|
|
|
def id(self, id):
|
2020-12-07 08:59:42 +00:00
|
|
|
|
"""Sets the id of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
版本ID(版本号),如v2。
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
:param id: The id of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
:type: str
|
|
|
|
|
"""
|
|
|
|
|
self._id = id
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
|
def min_version(self):
|
2020-12-07 08:59:42 +00:00
|
|
|
|
"""Gets the min_version of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
若该版本API支持微版本,则返回支持的最小微版本号;若不支持微版本,则返回空。
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
:return: The min_version of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
:rtype: str
|
|
|
|
|
"""
|
|
|
|
|
return self._min_version
|
|
|
|
|
|
|
|
|
|
@min_version.setter
|
|
|
|
|
def min_version(self, min_version):
|
2020-12-07 08:59:42 +00:00
|
|
|
|
"""Sets the min_version of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
若该版本API支持微版本,则返回支持的最小微版本号;若不支持微版本,则返回空。
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
:param min_version: The min_version of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
:type: str
|
|
|
|
|
"""
|
|
|
|
|
self._min_version = min_version
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
|
def status(self):
|
2020-12-07 08:59:42 +00:00
|
|
|
|
"""Gets the status of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
版本状态,为如下3种: CURRENT:表示该版本为主推版本。 SUPPORTED:表示为老版本,但是现在还继续支持。 DEPRECATED:表示为废弃版本,存在后续删除的可能。
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
:return: The status of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
:rtype: str
|
|
|
|
|
"""
|
|
|
|
|
return self._status
|
|
|
|
|
|
|
|
|
|
@status.setter
|
|
|
|
|
def status(self, status):
|
2020-12-07 08:59:42 +00:00
|
|
|
|
"""Sets the status of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
版本状态,为如下3种: CURRENT:表示该版本为主推版本。 SUPPORTED:表示为老版本,但是现在还继续支持。 DEPRECATED:表示为废弃版本,存在后续删除的可能。
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
:param status: The status of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
:type: str
|
|
|
|
|
"""
|
|
|
|
|
self._status = status
|
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
@property
|
|
|
|
|
def updated(self):
|
|
|
|
|
"""Gets the updated of this VersionItem.
|
|
|
|
|
|
|
|
|
|
版本发布时间,要求用UTC时间格式表示。如v2发布的时间2014-06-28T12:20:21Z。
|
|
|
|
|
|
|
|
|
|
:return: The updated of this VersionItem.
|
|
|
|
|
:rtype: str
|
|
|
|
|
"""
|
|
|
|
|
return self._updated
|
|
|
|
|
|
|
|
|
|
@updated.setter
|
|
|
|
|
def updated(self, updated):
|
|
|
|
|
"""Sets the updated of this VersionItem.
|
|
|
|
|
|
|
|
|
|
版本发布时间,要求用UTC时间格式表示。如v2发布的时间2014-06-28T12:20:21Z。
|
|
|
|
|
|
|
|
|
|
:param updated: The updated of this VersionItem.
|
|
|
|
|
:type: str
|
|
|
|
|
"""
|
|
|
|
|
self._updated = updated
|
|
|
|
|
|
2020-11-30 13:39:15 +00:00
|
|
|
|
@property
|
|
|
|
|
def version(self):
|
2020-12-07 08:59:42 +00:00
|
|
|
|
"""Gets the version of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
若该版本API支持微版本,则返回支持的最大微版本号;若不支持微版本,则返回空。
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
:return: The version of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
:rtype: str
|
|
|
|
|
"""
|
|
|
|
|
return self._version
|
|
|
|
|
|
|
|
|
|
@version.setter
|
|
|
|
|
def version(self, version):
|
2020-12-07 08:59:42 +00:00
|
|
|
|
"""Sets the version of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
若该版本API支持微版本,则返回支持的最大微版本号;若不支持微版本,则返回空。
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
:param version: The version of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
:type: str
|
|
|
|
|
"""
|
|
|
|
|
self._version = version
|
|
|
|
|
|
|
|
|
|
@property
|
2020-12-07 08:59:42 +00:00
|
|
|
|
def links(self):
|
|
|
|
|
"""Gets the links of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
API的URL地址。
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
:return: The links of this VersionItem.
|
|
|
|
|
:rtype: list[LinksItem]
|
2020-11-30 13:39:15 +00:00
|
|
|
|
"""
|
2020-12-07 08:59:42 +00:00
|
|
|
|
return self._links
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
@links.setter
|
|
|
|
|
def links(self, links):
|
|
|
|
|
"""Sets the links of this VersionItem.
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
API的URL地址。
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
2020-12-07 08:59:42 +00:00
|
|
|
|
:param links: The links of this VersionItem.
|
|
|
|
|
:type: list[LinksItem]
|
2020-11-30 13:39:15 +00:00
|
|
|
|
"""
|
2020-12-07 08:59:42 +00:00
|
|
|
|
self._links = links
|
2020-11-30 13:39:15 +00:00
|
|
|
|
|
|
|
|
|
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"""
|
2020-12-07 08:59:42 +00:00
|
|
|
|
if not isinstance(other, VersionItem):
|
2020-11-30 13:39:15 +00:00
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
return self.__dict__ == other.__dict__
|
|
|
|
|
|
|
|
|
|
def __ne__(self, other):
|
|
|
|
|
"""Returns true if both objects are not equal"""
|
|
|
|
|
return not self == other
|