huaweicloud-sdk-python-v3/huaweicloud-sdk-evs/huaweicloudsdkevs/v2/model/quota_detail_gigabytes_gpss...

187 lines
4.7 KiB
Python

# coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class QuotaDetailGigabytesGPSSD:
"""
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 = {
'in_use': 'int',
'limit': 'int',
'reserved': 'int',
'allocated': 'int'
}
attribute_map = {
'in_use': 'in_use',
'limit': 'limit',
'reserved': 'reserved',
'allocated': 'allocated'
}
def __init__(self, in_use=None, limit=None, reserved=None, allocated=None):
"""QuotaDetailGigabytesGPSSD - a model defined in huaweicloud sdk"""
self._in_use = None
self._limit = None
self._reserved = None
self._allocated = None
self.discriminator = None
self.in_use = in_use
self.limit = limit
self.reserved = reserved
self.allocated = allocated
@property
def in_use(self):
"""Gets the in_use of this QuotaDetailGigabytesGPSSD.
已使用的数量。
:return: The in_use of this QuotaDetailGigabytesGPSSD.
:rtype: int
"""
return self._in_use
@in_use.setter
def in_use(self, in_use):
"""Sets the in_use of this QuotaDetailGigabytesGPSSD.
已使用的数量。
:param in_use: The in_use of this QuotaDetailGigabytesGPSSD.
:type: int
"""
self._in_use = in_use
@property
def limit(self):
"""Gets the limit of this QuotaDetailGigabytesGPSSD.
最大的数量。
:return: The limit of this QuotaDetailGigabytesGPSSD.
:rtype: int
"""
return self._limit
@limit.setter
def limit(self, limit):
"""Sets the limit of this QuotaDetailGigabytesGPSSD.
最大的数量。
:param limit: The limit of this QuotaDetailGigabytesGPSSD.
:type: int
"""
self._limit = limit
@property
def reserved(self):
"""Gets the reserved of this QuotaDetailGigabytesGPSSD.
预留属性。
:return: The reserved of this QuotaDetailGigabytesGPSSD.
:rtype: int
"""
return self._reserved
@reserved.setter
def reserved(self, reserved):
"""Sets the reserved of this QuotaDetailGigabytesGPSSD.
预留属性。
:param reserved: The reserved of this QuotaDetailGigabytesGPSSD.
:type: int
"""
self._reserved = reserved
@property
def allocated(self):
"""Gets the allocated of this QuotaDetailGigabytesGPSSD.
预留属性。
:return: The allocated of this QuotaDetailGigabytesGPSSD.
:rtype: int
"""
return self._allocated
@allocated.setter
def allocated(self, allocated):
"""Sets the allocated of this QuotaDetailGigabytesGPSSD.
预留属性。
:param allocated: The allocated of this QuotaDetailGigabytesGPSSD.
:type: int
"""
self._allocated = allocated
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):
import simplejson as json
return json.dumps(sanitize_for_serialization(self))
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, QuotaDetailGigabytesGPSSD):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other