Files
2026-08-30 20:44:00 +02:00

423 lines
11 KiB
Python

# 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
class Link(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 = {
'entityid': 'int',
'title': 'str',
'is_bookable': 'int',
'link_state': 'int',
'category_id': 'int',
'category_color': 'str',
'category_title': 'str',
'status_id': 'int',
'status_color': 'str',
'status_title': 'str',
'custom_id': 'int',
'page': 'str',
'type': 'str'
}
attribute_map = {
'entityid': 'entityid',
'title': 'title',
'is_bookable': 'is_bookable',
'link_state': 'link_state',
'category_id': 'category_id',
'category_color': 'category_color',
'category_title': 'category_title',
'status_id': 'status_id',
'status_color': 'status_color',
'status_title': 'status_title',
'custom_id': 'custom_id',
'page': 'page',
'type': 'type'
}
def __init__(self, entityid=None, title=None, is_bookable=None, link_state=None, category_id=None, category_color=None, category_title=None, status_id=None, status_color=None, status_title=None, custom_id=None, page=None, type=None): # noqa: E501
"""Link - a model defined in Swagger""" # noqa: E501
self._entityid = None
self._title = None
self._is_bookable = None
self._link_state = None
self._category_id = None
self._category_color = None
self._category_title = None
self._status_id = None
self._status_color = None
self._status_title = None
self._custom_id = None
self._page = None
self._type = None
self.discriminator = None
if entityid is not None:
self.entityid = entityid
if title is not None:
self.title = title
if is_bookable is not None:
self.is_bookable = is_bookable
if link_state is not None:
self.link_state = link_state
if category_id is not None:
self.category_id = category_id
if category_color is not None:
self.category_color = category_color
if category_title is not None:
self.category_title = category_title
if status_id is not None:
self.status_id = status_id
if status_color is not None:
self.status_color = status_color
if status_title is not None:
self.status_title = status_title
if custom_id is not None:
self.custom_id = custom_id
if page is not None:
self.page = page
if type is not None:
self.type = type
@property
def entityid(self):
"""Gets the entityid of this Link. # noqa: E501
:return: The entityid of this Link. # noqa: E501
:rtype: int
"""
return self._entityid
@entityid.setter
def entityid(self, entityid):
"""Sets the entityid of this Link.
:param entityid: The entityid of this Link. # noqa: E501
:type: int
"""
self._entityid = entityid
@property
def title(self):
"""Gets the title of this Link. # noqa: E501
:return: The title of this Link. # noqa: E501
:rtype: str
"""
return self._title
@title.setter
def title(self, title):
"""Sets the title of this Link.
:param title: The title of this Link. # noqa: E501
:type: str
"""
self._title = title
@property
def is_bookable(self):
"""Gets the is_bookable of this Link. # noqa: E501
:return: The is_bookable of this Link. # noqa: E501
:rtype: int
"""
return self._is_bookable
@is_bookable.setter
def is_bookable(self, is_bookable):
"""Sets the is_bookable of this Link.
:param is_bookable: The is_bookable of this Link. # noqa: E501
:type: int
"""
self._is_bookable = is_bookable
@property
def link_state(self):
"""Gets the link_state of this Link. # noqa: E501
:return: The link_state of this Link. # noqa: E501
:rtype: int
"""
return self._link_state
@link_state.setter
def link_state(self, link_state):
"""Sets the link_state of this Link.
:param link_state: The link_state of this Link. # noqa: E501
:type: int
"""
self._link_state = link_state
@property
def category_id(self):
"""Gets the category_id of this Link. # noqa: E501
:return: The category_id of this Link. # noqa: E501
:rtype: int
"""
return self._category_id
@category_id.setter
def category_id(self, category_id):
"""Sets the category_id of this Link.
:param category_id: The category_id of this Link. # noqa: E501
:type: int
"""
self._category_id = category_id
@property
def category_color(self):
"""Gets the category_color of this Link. # noqa: E501
:return: The category_color of this Link. # noqa: E501
:rtype: str
"""
return self._category_color
@category_color.setter
def category_color(self, category_color):
"""Sets the category_color of this Link.
:param category_color: The category_color of this Link. # noqa: E501
:type: str
"""
self._category_color = category_color
@property
def category_title(self):
"""Gets the category_title of this Link. # noqa: E501
:return: The category_title of this Link. # noqa: E501
:rtype: str
"""
return self._category_title
@category_title.setter
def category_title(self, category_title):
"""Sets the category_title of this Link.
:param category_title: The category_title of this Link. # noqa: E501
:type: str
"""
self._category_title = category_title
@property
def status_id(self):
"""Gets the status_id of this Link. # noqa: E501
:return: The status_id of this Link. # noqa: E501
:rtype: int
"""
return self._status_id
@status_id.setter
def status_id(self, status_id):
"""Sets the status_id of this Link.
:param status_id: The status_id of this Link. # noqa: E501
:type: int
"""
self._status_id = status_id
@property
def status_color(self):
"""Gets the status_color of this Link. # noqa: E501
:return: The status_color of this Link. # noqa: E501
:rtype: str
"""
return self._status_color
@status_color.setter
def status_color(self, status_color):
"""Sets the status_color of this Link.
:param status_color: The status_color of this Link. # noqa: E501
:type: str
"""
self._status_color = status_color
@property
def status_title(self):
"""Gets the status_title of this Link. # noqa: E501
:return: The status_title of this Link. # noqa: E501
:rtype: str
"""
return self._status_title
@status_title.setter
def status_title(self, status_title):
"""Sets the status_title of this Link.
:param status_title: The status_title of this Link. # noqa: E501
:type: str
"""
self._status_title = status_title
@property
def custom_id(self):
"""Gets the custom_id of this Link. # noqa: E501
:return: The custom_id of this Link. # noqa: E501
:rtype: int
"""
return self._custom_id
@custom_id.setter
def custom_id(self, custom_id):
"""Sets the custom_id of this Link.
:param custom_id: The custom_id of this Link. # noqa: E501
:type: int
"""
self._custom_id = custom_id
@property
def page(self):
"""Gets the page of this Link. # noqa: E501
:return: The page of this Link. # noqa: E501
:rtype: str
"""
return self._page
@page.setter
def page(self, page):
"""Sets the page of this Link.
:param page: The page of this Link. # noqa: E501
:type: str
"""
self._page = page
@property
def type(self):
"""Gets the type of this Link. # noqa: E501
:return: The type of this Link. # noqa: E501
:rtype: str
"""
return self._type
@type.setter
def type(self, type):
"""Sets the type of this Link.
:param type: The type of this Link. # noqa: E501
:type: str
"""
self._type = type
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(Link, 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, Link):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other