Select Git revision
user_dto.py

Martin Weise authored
user_dto.py 13.52 KiB
# coding: utf-8
"""
Database Repository Query Service API
Service that manages the queries # 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 UserDto(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',
'authorities': 'list[GrantedAuthorityDto]',
'username': 'str',
'firstname': 'str',
'lastname': 'str',
'affiliation': 'str',
'orcid': 'str',
'roles': 'list[str]',
'containers': 'list[ContainerDto]',
'databases': 'list[ContainerDto]',
'identifiers': 'list[ContainerDto]',
'email': 'str',
'titles_before': 'str',
'titles_after': 'str',
'theme_dark': 'bool',
'email_verified': 'bool'
}
attribute_map = {
'id': 'id',
'authorities': 'authorities',
'username': 'username',
'firstname': 'firstname',
'lastname': 'lastname',
'affiliation': 'affiliation',
'orcid': 'orcid',
'roles': 'roles',
'containers': 'containers',
'databases': 'databases',
'identifiers': 'identifiers',
'email': 'email',
'titles_before': 'titles_before',
'titles_after': 'titles_after',
'theme_dark': 'theme_dark',
'email_verified': 'email_verified'
}
def __init__(self, id=None, authorities=None, username=None, firstname=None, lastname=None, affiliation=None, orcid=None, roles=None, containers=None, databases=None, identifiers=None, email=None, titles_before=None, titles_after=None, theme_dark=None, email_verified=None): # noqa: E501
"""UserDto - a model defined in Swagger""" # noqa: E501
self._id = None
self._authorities = None
self._username = None
self._firstname = None
self._lastname = None
self._affiliation = None
self._orcid = None
self._roles = None
self._containers = None
self._databases = None
self._identifiers = None
self._email = None
self._titles_before = None
self._titles_after = None
self._theme_dark = None
self._email_verified = None
self.discriminator = None
self.id = id
if authorities is not None:
self.authorities = authorities
self.username = username
if firstname is not None:
self.firstname = firstname
if lastname is not None:
self.lastname = lastname
if affiliation is not None:
self.affiliation = affiliation
if orcid is not None:
self.orcid = orcid
self.roles = roles
if containers is not None:
self.containers = containers
if databases is not None:
self.databases = databases
if identifiers is not None:
self.identifiers = identifiers
self.email = email
if titles_before is not None:
self.titles_before = titles_before
if titles_after is not None:
self.titles_after = titles_after
self.theme_dark = theme_dark
self.email_verified = email_verified
@property
def id(self):
"""Gets the id of this UserDto. # noqa: E501
:return: The id of this UserDto. # noqa: E501
:rtype: int
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this UserDto.
:param id: The id of this UserDto. # 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 authorities(self):
"""Gets the authorities of this UserDto. # noqa: E501
:return: The authorities of this UserDto. # noqa: E501
:rtype: list[GrantedAuthorityDto]
"""
return self._authorities
@authorities.setter
def authorities(self, authorities):
"""Sets the authorities of this UserDto.
:param authorities: The authorities of this UserDto. # noqa: E501
:type: list[GrantedAuthorityDto]
"""
self._authorities = authorities
@property
def username(self):
"""Gets the username of this UserDto. # noqa: E501
Only contains lowercase characters # noqa: E501
:return: The username of this UserDto. # noqa: E501
:rtype: str
"""
return self._username
@username.setter
def username(self, username):
"""Sets the username of this UserDto.
Only contains lowercase characters # noqa: E501
:param username: The username of this UserDto. # noqa: E501
:type: str
"""
if username is None:
raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501
self._username = username
@property
def firstname(self):
"""Gets the firstname of this UserDto. # noqa: E501
:return: The firstname of this UserDto. # noqa: E501
:rtype: str
"""
return self._firstname
@firstname.setter
def firstname(self, firstname):
"""Sets the firstname of this UserDto.
:param firstname: The firstname of this UserDto. # noqa: E501
:type: str
"""
self._firstname = firstname
@property
def lastname(self):
"""Gets the lastname of this UserDto. # noqa: E501
:return: The lastname of this UserDto. # noqa: E501
:rtype: str
"""
return self._lastname
@lastname.setter
def lastname(self, lastname):
"""Sets the lastname of this UserDto.
:param lastname: The lastname of this UserDto. # noqa: E501
:type: str
"""
self._lastname = lastname
@property
def affiliation(self):
"""Gets the affiliation of this UserDto. # noqa: E501
:return: The affiliation of this UserDto. # noqa: E501
:rtype: str
"""
return self._affiliation
@affiliation.setter
def affiliation(self, affiliation):
"""Sets the affiliation of this UserDto.
:param affiliation: The affiliation of this UserDto. # noqa: E501
:type: str
"""
self._affiliation = affiliation
@property
def orcid(self):
"""Gets the orcid of this UserDto. # noqa: E501
:return: The orcid of this UserDto. # noqa: E501
:rtype: str
"""
return self._orcid
@orcid.setter
def orcid(self, orcid):
"""Sets the orcid of this UserDto.
:param orcid: The orcid of this UserDto. # noqa: E501
:type: str
"""
self._orcid = orcid
@property
def roles(self):
"""Gets the roles of this UserDto. # noqa: E501
Roles of the user # noqa: E501
:return: The roles of this UserDto. # noqa: E501
:rtype: list[str]
"""
return self._roles
@roles.setter
def roles(self, roles):
"""Sets the roles of this UserDto.
Roles of the user # noqa: E501
:param roles: The roles of this UserDto. # noqa: E501
:type: list[str]
"""
if roles is None:
raise ValueError("Invalid value for `roles`, must not be `None`") # noqa: E501
self._roles = roles
@property
def containers(self):
"""Gets the containers of this UserDto. # noqa: E501
:return: The containers of this UserDto. # noqa: E501
:rtype: list[ContainerDto]
"""
return self._containers
@containers.setter
def containers(self, containers):
"""Sets the containers of this UserDto.
:param containers: The containers of this UserDto. # noqa: E501
:type: list[ContainerDto]
"""
self._containers = containers
@property
def databases(self):
"""Gets the databases of this UserDto. # noqa: E501
:return: The databases of this UserDto. # noqa: E501
:rtype: list[ContainerDto]
"""
return self._databases
@databases.setter
def databases(self, databases):
"""Sets the databases of this UserDto.
:param databases: The databases of this UserDto. # noqa: E501
:type: list[ContainerDto]
"""
self._databases = databases
@property
def identifiers(self):
"""Gets the identifiers of this UserDto. # noqa: E501
:return: The identifiers of this UserDto. # noqa: E501
:rtype: list[ContainerDto]
"""
return self._identifiers
@identifiers.setter
def identifiers(self, identifiers):
"""Sets the identifiers of this UserDto.
:param identifiers: The identifiers of this UserDto. # noqa: E501
:type: list[ContainerDto]
"""
self._identifiers = identifiers
@property
def email(self):
"""Gets the email of this UserDto. # noqa: E501
:return: The email of this UserDto. # noqa: E501
:rtype: str
"""
return self._email
@email.setter
def email(self, email):
"""Sets the email of this UserDto.
:param email: The email of this UserDto. # noqa: E501
:type: str
"""
if email is None:
raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501
self._email = email
@property
def titles_before(self):
"""Gets the titles_before of this UserDto. # noqa: E501
:return: The titles_before of this UserDto. # noqa: E501
:rtype: str
"""
return self._titles_before
@titles_before.setter
def titles_before(self, titles_before):
"""Sets the titles_before of this UserDto.
:param titles_before: The titles_before of this UserDto. # noqa: E501
:type: str
"""
self._titles_before = titles_before
@property
def titles_after(self):
"""Gets the titles_after of this UserDto. # noqa: E501
:return: The titles_after of this UserDto. # noqa: E501
:rtype: str
"""
return self._titles_after
@titles_after.setter
def titles_after(self, titles_after):
"""Sets the titles_after of this UserDto.
:param titles_after: The titles_after of this UserDto. # noqa: E501
:type: str
"""
self._titles_after = titles_after
@property
def theme_dark(self):
"""Gets the theme_dark of this UserDto. # noqa: E501
:return: The theme_dark of this UserDto. # noqa: E501
:rtype: bool
"""
return self._theme_dark
@theme_dark.setter
def theme_dark(self, theme_dark):
"""Sets the theme_dark of this UserDto.
:param theme_dark: The theme_dark of this UserDto. # noqa: E501
:type: bool
"""
if theme_dark is None:
raise ValueError("Invalid value for `theme_dark`, must not be `None`") # noqa: E501
self._theme_dark = theme_dark
@property
def email_verified(self):
"""Gets the email_verified of this UserDto. # noqa: E501
:return: The email_verified of this UserDto. # noqa: E501
:rtype: bool
"""
return self._email_verified
@email_verified.setter
def email_verified(self, email_verified):
"""Sets the email_verified of this UserDto.
:param email_verified: The email_verified of this UserDto. # noqa: E501
:type: bool
"""
if email_verified is None:
raise ValueError("Invalid value for `email_verified`, must not be `None`") # noqa: E501
self._email_verified = email_verified
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(UserDto, 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, UserDto):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other