# coding: utf-8 """ eLabFTW REST API v2 Documentation This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from elabapi_python.models.entity_editable import EntityEditable # noqa: F401,E501 class Entity(EntityEditable): """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 = { 'access_key': 'str', 'body_html': 'str', 'category_color': 'str', 'category_title': 'str', 'changelog': 'list[Changelog]', 'comments': 'list[Comment]', 'compounds_links': 'list[Compound]', 'created_at': 'str', 'created_from_id': 'int', 'created_from_type': 'int', 'created_from_type_human': 'str', 'elabid': 'str', 'exclusive_edit_mode': 'ExclusiveEditMode', 'experiments_links': 'list[Link]', 'firstname': 'str', 'fullname': 'str', 'hide_main_text': 'int', 'id': 'int', 'items_links': 'list[Link]', 'lastchangeby': 'int', 'lastname': 'str', 'locked': 'int', 'lockedby': 'int', 'locked_at': 'str', 'modified_at': 'str', 'next_step': 'str', 'orcid': 'str', 'page': 'str', 'recent_comment': 'str', 'related_experiments_links': 'list[Link]', 'related_items_links': 'list[Link]', 'sharelink': 'str', 'status_color': 'str', 'status_title': 'str', 'steps': 'list[Step]', 'tags': 'str', 'tags_id': 'str', 'team': 'int', 'timestamped': 'int', 'timestampedby': 'int', 'timestamped_at': 'str', 'type': 'str', 'uploads': 'list[Upload]' } if hasattr(EntityEditable, "swagger_types"): swagger_types.update(EntityEditable.swagger_types) attribute_map = { 'access_key': 'access_key', 'body_html': 'body_html', 'category_color': 'category_color', 'category_title': 'category_title', 'changelog': 'changelog', 'comments': 'comments', 'compounds_links': 'compounds_links', 'created_at': 'created_at', 'created_from_id': 'created_from_id', 'created_from_type': 'created_from_type', 'created_from_type_human': 'created_from_type_human', 'elabid': 'elabid', 'exclusive_edit_mode': 'exclusive_edit_mode', 'experiments_links': 'experiments_links', 'firstname': 'firstname', 'fullname': 'fullname', 'hide_main_text': 'hide_main_text', 'id': 'id', 'items_links': 'items_links', 'lastchangeby': 'lastchangeby', 'lastname': 'lastname', 'locked': 'locked', 'lockedby': 'lockedby', 'locked_at': 'locked_at', 'modified_at': 'modified_at', 'next_step': 'next_step', 'orcid': 'orcid', 'page': 'page', 'recent_comment': 'recent_comment', 'related_experiments_links': 'related_experiments_links', 'related_items_links': 'related_items_links', 'sharelink': 'sharelink', 'status_color': 'status_color', 'status_title': 'status_title', 'steps': 'steps', 'tags': 'tags', 'tags_id': 'tags_id', 'team': 'team', 'timestamped': 'timestamped', 'timestampedby': 'timestampedby', 'timestamped_at': 'timestamped_at', 'type': 'type', 'uploads': 'uploads' } if hasattr(EntityEditable, "attribute_map"): attribute_map.update(EntityEditable.attribute_map) def __init__(self, access_key=None, body_html=None, category_color=None, category_title=None, changelog=None, comments=None, compounds_links=None, created_at=None, created_from_id=None, created_from_type=None, created_from_type_human=None, elabid=None, exclusive_edit_mode=None, experiments_links=None, firstname=None, fullname=None, hide_main_text=None, id=None, items_links=None, lastchangeby=None, lastname=None, locked=None, lockedby=None, locked_at=None, modified_at=None, next_step=None, orcid=None, page=None, recent_comment=None, related_experiments_links=None, related_items_links=None, sharelink=None, status_color=None, status_title=None, steps=None, tags=None, tags_id=None, team=None, timestamped=None, timestampedby=None, timestamped_at=None, type=None, uploads=None, *args, **kwargs): # noqa: E501 """Entity - a model defined in Swagger""" # noqa: E501 self._access_key = None self._body_html = None self._category_color = None self._category_title = None self._changelog = None self._comments = None self._compounds_links = None self._created_at = None self._created_from_id = None self._created_from_type = None self._created_from_type_human = None self._elabid = None self._exclusive_edit_mode = None self._experiments_links = None self._firstname = None self._fullname = None self._hide_main_text = None self._id = None self._items_links = None self._lastchangeby = None self._lastname = None self._locked = None self._lockedby = None self._locked_at = None self._modified_at = None self._next_step = None self._orcid = None self._page = None self._recent_comment = None self._related_experiments_links = None self._related_items_links = None self._sharelink = None self._status_color = None self._status_title = None self._steps = None self._tags = None self._tags_id = None self._team = None self._timestamped = None self._timestampedby = None self._timestamped_at = None self._type = None self._uploads = None self.discriminator = None if access_key is not None: self.access_key = access_key if body_html is not None: self.body_html = body_html if category_color is not None: self.category_color = category_color if category_title is not None: self.category_title = category_title if changelog is not None: self.changelog = changelog if comments is not None: self.comments = comments if compounds_links is not None: self.compounds_links = compounds_links if created_at is not None: self.created_at = created_at if created_from_id is not None: self.created_from_id = created_from_id if created_from_type is not None: self.created_from_type = created_from_type if created_from_type_human is not None: self.created_from_type_human = created_from_type_human if elabid is not None: self.elabid = elabid if exclusive_edit_mode is not None: self.exclusive_edit_mode = exclusive_edit_mode if experiments_links is not None: self.experiments_links = experiments_links if firstname is not None: self.firstname = firstname if fullname is not None: self.fullname = fullname if hide_main_text is not None: self.hide_main_text = hide_main_text if id is not None: self.id = id if items_links is not None: self.items_links = items_links if lastchangeby is not None: self.lastchangeby = lastchangeby if lastname is not None: self.lastname = lastname if locked is not None: self.locked = locked if lockedby is not None: self.lockedby = lockedby if locked_at is not None: self.locked_at = locked_at if modified_at is not None: self.modified_at = modified_at if next_step is not None: self.next_step = next_step if orcid is not None: self.orcid = orcid if page is not None: self.page = page if recent_comment is not None: self.recent_comment = recent_comment if related_experiments_links is not None: self.related_experiments_links = related_experiments_links if related_items_links is not None: self.related_items_links = related_items_links if sharelink is not None: self.sharelink = sharelink if status_color is not None: self.status_color = status_color if status_title is not None: self.status_title = status_title if steps is not None: self.steps = steps if tags is not None: self.tags = tags if tags_id is not None: self.tags_id = tags_id if team is not None: self.team = team if timestamped is not None: self.timestamped = timestamped if timestampedby is not None: self.timestampedby = timestampedby if timestamped_at is not None: self.timestamped_at = timestamped_at if type is not None: self.type = type if uploads is not None: self.uploads = uploads EntityEditable.__init__(self, *args, **kwargs) @property def access_key(self): """Gets the access_key of this Entity. # noqa: E501 :return: The access_key of this Entity. # noqa: E501 :rtype: str """ return self._access_key @access_key.setter def access_key(self, access_key): """Sets the access_key of this Entity. :param access_key: The access_key of this Entity. # noqa: E501 :type: str """ self._access_key = access_key @property def body_html(self): """Gets the body_html of this Entity. # noqa: E501 :return: The body_html of this Entity. # noqa: E501 :rtype: str """ return self._body_html @body_html.setter def body_html(self, body_html): """Sets the body_html of this Entity. :param body_html: The body_html of this Entity. # noqa: E501 :type: str """ self._body_html = body_html @property def category_color(self): """Gets the category_color of this Entity. # noqa: E501 :return: The category_color of this Entity. # noqa: E501 :rtype: str """ return self._category_color @category_color.setter def category_color(self, category_color): """Sets the category_color of this Entity. :param category_color: The category_color of this Entity. # noqa: E501 :type: str """ self._category_color = category_color @property def category_title(self): """Gets the category_title of this Entity. # noqa: E501 :return: The category_title of this Entity. # noqa: E501 :rtype: str """ return self._category_title @category_title.setter def category_title(self, category_title): """Sets the category_title of this Entity. :param category_title: The category_title of this Entity. # noqa: E501 :type: str """ self._category_title = category_title @property def changelog(self): """Gets the changelog of this Entity. # noqa: E501 :return: The changelog of this Entity. # noqa: E501 :rtype: list[Changelog] """ return self._changelog @changelog.setter def changelog(self, changelog): """Sets the changelog of this Entity. :param changelog: The changelog of this Entity. # noqa: E501 :type: list[Changelog] """ self._changelog = changelog @property def comments(self): """Gets the comments of this Entity. # noqa: E501 :return: The comments of this Entity. # noqa: E501 :rtype: list[Comment] """ return self._comments @comments.setter def comments(self, comments): """Sets the comments of this Entity. :param comments: The comments of this Entity. # noqa: E501 :type: list[Comment] """ self._comments = comments @property def compounds_links(self): """Gets the compounds_links of this Entity. # noqa: E501 :return: The compounds_links of this Entity. # noqa: E501 :rtype: list[Compound] """ return self._compounds_links @compounds_links.setter def compounds_links(self, compounds_links): """Sets the compounds_links of this Entity. :param compounds_links: The compounds_links of this Entity. # noqa: E501 :type: list[Compound] """ self._compounds_links = compounds_links @property def created_at(self): """Gets the created_at of this Entity. # noqa: E501 :return: The created_at of this Entity. # noqa: E501 :rtype: str """ return self._created_at @created_at.setter def created_at(self, created_at): """Sets the created_at of this Entity. :param created_at: The created_at of this Entity. # noqa: E501 :type: str """ self._created_at = created_at @property def created_from_id(self): """Gets the created_from_id of this Entity. # noqa: E501 Id of the template used to create this entry. # noqa: E501 :return: The created_from_id of this Entity. # noqa: E501 :rtype: int """ return self._created_from_id @created_from_id.setter def created_from_id(self, created_from_id): """Sets the created_from_id of this Entity. Id of the template used to create this entry. # noqa: E501 :param created_from_id: The created_from_id of this Entity. # noqa: E501 :type: int """ self._created_from_id = created_from_id @property def created_from_type(self): """Gets the created_from_type of this Entity. # noqa: E501 Type of the entity used to create this entry: template or concrete type if duplicate # noqa: E501 :return: The created_from_type of this Entity. # noqa: E501 :rtype: int """ return self._created_from_type @created_from_type.setter def created_from_type(self, created_from_type): """Sets the created_from_type of this Entity. Type of the entity used to create this entry: template or concrete type if duplicate # noqa: E501 :param created_from_type: The created_from_type of this Entity. # noqa: E501 :type: int """ self._created_from_type = created_from_type @property def created_from_type_human(self): """Gets the created_from_type_human of this Entity. # noqa: E501 Human readable version of created_from_type integer. # noqa: E501 :return: The created_from_type_human of this Entity. # noqa: E501 :rtype: str """ return self._created_from_type_human @created_from_type_human.setter def created_from_type_human(self, created_from_type_human): """Sets the created_from_type_human of this Entity. Human readable version of created_from_type integer. # noqa: E501 :param created_from_type_human: The created_from_type_human of this Entity. # noqa: E501 :type: str """ self._created_from_type_human = created_from_type_human @property def elabid(self): """Gets the elabid of this Entity. # noqa: E501 :return: The elabid of this Entity. # noqa: E501 :rtype: str """ return self._elabid @elabid.setter def elabid(self, elabid): """Sets the elabid of this Entity. :param elabid: The elabid of this Entity. # noqa: E501 :type: str """ self._elabid = elabid @property def exclusive_edit_mode(self): """Gets the exclusive_edit_mode of this Entity. # noqa: E501 :return: The exclusive_edit_mode of this Entity. # noqa: E501 :rtype: ExclusiveEditMode """ return self._exclusive_edit_mode @exclusive_edit_mode.setter def exclusive_edit_mode(self, exclusive_edit_mode): """Sets the exclusive_edit_mode of this Entity. :param exclusive_edit_mode: The exclusive_edit_mode of this Entity. # noqa: E501 :type: ExclusiveEditMode """ self._exclusive_edit_mode = exclusive_edit_mode @property def experiments_links(self): """Gets the experiments_links of this Entity. # noqa: E501 :return: The experiments_links of this Entity. # noqa: E501 :rtype: list[Link] """ return self._experiments_links @experiments_links.setter def experiments_links(self, experiments_links): """Sets the experiments_links of this Entity. :param experiments_links: The experiments_links of this Entity. # noqa: E501 :type: list[Link] """ self._experiments_links = experiments_links @property def firstname(self): """Gets the firstname of this Entity. # noqa: E501 :return: The firstname of this Entity. # noqa: E501 :rtype: str """ return self._firstname @firstname.setter def firstname(self, firstname): """Sets the firstname of this Entity. :param firstname: The firstname of this Entity. # noqa: E501 :type: str """ self._firstname = firstname @property def fullname(self): """Gets the fullname of this Entity. # noqa: E501 :return: The fullname of this Entity. # noqa: E501 :rtype: str """ return self._fullname @fullname.setter def fullname(self, fullname): """Sets the fullname of this Entity. :param fullname: The fullname of this Entity. # noqa: E501 :type: str """ self._fullname = fullname @property def hide_main_text(self): """Gets the hide_main_text of this Entity. # noqa: E501 Hide the main text of an entry. When applied to templates, this setting also applies to derived entries. # noqa: E501 :return: The hide_main_text of this Entity. # noqa: E501 :rtype: int """ return self._hide_main_text @hide_main_text.setter def hide_main_text(self, hide_main_text): """Sets the hide_main_text of this Entity. Hide the main text of an entry. When applied to templates, this setting also applies to derived entries. # noqa: E501 :param hide_main_text: The hide_main_text of this Entity. # noqa: E501 :type: int """ allowed_values = [0, 1] # noqa: E501 if hide_main_text not in allowed_values: raise ValueError( "Invalid value for `hide_main_text` ({0}), must be one of {1}" # noqa: E501 .format(hide_main_text, allowed_values) ) self._hide_main_text = hide_main_text @property def id(self): """Gets the id of this Entity. # noqa: E501 :return: The id of this Entity. # noqa: E501 :rtype: int """ return self._id @id.setter def id(self, id): """Sets the id of this Entity. :param id: The id of this Entity. # noqa: E501 :type: int """ self._id = id @property def items_links(self): """Gets the items_links of this Entity. # noqa: E501 :return: The items_links of this Entity. # noqa: E501 :rtype: list[Link] """ return self._items_links @items_links.setter def items_links(self, items_links): """Sets the items_links of this Entity. :param items_links: The items_links of this Entity. # noqa: E501 :type: list[Link] """ self._items_links = items_links @property def lastchangeby(self): """Gets the lastchangeby of this Entity. # noqa: E501 :return: The lastchangeby of this Entity. # noqa: E501 :rtype: int """ return self._lastchangeby @lastchangeby.setter def lastchangeby(self, lastchangeby): """Sets the lastchangeby of this Entity. :param lastchangeby: The lastchangeby of this Entity. # noqa: E501 :type: int """ self._lastchangeby = lastchangeby @property def lastname(self): """Gets the lastname of this Entity. # noqa: E501 :return: The lastname of this Entity. # noqa: E501 :rtype: str """ return self._lastname @lastname.setter def lastname(self, lastname): """Sets the lastname of this Entity. :param lastname: The lastname of this Entity. # noqa: E501 :type: str """ self._lastname = lastname @property def locked(self): """Gets the locked of this Entity. # noqa: E501 :return: The locked of this Entity. # noqa: E501 :rtype: int """ return self._locked @locked.setter def locked(self, locked): """Sets the locked of this Entity. :param locked: The locked of this Entity. # noqa: E501 :type: int """ self._locked = locked @property def lockedby(self): """Gets the lockedby of this Entity. # noqa: E501 :return: The lockedby of this Entity. # noqa: E501 :rtype: int """ return self._lockedby @lockedby.setter def lockedby(self, lockedby): """Sets the lockedby of this Entity. :param lockedby: The lockedby of this Entity. # noqa: E501 :type: int """ self._lockedby = lockedby @property def locked_at(self): """Gets the locked_at of this Entity. # noqa: E501 :return: The locked_at of this Entity. # noqa: E501 :rtype: str """ return self._locked_at @locked_at.setter def locked_at(self, locked_at): """Sets the locked_at of this Entity. :param locked_at: The locked_at of this Entity. # noqa: E501 :type: str """ self._locked_at = locked_at @property def modified_at(self): """Gets the modified_at of this Entity. # noqa: E501 :return: The modified_at of this Entity. # noqa: E501 :rtype: str """ return self._modified_at @modified_at.setter def modified_at(self, modified_at): """Sets the modified_at of this Entity. :param modified_at: The modified_at of this Entity. # noqa: E501 :type: str """ self._modified_at = modified_at @property def next_step(self): """Gets the next_step of this Entity. # noqa: E501 :return: The next_step of this Entity. # noqa: E501 :rtype: str """ return self._next_step @next_step.setter def next_step(self, next_step): """Sets the next_step of this Entity. :param next_step: The next_step of this Entity. # noqa: E501 :type: str """ self._next_step = next_step @property def orcid(self): """Gets the orcid of this Entity. # noqa: E501 :return: The orcid of this Entity. # noqa: E501 :rtype: str """ return self._orcid @orcid.setter def orcid(self, orcid): """Sets the orcid of this Entity. :param orcid: The orcid of this Entity. # noqa: E501 :type: str """ self._orcid = orcid @property def page(self): """Gets the page of this Entity. # noqa: E501 :return: The page of this Entity. # noqa: E501 :rtype: str """ return self._page @page.setter def page(self, page): """Sets the page of this Entity. :param page: The page of this Entity. # noqa: E501 :type: str """ self._page = page @property def recent_comment(self): """Gets the recent_comment of this Entity. # noqa: E501 :return: The recent_comment of this Entity. # noqa: E501 :rtype: str """ return self._recent_comment @recent_comment.setter def recent_comment(self, recent_comment): """Sets the recent_comment of this Entity. :param recent_comment: The recent_comment of this Entity. # noqa: E501 :type: str """ self._recent_comment = recent_comment @property def related_experiments_links(self): """Gets the related_experiments_links of this Entity. # noqa: E501 :return: The related_experiments_links of this Entity. # noqa: E501 :rtype: list[Link] """ return self._related_experiments_links @related_experiments_links.setter def related_experiments_links(self, related_experiments_links): """Sets the related_experiments_links of this Entity. :param related_experiments_links: The related_experiments_links of this Entity. # noqa: E501 :type: list[Link] """ self._related_experiments_links = related_experiments_links @property def related_items_links(self): """Gets the related_items_links of this Entity. # noqa: E501 :return: The related_items_links of this Entity. # noqa: E501 :rtype: list[Link] """ return self._related_items_links @related_items_links.setter def related_items_links(self, related_items_links): """Sets the related_items_links of this Entity. :param related_items_links: The related_items_links of this Entity. # noqa: E501 :type: list[Link] """ self._related_items_links = related_items_links @property def sharelink(self): """Gets the sharelink of this Entity. # noqa: E501 :return: The sharelink of this Entity. # noqa: E501 :rtype: str """ return self._sharelink @sharelink.setter def sharelink(self, sharelink): """Sets the sharelink of this Entity. :param sharelink: The sharelink of this Entity. # noqa: E501 :type: str """ self._sharelink = sharelink @property def status_color(self): """Gets the status_color of this Entity. # noqa: E501 :return: The status_color of this Entity. # noqa: E501 :rtype: str """ return self._status_color @status_color.setter def status_color(self, status_color): """Sets the status_color of this Entity. :param status_color: The status_color of this Entity. # noqa: E501 :type: str """ self._status_color = status_color @property def status_title(self): """Gets the status_title of this Entity. # noqa: E501 :return: The status_title of this Entity. # noqa: E501 :rtype: str """ return self._status_title @status_title.setter def status_title(self, status_title): """Sets the status_title of this Entity. :param status_title: The status_title of this Entity. # noqa: E501 :type: str """ self._status_title = status_title @property def steps(self): """Gets the steps of this Entity. # noqa: E501 :return: The steps of this Entity. # noqa: E501 :rtype: list[Step] """ return self._steps @steps.setter def steps(self, steps): """Sets the steps of this Entity. :param steps: The steps of this Entity. # noqa: E501 :type: list[Step] """ self._steps = steps @property def tags(self): """Gets the tags of this Entity. # noqa: E501 :return: The tags of this Entity. # noqa: E501 :rtype: str """ return self._tags @tags.setter def tags(self, tags): """Sets the tags of this Entity. :param tags: The tags of this Entity. # noqa: E501 :type: str """ self._tags = tags @property def tags_id(self): """Gets the tags_id of this Entity. # noqa: E501 :return: The tags_id of this Entity. # noqa: E501 :rtype: str """ return self._tags_id @tags_id.setter def tags_id(self, tags_id): """Sets the tags_id of this Entity. :param tags_id: The tags_id of this Entity. # noqa: E501 :type: str """ self._tags_id = tags_id @property def team(self): """Gets the team of this Entity. # noqa: E501 :return: The team of this Entity. # noqa: E501 :rtype: int """ return self._team @team.setter def team(self, team): """Sets the team of this Entity. :param team: The team of this Entity. # noqa: E501 :type: int """ self._team = team @property def timestamped(self): """Gets the timestamped of this Entity. # noqa: E501 :return: The timestamped of this Entity. # noqa: E501 :rtype: int """ return self._timestamped @timestamped.setter def timestamped(self, timestamped): """Sets the timestamped of this Entity. :param timestamped: The timestamped of this Entity. # noqa: E501 :type: int """ self._timestamped = timestamped @property def timestampedby(self): """Gets the timestampedby of this Entity. # noqa: E501 :return: The timestampedby of this Entity. # noqa: E501 :rtype: int """ return self._timestampedby @timestampedby.setter def timestampedby(self, timestampedby): """Sets the timestampedby of this Entity. :param timestampedby: The timestampedby of this Entity. # noqa: E501 :type: int """ self._timestampedby = timestampedby @property def timestamped_at(self): """Gets the timestamped_at of this Entity. # noqa: E501 :return: The timestamped_at of this Entity. # noqa: E501 :rtype: str """ return self._timestamped_at @timestamped_at.setter def timestamped_at(self, timestamped_at): """Sets the timestamped_at of this Entity. :param timestamped_at: The timestamped_at of this Entity. # noqa: E501 :type: str """ self._timestamped_at = timestamped_at @property def type(self): """Gets the type of this Entity. # noqa: E501 :return: The type of this Entity. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this Entity. :param type: The type of this Entity. # noqa: E501 :type: str """ self._type = type @property def uploads(self): """Gets the uploads of this Entity. # noqa: E501 :return: The uploads of this Entity. # noqa: E501 :rtype: list[Upload] """ return self._uploads @uploads.setter def uploads(self, uploads): """Sets the uploads of this Entity. :param uploads: The uploads of this Entity. # noqa: E501 :type: list[Upload] """ self._uploads = uploads 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(Entity, 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, Entity): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other