Initial version

This commit is contained in:
Tom Kasper
2026-08-30 20:44:00 +02:00
commit 9aa2da72b5
612 changed files with 64514 additions and 0 deletions
+292
View File
@@ -0,0 +1,292 @@
# 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 Apikey(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',
'created_at': 'str',
'last_used_at': 'str',
'hash': 'str',
'can_write': 'int',
'team': 'int',
'team_name': 'str'
}
attribute_map = {
'id': 'id',
'name': 'name',
'created_at': 'created_at',
'last_used_at': 'last_used_at',
'hash': 'hash',
'can_write': 'can_write',
'team': 'team',
'team_name': 'team_name'
}
def __init__(self, id=None, name=None, created_at=None, last_used_at=None, hash=None, can_write=None, team=None, team_name=None): # noqa: E501
"""Apikey - a model defined in Swagger""" # noqa: E501
self._id = None
self._name = None
self._created_at = None
self._last_used_at = None
self._hash = None
self._can_write = None
self._team = None
self._team_name = None
self.discriminator = None
if id is not None:
self.id = id
if name is not None:
self.name = name
if created_at is not None:
self.created_at = created_at
if last_used_at is not None:
self.last_used_at = last_used_at
if hash is not None:
self.hash = hash
if can_write is not None:
self.can_write = can_write
if team is not None:
self.team = team
if team_name is not None:
self.team_name = team_name
@property
def id(self):
"""Gets the id of this Apikey. # noqa: E501
:return: The id of this Apikey. # noqa: E501
:rtype: int
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this Apikey.
:param id: The id of this Apikey. # noqa: E501
:type: int
"""
self._id = id
@property
def name(self):
"""Gets the name of this Apikey. # noqa: E501
:return: The name of this Apikey. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this Apikey.
:param name: The name of this Apikey. # noqa: E501
:type: str
"""
self._name = name
@property
def created_at(self):
"""Gets the created_at of this Apikey. # noqa: E501
:return: The created_at of this Apikey. # noqa: E501
:rtype: str
"""
return self._created_at
@created_at.setter
def created_at(self, created_at):
"""Sets the created_at of this Apikey.
:param created_at: The created_at of this Apikey. # noqa: E501
:type: str
"""
self._created_at = created_at
@property
def last_used_at(self):
"""Gets the last_used_at of this Apikey. # noqa: E501
:return: The last_used_at of this Apikey. # noqa: E501
:rtype: str
"""
return self._last_used_at
@last_used_at.setter
def last_used_at(self, last_used_at):
"""Sets the last_used_at of this Apikey.
:param last_used_at: The last_used_at of this Apikey. # noqa: E501
:type: str
"""
self._last_used_at = last_used_at
@property
def hash(self):
"""Gets the hash of this Apikey. # noqa: E501
:return: The hash of this Apikey. # noqa: E501
:rtype: str
"""
return self._hash
@hash.setter
def hash(self, hash):
"""Sets the hash of this Apikey.
:param hash: The hash of this Apikey. # noqa: E501
:type: str
"""
self._hash = hash
@property
def can_write(self):
"""Gets the can_write of this Apikey. # noqa: E501
:return: The can_write of this Apikey. # noqa: E501
:rtype: int
"""
return self._can_write
@can_write.setter
def can_write(self, can_write):
"""Sets the can_write of this Apikey.
:param can_write: The can_write of this Apikey. # noqa: E501
:type: int
"""
self._can_write = can_write
@property
def team(self):
"""Gets the team of this Apikey. # noqa: E501
:return: The team of this Apikey. # noqa: E501
:rtype: int
"""
return self._team
@team.setter
def team(self, team):
"""Sets the team of this Apikey.
:param team: The team of this Apikey. # noqa: E501
:type: int
"""
self._team = team
@property
def team_name(self):
"""Gets the team_name of this Apikey. # noqa: E501
:return: The team_name of this Apikey. # noqa: E501
:rtype: str
"""
return self._team_name
@team_name.setter
def team_name(self, team_name):
"""Sets the team_name of this Apikey.
:param team_name: The team_name of this Apikey. # noqa: E501
:type: str
"""
self._team_name = team_name
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(Apikey, 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, Apikey):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other