345 lines
8.5 KiB
Python
345 lines
8.5 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 Comment(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',
|
|
'created_at': 'str',
|
|
'item_id': 'int',
|
|
'comment': 'str',
|
|
'userid': 'int',
|
|
'modified_at': 'str',
|
|
'fullname': 'str',
|
|
'firstname': 'str',
|
|
'lastname': 'str',
|
|
'orcid': 'str'
|
|
}
|
|
|
|
attribute_map = {
|
|
'id': 'id',
|
|
'created_at': 'created_at',
|
|
'item_id': 'item_id',
|
|
'comment': 'comment',
|
|
'userid': 'userid',
|
|
'modified_at': 'modified_at',
|
|
'fullname': 'fullname',
|
|
'firstname': 'firstname',
|
|
'lastname': 'lastname',
|
|
'orcid': 'orcid'
|
|
}
|
|
|
|
def __init__(self, id=None, created_at=None, item_id=None, comment=None, userid=None, modified_at=None, fullname=None, firstname=None, lastname=None, orcid=None): # noqa: E501
|
|
"""Comment - a model defined in Swagger""" # noqa: E501
|
|
self._id = None
|
|
self._created_at = None
|
|
self._item_id = None
|
|
self._comment = None
|
|
self._userid = None
|
|
self._modified_at = None
|
|
self._fullname = None
|
|
self._firstname = None
|
|
self._lastname = None
|
|
self._orcid = None
|
|
self.discriminator = None
|
|
if id is not None:
|
|
self.id = id
|
|
if created_at is not None:
|
|
self.created_at = created_at
|
|
if item_id is not None:
|
|
self.item_id = item_id
|
|
if comment is not None:
|
|
self.comment = comment
|
|
if userid is not None:
|
|
self.userid = userid
|
|
if modified_at is not None:
|
|
self.modified_at = modified_at
|
|
if fullname is not None:
|
|
self.fullname = fullname
|
|
if firstname is not None:
|
|
self.firstname = firstname
|
|
if lastname is not None:
|
|
self.lastname = lastname
|
|
if orcid is not None:
|
|
self.orcid = orcid
|
|
|
|
@property
|
|
def id(self):
|
|
"""Gets the id of this Comment. # noqa: E501
|
|
|
|
|
|
:return: The id of this Comment. # noqa: E501
|
|
:rtype: int
|
|
"""
|
|
return self._id
|
|
|
|
@id.setter
|
|
def id(self, id):
|
|
"""Sets the id of this Comment.
|
|
|
|
|
|
:param id: The id of this Comment. # noqa: E501
|
|
:type: int
|
|
"""
|
|
|
|
self._id = id
|
|
|
|
@property
|
|
def created_at(self):
|
|
"""Gets the created_at of this Comment. # noqa: E501
|
|
|
|
|
|
:return: The created_at of this Comment. # noqa: E501
|
|
:rtype: str
|
|
"""
|
|
return self._created_at
|
|
|
|
@created_at.setter
|
|
def created_at(self, created_at):
|
|
"""Sets the created_at of this Comment.
|
|
|
|
|
|
:param created_at: The created_at of this Comment. # noqa: E501
|
|
:type: str
|
|
"""
|
|
|
|
self._created_at = created_at
|
|
|
|
@property
|
|
def item_id(self):
|
|
"""Gets the item_id of this Comment. # noqa: E501
|
|
|
|
|
|
:return: The item_id of this Comment. # noqa: E501
|
|
:rtype: int
|
|
"""
|
|
return self._item_id
|
|
|
|
@item_id.setter
|
|
def item_id(self, item_id):
|
|
"""Sets the item_id of this Comment.
|
|
|
|
|
|
:param item_id: The item_id of this Comment. # noqa: E501
|
|
:type: int
|
|
"""
|
|
|
|
self._item_id = item_id
|
|
|
|
@property
|
|
def comment(self):
|
|
"""Gets the comment of this Comment. # noqa: E501
|
|
|
|
|
|
:return: The comment of this Comment. # noqa: E501
|
|
:rtype: str
|
|
"""
|
|
return self._comment
|
|
|
|
@comment.setter
|
|
def comment(self, comment):
|
|
"""Sets the comment of this Comment.
|
|
|
|
|
|
:param comment: The comment of this Comment. # noqa: E501
|
|
:type: str
|
|
"""
|
|
|
|
self._comment = comment
|
|
|
|
@property
|
|
def userid(self):
|
|
"""Gets the userid of this Comment. # noqa: E501
|
|
|
|
|
|
:return: The userid of this Comment. # noqa: E501
|
|
:rtype: int
|
|
"""
|
|
return self._userid
|
|
|
|
@userid.setter
|
|
def userid(self, userid):
|
|
"""Sets the userid of this Comment.
|
|
|
|
|
|
:param userid: The userid of this Comment. # noqa: E501
|
|
:type: int
|
|
"""
|
|
|
|
self._userid = userid
|
|
|
|
@property
|
|
def modified_at(self):
|
|
"""Gets the modified_at of this Comment. # noqa: E501
|
|
|
|
|
|
:return: The modified_at of this Comment. # noqa: E501
|
|
:rtype: str
|
|
"""
|
|
return self._modified_at
|
|
|
|
@modified_at.setter
|
|
def modified_at(self, modified_at):
|
|
"""Sets the modified_at of this Comment.
|
|
|
|
|
|
:param modified_at: The modified_at of this Comment. # noqa: E501
|
|
:type: str
|
|
"""
|
|
|
|
self._modified_at = modified_at
|
|
|
|
@property
|
|
def fullname(self):
|
|
"""Gets the fullname of this Comment. # noqa: E501
|
|
|
|
|
|
:return: The fullname of this Comment. # noqa: E501
|
|
:rtype: str
|
|
"""
|
|
return self._fullname
|
|
|
|
@fullname.setter
|
|
def fullname(self, fullname):
|
|
"""Sets the fullname of this Comment.
|
|
|
|
|
|
:param fullname: The fullname of this Comment. # noqa: E501
|
|
:type: str
|
|
"""
|
|
|
|
self._fullname = fullname
|
|
|
|
@property
|
|
def firstname(self):
|
|
"""Gets the firstname of this Comment. # noqa: E501
|
|
|
|
|
|
:return: The firstname of this Comment. # noqa: E501
|
|
:rtype: str
|
|
"""
|
|
return self._firstname
|
|
|
|
@firstname.setter
|
|
def firstname(self, firstname):
|
|
"""Sets the firstname of this Comment.
|
|
|
|
|
|
:param firstname: The firstname of this Comment. # noqa: E501
|
|
:type: str
|
|
"""
|
|
|
|
self._firstname = firstname
|
|
|
|
@property
|
|
def lastname(self):
|
|
"""Gets the lastname of this Comment. # noqa: E501
|
|
|
|
|
|
:return: The lastname of this Comment. # noqa: E501
|
|
:rtype: str
|
|
"""
|
|
return self._lastname
|
|
|
|
@lastname.setter
|
|
def lastname(self, lastname):
|
|
"""Sets the lastname of this Comment.
|
|
|
|
|
|
:param lastname: The lastname of this Comment. # noqa: E501
|
|
:type: str
|
|
"""
|
|
|
|
self._lastname = lastname
|
|
|
|
@property
|
|
def orcid(self):
|
|
"""Gets the orcid of this Comment. # noqa: E501
|
|
|
|
|
|
:return: The orcid of this Comment. # noqa: E501
|
|
:rtype: str
|
|
"""
|
|
return self._orcid
|
|
|
|
@orcid.setter
|
|
def orcid(self, orcid):
|
|
"""Sets the orcid of this Comment.
|
|
|
|
|
|
:param orcid: The orcid of this Comment. # noqa: E501
|
|
:type: str
|
|
"""
|
|
|
|
self._orcid = orcid
|
|
|
|
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(Comment, 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, Comment):
|
|
return False
|
|
|
|
return self.__dict__ == other.__dict__
|
|
|
|
def __ne__(self, other):
|
|
"""Returns true if both objects are not equal"""
|
|
return not self == other
|