summaryrefslogtreecommitdiffstats
path: root/python/fatcat_client/models
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-03 16:53:58 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-03 16:54:09 -0800
commitb66dd55b128758cc929a1633ab6e15f8385873a1 (patch)
treee16b6879b990c5b78b44f16e9fc7a2d2f0331a31 /python/fatcat_client/models
parent39678e1410a06e99ea71655485786caaf5847e7f (diff)
downloadfatcat-b66dd55b128758cc929a1633ab6e15f8385873a1.tar.gz
fatcat-b66dd55b128758cc929a1633ab6e15f8385873a1.zip
python codegen
Diffstat (limited to 'python/fatcat_client/models')
-rw-r--r--python/fatcat_client/models/__init__.py2
-rw-r--r--python/fatcat_client/models/auth_oidc.py167
-rw-r--r--python/fatcat_client/models/auth_oidc_result.py142
-rw-r--r--python/fatcat_client/models/editor.py84
4 files changed, 392 insertions, 3 deletions
diff --git a/python/fatcat_client/models/__init__.py b/python/fatcat_client/models/__init__.py
index f4716d61..ef77b4fd 100644
--- a/python/fatcat_client/models/__init__.py
+++ b/python/fatcat_client/models/__init__.py
@@ -15,6 +15,8 @@
from __future__ import absolute_import
# import models into model package
+from fatcat_client.models.auth_oidc import AuthOidc
+from fatcat_client.models.auth_oidc_result import AuthOidcResult
from fatcat_client.models.changelog_entry import ChangelogEntry
from fatcat_client.models.container_entity import ContainerEntity
from fatcat_client.models.creator_entity import CreatorEntity
diff --git a/python/fatcat_client/models/auth_oidc.py b/python/fatcat_client/models/auth_oidc.py
new file mode 100644
index 00000000..871cc23d
--- /dev/null
+++ b/python/fatcat_client/models/auth_oidc.py
@@ -0,0 +1,167 @@
+# coding: utf-8
+
+"""
+ fatcat
+
+ A scalable, versioned, API-oriented catalog of bibliographic entities and file metadata # noqa: E501
+
+ OpenAPI spec version: 0.1.0
+
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class AuthOidc(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 = {
+ 'provider': 'str',
+ 'sub': 'str',
+ 'iss': 'str'
+ }
+
+ attribute_map = {
+ 'provider': 'provider',
+ 'sub': 'sub',
+ 'iss': 'iss'
+ }
+
+ def __init__(self, provider=None, sub=None, iss=None): # noqa: E501
+ """AuthOidc - a model defined in Swagger""" # noqa: E501
+
+ self._provider = None
+ self._sub = None
+ self._iss = None
+ self.discriminator = None
+
+ self.provider = provider
+ self.sub = sub
+ self.iss = iss
+
+ @property
+ def provider(self):
+ """Gets the provider of this AuthOidc. # noqa: E501
+
+
+ :return: The provider of this AuthOidc. # noqa: E501
+ :rtype: str
+ """
+ return self._provider
+
+ @provider.setter
+ def provider(self, provider):
+ """Sets the provider of this AuthOidc.
+
+
+ :param provider: The provider of this AuthOidc. # noqa: E501
+ :type: str
+ """
+ if provider is None:
+ raise ValueError("Invalid value for `provider`, must not be `None`") # noqa: E501
+
+ self._provider = provider
+
+ @property
+ def sub(self):
+ """Gets the sub of this AuthOidc. # noqa: E501
+
+
+ :return: The sub of this AuthOidc. # noqa: E501
+ :rtype: str
+ """
+ return self._sub
+
+ @sub.setter
+ def sub(self, sub):
+ """Sets the sub of this AuthOidc.
+
+
+ :param sub: The sub of this AuthOidc. # noqa: E501
+ :type: str
+ """
+ if sub is None:
+ raise ValueError("Invalid value for `sub`, must not be `None`") # noqa: E501
+
+ self._sub = sub
+
+ @property
+ def iss(self):
+ """Gets the iss of this AuthOidc. # noqa: E501
+
+
+ :return: The iss of this AuthOidc. # noqa: E501
+ :rtype: str
+ """
+ return self._iss
+
+ @iss.setter
+ def iss(self, iss):
+ """Sets the iss of this AuthOidc.
+
+
+ :param iss: The iss of this AuthOidc. # noqa: E501
+ :type: str
+ """
+ if iss is None:
+ raise ValueError("Invalid value for `iss`, must not be `None`") # noqa: E501
+
+ self._iss = iss
+
+ 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
+
+ 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, AuthOidc):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/python/fatcat_client/models/auth_oidc_result.py b/python/fatcat_client/models/auth_oidc_result.py
new file mode 100644
index 00000000..5e31a574
--- /dev/null
+++ b/python/fatcat_client/models/auth_oidc_result.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ fatcat
+
+ A scalable, versioned, API-oriented catalog of bibliographic entities and file metadata # noqa: E501
+
+ OpenAPI spec version: 0.1.0
+
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from fatcat_client.models.editor import Editor # noqa: F401,E501
+
+
+class AuthOidcResult(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 = {
+ 'editor': 'Editor',
+ 'token': 'str'
+ }
+
+ attribute_map = {
+ 'editor': 'editor',
+ 'token': 'token'
+ }
+
+ def __init__(self, editor=None, token=None): # noqa: E501
+ """AuthOidcResult - a model defined in Swagger""" # noqa: E501
+
+ self._editor = None
+ self._token = None
+ self.discriminator = None
+
+ self.editor = editor
+ self.token = token
+
+ @property
+ def editor(self):
+ """Gets the editor of this AuthOidcResult. # noqa: E501
+
+
+ :return: The editor of this AuthOidcResult. # noqa: E501
+ :rtype: Editor
+ """
+ return self._editor
+
+ @editor.setter
+ def editor(self, editor):
+ """Sets the editor of this AuthOidcResult.
+
+
+ :param editor: The editor of this AuthOidcResult. # noqa: E501
+ :type: Editor
+ """
+ if editor is None:
+ raise ValueError("Invalid value for `editor`, must not be `None`") # noqa: E501
+
+ self._editor = editor
+
+ @property
+ def token(self):
+ """Gets the token of this AuthOidcResult. # noqa: E501
+
+
+ :return: The token of this AuthOidcResult. # noqa: E501
+ :rtype: str
+ """
+ return self._token
+
+ @token.setter
+ def token(self, token):
+ """Sets the token of this AuthOidcResult.
+
+
+ :param token: The token of this AuthOidcResult. # noqa: E501
+ :type: str
+ """
+ if token is None:
+ raise ValueError("Invalid value for `token`, must not be `None`") # noqa: E501
+
+ self._token = token
+
+ 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
+
+ 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, AuthOidcResult):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/python/fatcat_client/models/editor.py b/python/fatcat_client/models/editor.py
index 2010d454..493f5d81 100644
--- a/python/fatcat_client/models/editor.py
+++ b/python/fatcat_client/models/editor.py
@@ -32,24 +32,39 @@ class Editor(object):
"""
swagger_types = {
'editor_id': 'str',
- 'username': 'str'
+ 'username': 'str',
+ 'is_admin': 'bool',
+ 'is_bot': 'bool',
+ 'is_active': 'bool'
}
attribute_map = {
'editor_id': 'editor_id',
- 'username': 'username'
+ 'username': 'username',
+ 'is_admin': 'is_admin',
+ 'is_bot': 'is_bot',
+ 'is_active': 'is_active'
}
- def __init__(self, editor_id=None, username=None): # noqa: E501
+ def __init__(self, editor_id=None, username=None, is_admin=None, is_bot=None, is_active=None): # noqa: E501
"""Editor - a model defined in Swagger""" # noqa: E501
self._editor_id = None
self._username = None
+ self._is_admin = None
+ self._is_bot = None
+ self._is_active = None
self.discriminator = None
if editor_id is not None:
self.editor_id = editor_id
self.username = username
+ if is_admin is not None:
+ self.is_admin = is_admin
+ if is_bot is not None:
+ self.is_bot = is_bot
+ if is_active is not None:
+ self.is_active = is_active
@property
def editor_id(self):
@@ -103,6 +118,69 @@ class Editor(object):
self._username = username
+ @property
+ def is_admin(self):
+ """Gets the is_admin of this Editor. # noqa: E501
+
+
+ :return: The is_admin of this Editor. # noqa: E501
+ :rtype: bool
+ """
+ return self._is_admin
+
+ @is_admin.setter
+ def is_admin(self, is_admin):
+ """Sets the is_admin of this Editor.
+
+
+ :param is_admin: The is_admin of this Editor. # noqa: E501
+ :type: bool
+ """
+
+ self._is_admin = is_admin
+
+ @property
+ def is_bot(self):
+ """Gets the is_bot of this Editor. # noqa: E501
+
+
+ :return: The is_bot of this Editor. # noqa: E501
+ :rtype: bool
+ """
+ return self._is_bot
+
+ @is_bot.setter
+ def is_bot(self, is_bot):
+ """Sets the is_bot of this Editor.
+
+
+ :param is_bot: The is_bot of this Editor. # noqa: E501
+ :type: bool
+ """
+
+ self._is_bot = is_bot
+
+ @property
+ def is_active(self):
+ """Gets the is_active of this Editor. # noqa: E501
+
+
+ :return: The is_active of this Editor. # noqa: E501
+ :rtype: bool
+ """
+ return self._is_active
+
+ @is_active.setter
+ def is_active(self, is_active):
+ """Sets the is_active of this Editor.
+
+
+ :param is_active: The is_active of this Editor. # noqa: E501
+ :type: bool
+ """
+
+ self._is_active = is_active
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}