memos-script/memos/models/resources_resource_id_body.py

269 lines
7.3 KiB
Python

# coding: utf-8
"""
api/v2/activity_service.proto
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: version not set
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class ResourcesResourceIdBody(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_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.
"""
swagger_types = {
'name': 'str',
'create_time': 'datetime',
'filename': 'str',
'external_link': 'str',
'type': 'str',
'size': 'str',
'memo_id': 'int'
}
attribute_map = {
'name': 'name',
'create_time': 'createTime',
'filename': 'filename',
'external_link': 'externalLink',
'type': 'type',
'size': 'size',
'memo_id': 'memoId'
}
def __init__(self, name=None, create_time=None, filename=None, external_link=None, type=None, size=None, memo_id=None): # noqa: E501
"""ResourcesResourceIdBody - a model defined in Swagger""" # noqa: E501
self._name = None
self._create_time = None
self._filename = None
self._external_link = None
self._type = None
self._size = None
self._memo_id = None
self.discriminator = None
if name is not None:
self.name = name
if create_time is not None:
self.create_time = create_time
if filename is not None:
self.filename = filename
if external_link is not None:
self.external_link = external_link
if type is not None:
self.type = type
if size is not None:
self.size = size
if memo_id is not None:
self.memo_id = memo_id
@property
def name(self):
"""Gets the name of this ResourcesResourceIdBody. # noqa: E501
name is the user provided name. # noqa: E501
:return: The name of this ResourcesResourceIdBody. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this ResourcesResourceIdBody.
name is the user provided name. # noqa: E501
:param name: The name of this ResourcesResourceIdBody. # noqa: E501
:type: str
"""
self._name = name
@property
def create_time(self):
"""Gets the create_time of this ResourcesResourceIdBody. # noqa: E501
:return: The create_time of this ResourcesResourceIdBody. # noqa: E501
:rtype: datetime
"""
return self._create_time
@create_time.setter
def create_time(self, create_time):
"""Sets the create_time of this ResourcesResourceIdBody.
:param create_time: The create_time of this ResourcesResourceIdBody. # noqa: E501
:type: datetime
"""
self._create_time = create_time
@property
def filename(self):
"""Gets the filename of this ResourcesResourceIdBody. # noqa: E501
:return: The filename of this ResourcesResourceIdBody. # noqa: E501
:rtype: str
"""
return self._filename
@filename.setter
def filename(self, filename):
"""Sets the filename of this ResourcesResourceIdBody.
:param filename: The filename of this ResourcesResourceIdBody. # noqa: E501
:type: str
"""
self._filename = filename
@property
def external_link(self):
"""Gets the external_link of this ResourcesResourceIdBody. # noqa: E501
:return: The external_link of this ResourcesResourceIdBody. # noqa: E501
:rtype: str
"""
return self._external_link
@external_link.setter
def external_link(self, external_link):
"""Sets the external_link of this ResourcesResourceIdBody.
:param external_link: The external_link of this ResourcesResourceIdBody. # noqa: E501
:type: str
"""
self._external_link = external_link
@property
def type(self):
"""Gets the type of this ResourcesResourceIdBody. # noqa: E501
:return: The type of this ResourcesResourceIdBody. # noqa: E501
:rtype: str
"""
return self._type
@type.setter
def type(self, type):
"""Sets the type of this ResourcesResourceIdBody.
:param type: The type of this ResourcesResourceIdBody. # noqa: E501
:type: str
"""
self._type = type
@property
def size(self):
"""Gets the size of this ResourcesResourceIdBody. # noqa: E501
:return: The size of this ResourcesResourceIdBody. # noqa: E501
:rtype: str
"""
return self._size
@size.setter
def size(self, size):
"""Sets the size of this ResourcesResourceIdBody.
:param size: The size of this ResourcesResourceIdBody. # noqa: E501
:type: str
"""
self._size = size
@property
def memo_id(self):
"""Gets the memo_id of this ResourcesResourceIdBody. # noqa: E501
:return: The memo_id of this ResourcesResourceIdBody. # noqa: E501
:rtype: int
"""
return self._memo_id
@memo_id.setter
def memo_id(self, memo_id):
"""Sets the memo_id of this ResourcesResourceIdBody.
:param memo_id: The memo_id of this ResourcesResourceIdBody. # noqa: E501
:type: int
"""
self._memo_id = memo_id
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_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:
result[attr] = value
if issubclass(ResourcesResourceIdBody, dict):
for key, value in self.items():
result[key] = 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"""
if not isinstance(other, ResourcesResourceIdBody):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other