Initial version
This commit is contained in:
@@ -0,0 +1,726 @@
|
||||
# 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 Event(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',
|
||||
'team': 'int',
|
||||
'team_name': 'str',
|
||||
'title': 'str',
|
||||
'title_only': 'str',
|
||||
'book_cancel_minutes': 'int',
|
||||
'book_is_cancellable': 'int',
|
||||
'canbook': 'int',
|
||||
'created_at': 'datetime',
|
||||
'modified_at': 'datetime',
|
||||
'start': 'datetime',
|
||||
'end': 'datetime',
|
||||
'event_duration_minutes': 'int',
|
||||
'userid': 'int',
|
||||
'fullname': 'str',
|
||||
'experiment': 'int',
|
||||
'experiment_title': 'str',
|
||||
'items_id': 'int',
|
||||
'item_title': 'str',
|
||||
'items_category': 'int',
|
||||
'items_category_title': 'str',
|
||||
'item_link': 'int',
|
||||
'item_link_title': 'str',
|
||||
'color': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'id': 'id',
|
||||
'team': 'team',
|
||||
'team_name': 'team_name',
|
||||
'title': 'title',
|
||||
'title_only': 'title_only',
|
||||
'book_cancel_minutes': 'book_cancel_minutes',
|
||||
'book_is_cancellable': 'book_is_cancellable',
|
||||
'canbook': 'canbook',
|
||||
'created_at': 'created_at',
|
||||
'modified_at': 'modified_at',
|
||||
'start': 'start',
|
||||
'end': 'end',
|
||||
'event_duration_minutes': 'event_duration_minutes',
|
||||
'userid': 'userid',
|
||||
'fullname': 'fullname',
|
||||
'experiment': 'experiment',
|
||||
'experiment_title': 'experiment_title',
|
||||
'items_id': 'items_id',
|
||||
'item_title': 'item_title',
|
||||
'items_category': 'items_category',
|
||||
'items_category_title': 'items_category_title',
|
||||
'item_link': 'item_link',
|
||||
'item_link_title': 'item_link_title',
|
||||
'color': 'color'
|
||||
}
|
||||
|
||||
def __init__(self, id=None, team=None, team_name=None, title=None, title_only=None, book_cancel_minutes=None, book_is_cancellable=None, canbook=None, created_at=None, modified_at=None, start=None, end=None, event_duration_minutes=None, userid=None, fullname=None, experiment=None, experiment_title=None, items_id=None, item_title=None, items_category=None, items_category_title=None, item_link=None, item_link_title=None, color=None): # noqa: E501
|
||||
"""Event - a model defined in Swagger""" # noqa: E501
|
||||
self._id = None
|
||||
self._team = None
|
||||
self._team_name = None
|
||||
self._title = None
|
||||
self._title_only = None
|
||||
self._book_cancel_minutes = None
|
||||
self._book_is_cancellable = None
|
||||
self._canbook = None
|
||||
self._created_at = None
|
||||
self._modified_at = None
|
||||
self._start = None
|
||||
self._end = None
|
||||
self._event_duration_minutes = None
|
||||
self._userid = None
|
||||
self._fullname = None
|
||||
self._experiment = None
|
||||
self._experiment_title = None
|
||||
self._items_id = None
|
||||
self._item_title = None
|
||||
self._items_category = None
|
||||
self._items_category_title = None
|
||||
self._item_link = None
|
||||
self._item_link_title = None
|
||||
self._color = None
|
||||
self.discriminator = None
|
||||
if id is not None:
|
||||
self.id = id
|
||||
if team is not None:
|
||||
self.team = team
|
||||
if team_name is not None:
|
||||
self.team_name = team_name
|
||||
if title is not None:
|
||||
self.title = title
|
||||
if title_only is not None:
|
||||
self.title_only = title_only
|
||||
if book_cancel_minutes is not None:
|
||||
self.book_cancel_minutes = book_cancel_minutes
|
||||
if book_is_cancellable is not None:
|
||||
self.book_is_cancellable = book_is_cancellable
|
||||
if canbook is not None:
|
||||
self.canbook = canbook
|
||||
if created_at is not None:
|
||||
self.created_at = created_at
|
||||
if modified_at is not None:
|
||||
self.modified_at = modified_at
|
||||
if start is not None:
|
||||
self.start = start
|
||||
if end is not None:
|
||||
self.end = end
|
||||
if event_duration_minutes is not None:
|
||||
self.event_duration_minutes = event_duration_minutes
|
||||
if userid is not None:
|
||||
self.userid = userid
|
||||
if fullname is not None:
|
||||
self.fullname = fullname
|
||||
if experiment is not None:
|
||||
self.experiment = experiment
|
||||
if experiment_title is not None:
|
||||
self.experiment_title = experiment_title
|
||||
if items_id is not None:
|
||||
self.items_id = items_id
|
||||
if item_title is not None:
|
||||
self.item_title = item_title
|
||||
if items_category is not None:
|
||||
self.items_category = items_category
|
||||
if items_category_title is not None:
|
||||
self.items_category_title = items_category_title
|
||||
if item_link is not None:
|
||||
self.item_link = item_link
|
||||
if item_link_title is not None:
|
||||
self.item_link_title = item_link_title
|
||||
if color is not None:
|
||||
self.color = color
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
"""Gets the id of this Event. # noqa: E501
|
||||
|
||||
|
||||
:return: The id of this Event. # noqa: E501
|
||||
:rtype: int
|
||||
"""
|
||||
return self._id
|
||||
|
||||
@id.setter
|
||||
def id(self, id):
|
||||
"""Sets the id of this Event.
|
||||
|
||||
|
||||
:param id: The id of this Event. # noqa: E501
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._id = id
|
||||
|
||||
@property
|
||||
def team(self):
|
||||
"""Gets the team of this Event. # noqa: E501
|
||||
|
||||
|
||||
:return: The team of this Event. # noqa: E501
|
||||
:rtype: int
|
||||
"""
|
||||
return self._team
|
||||
|
||||
@team.setter
|
||||
def team(self, team):
|
||||
"""Sets the team of this Event.
|
||||
|
||||
|
||||
:param team: The team of this Event. # noqa: E501
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._team = team
|
||||
|
||||
@property
|
||||
def team_name(self):
|
||||
"""Gets the team_name of this Event. # noqa: E501
|
||||
|
||||
|
||||
:return: The team_name of this Event. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._team_name
|
||||
|
||||
@team_name.setter
|
||||
def team_name(self, team_name):
|
||||
"""Sets the team_name of this Event.
|
||||
|
||||
|
||||
:param team_name: The team_name of this Event. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._team_name = team_name
|
||||
|
||||
@property
|
||||
def title(self):
|
||||
"""Gets the title of this Event. # noqa: E501
|
||||
|
||||
Optional comment added to the event # noqa: E501
|
||||
|
||||
:return: The title of this Event. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._title
|
||||
|
||||
@title.setter
|
||||
def title(self, title):
|
||||
"""Sets the title of this Event.
|
||||
|
||||
Optional comment added to the event # noqa: E501
|
||||
|
||||
:param title: The title of this Event. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._title = title
|
||||
|
||||
@property
|
||||
def title_only(self):
|
||||
"""Gets the title_only of this Event. # noqa: E501
|
||||
|
||||
Title of the event. # noqa: E501
|
||||
|
||||
:return: The title_only of this Event. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._title_only
|
||||
|
||||
@title_only.setter
|
||||
def title_only(self, title_only):
|
||||
"""Sets the title_only of this Event.
|
||||
|
||||
Title of the event. # noqa: E501
|
||||
|
||||
:param title_only: The title_only of this Event. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._title_only = title_only
|
||||
|
||||
@property
|
||||
def book_cancel_minutes(self):
|
||||
"""Gets the book_cancel_minutes of this Event. # noqa: E501
|
||||
|
||||
Minutes before start when cancellation is allowed # noqa: E501
|
||||
|
||||
:return: The book_cancel_minutes of this Event. # noqa: E501
|
||||
:rtype: int
|
||||
"""
|
||||
return self._book_cancel_minutes
|
||||
|
||||
@book_cancel_minutes.setter
|
||||
def book_cancel_minutes(self, book_cancel_minutes):
|
||||
"""Sets the book_cancel_minutes of this Event.
|
||||
|
||||
Minutes before start when cancellation is allowed # noqa: E501
|
||||
|
||||
:param book_cancel_minutes: The book_cancel_minutes of this Event. # noqa: E501
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._book_cancel_minutes = book_cancel_minutes
|
||||
|
||||
@property
|
||||
def book_is_cancellable(self):
|
||||
"""Gets the book_is_cancellable of this Event. # noqa: E501
|
||||
|
||||
Whether the booking can be cancelled (1 = yes, 0 = no) # noqa: E501
|
||||
|
||||
:return: The book_is_cancellable of this Event. # noqa: E501
|
||||
:rtype: int
|
||||
"""
|
||||
return self._book_is_cancellable
|
||||
|
||||
@book_is_cancellable.setter
|
||||
def book_is_cancellable(self, book_is_cancellable):
|
||||
"""Sets the book_is_cancellable of this Event.
|
||||
|
||||
Whether the booking can be cancelled (1 = yes, 0 = no) # noqa: E501
|
||||
|
||||
:param book_is_cancellable: The book_is_cancellable of this Event. # noqa: E501
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._book_is_cancellable = book_is_cancellable
|
||||
|
||||
@property
|
||||
def canbook(self):
|
||||
"""Gets the canbook of this Event. # noqa: E501
|
||||
|
||||
Whether the event is bookable (1 = yes, 0 = no) # noqa: E501
|
||||
|
||||
:return: The canbook of this Event. # noqa: E501
|
||||
:rtype: int
|
||||
"""
|
||||
return self._canbook
|
||||
|
||||
@canbook.setter
|
||||
def canbook(self, canbook):
|
||||
"""Sets the canbook of this Event.
|
||||
|
||||
Whether the event is bookable (1 = yes, 0 = no) # noqa: E501
|
||||
|
||||
:param canbook: The canbook of this Event. # noqa: E501
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._canbook = canbook
|
||||
|
||||
@property
|
||||
def created_at(self):
|
||||
"""Gets the created_at of this Event. # noqa: E501
|
||||
|
||||
|
||||
:return: The created_at of this Event. # noqa: E501
|
||||
:rtype: datetime
|
||||
"""
|
||||
return self._created_at
|
||||
|
||||
@created_at.setter
|
||||
def created_at(self, created_at):
|
||||
"""Sets the created_at of this Event.
|
||||
|
||||
|
||||
:param created_at: The created_at of this Event. # noqa: E501
|
||||
:type: datetime
|
||||
"""
|
||||
|
||||
self._created_at = created_at
|
||||
|
||||
@property
|
||||
def modified_at(self):
|
||||
"""Gets the modified_at of this Event. # noqa: E501
|
||||
|
||||
|
||||
:return: The modified_at of this Event. # noqa: E501
|
||||
:rtype: datetime
|
||||
"""
|
||||
return self._modified_at
|
||||
|
||||
@modified_at.setter
|
||||
def modified_at(self, modified_at):
|
||||
"""Sets the modified_at of this Event.
|
||||
|
||||
|
||||
:param modified_at: The modified_at of this Event. # noqa: E501
|
||||
:type: datetime
|
||||
"""
|
||||
|
||||
self._modified_at = modified_at
|
||||
|
||||
@property
|
||||
def start(self):
|
||||
"""Gets the start of this Event. # noqa: E501
|
||||
|
||||
|
||||
:return: The start of this Event. # noqa: E501
|
||||
:rtype: datetime
|
||||
"""
|
||||
return self._start
|
||||
|
||||
@start.setter
|
||||
def start(self, start):
|
||||
"""Sets the start of this Event.
|
||||
|
||||
|
||||
:param start: The start of this Event. # noqa: E501
|
||||
:type: datetime
|
||||
"""
|
||||
|
||||
self._start = start
|
||||
|
||||
@property
|
||||
def end(self):
|
||||
"""Gets the end of this Event. # noqa: E501
|
||||
|
||||
|
||||
:return: The end of this Event. # noqa: E501
|
||||
:rtype: datetime
|
||||
"""
|
||||
return self._end
|
||||
|
||||
@end.setter
|
||||
def end(self, end):
|
||||
"""Sets the end of this Event.
|
||||
|
||||
|
||||
:param end: The end of this Event. # noqa: E501
|
||||
:type: datetime
|
||||
"""
|
||||
|
||||
self._end = end
|
||||
|
||||
@property
|
||||
def event_duration_minutes(self):
|
||||
"""Gets the event_duration_minutes of this Event. # noqa: E501
|
||||
|
||||
|
||||
:return: The event_duration_minutes of this Event. # noqa: E501
|
||||
:rtype: int
|
||||
"""
|
||||
return self._event_duration_minutes
|
||||
|
||||
@event_duration_minutes.setter
|
||||
def event_duration_minutes(self, event_duration_minutes):
|
||||
"""Sets the event_duration_minutes of this Event.
|
||||
|
||||
|
||||
:param event_duration_minutes: The event_duration_minutes of this Event. # noqa: E501
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._event_duration_minutes = event_duration_minutes
|
||||
|
||||
@property
|
||||
def userid(self):
|
||||
"""Gets the userid of this Event. # noqa: E501
|
||||
|
||||
|
||||
:return: The userid of this Event. # noqa: E501
|
||||
:rtype: int
|
||||
"""
|
||||
return self._userid
|
||||
|
||||
@userid.setter
|
||||
def userid(self, userid):
|
||||
"""Sets the userid of this Event.
|
||||
|
||||
|
||||
:param userid: The userid of this Event. # noqa: E501
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._userid = userid
|
||||
|
||||
@property
|
||||
def fullname(self):
|
||||
"""Gets the fullname of this Event. # noqa: E501
|
||||
|
||||
Full name of the user who created the event. # noqa: E501
|
||||
|
||||
:return: The fullname of this Event. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._fullname
|
||||
|
||||
@fullname.setter
|
||||
def fullname(self, fullname):
|
||||
"""Sets the fullname of this Event.
|
||||
|
||||
Full name of the user who created the event. # noqa: E501
|
||||
|
||||
:param fullname: The fullname of this Event. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._fullname = fullname
|
||||
|
||||
@property
|
||||
def experiment(self):
|
||||
"""Gets the experiment of this Event. # noqa: E501
|
||||
|
||||
|
||||
:return: The experiment of this Event. # noqa: E501
|
||||
:rtype: int
|
||||
"""
|
||||
return self._experiment
|
||||
|
||||
@experiment.setter
|
||||
def experiment(self, experiment):
|
||||
"""Sets the experiment of this Event.
|
||||
|
||||
|
||||
:param experiment: The experiment of this Event. # noqa: E501
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._experiment = experiment
|
||||
|
||||
@property
|
||||
def experiment_title(self):
|
||||
"""Gets the experiment_title of this Event. # noqa: E501
|
||||
|
||||
The experiment that has been bound to the event. # noqa: E501
|
||||
|
||||
:return: The experiment_title of this Event. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._experiment_title
|
||||
|
||||
@experiment_title.setter
|
||||
def experiment_title(self, experiment_title):
|
||||
"""Sets the experiment_title of this Event.
|
||||
|
||||
The experiment that has been bound to the event. # noqa: E501
|
||||
|
||||
:param experiment_title: The experiment_title of this Event. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._experiment_title = experiment_title
|
||||
|
||||
@property
|
||||
def items_id(self):
|
||||
"""Gets the items_id of this Event. # noqa: E501
|
||||
|
||||
ID of the Resource being booked # noqa: E501
|
||||
|
||||
:return: The items_id of this Event. # noqa: E501
|
||||
:rtype: int
|
||||
"""
|
||||
return self._items_id
|
||||
|
||||
@items_id.setter
|
||||
def items_id(self, items_id):
|
||||
"""Sets the items_id of this Event.
|
||||
|
||||
ID of the Resource being booked # noqa: E501
|
||||
|
||||
:param items_id: The items_id of this Event. # noqa: E501
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._items_id = items_id
|
||||
|
||||
@property
|
||||
def item_title(self):
|
||||
"""Gets the item_title of this Event. # noqa: E501
|
||||
|
||||
|
||||
:return: The item_title of this Event. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._item_title
|
||||
|
||||
@item_title.setter
|
||||
def item_title(self, item_title):
|
||||
"""Sets the item_title of this Event.
|
||||
|
||||
|
||||
:param item_title: The item_title of this Event. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._item_title = item_title
|
||||
|
||||
@property
|
||||
def items_category(self):
|
||||
"""Gets the items_category of this Event. # noqa: E501
|
||||
|
||||
|
||||
:return: The items_category of this Event. # noqa: E501
|
||||
:rtype: int
|
||||
"""
|
||||
return self._items_category
|
||||
|
||||
@items_category.setter
|
||||
def items_category(self, items_category):
|
||||
"""Sets the items_category of this Event.
|
||||
|
||||
|
||||
:param items_category: The items_category of this Event. # noqa: E501
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._items_category = items_category
|
||||
|
||||
@property
|
||||
def items_category_title(self):
|
||||
"""Gets the items_category_title of this Event. # noqa: E501
|
||||
|
||||
|
||||
:return: The items_category_title of this Event. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._items_category_title
|
||||
|
||||
@items_category_title.setter
|
||||
def items_category_title(self, items_category_title):
|
||||
"""Sets the items_category_title of this Event.
|
||||
|
||||
|
||||
:param items_category_title: The items_category_title of this Event. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._items_category_title = items_category_title
|
||||
|
||||
@property
|
||||
def item_link(self):
|
||||
"""Gets the item_link of this Event. # noqa: E501
|
||||
|
||||
|
||||
:return: The item_link of this Event. # noqa: E501
|
||||
:rtype: int
|
||||
"""
|
||||
return self._item_link
|
||||
|
||||
@item_link.setter
|
||||
def item_link(self, item_link):
|
||||
"""Sets the item_link of this Event.
|
||||
|
||||
|
||||
:param item_link: The item_link of this Event. # noqa: E501
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._item_link = item_link
|
||||
|
||||
@property
|
||||
def item_link_title(self):
|
||||
"""Gets the item_link_title of this Event. # noqa: E501
|
||||
|
||||
The item that has been bound to the event. # noqa: E501
|
||||
|
||||
:return: The item_link_title of this Event. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._item_link_title
|
||||
|
||||
@item_link_title.setter
|
||||
def item_link_title(self, item_link_title):
|
||||
"""Sets the item_link_title of this Event.
|
||||
|
||||
The item that has been bound to the event. # noqa: E501
|
||||
|
||||
:param item_link_title: The item_link_title of this Event. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._item_link_title = item_link_title
|
||||
|
||||
@property
|
||||
def color(self):
|
||||
"""Gets the color of this Event. # noqa: E501
|
||||
|
||||
|
||||
:return: The color of this Event. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._color
|
||||
|
||||
@color.setter
|
||||
def color(self, color):
|
||||
"""Sets the color of this Event.
|
||||
|
||||
|
||||
:param color: The color of this Event. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._color = color
|
||||
|
||||
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(Event, 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, Event):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
||||
Reference in New Issue
Block a user