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

239 lines
6.0 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class GlanceImageMembers:
"""
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 = {
'status': 'str',
'created_at': 'str',
'updated_at': 'str',
'image_id': 'str',
'member_id': 'str',
'schema': 'str'
}
attribute_map = {
'status': 'status',
'created_at': 'created_at',
'updated_at': 'updated_at',
'image_id': 'image_id',
'member_id': 'member_id',
'schema': 'schema'
}
def __init__(self, status=None, created_at=None, updated_at=None, image_id=None, member_id=None, schema=None):
"""GlanceImageMembers - a model defined in huaweicloud sdk"""
self._status = None
self._created_at = None
self._updated_at = None
self._image_id = None
self._member_id = None
self._schema = None
self.discriminator = None
self.status = status
self.created_at = created_at
self.updated_at = updated_at
self.image_id = image_id
self.member_id = member_id
self.schema = schema
@property
def status(self):
"""Gets the status of this GlanceImageMembers.
共享状态。
:return: The status of this GlanceImageMembers.
:rtype: str
"""
return self._status
@status.setter
def status(self, status):
"""Sets the status of this GlanceImageMembers.
共享状态。
:param status: The status of this GlanceImageMembers.
:type: str
"""
self._status = status
@property
def created_at(self):
"""Gets the created_at of this GlanceImageMembers.
共享时间格式为UTC时间。
:return: The created_at of this GlanceImageMembers.
:rtype: str
"""
return self._created_at
@created_at.setter
def created_at(self, created_at):
"""Sets the created_at of this GlanceImageMembers.
共享时间格式为UTC时间。
:param created_at: The created_at of this GlanceImageMembers.
:type: str
"""
self._created_at = created_at
@property
def updated_at(self):
"""Gets the updated_at of this GlanceImageMembers.
更新时间格式为UTC时间。
:return: The updated_at of this GlanceImageMembers.
:rtype: str
"""
return self._updated_at
@updated_at.setter
def updated_at(self, updated_at):
"""Sets the updated_at of this GlanceImageMembers.
更新时间格式为UTC时间。
:param updated_at: The updated_at of this GlanceImageMembers.
:type: str
"""
self._updated_at = updated_at
@property
def image_id(self):
"""Gets the image_id of this GlanceImageMembers.
镜像ID。
:return: The image_id of this GlanceImageMembers.
:rtype: str
"""
return self._image_id
@image_id.setter
def image_id(self, image_id):
"""Sets the image_id of this GlanceImageMembers.
镜像ID。
:param image_id: The image_id of this GlanceImageMembers.
:type: str
"""
self._image_id = image_id
@property
def member_id(self):
"""Gets the member_id of this GlanceImageMembers.
成员ID。
:return: The member_id of this GlanceImageMembers.
:rtype: str
"""
return self._member_id
@member_id.setter
def member_id(self, member_id):
"""Sets the member_id of this GlanceImageMembers.
成员ID。
:param member_id: The member_id of this GlanceImageMembers.
:type: str
"""
self._member_id = member_id
@property
def schema(self):
"""Gets the schema of this GlanceImageMembers.
共享视图。
:return: The schema of this GlanceImageMembers.
:rtype: str
"""
return self._schema
@schema.setter
def schema(self, schema):
"""Sets the schema of this GlanceImageMembers.
共享视图。
:param schema: The schema of this GlanceImageMembers.
:type: str
"""
self._schema = schema
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, GlanceImageMembers):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other