Select Git revision
cmp_debug.h
creator_dto.py 6.35 KiB
# coding: utf-8
"""
Database Repository Authentication Service API
Service that manages the authentication # 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',
'name': 'str',
'affiliation': 'str',
'orcid': 'str',
'created': 'datetime',
'last_modified': 'datetime'
}
attribute_map = {
'id': 'id',
'name': 'name',
'affiliation': 'affiliation',
'orcid': 'orcid',
'created': 'created',
'last_modified': 'last_modified'
}
def __init__(self, id=None, name=None, affiliation=None, orcid=None, created=None, last_modified=None): # noqa: E501
"""CreatorDto - a model defined in Swagger""" # noqa: E501
self._id = None
self._name = None
self._affiliation = None
self._orcid = None
self._created = None
self._last_modified = None
self.discriminator = None
self.id = id
self.name = name
if affiliation is not None:
self.affiliation = affiliation
if orcid is not None:
self.orcid = orcid
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 name(self):
"""Gets the name of this CreatorDto. # noqa: E501
:return: The name of this CreatorDto. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this CreatorDto.
:param name: The name of this CreatorDto. # noqa: E501
:type: str
"""
if name is None:
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
self._name = name
@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
"""
if created is None:
raise ValueError("Invalid value for `created`, must not be `None`") # noqa: E501
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