huaweicloud-sdk-python-v3/huaweicloud-sdk-ims/huaweicloudsdkims/v2/model/os_version_info.py

214 lines
5.3 KiB
Python
Raw Normal View History

2020-05-18 07:34:40 +00:00
# coding: utf-8
import pprint
import re
import six
class OsVersionInfo:
2020-05-18 07:34:40 +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 = []
2020-05-18 07:34:40 +00:00
openapi_types = {
'platform': 'str',
'os_version_key': 'str',
'os_version': 'str',
'os_bit': 'str',
'os_type': 'str'
}
attribute_map = {
'platform': 'platform',
'os_version_key': 'os_version_key',
'os_version': 'os_version',
'os_bit': 'os_bit',
'os_type': 'os_type'
}
def __init__(self, platform=None, os_version_key=None, os_version=None, os_bit=None, os_type=None):
2020-05-18 07:34:40 +00:00
"""OsVersionInfo - a model defined in huaweicloud sdk"""
2020-05-18 07:34:40 +00:00
self._platform = None
self._os_version_key = None
self._os_version = None
self._os_bit = None
self._os_type = None
self.discriminator = None
self.platform = platform
self.os_version_key = os_version_key
self.os_version = os_version
self.os_bit = os_bit
self.os_type = os_type
@property
def platform(self):
"""Gets the platform of this OsVersionInfo.
操作系统的平台值
:return: The platform of this OsVersionInfo.
:rtype: str
"""
return self._platform
@platform.setter
def platform(self, platform):
"""Sets the platform of this OsVersionInfo.
操作系统的平台值
:param platform: The platform of this OsVersionInfo.
:type: str
"""
self._platform = platform
@property
def os_version_key(self):
"""Gets the os_version_key of this OsVersionInfo.
os_version的key值和os_version值相同
:return: The os_version_key of this OsVersionInfo.
:rtype: str
"""
return self._os_version_key
@os_version_key.setter
def os_version_key(self, os_version_key):
"""Sets the os_version_key of this OsVersionInfo.
os_version的key值和os_version值相同
:param os_version_key: The os_version_key of this OsVersionInfo.
:type: str
"""
self._os_version_key = os_version_key
@property
def os_version(self):
"""Gets the os_version of this OsVersionInfo.
操作系统的版本
:return: The os_version of this OsVersionInfo.
:rtype: str
"""
return self._os_version
@os_version.setter
def os_version(self, os_version):
"""Sets the os_version of this OsVersionInfo.
操作系统的版本
:param os_version: The os_version of this OsVersionInfo.
:type: str
"""
self._os_version = os_version
@property
def os_bit(self):
"""Gets the os_bit of this OsVersionInfo.
操作系统的位数
:return: The os_bit of this OsVersionInfo.
:rtype: str
"""
return self._os_bit
@os_bit.setter
def os_bit(self, os_bit):
"""Sets the os_bit of this OsVersionInfo.
操作系统的位数
:param os_bit: The os_bit of this OsVersionInfo.
:type: str
"""
self._os_bit = os_bit
@property
def os_type(self):
"""Gets the os_type of this OsVersionInfo.
操作系统的类型Linux或Windows
:return: The os_type of this OsVersionInfo.
:rtype: str
"""
return self._os_type
@os_type.setter
def os_type(self, os_type):
"""Sets the os_type of this OsVersionInfo.
操作系统的类型Linux或Windows
:param os_type: The os_type of this OsVersionInfo.
:type: str
"""
self._os_type = os_type
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
2020-05-18 07:34:40 +00:00
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"""
if not isinstance(other, OsVersionInfo):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other