Select Git revision
creator_dto.py 7.08 KiB
# coding: utf-8
"""
Database Repository Container Service API
Service that manages the containers # noqa: E501
OpenAPI spec version: 1.1.0-alpha
Contact: andreas.rauber@tuwien.ac.at
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class CreatorDto(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 = {
'id': 'int',
'firstname': 'str',
'lastname': 'str',
'affiliation': 'str',
'orcid': 'str',
'created': 'datetime',
'last_modified': 'datetime'
}
attribute_map = {
'id': 'id',
'firstname': 'firstname',
'lastname': 'lastname',
'affiliation': 'affiliation',
'orcid': 'orcid',
'created': 'created',
'last_modified': 'lastModified'
}
def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None, created=None, last_modified=None): # noqa: E501
"""CreatorDto - a model defined in Swagger""" # noqa: E501
self._id = None
self._firstname = None
self._lastname = None
self._affiliation = None
self._orcid = None
self._created = None
self._last_modified = None
self.discriminator = None
self.id = id
self.firstname = firstname
self.lastname = lastname
if affiliation is not None:
self.affiliation = affiliation
if orcid is not None:
self.orcid = orcid
if created is not None:
self.created = created
if last_modified is not None:
self.last_modified = last_modified
@property
def id(self):
"""Gets the id of this CreatorDto. # noqa: E501
:return: The id of this CreatorDto. # noqa: E501
:rtype: int
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this CreatorDto.
:param id: The id of this CreatorDto. # noqa: E501
:type: int
"""
if id is None:
raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
self._id = id
@property
def firstname(self):
"""Gets the firstname of this CreatorDto. # noqa: E501
:return: The firstname of this CreatorDto. # noqa: E501
:rtype: str
"""
return self._firstname
@firstname.setter
def firstname(self, firstname):
"""Sets the firstname of this CreatorDto.
:param firstname: The firstname of this CreatorDto. # noqa: E501
:type: str
"""
if firstname is None:
raise ValueError("Invalid value for `firstname`, must not be `None`") # noqa: E501
self._firstname = firstname
@property
def lastname(self):
"""Gets the lastname of this CreatorDto. # noqa: E501
:return: The lastname of this CreatorDto. # noqa: E501
:rtype: str
"""
return self._lastname
@lastname.setter
def lastname(self, lastname):
"""Sets the lastname of this CreatorDto.
:param lastname: The lastname of this CreatorDto. # noqa: E501
:type: str
"""
if lastname is None:
raise ValueError("Invalid value for `lastname`, must not be `None`") # noqa: E501
self._lastname = lastname
@property
def affiliation(self):
"""Gets the affiliation of this CreatorDto. # noqa: E501
:return: The affiliation of this CreatorDto. # noqa: E501
:rtype: str
"""
return self._affiliation
@affiliation.setter
def affiliation(self, affiliation):
"""Sets the affiliation of this CreatorDto.
:param affiliation: The affiliation of this CreatorDto. # noqa: E501
:type: str
"""
self._affiliation = affiliation
@property
def orcid(self):
"""Gets the orcid of this CreatorDto. # noqa: E501
:return: The orcid of this CreatorDto. # noqa: E501
:rtype: str
"""
return self._orcid
@orcid.setter
def orcid(self, orcid):
"""Sets the orcid of this CreatorDto.
:param orcid: The orcid of this CreatorDto. # noqa: E501
:type: str
"""
self._orcid = orcid
@property
def created(self):
"""Gets the created of this CreatorDto. # noqa: E501
:return: The created of this CreatorDto. # noqa: E501
:rtype: datetime
"""
return self._created
@created.setter
def created(self, created):
"""Sets the created of this CreatorDto.
:param created: The created of this CreatorDto. # noqa: E501
:type: datetime
"""
self._created = created
@property
def last_modified(self):
"""Gets the last_modified of this CreatorDto. # noqa: E501
:return: The last_modified of this CreatorDto. # noqa: E501
:rtype: datetime
"""
return self._last_modified
@last_modified.setter
def last_modified(self, last_modified):
"""Sets the last_modified of this CreatorDto.
:param last_modified: The last_modified of this CreatorDto. # noqa: E501
:type: datetime
"""
self._last_modified = last_modified
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(CreatorDto, 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, CreatorDto):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other