aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_client/models
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-08 16:28:27 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-08 16:28:27 -0800
commit16f2e78298dbd2231f5f337ea17c89a6a131a052 (patch)
tree6e72581e625e73c97cbab72d0f9c35665c99e5d7 /python/fatcat_client/models
parenteb40a5f274f3608db34309cfd16739a7642ef5e7 (diff)
parentffb721f90c5d97ee80885209bf45feb85ca9625c (diff)
downloadfatcat-16f2e78298dbd2231f5f337ea17c89a6a131a052.tar.gz
fatcat-16f2e78298dbd2231f5f337ea17c89a6a131a052.zip
Merge branch 'bnewbold-crude-auth'
Fixed a conflict in: python/fatcat_export.py
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.py194
-rw-r--r--python/fatcat_client/models/auth_oidc_result.py142
-rw-r--r--python/fatcat_client/models/editgroup.py5
-rw-r--r--python/fatcat_client/models/editor.py84
5 files changed, 421 insertions, 6 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..1ee4c429
--- /dev/null
+++ b/python/fatcat_client/models/auth_oidc.py
@@ -0,0 +1,194 @@
+# 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',
+ 'preferred_username': 'str'
+ }
+
+ attribute_map = {
+ 'provider': 'provider',
+ 'sub': 'sub',
+ 'iss': 'iss',
+ 'preferred_username': 'preferred_username'
+ }
+
+ def __init__(self, provider=None, sub=None, iss=None, preferred_username=None): # noqa: E501
+ """AuthOidc - a model defined in Swagger""" # noqa: E501
+
+ self._provider = None
+ self._sub = None
+ self._iss = None
+ self._preferred_username = None
+ self.discriminator = None
+
+ self.provider = provider
+ self.sub = sub
+ self.iss = iss
+ self.preferred_username = preferred_username
+
+ @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
+
+ @property
+ def preferred_username(self):
+ """Gets the preferred_username of this AuthOidc. # noqa: E501
+
+
+ :return: The preferred_username of this AuthOidc. # noqa: E501
+ :rtype: str
+ """
+ return self._preferred_username
+
+ @preferred_username.setter
+ def preferred_username(self, preferred_username):
+ """Sets the preferred_username of this AuthOidc.
+
+
+ :param preferred_username: The preferred_username of this AuthOidc. # noqa: E501
+ :type: str
+ """
+ if preferred_username is None:
+ raise ValueError("Invalid value for `preferred_username`, must not be `None`") # noqa: E501
+
+ self._preferred_username = preferred_username
+
+ 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/editgroup.py b/python/fatcat_client/models/editgroup.py
index 5b1573ed..4c877685 100644
--- a/python/fatcat_client/models/editgroup.py
+++ b/python/fatcat_client/models/editgroup.py
@@ -60,7 +60,8 @@ class Editgroup(object):
if editgroup_id is not None:
self.editgroup_id = editgroup_id
- self.editor_id = editor_id
+ if editor_id is not None:
+ self.editor_id = editor_id
if description is not None:
self.description = description
if extra is not None:
@@ -117,8 +118,6 @@ class Editgroup(object):
:param editor_id: The editor_id of this Editgroup. # noqa: E501
:type: str
"""
- if editor_id is None:
- raise ValueError("Invalid value for `editor_id`, must not be `None`") # noqa: E501
if editor_id is not None and len(editor_id) > 26:
raise ValueError("Invalid value for `editor_id`, length must be less than or equal to `26`") # noqa: E501
if editor_id is not None and len(editor_id) < 26:
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 = {}