411 lines
12 KiB
Python
411 lines
12 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 Team(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',
|
|
'name': 'str',
|
|
'user_create_tag': 'int',
|
|
'force_exp_tpl': 'int',
|
|
'force_res_tpl': 'int',
|
|
'created_at': 'str',
|
|
'orgid': 'str',
|
|
'visible': 'int',
|
|
'announcement': 'str',
|
|
'onboarding_email_active': 'int',
|
|
'onboarding_email_body': 'str',
|
|
'onboarding_email_subject': 'str'
|
|
}
|
|
|
|
attribute_map = {
|
|
'id': 'id',
|
|
'name': 'name',
|
|
'user_create_tag': 'user_create_tag',
|
|
'force_exp_tpl': 'force_exp_tpl',
|
|
'force_res_tpl': 'force_res_tpl',
|
|
'created_at': 'created_at',
|
|
'orgid': 'orgid',
|
|
'visible': 'visible',
|
|
'announcement': 'announcement',
|
|
'onboarding_email_active': 'onboarding_email_active',
|
|
'onboarding_email_body': 'onboarding_email_body',
|
|
'onboarding_email_subject': 'onboarding_email_subject'
|
|
}
|
|
|
|
def __init__(self, id=None, name=None, user_create_tag=None, force_exp_tpl=0, force_res_tpl=0, created_at=None, orgid=None, visible=None, announcement=None, onboarding_email_active=None, onboarding_email_body=None, onboarding_email_subject=None): # noqa: E501
|
|
"""Team - a model defined in Swagger""" # noqa: E501
|
|
self._id = None
|
|
self._name = None
|
|
self._user_create_tag = None
|
|
self._force_exp_tpl = None
|
|
self._force_res_tpl = None
|
|
self._created_at = None
|
|
self._orgid = None
|
|
self._visible = None
|
|
self._announcement = None
|
|
self._onboarding_email_active = None
|
|
self._onboarding_email_body = None
|
|
self._onboarding_email_subject = None
|
|
self.discriminator = None
|
|
if id is not None:
|
|
self.id = id
|
|
if name is not None:
|
|
self.name = name
|
|
if user_create_tag is not None:
|
|
self.user_create_tag = user_create_tag
|
|
if force_exp_tpl is not None:
|
|
self.force_exp_tpl = force_exp_tpl
|
|
if force_res_tpl is not None:
|
|
self.force_res_tpl = force_res_tpl
|
|
if created_at is not None:
|
|
self.created_at = created_at
|
|
if orgid is not None:
|
|
self.orgid = orgid
|
|
if visible is not None:
|
|
self.visible = visible
|
|
if announcement is not None:
|
|
self.announcement = announcement
|
|
if onboarding_email_active is not None:
|
|
self.onboarding_email_active = onboarding_email_active
|
|
if onboarding_email_body is not None:
|
|
self.onboarding_email_body = onboarding_email_body
|
|
if onboarding_email_subject is not None:
|
|
self.onboarding_email_subject = onboarding_email_subject
|
|
|
|
@property
|
|
def id(self):
|
|
"""Gets the id of this Team. # noqa: E501
|
|
|
|
|
|
:return: The id of this Team. # noqa: E501
|
|
:rtype: int
|
|
"""
|
|
return self._id
|
|
|
|
@id.setter
|
|
def id(self, id):
|
|
"""Sets the id of this Team.
|
|
|
|
|
|
:param id: The id of this Team. # noqa: E501
|
|
:type: int
|
|
"""
|
|
|
|
self._id = id
|
|
|
|
@property
|
|
def name(self):
|
|
"""Gets the name of this Team. # noqa: E501
|
|
|
|
|
|
:return: The name of this Team. # noqa: E501
|
|
:rtype: str
|
|
"""
|
|
return self._name
|
|
|
|
@name.setter
|
|
def name(self, name):
|
|
"""Sets the name of this Team.
|
|
|
|
|
|
:param name: The name of this Team. # noqa: E501
|
|
:type: str
|
|
"""
|
|
|
|
self._name = name
|
|
|
|
@property
|
|
def user_create_tag(self):
|
|
"""Gets the user_create_tag of this Team. # noqa: E501
|
|
|
|
|
|
:return: The user_create_tag of this Team. # noqa: E501
|
|
:rtype: int
|
|
"""
|
|
return self._user_create_tag
|
|
|
|
@user_create_tag.setter
|
|
def user_create_tag(self, user_create_tag):
|
|
"""Sets the user_create_tag of this Team.
|
|
|
|
|
|
:param user_create_tag: The user_create_tag of this Team. # noqa: E501
|
|
:type: int
|
|
"""
|
|
|
|
self._user_create_tag = user_create_tag
|
|
|
|
@property
|
|
def force_exp_tpl(self):
|
|
"""Gets the force_exp_tpl of this Team. # noqa: E501
|
|
|
|
Binary toggle to force usage of templates. # noqa: E501
|
|
|
|
:return: The force_exp_tpl of this Team. # noqa: E501
|
|
:rtype: int
|
|
"""
|
|
return self._force_exp_tpl
|
|
|
|
@force_exp_tpl.setter
|
|
def force_exp_tpl(self, force_exp_tpl):
|
|
"""Sets the force_exp_tpl of this Team.
|
|
|
|
Binary toggle to force usage of templates. # noqa: E501
|
|
|
|
:param force_exp_tpl: The force_exp_tpl of this Team. # noqa: E501
|
|
:type: int
|
|
"""
|
|
|
|
self._force_exp_tpl = force_exp_tpl
|
|
|
|
@property
|
|
def force_res_tpl(self):
|
|
"""Gets the force_res_tpl of this Team. # noqa: E501
|
|
|
|
Binary toggle to force usage of templates. # noqa: E501
|
|
|
|
:return: The force_res_tpl of this Team. # noqa: E501
|
|
:rtype: int
|
|
"""
|
|
return self._force_res_tpl
|
|
|
|
@force_res_tpl.setter
|
|
def force_res_tpl(self, force_res_tpl):
|
|
"""Sets the force_res_tpl of this Team.
|
|
|
|
Binary toggle to force usage of templates. # noqa: E501
|
|
|
|
:param force_res_tpl: The force_res_tpl of this Team. # noqa: E501
|
|
:type: int
|
|
"""
|
|
|
|
self._force_res_tpl = force_res_tpl
|
|
|
|
@property
|
|
def created_at(self):
|
|
"""Gets the created_at of this Team. # noqa: E501
|
|
|
|
|
|
:return: The created_at of this Team. # noqa: E501
|
|
:rtype: str
|
|
"""
|
|
return self._created_at
|
|
|
|
@created_at.setter
|
|
def created_at(self, created_at):
|
|
"""Sets the created_at of this Team.
|
|
|
|
|
|
:param created_at: The created_at of this Team. # noqa: E501
|
|
:type: str
|
|
"""
|
|
|
|
self._created_at = created_at
|
|
|
|
@property
|
|
def orgid(self):
|
|
"""Gets the orgid of this Team. # noqa: E501
|
|
|
|
|
|
:return: The orgid of this Team. # noqa: E501
|
|
:rtype: str
|
|
"""
|
|
return self._orgid
|
|
|
|
@orgid.setter
|
|
def orgid(self, orgid):
|
|
"""Sets the orgid of this Team.
|
|
|
|
|
|
:param orgid: The orgid of this Team. # noqa: E501
|
|
:type: str
|
|
"""
|
|
|
|
self._orgid = orgid
|
|
|
|
@property
|
|
def visible(self):
|
|
"""Gets the visible of this Team. # noqa: E501
|
|
|
|
|
|
:return: The visible of this Team. # noqa: E501
|
|
:rtype: int
|
|
"""
|
|
return self._visible
|
|
|
|
@visible.setter
|
|
def visible(self, visible):
|
|
"""Sets the visible of this Team.
|
|
|
|
|
|
:param visible: The visible of this Team. # noqa: E501
|
|
:type: int
|
|
"""
|
|
|
|
self._visible = visible
|
|
|
|
@property
|
|
def announcement(self):
|
|
"""Gets the announcement of this Team. # noqa: E501
|
|
|
|
Text shown on top of every page for all users of this team. # noqa: E501
|
|
|
|
:return: The announcement of this Team. # noqa: E501
|
|
:rtype: str
|
|
"""
|
|
return self._announcement
|
|
|
|
@announcement.setter
|
|
def announcement(self, announcement):
|
|
"""Sets the announcement of this Team.
|
|
|
|
Text shown on top of every page for all users of this team. # noqa: E501
|
|
|
|
:param announcement: The announcement of this Team. # noqa: E501
|
|
:type: str
|
|
"""
|
|
|
|
self._announcement = announcement
|
|
|
|
@property
|
|
def onboarding_email_active(self):
|
|
"""Gets the onboarding_email_active of this Team. # noqa: E501
|
|
|
|
Do we send onboarding emails to new users? # noqa: E501
|
|
|
|
:return: The onboarding_email_active of this Team. # noqa: E501
|
|
:rtype: int
|
|
"""
|
|
return self._onboarding_email_active
|
|
|
|
@onboarding_email_active.setter
|
|
def onboarding_email_active(self, onboarding_email_active):
|
|
"""Sets the onboarding_email_active of this Team.
|
|
|
|
Do we send onboarding emails to new users? # noqa: E501
|
|
|
|
:param onboarding_email_active: The onboarding_email_active of this Team. # noqa: E501
|
|
:type: int
|
|
"""
|
|
allowed_values = [0, 1] # noqa: E501
|
|
if onboarding_email_active not in allowed_values:
|
|
raise ValueError(
|
|
"Invalid value for `onboarding_email_active` ({0}), must be one of {1}" # noqa: E501
|
|
.format(onboarding_email_active, allowed_values)
|
|
)
|
|
|
|
self._onboarding_email_active = onboarding_email_active
|
|
|
|
@property
|
|
def onboarding_email_body(self):
|
|
"""Gets the onboarding_email_body of this Team. # noqa: E501
|
|
|
|
|
|
:return: The onboarding_email_body of this Team. # noqa: E501
|
|
:rtype: str
|
|
"""
|
|
return self._onboarding_email_body
|
|
|
|
@onboarding_email_body.setter
|
|
def onboarding_email_body(self, onboarding_email_body):
|
|
"""Sets the onboarding_email_body of this Team.
|
|
|
|
|
|
:param onboarding_email_body: The onboarding_email_body of this Team. # noqa: E501
|
|
:type: str
|
|
"""
|
|
|
|
self._onboarding_email_body = onboarding_email_body
|
|
|
|
@property
|
|
def onboarding_email_subject(self):
|
|
"""Gets the onboarding_email_subject of this Team. # noqa: E501
|
|
|
|
|
|
:return: The onboarding_email_subject of this Team. # noqa: E501
|
|
:rtype: str
|
|
"""
|
|
return self._onboarding_email_subject
|
|
|
|
@onboarding_email_subject.setter
|
|
def onboarding_email_subject(self, onboarding_email_subject):
|
|
"""Sets the onboarding_email_subject of this Team.
|
|
|
|
|
|
:param onboarding_email_subject: The onboarding_email_subject of this Team. # noqa: E501
|
|
:type: str
|
|
"""
|
|
|
|
self._onboarding_email_subject = onboarding_email_subject
|
|
|
|
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(Team, 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, Team):
|
|
return False
|
|
|
|
return self.__dict__ == other.__dict__
|
|
|
|
def __ne__(self, other):
|
|
"""Returns true if both objects are not equal"""
|
|
return not self == other
|